/* Brand fonts, self-hosted (SIL Open Font License 1.1): Inter, Plus Jakarta Sans, JetBrains Mono. Latin subset. */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(/brand/fonts/Inter.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url(/brand/fonts/JetBrainsMono.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url(/brand/fonts/PlusJakartaSans.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ============================================================================
   SequBanking brand layer — shared, byte-for-byte, by bank.sequspace.com and
   studio-bank.sequspace.com. Tokens are the SequSpace standard verbatim
   (common-ui/seq-theme.css + styles/global.css): ivory light, gradient-glass dark.
   Colour rule: no blue/red/pink/violet text, borders or bullets. Blue lives only in
   the brand gradient. Errors are shown in deep orange, never red.
   ========================================================================== */
:root {
  /* surfaces — light off-white ivory (seq-theme) */
  --bg-page: #F7F2E7;
  --bg-card: #FFFFFF;
  --bg-soft: #FBF8F1;
  --border: #ECE6D8;
  /* text */
  --text-primary: #1A1714;
  --text-secondary: #4A4138;
  --text-muted: #6C6357;
  /* brand (theme-independent) */
  --accent: #0F766E;
  --accent-2: #14B8A6;
  --accent-amber: #F59E0B;
  --gradient-brand: linear-gradient(135deg, #1E40AF 0%, #14B8A6 55%, #F59E0B 100%);
  --gradient-cta: linear-gradient(135deg, #1E40AF 0%, #14B8A6 100%);
  --icon-tile-bg: rgba(125,130,140,0.10);
  --icon-tile-border: rgba(125,130,140,0.20);
  /* header + page (global.css) */
  --header-bg: #FFFFFF;
  --header-border: #ECE6D8;
  --gradient-bg:
    radial-gradient(ellipse at 50% -20%, rgba(30, 64, 175, 0.05) 0%, transparent 55%),
    radial-gradient(ellipse at 90% 110%, rgba(245, 158, 11, 0.04) 0%, transparent 50%),
    linear-gradient(180deg, #FBF8F1 0%, #F7F2E7 100%);
  /* status (colors.ts signal family; red replaced by deep orange per the colour rule) */
  --ok: #047857;   --ok-bg: #D1FAE5;
  --warn: #92400E; --warn-bg: #FEF3C7;
  --bad: #9A3412;  --bad-bg: #FFEDD5;
  --info: #0F766E; --info-bg: #CCFBF1;
  /* shape + type (radius.ts, shadows.ts, fontTheme.ts) */
  --radius-sm: 8px; --radius: 12px; --radius-lg: 16px;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  --shadow-cta: 0 4px 18px rgba(20, 184, 166, 0.3);
  --focus: 0 0 0 3px rgba(20, 184, 166, 0.25);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'JetBrains Mono', 'SFMono-Regular', Menlo, Consolas, monospace;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg-page: #0B1220;
  --bg-card: rgba(255,255,255,0.06);
  --bg-soft: rgba(255,255,255,0.04);
  --border: rgba(255,255,255,0.12);
  --text-primary: #F6F8FB;
  --text-secondary: #E8EEF6;
  --text-muted: #AEB9C8;
  --accent: #2DD4BF;
  --icon-tile-bg: rgba(255,255,255,0.10);
  --icon-tile-border: rgba(255,255,255,0.22);
  --header-bg: linear-gradient(180deg, #131C2E 0%, #0E1626 100%);
  --header-border: rgba(255, 255, 255, 0.10);
  --gradient-bg:
    radial-gradient(ellipse at 50% -20%, rgba(96, 165, 250, 0.10) 0%, transparent 55%),
    radial-gradient(ellipse at 88% 8%, rgba(20, 184, 166, 0.08) 0%, transparent 45%),
    radial-gradient(ellipse at 90% 110%, rgba(245, 158, 11, 0.05) 0%, transparent 50%),
    linear-gradient(180deg, #0B1220 0%, #060B16 55%, #020617 100%);
  --ok: #34D399;   --ok-bg: rgba(52,211,153,0.14);
  --warn: #FBBF24; --warn-bg: rgba(251,191,36,0.14);
  --bad: #FDBA74;  --bad-bg: rgba(253,186,116,0.14);
  --info: #2DD4BF; --info-bg: rgba(45,212,191,0.14);
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.22);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.3);
  color-scheme: dark;
}

/* ---- base ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font); font-size: 14.5px; line-height: 1.55;
  color: var(--text-primary); background: var(--gradient-bg, var(--bg-page)); background-attachment: fixed;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); color: var(--text-primary); letter-spacing: -0.01em; }
code, pre, kbd, samp, .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
::placeholder { color: var(--text-muted); opacity: 1; }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 6px; border: 3px solid transparent; background-clip: padding-box; }

/* ---- header: co-brand lock-up  [SequBanking] | [SequSpace] 🍋 -------------- */
.sb-header {
  position: sticky; top: 0; z-index: 20; height: 64px;
  display: flex; align-items: center; gap: 16px; padding: 0 24px;
  background: var(--header-bg); border-bottom: 1px solid var(--header-border);
}
.sb-lockup { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; min-width: 0; }
.sb-lockup .sb-mark { width: 34px; height: 34px; border-radius: 9px; display: block; }
.sb-product { display: flex; flex-direction: column; line-height: 1.1; }
.sb-product b { font-family: var(--font-heading); font-weight: 800; font-size: 18px; letter-spacing: -0.02em; color: var(--text-primary); }
.sb-product b span { background: var(--gradient-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sb-product small { font-size: 11.5px; font-weight: 600; color: var(--text-muted); letter-spacing: 0.02em; }
.sb-divider { width: 2px; height: 30px; background: rgba(117,117,117,0.56); border-radius: 1px; }
.sb-sequspace { height: 26px; width: auto; display: block; }
.sb-sequspace.on-dark { display: none; }
[data-theme="dark"] .sb-sequspace.on-light { display: none; }
[data-theme="dark"] .sb-sequspace.on-dark { display: block; }
.sb-lemon { height: 30px; width: auto; display: block; }
.sb-header .sb-space { flex: 1; }
.sb-user { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-secondary); min-width: 0; }
.sb-user .sb-avatar { width: 32px; height: 32px; border-radius: 10px; background: var(--gradient-cta); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.sb-user .sb-who { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.sb-user .sb-who b { color: var(--text-primary); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.sb-user .sb-who span { font-size: 11.5px; color: var(--text-muted); font-family: var(--mono); }
.sb-icon-btn {
  width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg-card);
  color: var(--text-secondary); display: grid; place-items: center; cursor: pointer; font-size: 16px; flex: none;
}
.sb-theme { display: inline-flex; padding: 3px; gap: 2px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg-soft); flex: none; }
.sb-theme button { border: 0; background: none; font: inherit; font-size: 12.5px; font-weight: 700; color: var(--text-secondary); padding: 6px 12px; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.sb-theme button:hover { color: var(--text-primary); }
[data-theme="light"] .sb-theme [data-theme-set="light"],
[data-theme="dark"] .sb-theme [data-theme-set="dark"] { background: var(--gradient-cta); color: #FFFFFF; box-shadow: 0 2px 10px rgba(20, 184, 166, 0.3); }
.sb-icon-btn:hover { color: var(--text-primary); border-color: var(--accent-2); }
@media (max-width: 760px) {
  .sb-header { padding: 0 12px; gap: 8px; }
  .sb-product small, .sb-user .sb-who { display: none; }
  .sb-sequspace { height: 18px; } .sb-lemon { height: 22px; }
  .sb-divider { height: 22px; }
}
@media (max-width: 520px) {
  .sb-lockup { gap: 8px; }
  .sb-lockup .sb-mark { width: 28px; height: 28px; }
  .sb-product b { font-size: 15px; }
  .sb-sequspace { height: 15px; } .sb-lemon { height: 18px; }
  .sb-header .sb-btn { padding: 7px 10px; font-size: 12.5px; }
  .sb-user .sb-avatar, .sb-icon-btn { width: 30px; height: 30px; }
  .sb-theme button { padding: 5px 8px; font-size: 0; }
  .sb-theme button::first-letter { font-size: 14px; }
}

/* ---- layout: side navigation + main + thin footer ------------------------ */
.sb-app { min-height: 100vh; display: flex; flex-direction: column; max-width: 100vw; overflow-x: clip; }
.sb-header { min-width: 0; }
.sb-header > * { flex-shrink: 0; }
.sb-header .sb-space { flex: 1 1 0; min-width: 0; }
.sb-body { flex: 1; display: grid; grid-template-columns: 252px minmax(0, 1fr); }
.sb-side {
  background: var(--bg-card); border-right: 1px solid var(--border); padding: 16px 12px;
  display: flex; flex-direction: column; gap: 2px; position: sticky; top: 64px; height: calc(100vh - 64px); overflow-y: auto;
}
[data-theme="dark"] .sb-side { backdrop-filter: blur(16px) saturate(150%); -webkit-backdrop-filter: blur(16px) saturate(150%); }
.sb-group { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); padding: 14px 12px 6px; }
.sb-group:first-child { padding-top: 4px; }
.sb-nav {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border-radius: 10px; border: 0;
  background: none; color: var(--text-secondary); font: inherit; font-size: 13.5px; font-weight: 600; text-align: left;
  text-decoration: none; cursor: pointer;
}
.sb-nav .sb-ic { width: 18px; text-align: center; color: var(--text-muted); flex: none; }
.sb-nav:hover { background: var(--bg-soft); color: var(--text-primary); }
.sb-nav.active { background: var(--gradient-cta); color: #FFFFFF; box-shadow: 0 4px 14px rgba(20, 184, 166, 0.3); }
.sb-nav.active .sb-ic { color: #FFFFFF; }
.sb-nav .sb-count { margin-left: auto; background: var(--accent-amber); color: #1A1714; border-radius: 999px; font-size: 11px; padding: 0 7px; font-weight: 700; }
.sb-nav.sb-ext::after { content: "↗"; margin-left: auto; font-size: 12px; color: var(--text-muted); }
.sb-main { min-width: 0; padding: 24px 28px 56px; }
.sb-pagehead { margin: 0 0 18px; }
.sb-pagehead .sb-crumb { font-size: 12px; color: var(--text-muted); font-weight: 600; }
.sb-pagehead h1 { font-size: 24px; font-weight: 800; margin: 2px 0 0; }
@media (max-width: 900px) {
  .sb-body { grid-template-columns: minmax(0, 1fr); }
  .sb-side { min-width: 0; max-width: 100vw; }
  .sb-side { position: sticky; top: 64px; z-index: 10; height: auto; flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--border); padding: 8px; gap: 4px; }
  .sb-side > *, .sb-side nav, .sb-side > div { display: flex; flex-direction: row; gap: 4px; flex: none; }
  .sb-group { display: none !important; }
  .sb-nav, .sb-side nav a { white-space: nowrap; width: auto !important; flex: none; }
  .sb-main { padding: 18px 16px 48px; }
}

/* Thin legal footer (SeqFooterThin) — always dark navy, identical across SequSpace properties. */
.sb-footer { background: #0F172A; color: #FFFFFF; border-top: 1px solid #334155; padding: 12px 24px; font-family: var(--font); }
.sb-footer-in { max-width: 1600px; margin: 0 auto; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.sb-footer p { margin: 0; font-size: 13px; color: #94A3B8; }
.sb-cobrand { display: inline-flex; align-items: center; gap: 8px; color: #CBD5E1; font-weight: 700; font-size: 13px; }
.sb-cobrand img { height: 22px; width: auto; display: block; }
.sb-cobrand .sb-dash { color: #64748B; font-weight: 500; }

/* ---- sign-in ------------------------------------------------------------- */
.sb-auth { flex: 1; display: grid; place-items: center; padding: 40px 16px; }
.sb-auth-card {
  width: 100%; max-width: 440px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); padding: 32px;
}
[data-theme="dark"] .sb-auth-card { backdrop-filter: blur(16px) saturate(150%); -webkit-backdrop-filter: blur(16px) saturate(150%); }
.sb-auth-card .sb-mark { width: 52px; height: 52px; border-radius: 13px; display: block; margin-bottom: 18px; }
.sb-auth-card h1 { font-size: 26px; font-weight: 800; margin: 0; letter-spacing: -0.02em; }
.sb-auth-card h1 span { background: var(--gradient-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sb-auth-card .sb-tag { font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin-top: 6px; }
.sb-auth-card p { color: var(--text-secondary); margin: 16px 0 20px; }
.sb-auth-card .sb-btn { width: 100%; padding: 12px 16px; font-size: 15px; }
.sb-auth-card .sb-fine { font-size: 12px; color: var(--text-muted); margin: 16px 0 0; }

/* ---- components ---------------------------------------------------------- */
.sb-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 700; font-size: 13.5px;
  border-radius: var(--radius-sm); padding: 9px 16px; border: 1px solid transparent; cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.sb-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.sb-btn-primary { background: var(--gradient-cta); color: #FFFFFF; box-shadow: var(--shadow-cta); }
.sb-btn-primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 6px 22px rgba(20, 184, 166, 0.38); }
.sb-btn-secondary { background: var(--bg-card); color: var(--text-primary); border-color: var(--border); }
.sb-btn-secondary:hover:not(:disabled) { border-color: var(--accent-2); }
.sb-btn-ghost { background: none; color: var(--accent); padding: 6px 10px; }
.sb-btn-ghost:hover:not(:disabled) { background: var(--bg-soft); }
.sb-btn-warn { background: var(--bad-bg); color: var(--bad); }
.sb-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
[data-theme="dark"] .sb-card { backdrop-filter: blur(16px) saturate(150%); -webkit-backdrop-filter: blur(16px) saturate(150%); }
.sb-badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.sb-ok { background: var(--ok-bg); color: var(--ok); }
.sb-warn { background: var(--warn-bg); color: var(--warn); }
.sb-bad { background: var(--bad-bg); color: var(--bad); }
.sb-info { background: var(--info-bg); color: var(--info); }
.sb-neutral { background: var(--bg-soft); color: var(--text-secondary); border: 1px solid var(--border); }
.sb-alert { border-radius: var(--radius-sm); padding: 10px 14px; font-weight: 500; }

input, select, textarea {
  font: inherit; color: var(--text-primary); background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 9px 11px;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent-2); box-shadow: var(--focus); }
[data-theme="dark"] input, [data-theme="dark"] select, [data-theme="dark"] textarea { background: rgba(255,255,255,0.06); }
[data-theme="dark"] option { background: #0E1626; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); padding: 9px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr:hover td { background: var(--bg-soft); }

.sb-toast {
  position: fixed; right: 20px; bottom: 20px; z-index: 60; max-width: 420px; padding: 12px 16px; border-radius: var(--radius-sm);
  background: var(--bg-card); color: var(--text-primary); border: 1px solid var(--border); border-left: 4px solid var(--accent-2); box-shadow: var(--shadow-lg);
}

/* ---- page hardening (branding standard §6) ------------------------------- */
@media print {
  html, body { background: #fff !important; }
  body * { display: none !important; }
  body::after { content: "Printing is disabled for security reasons. © SequSpace Technology Pvt. Ltd."; display: block !important; padding: 40px; font-family: Inter, sans-serif; color: #000; }
}
body { -webkit-user-select: none; user-select: none; }
input, textarea, select, [contenteditable="true"] { -webkit-user-select: text; user-select: text; }
img { -webkit-user-drag: none; }
