/* ==========================================================================
   DIGITAL SWITCH HRM — Navy · Teal · White theme
   ========================================================================== */
:root {
  --navy-950: #061429;
  --navy-900: #081C38;
  --navy-800: #0B2447;
  --navy-700: #12345F;
  --navy-600: #1B4677;
  --navy-500: #2B5C94;
  --teal-700: #08706F;
  --teal-600: #0A8A89;
  --teal-500: #0FA3A3;
  --teal-400: #2DC2B8;
  --teal-300: #7ADCD3;
  --teal-100: #D2F3F0;
  --teal-50:  #EBFAF8;
  --white: #FFFFFF;
  --bg: #F2F5F9;
  --surface: #FFFFFF;
  --surface-2: #F7F9FC;
  --border: #E1E7EF;
  --border-strong: #CBD5E1;
  --text: #0E1D33;
  --text-2: #32435A;
  --muted: #64748B;
  --success: #15803D; --success-bg: #E8F7EE;
  --warning: #B45309; --warning-bg: #FEF4E3;
  --danger:  #B91C1C; --danger-bg:  #FDECEC;
  --info:    #1D4ED8; --info-bg:    #E9F0FE;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 2px rgba(8, 28, 56, .06);
  --shadow: 0 1px 2px rgba(8, 28, 56, .05), 0 6px 24px rgba(8, 28, 56, .06);
  --shadow-lg: 0 20px 60px rgba(6, 20, 41, .25);
  --sidebar-w: 268px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.ds-app, body.ds-auth { margin: 0; font-family: var(--font); font-size: 14px; line-height: 1.5; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--teal-600); text-decoration: none; }
a:hover { color: var(--teal-700); }
img { max-width: 100%; }
h1, h2, h3, h4 { margin: 0; color: var(--navy-800); letter-spacing: -.01em; }
p { margin: 0; }
.ds-muted { color: var(--muted); }
.ds-skip { position: absolute; left: -999px; top: 8px; background: var(--white); padding: 8px 12px; z-index: 9999; border-radius: 8px; }
.ds-skip:focus { left: 8px; }
.ds-ic { flex: none; display: inline-block; vertical-align: middle; }
:focus-visible { outline: 3px solid var(--teal-300); outline-offset: 2px; }

/* ----- Sidebar ---------------------------------------------------------- */
.ds-sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); background: linear-gradient(180deg, var(--navy-900) 0%, var(--navy-800) 60%, #0B2A4F 100%); color: #C9D6E8; display: flex; flex-direction: column; z-index: 60; transition: transform .25s ease; }
.ds-brand { display: flex; align-items: center; gap: 11px; padding: 20px 20px 16px; }
.ds-brand-mark { width: 40px; height: 40px; border-radius: 11px; background: linear-gradient(135deg, var(--teal-500), var(--teal-400)); display: grid; place-items: center; box-shadow: 0 6px 18px rgba(15, 163, 163, .35); flex: none; }
.ds-brand-mark img { width: 24px; height: 24px; }
.ds-brand-logo { width: 40px; height: 40px; object-fit: contain; border-radius: 10px; background: #fff; padding: 3px; }
.ds-brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.ds-brand-text strong { color: #fff; font-size: 14.5px; font-weight: 800; letter-spacing: .06em; }
.ds-brand-text small { color: var(--teal-300); font-size: 11px; font-weight: 700; letter-spacing: .32em; margin-top: 3px; }
.ds-sidebar .ds-sidebar-close { display: none; margin-left: auto; color: #fff; }
.ds-userbox { display: flex; align-items: center; gap: 10px; margin: 4px 14px 10px; padding: 11px 12px; border-radius: 12px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); }
.ds-userbox strong { display: block; color: #fff; font-size: 13px; line-height: 1.25; }
.ds-userbox small { color: var(--teal-300); font-size: 11.5px; font-weight: 600; }
.ds-nav { flex: 1; overflow-y: auto; padding: 4px 10px 12px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.15) transparent; }
.ds-nav-group { margin-top: 6px; }
.ds-nav-title { width: 100%; display: flex; align-items: center; justify-content: space-between; background: none; border: 0; color: #7F93B0; font: 700 10.5px/1 var(--font); letter-spacing: .14em; text-transform: uppercase; padding: 12px 10px 8px; cursor: pointer; }
.ds-nav-title .ds-ic { transition: transform .2s; }
.ds-nav-group:not(.open) .ds-nav-title .ds-ic { transform: rotate(-90deg); }
.ds-nav-group:not(.open) .ds-nav-items { display: none; }
.ds-nav a { display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 10px; color: #C6D3E6; font-weight: 500; font-size: 13.5px; position: relative; }
.ds-nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.ds-nav a.active { background: linear-gradient(90deg, rgba(15,163,163,.28), rgba(15,163,163,.08)); color: #fff; font-weight: 600; }
.ds-nav a.active::before { content: ''; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: var(--teal-400); }
.ds-nav a.active .ds-ic { color: var(--teal-300); }
.ds-dot { margin-left: auto; width: 8px; height: 8px; border-radius: 50%; background: #50627d; }
.ds-dot.on { background: #34D399; box-shadow: 0 0 0 4px rgba(52,211,153,.18); }
.ds-sidebar-foot { padding: 12px 14px 18px; border-top: 1px solid rgba(255,255,255,.07); }
.ds-signout { display: flex; align-items: center; gap: 10px; color: #C6D3E6; padding: 9px 11px; border-radius: 10px; font-weight: 500; }
.ds-signout:hover { background: rgba(239,68,68,.14); color: #fff; }
.ds-scrim { display: none; }

/* ----- Main / topbar ---------------------------------------------------- */
.ds-main { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.ds-topbar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 14px; height: 66px; padding: 0 28px; background: rgba(255,255,255,.9); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--border); }
.ds-menu-btn { display: none; }
.ds-top-title { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.ds-top-title small { color: var(--teal-600); font-weight: 700; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
.ds-top-title strong { color: var(--navy-800); font-size: 17px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds-top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.ds-top-clock { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.15; padding-right: 6px; }
.ds-top-clock strong { font-size: 14px; color: var(--navy-800); font-variant-numeric: tabular-nums; }
.ds-top-clock small { color: var(--muted); font-size: 11.5px; }
.ds-clock-chip { display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border-radius: 999px; font-weight: 600; font-size: 12.5px; background: var(--teal-500); color: #fff; box-shadow: 0 4px 14px rgba(15,163,163,.3); }
.ds-clock-chip:hover { color: #fff; background: var(--teal-600); }
.ds-clock-chip.state-in { background: var(--success-bg); color: var(--success); box-shadow: none; border: 1px solid #BFE6CD; }
.ds-clock-chip.state-done { background: var(--surface-2); color: var(--muted); box-shadow: none; border: 1px solid var(--border); }
.ds-icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; border: 0; background: transparent; color: var(--navy-700); cursor: pointer; position: relative; }
.ds-icon-btn:hover { background: var(--surface-2); }
.ds-icon-btn.sm { width: 28px; height: 28px; border-radius: 8px; }
.ds-bell i { position: absolute; top: 4px; right: 3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #EF4444; color: #fff; font: 700 10.5px/18px var(--font); font-style: normal; text-align: center; border: 2px solid #fff; }
.ds-top-avatar { display: inline-flex; }
.ds-content { flex: 1; width: 100%; max-width: 1440px; margin: 0 auto; padding: 26px 28px 40px; }
.ds-footer { display: flex; justify-content: space-between; gap: 10px; padding: 16px 28px 22px; color: var(--muted); font-size: 12px; border-top: 1px solid var(--border); }

/* ----- Page head -------------------------------------------------------- */
.ds-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.ds-page-head h1 { font-size: 24px; font-weight: 800; }
.ds-page-head p { color: var(--muted); margin-top: 4px; max-width: 70ch; }
.ds-page-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ----- Buttons ---------------------------------------------------------- */
.ds-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid transparent; font: 600 13.5px/1 var(--font); cursor: pointer; white-space: nowrap; transition: background .15s, box-shadow .15s, transform .05s; text-decoration: none; }
.ds-btn:active { transform: translateY(1px); }
.ds-btn.primary { background: var(--teal-500); color: #fff; box-shadow: 0 4px 12px rgba(15,163,163,.25); }
.ds-btn.primary:hover { background: var(--teal-600); color: #fff; }
.ds-btn.navy { background: var(--navy-800); color: #fff; }
.ds-btn.navy:hover { background: var(--navy-700); color: #fff; }
.ds-btn.ghost { background: var(--surface); color: var(--navy-700); border-color: var(--border); }
.ds-btn.ghost:hover { border-color: var(--border-strong); background: var(--surface-2); color: var(--navy-800); }
.ds-btn.success { background: var(--success); color: #fff; }
.ds-btn.success:hover { background: #166534; color: #fff; }
.ds-btn.danger { background: var(--danger); color: #fff; }
.ds-btn.danger:hover { background: #991B1B; color: #fff; }
.ds-btn.danger-ghost { background: var(--surface); color: var(--danger); border-color: #F4CACA; }
.ds-btn.danger-ghost:hover { background: var(--danger-bg); }
.ds-btn.sm { height: 32px; padding: 0 11px; font-size: 12.5px; border-radius: 8px; }
.ds-btn.lg { height: 52px; padding: 0 24px; font-size: 15px; border-radius: 13px; }
.ds-btn.block { width: 100%; }
.ds-btn[disabled], .ds-btn.disabled { opacity: .5; pointer-events: none; }
.ds-inline { display: inline; margin: 0; }
.ds-btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ----- Cards / grid ----------------------------------------------------- */
.ds-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); margin-bottom: 20px; min-width: 0; }
.ds-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.ds-card-head h2 { font-size: 15.5px; font-weight: 700; }
.ds-card-head p { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.ds-card-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ds-card-body { padding: 18px 20px; }
.ds-card-body.flush, .ds-card.flush .ds-card-body { padding: 0; }
.ds-grid { display: grid; gap: 20px; }
.ds-grid > .ds-card { margin-bottom: 0; }
.ds-grid.g2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.ds-grid.g3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.ds-grid.g4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.ds-grid.main-side { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
.ds-grid.side-main { grid-template-columns: 340px minmax(0, 1fr); align-items: start; }
.ds-stack > * + * { margin-top: 20px; }
.ds-section-gap { margin-bottom: 20px; }

/* ----- Stats ------------------------------------------------------------ */
.ds-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; margin-bottom: 20px; }
.ds-stat { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); color: inherit; min-width: 0; }
a.ds-stat:hover { border-color: var(--teal-300); color: inherit; box-shadow: var(--shadow); }
.ds-stat-ic { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.ds-stat-body { display: flex; flex-direction: column; min-width: 0; }
.ds-stat small { color: var(--muted); font-weight: 600; font-size: 12px; }
.ds-stat strong { font-size: 23px; font-weight: 800; color: var(--navy-800); line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds-stat em { font-style: normal; color: var(--muted); font-size: 12px; }
.tone-teal .ds-stat-ic { background: var(--teal-50); color: var(--teal-600); }
.tone-navy .ds-stat-ic { background: #E7EEF8; color: var(--navy-600); }
.tone-green .ds-stat-ic { background: var(--success-bg); color: var(--success); }
.tone-amber .ds-stat-ic { background: var(--warning-bg); color: var(--warning); }
.tone-red .ds-stat-ic { background: var(--danger-bg); color: var(--danger); }
.tone-blue .ds-stat-ic { background: var(--info-bg); color: var(--info); }

/* ----- Hero ------------------------------------------------------------- */
.ds-hero { position: relative; overflow: hidden; display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 26px 28px; border-radius: 18px; color: #fff; background: radial-gradient(1200px 300px at 100% 0%, rgba(45,194,184,.35), transparent 60%), linear-gradient(120deg, var(--navy-900) 0%, var(--navy-700) 55%, var(--teal-700) 130%); margin-bottom: 20px; box-shadow: 0 12px 34px rgba(8,28,56,.18); flex-wrap: wrap; }
.ds-hero::after { content: ''; position: absolute; right: -60px; bottom: -80px; width: 260px; height: 260px; border-radius: 50%; border: 40px solid rgba(255,255,255,.05); pointer-events: none; }
.ds-hero h1, .ds-hero h2 { color: #fff; font-size: 25px; font-weight: 800; }
.ds-hero p { color: #BFD0E6; margin-top: 6px; }
.ds-hero .ds-eyebrow { color: var(--teal-300); }
.ds-hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; position: relative; z-index: 1; }
.ds-hero .ds-btn.ghost { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.2); }
.ds-hero .ds-btn.ghost:hover { background: rgba(255,255,255,.18); }
.ds-eyebrow { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--teal-600); margin-bottom: 4px; }

/* ----- Badges / avatars ------------------------------------------------- */
.ds-badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap; background: #EEF2F7; color: #475569; border: 1px solid transparent; }
.ds-badge.success { background: var(--success-bg); color: var(--success); }
.ds-badge.warning { background: var(--warning-bg); color: var(--warning); }
.ds-badge.danger { background: var(--danger-bg); color: var(--danger); }
.ds-badge.info { background: var(--info-bg); color: var(--info); }
.ds-badge.teal { background: var(--teal-50); color: var(--teal-700); }
.ds-badge.navy { background: var(--navy-800); color: #fff; }
.ds-avatar { display: inline-grid; place-items: center; flex: none; border-radius: 50%; overflow: hidden; font-weight: 700; color: #fff; background: var(--navy-600); }
.ds-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ds-avatar.sm { width: 34px; height: 34px; font-size: 12px; }
.ds-avatar.md { width: 42px; height: 42px; font-size: 14px; }
.ds-avatar.lg { width: 76px; height: 76px; font-size: 24px; }
.ds-avatar.xl { width: 104px; height: 104px; font-size: 32px; }
.ds-avatar.h0 { background: linear-gradient(135deg, #0B2447, #1B4677); }
.ds-avatar.h1 { background: linear-gradient(135deg, #0A8A89, #2DC2B8); }
.ds-avatar.h2 { background: linear-gradient(135deg, #12345F, #0FA3A3); }
.ds-avatar.h3 { background: linear-gradient(135deg, #2B5C94, #5B8CC7); }
.ds-avatar.h4 { background: linear-gradient(135deg, #08706F, #12345F); }
.ds-person { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.ds-person strong { display: block; color: var(--navy-800); font-weight: 600; font-size: 13.5px; line-height: 1.25; }
.ds-person strong a { color: inherit; }
.ds-person strong a:hover { color: var(--teal-600); }
.ds-person small { display: block; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }

/* ----- Tables ----------------------------------------------------------- */
.ds-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.ds-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.ds-table th { text-align: left; font-size: 11.5px; font-weight: 700; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; padding: 11px 16px; background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap; }
.ds-table td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; color: var(--text-2); }
.ds-table tbody tr:last-child td { border-bottom: 0; }
.ds-table tbody tr:hover td { background: #FAFCFE; }
.ds-table td.num, .ds-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.ds-table td.actions { text-align: right; white-space: nowrap; }
.ds-table .ds-btn-row { justify-content: flex-end; flex-wrap: nowrap; }
.ds-table tfoot td { font-weight: 700; background: var(--surface-2); color: var(--navy-800); }
.ds-table .sub { display: block; color: var(--muted); font-size: 12px; }
.ds-thumb { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; display: block; border: 1px solid var(--border); background: var(--surface-2); }
.ds-thumb-pair { display: flex; gap: 6px; }

/* ----- Forms ------------------------------------------------------------ */
.ds-form { margin: 0; }
.ds-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.ds-form-grid.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ds-form-grid.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ds-form-grid.g1 { grid-template-columns: 1fr; }
.ds-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ds-field.span-2, .ds-field.span-full { grid-column: 1 / -1; }
.ds-field label { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.ds-field label b { color: var(--danger); }
.ds-field input, .ds-field select, .ds-field textarea, .ds-input { width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid var(--border-strong); border-radius: 10px; background: #fff; color: var(--text); font: 400 14px/1.4 var(--font); transition: border-color .15s, box-shadow .15s; }
.ds-field textarea { min-height: 88px; resize: vertical; }
.ds-field select[multiple] { min-height: 130px; }
.ds-field input[type=file] { padding: 8px; background: var(--surface-2); }
.ds-field input[type=color] { padding: 4px; height: 42px; }
.ds-field input:focus, .ds-field select:focus, .ds-field textarea:focus, .ds-input:focus { outline: none; border-color: var(--teal-500); box-shadow: 0 0 0 4px rgba(15,163,163,.15); }
.ds-help { color: var(--muted); font-size: 12px; }
.ds-check { flex-direction: row; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); cursor: pointer; flex-wrap: wrap; }
.ds-check input { width: 18px; height: 18px; accent-color: var(--teal-500); margin-top: 1px; }
.ds-check span { font-weight: 600; font-size: 13.5px; color: var(--text-2); }
.ds-check small { flex-basis: 100%; color: var(--muted); padding-left: 28px; font-size: 12px; }
.ds-form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.ds-form-section { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--teal-600); grid-column: 1 / -1; margin-top: 8px; padding-bottom: 6px; border-bottom: 1px dashed var(--border); }
.ds-filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.ds-filters .ds-field { min-width: 150px; flex: 1 1 150px; max-width: 240px; }
.ds-filters .ds-field.grow { max-width: none; flex: 2 1 240px; }
.ds-search { position: relative; }
.ds-search .ds-ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.ds-search input { padding-left: 38px; }

/* ----- Tabs ------------------------------------------------------------- */
.ds-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; }
.ds-tabs::-webkit-scrollbar { display: none; }
.ds-tabs a { padding: 11px 14px; color: var(--muted); font-weight: 600; font-size: 13.5px; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; gap: 7px; align-items: center; }
.ds-tabs a:hover { color: var(--navy-800); }
.ds-tabs a.active { color: var(--teal-600); border-bottom-color: var(--teal-500); }
.ds-tabs a i { font-style: normal; background: var(--teal-500); color: #fff; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 99px; }

/* ----- Alerts ----------------------------------------------------------- */
.ds-flashes { margin-bottom: 18px; display: grid; gap: 8px; }
.ds-alert { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 12px; border: 1px solid; font-weight: 500; }
.ds-alert > span { flex: 1; padding-top: 1px; }
.ds-alert.success { background: var(--success-bg); border-color: #BFE6CD; color: #14532D; }
.ds-alert.error { background: var(--danger-bg); border-color: #F4CACA; color: #7F1D1D; }
.ds-alert.info { background: var(--info-bg); border-color: #C9D8FB; color: #1E3A8A; }
.ds-alert.warning { background: var(--warning-bg); border-color: #F6DDB0; color: #7C2D12; }
.ds-alert .ds-icon-btn { color: inherit; }

/* ----- Empty ------------------------------------------------------------ */
.ds-empty { text-align: center; padding: 38px 20px; color: var(--muted); }
.ds-empty-ic { width: 56px; height: 56px; border-radius: 16px; background: var(--teal-50); color: var(--teal-600); display: inline-grid; place-items: center; margin-bottom: 10px; }
.ds-empty strong { display: block; color: var(--navy-800); font-size: 15px; margin-bottom: 3px; }
.ds-empty p { max-width: 380px; margin: 0 auto 12px; }

/* ----- Lists ------------------------------------------------------------ */
.ds-list { list-style: none; margin: 0; padding: 0; }
.ds-list > li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.ds-list > li:last-child { border-bottom: 0; }
.ds-list .grow { flex: 1; min-width: 0; }
.ds-list strong { color: var(--navy-800); font-weight: 600; }
.ds-list small { display: block; color: var(--muted); font-size: 12px; }
.ds-kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; margin: 0; }
.ds-kv div { min-width: 0; }
.ds-kv dt { font-size: 11.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.ds-kv dd { margin: 3px 0 0; color: var(--navy-800); font-weight: 500; word-break: break-word; }
.ds-kv.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ds-kv.g1 { grid-template-columns: 1fr; }

/* ----- Progress & charts ------------------------------------------------ */
.ds-progress { display: block; height: 8px; border-radius: 99px; background: #E8EEF5; overflow: hidden; min-width: 60px; }
.ds-progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--teal-500), var(--teal-400)); }
.ds-progress.navy i { background: var(--navy-600); }
.ds-bars { display: grid; gap: 10px; }
.ds-bar-row { display: grid; grid-template-columns: 140px minmax(0,1fr) 90px; gap: 12px; align-items: center; font-size: 13px; }
.ds-bar-label { color: var(--text-2); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-bar-track { height: 10px; background: #EAF0F6; border-radius: 99px; overflow: hidden; }
.ds-bar-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--navy-600), var(--teal-500)); }
.ds-bar-val { text-align: right; font-weight: 700; color: var(--navy-800); font-variant-numeric: tabular-nums; }
.ds-cols { display: flex; align-items: flex-end; gap: 8px; height: 210px; padding-top: 10px; }
.ds-col { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; min-width: 0; }
.ds-col-val { font-size: 11px; font-weight: 700; color: var(--navy-700); margin-bottom: 4px; white-space: nowrap; }
.ds-col-bar { flex: 1; width: 100%; max-width: 42px; display: flex; align-items: flex-end; background: #F0F4F8; border-radius: 8px 8px 4px 4px; overflow: hidden; }
.ds-col-bar i { display: block; width: 100%; background: linear-gradient(180deg, var(--teal-400), var(--navy-600)); border-radius: 8px 8px 0 0; }
.ds-col-label { font-size: 11px; color: var(--muted); margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.ds-legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--muted); }
.ds-legend span { display: inline-flex; align-items: center; gap: 6px; }
.ds-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* ----- Modal ------------------------------------------------------------ */
.ds-modal { border: 0; padding: 0; border-radius: 18px; width: min(640px, calc(100vw - 24px)); max-height: calc(100vh - 32px); box-shadow: var(--shadow-lg); color: var(--text); background: var(--surface); }
.ds-modal.wide { width: min(920px, calc(100vw - 24px)); }
.ds-modal.narrow { width: min(460px, calc(100vw - 24px)); }
.ds-modal::backdrop { background: rgba(6, 20, 41, .6); backdrop-filter: blur(2px); }
.ds-modal-inner { display: flex; flex-direction: column; max-height: calc(100vh - 32px); }
.ds-modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 18px 20px 14px; border-bottom: 1px solid var(--border); }
.ds-modal-head h3 { font-size: 17px; }
.ds-modal-head p { color: var(--muted); font-size: 13px; margin-top: 2px; }
.ds-modal-body { padding: 18px 20px 20px; overflow-y: auto; }
.ds-modal .ds-form-actions { margin: 18px -20px -20px; padding: 14px 20px; background: var(--surface-2); border-radius: 0 0 18px 18px; position: sticky; bottom: -20px; }

/* ----- Pager ------------------------------------------------------------ */
.ds-pager { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--border); color: var(--muted); font-size: 12.5px; flex-wrap: wrap; }
.ds-pager div { display: flex; gap: 6px; }

/* ----- Calendar --------------------------------------------------------- */
.ds-cal { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); gap: 6px; }
.ds-cal-h { text-align: center; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; padding-bottom: 2px; }
.ds-cal-d { min-height: 64px; border: 1px solid var(--border); border-radius: 10px; padding: 6px 7px; background: #fff; font-size: 12px; display: flex; flex-direction: column; gap: 3px; overflow: hidden; }
.ds-cal-d.out { background: transparent; border-style: dashed; opacity: .45; }
.ds-cal-d.today { border-color: var(--teal-500); box-shadow: 0 0 0 2px var(--teal-100); }
.ds-cal-d.weekend { background: var(--surface-2); }
.ds-cal-d b { font-weight: 700; color: var(--navy-700); }
.ds-cal-d .tag { font-size: 10.5px; font-weight: 600; border-radius: 6px; padding: 1px 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tag.present { background: var(--success-bg); color: var(--success); }
.tag.late { background: var(--warning-bg); color: var(--warning); }
.tag.absent { background: var(--danger-bg); color: var(--danger); }
.tag.leave { background: var(--info-bg); color: var(--info); }
.tag.holiday { background: var(--teal-50); color: var(--teal-700); }

/* ----- Clock (employee) ------------------------------------------------- */
.ds-clock-hero { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 20px; margin-bottom: 20px; }
.ds-clock-face { position: relative; overflow: hidden; border-radius: 22px; padding: 30px; color: #fff; background: radial-gradient(700px 260px at 110% -10%, rgba(45,194,184,.45), transparent 60%), linear-gradient(135deg, var(--navy-900), var(--navy-700)); box-shadow: 0 16px 40px rgba(8,28,56,.22); display: flex; flex-direction: column; }
.ds-clock-face .ds-eyebrow { color: var(--teal-300); }
.ds-clock-time { font-size: clamp(44px, 7vw, 72px); font-weight: 800; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; margin: 8px 0 6px; }
.ds-clock-date { color: #BFD0E6; font-size: 15px; }
.ds-clock-status { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; padding: 8px 14px; border-radius: 99px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.14); font-weight: 600; width: fit-content; }
.ds-clock-status i { width: 9px; height: 9px; border-radius: 50%; background: #94A3B8; }
.ds-clock-status.in i { background: #34D399; box-shadow: 0 0 0 5px rgba(52,211,153,.2); animation: ds-pulse 2s infinite; }
@keyframes ds-pulse { 50% { box-shadow: 0 0 0 9px rgba(52,211,153,0); } }
.ds-clock-cta { margin-top: auto; padding-top: 26px; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.ds-clock-btn { display: inline-flex; align-items: center; gap: 12px; height: 62px; padding: 0 28px; border-radius: 16px; border: 0; font: 800 17px/1 var(--font); cursor: pointer; color: #fff; background: linear-gradient(135deg, var(--teal-500), var(--teal-400)); box-shadow: 0 10px 28px rgba(15,163,163,.45); transition: transform .1s, box-shadow .2s; }
.ds-clock-btn:hover { transform: translateY(-1px); box-shadow: 0 14px 32px rgba(15,163,163,.5); }
.ds-clock-btn.out { background: linear-gradient(135deg, #F97362, #E1483A); box-shadow: 0 10px 28px rgba(225,72,58,.35); }
.ds-clock-btn[disabled] { background: rgba(255,255,255,.12); box-shadow: none; cursor: not-allowed; color: #BFD0E6; }
.ds-clock-worked { color: #BFD0E6; font-size: 13px; }
.ds-clock-worked strong { color: #fff; font-size: 20px; display: block; font-variant-numeric: tabular-nums; }
.ds-today-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ds-punch { border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: var(--surface); }
.ds-punch-photo { aspect-ratio: 4/3; background: linear-gradient(135deg, #EEF3F8, #E2EAF3); display: grid; place-items: center; color: #9AA9BC; position: relative; }
.ds-punch-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ds-punch-body { padding: 10px 12px 12px; }
.ds-punch-body small { display: block; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.ds-punch-body strong { font-size: 20px; color: var(--navy-800); font-variant-numeric: tabular-nums; }
.ds-punch-body p { font-size: 12px; color: var(--muted); margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Camera flow */
.ds-cam { width: min(980px, calc(100vw - 16px)); }
.ds-cam-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; }
.ds-cam-stage { position: relative; border-radius: 16px; overflow: hidden; background: #0A1628; aspect-ratio: 4/3; }
.ds-cam-stage video, .ds-cam-stage img, .ds-cam-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ds-cam-stage video { transform: scaleX(-1); }
.ds-cam-guide { position: absolute; inset: 12% 24%; border: 3px dashed rgba(255,255,255,.55); border-radius: 50% 50% 46% 46%; pointer-events: none; }
.ds-cam-msg { position: absolute; left: 12px; right: 12px; top: 12px; padding: 9px 12px; border-radius: 10px; background: rgba(6,20,41,.72); color: #fff; font-size: 12.5px; display: flex; gap: 8px; align-items: center; }
.ds-cam-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.ds-cam-map { height: 230px; border-radius: 14px; overflow: hidden; border: 1px solid var(--border); background: #E7EEF6; }
.ds-geo-box { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; background: var(--surface-2); font-size: 13px; }
.ds-geo-box .row { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; }
.ds-geo-box .row span { color: var(--muted); }
.ds-geo-box .row b { color: var(--navy-800); text-align: right; font-weight: 600; word-break: break-word; }
.ds-geo-state { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13px; padding: 9px 12px; border-radius: 10px; }
.ds-geo-state.wait { background: var(--info-bg); color: var(--info); }
.ds-geo-state.ok { background: var(--success-bg); color: var(--success); }
.ds-geo-state.warn { background: var(--warning-bg); color: var(--warning); }
.ds-geo-state.bad { background: var(--danger-bg); color: var(--danger); }
.ds-spin { width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: ds-spin .8s linear infinite; display: inline-block; }
@keyframes ds-spin { to { transform: rotate(360deg); } }
.ds-steps { display: flex; gap: 6px; margin-bottom: 14px; }
.ds-steps span { flex: 1; height: 4px; border-radius: 4px; background: var(--border); }
.ds-steps span.on { background: var(--teal-500); }

/* Maps */
.ds-map { height: 380px; border-radius: 12px; overflow: hidden; background: #E7EEF6; border: 1px solid var(--border); z-index: 1; }
.ds-map.tall { height: 520px; }
.ds-map.short { height: 260px; }
.ds-pin { width: 44px; height: 44px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 4px 12px rgba(0,0,0,.35); overflow: hidden; background: var(--teal-500); display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 13px; }
.ds-pin img { width: 100%; height: 100%; object-fit: cover; }
.ds-pin.out { background: #E1483A; }
.ds-pin.flag { border-color: #F59E0B; }
.ds-pin-wrap { background: none; border: 0; }
.leaflet-popup-content { font-family: var(--font); font-size: 12.5px; margin: 10px 12px; }
.ds-popup img { width: 190px; height: 142px; object-fit: cover; border-radius: 8px; display: block; margin-bottom: 6px; }
.ds-popup strong { color: var(--navy-800); display: block; font-size: 13px; }
.ds-popup small { color: var(--muted); display: block; }

/* Attendance board */
.ds-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.ds-board-card { border: 1px solid var(--border); border-radius: 14px; background: var(--surface); overflow: hidden; display: flex; flex-direction: column; }
.ds-board-card.flagged { border-color: #F6C681; box-shadow: 0 0 0 3px #FEF4E3; }
.ds-board-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; background: var(--border); aspect-ratio: 2/1.05; }
.ds-board-photos > * { background: #EEF3F8; display: grid; place-items: center; color: #9AA9BC; font-size: 11px; position: relative; overflow: hidden; }
.ds-board-photos img { width: 100%; height: 100%; object-fit: cover; }
.ds-board-photos em { position: absolute; left: 6px; top: 6px; font-style: normal; background: rgba(6,20,41,.7); color: #fff; font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 5px; }
.ds-board-body { padding: 11px 13px 13px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.ds-board-meta { font-size: 12px; color: var(--muted); display: flex; gap: 6px; align-items: flex-start; }
.ds-board-meta .ds-ic { margin-top: 1px; color: var(--teal-600); }

/* Photo viewer */
.ds-photo-card { border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: var(--surface); }
.ds-photo-card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; background: #EEF3F8; cursor: zoom-in; }
.ds-photo-card .ds-card-body { padding: 14px 16px; }
.ds-lightbox { position: fixed; inset: 0; background: rgba(6,20,41,.88); z-index: 999; display: grid; place-items: center; padding: 20px; cursor: zoom-out; }
.ds-lightbox img { max-width: 100%; max-height: 100%; border-radius: 12px; box-shadow: var(--shadow-lg); }

/* Payslip */
.ds-payslip { max-width: 860px; margin: 0 auto; background: #fff; border: 1px solid var(--border); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); }
.ds-payslip-head { display: flex; justify-content: space-between; gap: 20px; padding: 26px 30px; background: linear-gradient(120deg, var(--navy-900), var(--navy-700)); color: #fff; flex-wrap: wrap; }
.ds-payslip-head h2 { color: #fff; font-size: 20px; }
.ds-payslip-head p { color: #BFD0E6; font-size: 12.5px; }
.ds-payslip-head .net { text-align: right; }
.ds-payslip-head .net small { color: var(--teal-300); font-weight: 700; letter-spacing: .1em; font-size: 11px; }
.ds-payslip-head .net strong { display: block; font-size: 28px; }
.ds-payslip-body { padding: 24px 30px 30px; }
.ds-payslip-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 20px; }
.ds-payslip table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.ds-payslip th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--teal-700); padding: 8px 0; border-bottom: 2px solid var(--teal-100); }
.ds-payslip td { padding: 8px 0; border-bottom: 1px solid var(--border); }
.ds-payslip td:last-child, .ds-payslip th:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.ds-payslip tr.total td { font-weight: 800; color: var(--navy-800); border-bottom: 0; border-top: 2px solid var(--navy-800); }
.ds-payslip-net { margin-top: 22px; display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-radius: 12px; background: var(--teal-50); border: 1px solid var(--teal-100); }
.ds-payslip-net strong { font-size: 22px; color: var(--navy-800); }
.ds-payslip-foot { margin-top: 18px; color: var(--muted); font-size: 12px; text-align: center; }

/* Org chart */
.ds-org { overflow-x: auto; padding: 10px 0 20px; }
.ds-org ul { padding-top: 22px; position: relative; display: flex; justify-content: center; margin: 0; padding-left: 0; }
.ds-org li { list-style: none; text-align: center; position: relative; padding: 22px 8px 0; }
.ds-org li::before, .ds-org li::after { content: ''; position: absolute; top: 0; right: 50%; border-top: 2px solid var(--border-strong); width: 50%; height: 22px; }
.ds-org li::after { right: auto; left: 50%; border-left: 2px solid var(--border-strong); }
.ds-org li:only-child::after, .ds-org li:only-child::before { display: none; }
.ds-org li:only-child { padding-top: 0; }
.ds-org li:first-child::before, .ds-org li:last-child::after { border: 0 none; }
.ds-org li:last-child::before { border-right: 2px solid var(--border-strong); border-radius: 0 8px 0 0; }
.ds-org li:first-child::after { border-radius: 8px 0 0 0; }
.ds-org ul ul::before { content: ''; position: absolute; top: 0; left: 50%; border-left: 2px solid var(--border-strong); width: 0; height: 22px; }
.ds-org > ul { padding-top: 0; }
.ds-org-node { display: inline-flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 14px; min-width: 150px; max-width: 190px; border: 1px solid var(--border); border-radius: 14px; background: #fff; box-shadow: var(--shadow-sm); }
.ds-org-node strong { font-size: 13px; color: var(--navy-800); line-height: 1.2; }
.ds-org-node small { font-size: 11.5px; color: var(--muted); line-height: 1.25; }
.ds-org-node.ceo { border-color: var(--teal-300); background: var(--teal-50); }

/* Kanban */
.ds-kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 6px; }
.ds-kanban-col { background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; padding: 12px; min-height: 160px; }
.ds-kanban-col h3 { font-size: 13px; display: flex; justify-content: space-between; margin-bottom: 10px; }
.ds-kanban-col h3 span { background: var(--navy-800); color: #fff; border-radius: 99px; padding: 0 8px; font-size: 11px; line-height: 20px; }
.ds-kcard { background: #fff; border: 1px solid var(--border); border-radius: 11px; padding: 10px 12px; margin-bottom: 8px; box-shadow: var(--shadow-sm); font-size: 12.5px; }
.ds-kcard strong { color: var(--navy-800); display: block; font-size: 13px; }
.ds-kcard small { color: var(--muted); display: block; }

/* Chat thread */
.ds-thread { display: flex; flex-direction: column; gap: 12px; }
.ds-msg { max-width: 80%; padding: 11px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); }
.ds-msg.mine { align-self: flex-end; background: var(--teal-50); border-color: var(--teal-100); }
.ds-msg header { font-size: 12px; color: var(--muted); margin-bottom: 4px; display: flex; gap: 8px; justify-content: space-between; }
.ds-msg header strong { color: var(--navy-800); }
.ds-msg p { white-space: pre-wrap; }

/* Announcement */
.ds-announce { padding: 14px 16px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); margin-bottom: 10px; }
.ds-announce.pinned { border-color: var(--teal-300); background: linear-gradient(0deg, #fff, var(--teal-50)); }
.ds-announce h3 { font-size: 15px; margin-bottom: 4px; }
.ds-announce .meta { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.ds-announce .body { color: var(--text-2); }

/* Quick actions */
.ds-quick { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.ds-quick a { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); color: var(--navy-800); font-weight: 600; font-size: 13.5px; transition: border-color .15s, box-shadow .15s, transform .1s; }
.ds-quick a:hover { border-color: var(--teal-300); box-shadow: var(--shadow); transform: translateY(-1px); color: var(--navy-800); }
.ds-quick a span { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--teal-50); color: var(--teal-600); }

/* Leave balance */
.ds-balances { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.ds-balance { border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; background: var(--surface); position: relative; overflow: hidden; }
.ds-balance::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--c, var(--teal-500)); }
.ds-balance small { color: var(--muted); font-weight: 600; font-size: 12px; }
.ds-balance strong { display: block; font-size: 26px; color: var(--navy-800); font-weight: 800; line-height: 1.2; }
.ds-balance em { font-style: normal; color: var(--muted); font-size: 12px; }
.ds-balance .ds-progress { margin-top: 10px; }

/* Timeline */
.ds-timeline { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 2px solid var(--border); }
.ds-timeline li { position: relative; padding: 0 0 16px 14px; }
.ds-timeline li::before { content: ''; position: absolute; left: -25px; top: 3px; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 3px solid var(--teal-500); }
.ds-timeline strong { display: block; color: var(--navy-800); font-size: 13.5px; }
.ds-timeline small { color: var(--muted); font-size: 12px; }

/* Profile header */
.ds-profile-head { display: flex; gap: 20px; align-items: center; padding: 22px 24px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); margin-bottom: 20px; flex-wrap: wrap; box-shadow: var(--shadow-sm); }
.ds-profile-head h1 { font-size: 22px; }
.ds-profile-head p { color: var(--muted); }
.ds-profile-head .ds-btn-row { margin-left: auto; }
.ds-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }

/* Bottom nav (mobile) */
.ds-bottom-nav { display: none; }

/* ----- Auth screens ----------------------------------------------------- */
.ds-auth { background: var(--navy-900); min-height: 100vh; }
.ds-auth-wrap { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.ds-auth-art { position: relative; overflow: hidden; padding: 48px 56px; color: #fff; display: flex; flex-direction: column; background: radial-gradient(800px 500px at 90% 10%, rgba(45,194,184,.35), transparent 60%), radial-gradient(700px 500px at 0% 100%, rgba(15,163,163,.25), transparent 60%), linear-gradient(145deg, var(--navy-950), var(--navy-800)); }
.ds-auth-art::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px); background-size: 38px 38px; mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent); }
.ds-auth-art > * { position: relative; }
.ds-auth-art .ds-brand { padding: 0; }
.ds-auth-art h1 { color: #fff; font-size: clamp(30px, 3.4vw, 46px); line-height: 1.1; font-weight: 800; margin-top: auto; max-width: 16ch; letter-spacing: -.02em; }
.ds-auth-art h1 span { color: var(--teal-300); }
.ds-auth-art p.lead { color: #BFD0E6; font-size: 16px; margin-top: 14px; max-width: 46ch; }
.ds-auth-feats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 30px; max-width: 540px; }
.ds-auth-feats div { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 12px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.09); font-size: 13px; font-weight: 500; color: #DCE6F3; }
.ds-auth-feats .ds-ic { color: var(--teal-300); }
.ds-auth-art footer { margin-top: 34px; color: #7F93B0; font-size: 12px; }
.ds-auth-panel { background: #fff; display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.ds-auth-box { width: 100%; max-width: 410px; }
.ds-auth-box h2 { font-size: 26px; font-weight: 800; }
.ds-auth-box > p { color: var(--muted); margin: 6px 0 24px; }
.ds-auth-box .ds-field { margin-bottom: 14px; }
.ds-auth-box .ds-btn { width: 100%; height: 48px; font-size: 15px; }
.ds-auth-links { display: flex; justify-content: space-between; align-items: center; margin: 4px 0 18px; font-size: 13px; }
.ds-auth-note { margin-top: 22px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); font-size: 12.5px; display: flex; gap: 10px; }
.ds-auth-note .ds-ic { color: var(--teal-600); flex: none; margin-top: 1px; }
.ds-auth-mobile-brand { display: none; }
.ds-pass { position: relative; }
.ds-pass button { position: absolute; right: 6px; bottom: 6px; }

/* Careers */
.ds-public { background: var(--bg); min-height: 100vh; }
.ds-public-head { background: linear-gradient(120deg, var(--navy-900), var(--navy-700)); color: #fff; padding: 22px 0 70px; }
.ds-public-head .inner, .ds-public-body { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.ds-public-head h1 { color: #fff; font-size: 34px; margin-top: 40px; }
.ds-public-head p { color: #BFD0E6; margin-top: 8px; font-size: 16px; }
.ds-public-body { margin-top: -44px; padding-bottom: 60px; }
.ds-job { display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 18px 20px; background: #fff; border: 1px solid var(--border); border-radius: 14px; margin-bottom: 12px; box-shadow: var(--shadow-sm); flex-wrap: wrap; }
.ds-job h3 { font-size: 16px; }
.ds-job p { color: var(--muted); font-size: 13px; margin-top: 3px; }

/* ----- Responsive ------------------------------------------------------- */
@media (max-width: 1200px) {
  .ds-grid.g4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .ds-grid.main-side { grid-template-columns: minmax(0,1fr) 320px; }
}
@media (max-width: 1024px) {
  .ds-sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
  body.ds-nav-open .ds-sidebar { transform: none; }
  body.ds-nav-open .ds-scrim { display: block; position: fixed; inset: 0; background: rgba(6,20,41,.5); z-index: 55; }
  .ds-sidebar .ds-sidebar-close { display: inline-grid; }
  .ds-main { margin-left: 0; }
  .ds-menu-btn { display: inline-grid; }
  .ds-grid.main-side, .ds-grid.side-main, .ds-grid.g3 { grid-template-columns: 1fr; }
  .ds-clock-hero, .ds-cam-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  body.ds-app { font-size: 14px; }
  .ds-topbar { padding: 0 12px; height: 60px; gap: 8px; }
  .ds-top-clock { display: none; }
  .ds-clock-chip span { display: none; }
  .ds-clock-chip { padding: 9px; }
  .ds-content { padding: 18px 14px 100px; }
  .ds-footer { padding: 14px 14px 90px; flex-direction: column; }
  .ds-page-head h1 { font-size: 20px; }
  .ds-grid.g2, .ds-grid.g4 { grid-template-columns: 1fr; }
  .ds-form-grid, .ds-form-grid.g3, .ds-form-grid.g4 { grid-template-columns: 1fr; }
  .ds-kv, .ds-kv.g3 { grid-template-columns: 1fr 1fr; }
  .ds-stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .ds-stat { padding: 12px; gap: 10px; flex-direction: column; align-items: flex-start; }
  .ds-stat-ic { width: 38px; height: 38px; }
  .ds-stat strong { font-size: 19px; }
  .ds-hero { padding: 20px; border-radius: 16px; }
  .ds-hero h1, .ds-hero h2 { font-size: 21px; }
  .ds-card-head, .ds-card-body { padding-left: 14px; padding-right: 14px; }
  .ds-clock-face { padding: 22px; }
  .ds-clock-btn { width: 100%; justify-content: center; }
  .ds-today-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .ds-bar-row { grid-template-columns: 90px minmax(0,1fr) 70px; }
  .ds-payslip-cols { grid-template-columns: 1fr; }
  .ds-payslip-head, .ds-payslip-body { padding: 18px; }
  .ds-cal { gap: 3px; }
  .ds-cal-d { min-height: 46px; padding: 4px; font-size: 11px; }
  .ds-cal-d .tag { font-size: 0; padding: 0; height: 6px; border-radius: 3px; }
  .ds-msg { max-width: 92%; }
  .ds-modal { border-radius: 16px 16px 0 0; margin: auto 0 0; width: 100vw; max-width: 100vw; max-height: 92vh; }
  .ds-modal-inner { max-height: 92vh; }
  .ds-cam-map { height: 180px; }
  .ds-bottom-nav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: #fff; border-top: 1px solid var(--border); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); box-shadow: 0 -6px 20px rgba(8,28,56,.08); }
  .ds-bottom-nav a, .ds-bottom-nav button { display: flex; flex-direction: column; align-items: center; gap: 3px; font: 600 10.5px/1.1 var(--font); color: var(--muted); background: none; border: 0; padding: 4px 0; cursor: pointer; }
  .ds-bottom-nav a.active { color: var(--teal-600); }
  .ds-bottom-clock { margin-top: -26px; }
  .ds-bottom-clock .ds-ic { width: 56px; height: 56px; padding: 15px; border-radius: 50%; background: linear-gradient(135deg, var(--teal-500), var(--teal-400)); color: #fff; box-shadow: 0 8px 20px rgba(15,163,163,.45); border: 4px solid #fff; box-sizing: border-box; }
  .ds-bottom-clock.state-in .ds-ic { background: linear-gradient(135deg, #F97362, #E1483A); box-shadow: 0 8px 20px rgba(225,72,58,.4); }
  .ds-auth-wrap { grid-template-columns: 1fr; }
  .ds-auth-art { display: none; }
  .ds-auth-panel { align-items: flex-start; padding-top: 0; background: linear-gradient(180deg, var(--navy-900) 0 210px, #fff 210px); }
  .ds-auth-mobile-brand { display: flex; color: #fff; padding: 34px 0 30px; }
  .ds-auth-box { background: #fff; border-radius: 18px; padding: 24px 20px; box-shadow: var(--shadow); }
  .ds-table.stack thead { display: none; }
  .ds-table.stack tr { display: block; border-bottom: 1px solid var(--border); padding: 8px 0; }
  .ds-table.stack td { display: flex; justify-content: space-between; gap: 12px; border: 0; padding: 6px 14px; text-align: right; }
  .ds-table.stack td::before { content: attr(data-label); font-weight: 600; color: var(--muted); font-size: 12px; text-align: left; }
  .ds-table.stack td.actions { justify-content: flex-end; }
  .ds-table.stack td.actions::before { display: none; }
}

/* ----- Print (payslips, reports) ---------------------------------------- */
@media print {
  .ds-sidebar, .ds-topbar, .ds-footer, .ds-bottom-nav, .ds-no-print, .ds-flashes, .ds-page-actions { display: none !important; }
  .ds-main { margin: 0; }
  .ds-content { padding: 0; max-width: none; }
  body.ds-app { background: #fff; }
  .ds-payslip { box-shadow: none; border: 0; }
  .ds-payslip-head, .ds-hero { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .ds-card { box-shadow: none; break-inside: avoid; }
}

/* ----- Public home page ------------------------------------------------- */
.ds-home { background: #fff; color: var(--text); }
.ds-home-inner { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.ds-home-nav { position: sticky; top: 0; z-index: 30; background: rgba(8, 28, 56, .92); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(255,255,255,.08); }
.ds-home-nav .ds-home-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 16px; }
.ds-home-nav nav { display: flex; align-items: center; gap: 22px; }
.ds-home-nav nav > a:not(.ds-btn) { color: #C6D3E6; font-weight: 600; font-size: 14px; }
.ds-home-nav nav > a:not(.ds-btn):hover { color: #fff; }
.ds-home-hero { position: relative; overflow: hidden; color: #fff; padding: 80px 0 96px; background: radial-gradient(900px 500px at 85% 0%, rgba(45,194,184,.32), transparent 60%), radial-gradient(700px 500px at 0% 100%, rgba(15,163,163,.22), transparent 60%), linear-gradient(150deg, var(--navy-950), var(--navy-800)); }
.ds-home-hero::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px); background-size: 40px 40px; mask-image: linear-gradient(180deg, #000, transparent); pointer-events: none; }
.ds-home-hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 56px; align-items: center; }
.ds-home-hero .ds-eyebrow { color: var(--teal-300); }
.ds-home-hero h1 { color: #fff; font-size: clamp(34px, 5vw, 58px); line-height: 1.05; font-weight: 800; letter-spacing: -.025em; margin-top: 10px; }
.ds-home-hero h1 span { color: var(--teal-300); }
.ds-home-hero .lead { color: #BFD0E6; font-size: 17px; margin-top: 18px; max-width: 52ch; }
.ds-home-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
.ds-home-cta .ds-btn.ghost { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.22); }
.ds-home-cta .ds-btn.ghost:hover { background: rgba(255,255,255,.16); }
.ds-home-note { display: flex; align-items: center; gap: 8px; color: #9FB3CE; font-size: 13px; margin-top: 18px; }
.ds-home-note .ds-ic { color: var(--teal-300); }
.ds-home-card { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: 22px; padding: 26px; box-shadow: 0 30px 70px rgba(0,0,0,.3); backdrop-filter: blur(6px); }
.ds-home-card-top { padding-bottom: 20px; border-bottom: 1px solid rgba(255,255,255,.1); }
.ds-home-clock { display: block; font-size: 44px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; margin: 4px 0; }
.ds-home-card-top small { color: #BFD0E6; }
.ds-home-card-steps { display: grid; gap: 14px; margin-top: 20px; }
.ds-home-card-steps > div { display: flex; gap: 14px; align-items: center; }
.ds-home-card-steps span { width: 42px; height: 42px; border-radius: 12px; background: linear-gradient(135deg, var(--teal-500), var(--teal-400)); display: grid; place-items: center; flex: none; }
.ds-home-card-steps strong { display: block; color: #fff; font-size: 14.5px; }
.ds-home-card-steps small { color: #9FB3CE; font-size: 12.5px; }
.ds-home-section { padding: 84px 0; }
.ds-home-section.alt { background: var(--bg); }
.ds-home-head { text-align: center; max-width: 720px; margin: 0 auto 44px; }
.ds-home-head h2 { font-size: clamp(26px, 3.2vw, 36px); font-weight: 800; letter-spacing: -.02em; margin-top: 6px; }
.ds-home-head p { color: var(--muted); font-size: 16px; margin-top: 12px; }
.ds-home-portals { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.ds-home-portal { display: flex; flex-direction: column; gap: 12px; padding: 24px; border-radius: 18px; border: 1px solid var(--border); background: #fff; box-shadow: var(--shadow-sm); transition: box-shadow .2s, transform .2s, border-color .2s; }
.ds-home-portal:hover { box-shadow: var(--shadow); transform: translateY(-3px); border-color: var(--teal-300); }
.ds-home-portal:first-child { background: linear-gradient(180deg, var(--teal-50), #fff 55%); border-color: var(--teal-100); }
.ds-home-portal.locked { opacity: .6; }
.ds-home-portal .ic { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--navy-800), var(--navy-600)); }
.ds-home-portal:first-child .ic { background: linear-gradient(135deg, var(--teal-500), var(--teal-400)); }
.ds-home-portal h3 { font-size: 18px; }
.ds-home-portal p { color: var(--muted); font-size: 13.5px; flex: 1; }
.ds-home-portal ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13px; color: var(--text-2); font-weight: 500; }
.ds-home-portal li { display: flex; gap: 8px; align-items: center; }
.ds-home-portal li .ds-ic { color: var(--teal-600); }
.ds-home-portal .ds-btn { margin-top: 6px; justify-content: space-between; }
.ds-home-features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.ds-home-features > div { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 22px; }
.ds-home-features span { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; background: var(--teal-50); color: var(--teal-600); margin-bottom: 14px; }
.ds-home-features h3 { font-size: 16px; margin-bottom: 6px; }
.ds-home-features p { color: var(--muted); font-size: 13.5px; }
.ds-home-careers { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 40px; align-items: center; padding: 40px; border-radius: 24px; background: linear-gradient(120deg, var(--navy-900), var(--navy-700)); color: #fff; }
.ds-home-careers h2 { color: #fff; font-size: 28px; margin: 6px 0 10px; }
.ds-home-careers .ds-eyebrow { color: var(--teal-300); }
.ds-home-careers p { color: #BFD0E6; margin-bottom: 18px; }
.ds-home-careers .ds-btn.ghost { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.22); }
.ds-home-jobs { display: grid; gap: 10px; }
.ds-home-jobs a { display: grid; grid-template-columns: 1fr auto; align-items: center; padding: 16px 18px; border-radius: 14px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1); color: #fff; }
.ds-home-jobs a:hover { background: rgba(255,255,255,.13); color: #fff; }
.ds-home-jobs strong { font-size: 15px; }
.ds-home-jobs small { grid-column: 1; color: #9FB3CE; font-size: 12.5px; }
.ds-home-jobs .ds-ic { grid-row: 1 / span 2; grid-column: 2; color: var(--teal-300); }
.ds-home-foot { background: var(--navy-950); color: #9FB3CE; padding: 40px 0 26px; font-size: 13.5px; }
.ds-home-foot .ds-home-inner:first-child { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.ds-home-foot strong { color: #fff; font-size: 15px; letter-spacing: .04em; }
.ds-home-foot p { margin-top: 6px; }
.ds-home-foot a { color: var(--teal-300); }
.ds-home-foot nav { display: flex; gap: 20px; flex-wrap: wrap; }
.ds-home-copy { margin-top: 26px; padding-top: 18px !important; border-top: 1px solid rgba(255,255,255,.08); font-size: 12.5px; }
@media (max-width: 1024px) {
  .ds-home-portals { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ds-home-features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ds-home-hero-grid, .ds-home-careers { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .ds-home-inner { padding: 0 16px; }
  .ds-home-nav nav > a:not(.ds-btn) { display: none; }
  .ds-home-hero { padding: 48px 0 60px; }
  .ds-home-hero .lead { font-size: 15.5px; }
  .ds-home-cta .ds-btn { width: 100%; }
  .ds-home-section { padding: 56px 0; }
  .ds-home-portals, .ds-home-features { grid-template-columns: 1fr; }
  .ds-home-careers { padding: 26px 20px; }
  .ds-home-clock { font-size: 36px; }
}

/* ----- Bio-data form (printable) ---------------------------------------- */
.ds-biodata { max-width: 900px; margin: 0 auto; background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 30px 34px 36px; box-shadow: var(--shadow); font-size: 13px; }
.ds-biodata header { display: grid; grid-template-columns: 1fr auto 120px; gap: 20px; align-items: center; padding-bottom: 18px; border-bottom: 3px solid var(--navy-800); margin-bottom: 8px; }
.ds-biodata .org { display: flex; gap: 12px; align-items: center; }
.ds-biodata .org img { width: 48px; height: 48px; object-fit: contain; }
.ds-biodata .org strong { display: block; color: var(--navy-800); font-size: 15px; letter-spacing: .04em; }
.ds-biodata .org small { color: var(--muted); font-size: 11.5px; }
.ds-biodata .title { text-align: center; }
.ds-biodata .title h1 { font-size: 18px; letter-spacing: .08em; color: var(--navy-800); }
.ds-biodata .title small { color: var(--muted); font-size: 11.5px; }
.ds-biodata .photo { width: 110px; height: 130px; border: 2px dashed var(--border-strong); border-radius: 8px; display: grid; place-items: center; overflow: hidden; text-align: center; color: var(--muted); font-size: 11px; justify-self: end; }
.ds-biodata .photo img { width: 100%; height: 100%; object-fit: cover; }
.ds-biodata h2 { font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; color: #fff; background: linear-gradient(90deg, var(--navy-800), var(--teal-600)); padding: 7px 12px; border-radius: 6px; margin: 18px 0 6px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.ds-biodata table { width: 100%; border-collapse: collapse; }
.ds-biodata th, .ds-biodata td { border: 1px solid var(--border); padding: 7px 10px; vertical-align: top; text-align: left; }
.ds-biodata th { width: 20%; background: var(--surface-2); color: var(--text-2); font-weight: 600; font-size: 12px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.ds-biodata td { color: var(--navy-800); font-weight: 500; }
.ds-biodata .blank { display: inline-block; min-width: 140px; border-bottom: 1px dotted var(--border-strong); height: 14px; }
.ds-biodata .decl { color: var(--text-2); margin-top: 6px; }
.ds-biodata .signs { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 40px; color: var(--muted); font-size: 12px; }
.ds-biodata .signs span { display: block; border-bottom: 1px solid var(--navy-800); height: 34px; margin-bottom: 6px; }
@media (max-width: 760px) { .ds-biodata { padding: 18px; } .ds-biodata header { grid-template-columns: 1fr; } .ds-biodata .photo { justify-self: start; } .ds-biodata th { width: 38%; } .ds-biodata tr { display: grid; grid-template-columns: 38% 62%; } .ds-biodata td[colspan] { grid-column: 2; } }
@media print { .ds-biodata { border: 0; box-shadow: none; padding: 0; font-size: 11.5px; } .ds-biodata h2 { margin-top: 12px; } }

/* ----- Calendar (big) --------------------------------------------------- */
.ds-cal-big .ds-cal-d { min-height: 104px; }
.ds-cal-d a.tag, .ds-cal-d span.tag { display: block; text-decoration: none; }
.ds-cal-d a.tag:hover { filter: brightness(.9); }
.ds-cal-d .tag.more { background: var(--surface-2); color: var(--muted); }
.ds-cal-filters { display: grid; gap: 8px; }
.ds-cal-filters label { display: flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 500; color: var(--text-2); cursor: pointer; }
.ds-cal-filters input { width: 16px; height: 16px; accent-color: var(--teal-500); }
.ds-cal-filters i { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.ds-agenda { padding: 0 20px; }
.ds-agenda .ds-agenda-day { background: var(--surface-2); margin: 0 -20px; padding: 9px 20px; border-bottom: 1px solid var(--border); font-size: 12.5px; }
.ds-agenda-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.ds-date-chip { width: 44px; flex: none; text-align: center; border-radius: 10px; background: var(--teal-50); color: var(--teal-700); font-size: 11px; font-weight: 700; text-transform: uppercase; padding: 5px 0; line-height: 1.1; }
.ds-date-chip b { display: block; font-size: 17px; color: var(--navy-800); }
@media (max-width: 760px) { .ds-cal-big .ds-cal-d { min-height: 54px; } .ds-cal-d a.tag, .ds-cal-d span.tag { font-size: 0; height: 6px; padding: 0; } }

/* ----- Meetings --------------------------------------------------------- */
.ds-meeting { display: grid; grid-template-columns: 70px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.ds-meeting:last-child { border-bottom: 0; }
.ds-meeting.cancelled { opacity: .55; }
.ds-meeting .when { text-align: center; border-radius: 12px; background: linear-gradient(135deg, var(--navy-800), var(--navy-600)); color: #fff; padding: 8px 4px; line-height: 1.15; }
.ds-meeting .when small { display: block; font-size: 11px; color: var(--teal-300); font-weight: 700; text-transform: uppercase; }
.ds-meeting .when b { display: block; font-size: 22px; }
.ds-meeting .when em { font-style: normal; font-size: 11px; color: #BFD0E6; }
.ds-meeting h3 { font-size: 15px; }
.ds-meeting h3 a { color: inherit; }
.ds-meeting .meta { font-size: 12.5px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 3px; }
.ds-meeting .meta span { display: inline-flex; gap: 5px; align-items: center; }
.ds-live { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; color: #fff; background: #DC2626; padding: 2px 8px; border-radius: 99px; }
.ds-live::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: ds-pulse 1.5s infinite; }
.ds-avatars { display: flex; }
.ds-avatars .ds-avatar { border: 2px solid #fff; margin-left: -8px; }
.ds-avatars .ds-avatar:first-child { margin-left: 0; }
@media (max-width: 760px) { .ds-meeting { grid-template-columns: 58px minmax(0, 1fr); } .ds-meeting > .ds-btn-row { grid-column: 1 / -1; } }

/* ----- File library ----------------------------------------------------- */
.ds-folders { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.ds-folder { display: flex; gap: 12px; align-items: center; padding: 14px; border: 1px solid var(--border); border-radius: 14px; background: #fff; color: var(--navy-800); transition: border-color .15s, box-shadow .15s; }
.ds-folder:hover { border-color: var(--teal-300); box-shadow: var(--shadow); color: var(--navy-800); }
.ds-folder .ic { width: 44px; height: 44px; border-radius: 12px; background: #FFF4DB; color: #D99A1E; display: grid; place-items: center; flex: none; }
.ds-folder strong { display: block; font-size: 13.5px; }
.ds-folder small { color: var(--muted); font-size: 12px; }
.ds-crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; margin-bottom: 16px; color: var(--muted); }
.ds-crumbs a { font-weight: 600; }
.ds-file-ic { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; color: #fff; flex: none; font-size: 10px; font-weight: 800; }
.ds-dropzone { border: 2px dashed var(--border-strong); border-radius: 14px; padding: 22px; text-align: center; background: var(--surface-2); color: var(--muted); }
.ds-dropzone input[type=file] { margin-top: 10px; }
.ds-types { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 10px; }
.ds-types span { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 8px; color: #fff; font-size: 11.5px; font-weight: 700; }

/* ----- Switch Assistant (chat) ------------------------------------------ */
.ds-chat { position: fixed; right: 22px; bottom: 22px; z-index: 90; font-family: var(--font); }
.ds-chat-fab { display: inline-flex; align-items: center; gap: 10px; height: 56px; padding: 0 20px 0 16px; border: 0; border-radius: 28px; cursor: pointer; color: #fff; font: 700 14px/1 var(--font); background: linear-gradient(135deg, var(--teal-500), var(--navy-700)); box-shadow: 0 12px 30px rgba(8,28,56,.35); transition: transform .15s, box-shadow .2s; }
.ds-chat-fab:hover { transform: translateY(-2px); box-shadow: 0 16px 36px rgba(8,28,56,.4); }
.ds-chat-fab-ic { display: grid; place-items: center; }
.ds-chat-fab-ic.close, .ds-chat.open .ds-chat-fab-ic.open, .ds-chat.open .ds-chat-fab-label { display: none; }
.ds-chat.open .ds-chat-fab-ic.close { display: grid; }
.ds-chat.open .ds-chat-fab { width: 56px; padding: 0; justify-content: center; }
.ds-chat-panel { position: absolute; right: 0; bottom: 70px; width: 390px; max-width: calc(100vw - 32px); height: min(600px, calc(100vh - 120px)); display: flex; flex-direction: column; background: #fff; border-radius: 20px; overflow: hidden; box-shadow: 0 24px 70px rgba(6,20,41,.35); border: 1px solid var(--border); animation: ds-chat-in .2s ease-out; }
.ds-chat-panel[hidden] { display: none; }
@keyframes ds-chat-in { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.ds-chat-head { display: flex; align-items: center; gap: 11px; padding: 14px 12px 14px 16px; color: #fff; background: radial-gradient(400px 120px at 100% 0%, rgba(45,194,184,.4), transparent 60%), linear-gradient(120deg, var(--navy-900), var(--navy-700)); }
.ds-chat-head > div { flex: 1; min-width: 0; line-height: 1.2; }
.ds-chat-head strong { display: block; font-size: 15px; }
.ds-chat-head small { display: inline-flex; align-items: center; gap: 6px; color: #BFD0E6; font-size: 12px; margin-top: 3px; }
.ds-chat-head small i { width: 7px; height: 7px; border-radius: 50%; background: #34D399; }
.ds-chat-bot { width: 38px; height: 38px; border-radius: 12px; background: linear-gradient(135deg, var(--teal-500), var(--teal-400)); display: grid; place-items: center; flex: none; }
.ds-chat-bot img { width: 22px; height: 22px; }
.ds-chat-icon { width: 34px; height: 34px; border-radius: 10px; border: 0; background: transparent; color: #fff; display: grid; place-items: center; cursor: pointer; }
.ds-chat-icon:hover { background: rgba(255,255,255,.12); }
.ds-chat-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--bg); }
.ds-chat-msg { max-width: 86%; padding: 10px 13px; border-radius: 16px; font-size: 13.5px; line-height: 1.5; color: var(--text); word-wrap: break-word; }
.ds-chat-msg.in { animation: ds-chat-in .18s ease-out; }
.ds-chat-msg p { margin: 0; }
.ds-chat-msg p + p, .ds-chat-msg p + ul, .ds-chat-msg ul + p { margin-top: 6px; }
.ds-chat-msg ul { margin: 4px 0 0; padding-left: 18px; }
.ds-chat-msg li { margin: 2px 0; }
.ds-chat-msg.bot { align-self: flex-start; background: #fff; border: 1px solid var(--border); border-bottom-left-radius: 5px; box-shadow: var(--shadow-sm); }
.ds-chat-msg.me { align-self: flex-end; background: linear-gradient(135deg, var(--teal-500), var(--teal-600)); color: #fff; border-bottom-right-radius: 5px; }
.ds-chat-links { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.ds-chat-links a { display: block; padding: 8px 11px; border-radius: 10px; background: var(--teal-50); color: var(--teal-700); font-weight: 600; font-size: 12.5px; border: 1px solid var(--teal-100); }
.ds-chat-links a:hover { background: var(--teal-100); color: var(--navy-800); }
.ds-chat-typing { display: inline-flex; gap: 4px; padding: 13px 14px; }
.ds-chat-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); opacity: .4; animation: ds-dot 1.2s infinite; }
.ds-chat-typing span:nth-child(2) { animation-delay: .15s; } .ds-chat-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes ds-dot { 30% { opacity: 1; transform: translateY(-3px); } }
.ds-chat-chips { display: flex; gap: 6px; padding: 8px 12px; overflow-x: auto; background: var(--bg); scrollbar-width: none; }
.ds-chat-chips:empty { display: none; }
.ds-chat-chips::-webkit-scrollbar { display: none; }
.ds-chat-chips button { flex: none; border: 1px solid var(--teal-300); background: #fff; color: var(--teal-700); border-radius: 99px; padding: 7px 12px; font: 600 12.5px/1 var(--font); cursor: pointer; white-space: nowrap; }
.ds-chat-chips button:hover { background: var(--teal-50); }
.ds-chat-chips button.hr { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
.ds-chat-form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--border); background: #fff; }
.ds-chat-form input { flex: 1; min-width: 0; height: 44px; border: 1px solid var(--border-strong); border-radius: 22px; padding: 0 16px; font: 400 14px var(--font); color: var(--text); }
.ds-chat-form input:focus { outline: none; border-color: var(--teal-500); box-shadow: 0 0 0 3px rgba(15,163,163,.15); }
.ds-chat-form button { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--teal-500); color: #fff; display: grid; place-items: center; cursor: pointer; flex: none; }
.ds-chat-form button:hover { background: var(--teal-600); }
.ds-chat-foot { padding: 0 12px 10px; font-size: 11px; color: var(--muted); text-align: center; background: #fff; }
@media (max-width: 760px) {
  body.ds-app:not(.ds-public) .ds-chat { bottom: 84px; right: 12px; }
  .ds-chat { right: 14px; bottom: 14px; }
  .ds-chat-fab { height: 52px; padding: 0; width: 52px; justify-content: center; border-radius: 50%; }
  .ds-chat-fab-label { display: none; }
  .ds-chat.open { inset: 0; right: 0; bottom: 0; }
  .ds-chat.open .ds-chat-fab { display: none; }
  .ds-chat-panel { position: fixed; inset: 0; width: 100%; max-width: none; height: 100%; border-radius: 0; bottom: 0; }
}
@media print { .ds-chat { display: none !important; } }

/* ================= v10.4 OFFICE SUITE ================= */
.ds-link { background: none; border: 0; padding: 0; color: var(--teal-600); font: inherit; font-weight: 600; cursor: pointer; }
.ds-link:hover { text-decoration: underline; }
.ds-select, .ds-textarea { width: 100%; min-height: 40px; padding: 8px 12px; border: 1px solid var(--border-strong); border-radius: 10px; background: #fff; color: var(--text); font: 400 14px/1.4 var(--font); }
.ds-select.sm, .ds-input.sm { min-height: 32px; padding: 4px 8px; width: auto; }
.ds-select:focus, .ds-textarea:focus { outline: none; border-color: var(--teal-500); box-shadow: 0 0 0 4px rgba(15,163,163,.15); }

/* Editor header */
.ds-office-head { display: flex; align-items: center; gap: 12px; margin: -4px 0 14px; flex-wrap: wrap; }
.ds-office-titlebox { flex: 1; min-width: 200px; }
.ds-office-title { width: 100%; border: 1px solid transparent; background: transparent; font: 700 20px/1.3 var(--font); color: var(--navy-800); padding: 3px 8px; margin-left: -8px; border-radius: 8px; }
.ds-office-title:hover:not([readonly]) { border-color: var(--border); }
.ds-office-title:focus { outline: none; border-color: var(--teal-500); background: #fff; }
.ds-office-titlebox small { display: block; color: var(--muted); font-size: 12px; margin-top: 1px; }
.ds-office-status { font-weight: 600; color: var(--muted); }
.ds-office-status.st-saved { color: var(--success); }
.ds-office-status.st-saving, .ds-office-status.st-dirty { color: var(--teal-600); }
.ds-office-status.st-offline, .ds-office-status.st-expired { color: var(--danger); }
.ds-office-presence { display: flex; align-items: center; }
.ds-office-presence .ds-avatar { width: 30px; height: 30px; font-size: 11px; border: 2px solid #fff; margin-left: -8px; box-shadow: var(--shadow-sm); }
.ds-office-presence .ds-avatar:first-child { margin-left: 0; }
.ds-office-actions { align-items: center; }
.ds-menu { position: relative; }
.ds-menu > summary { list-style: none; cursor: pointer; }
.ds-menu > summary::-webkit-details-marker { display: none; }
.ds-menu-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 50; background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; min-width: 240px; display: grid; gap: 2px; }
.ds-menu-pop .ds-btn, .ds-menu-pop form { width: 100%; justify-content: flex-start; margin: 0; }
.ds-menu-pop .ds-btn { border-color: transparent; }

/* Shared toolbar (docs + sheets) */
.ds-doc-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; padding: 6px 8px; background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-sm); position: sticky; top: 74px; z-index: 20; }
.ds-doc-toolbar button { min-width: 32px; height: 32px; padding: 0 7px; display: inline-grid; place-items: center; border: 0; border-radius: 7px; background: transparent; color: var(--navy-800); font: 600 14px var(--font); cursor: pointer; }
.ds-doc-toolbar button:hover { background: var(--teal-50); }
.ds-doc-toolbar button.on { background: var(--teal-100); color: var(--teal-700); }
.ds-doc-toolbar select { height: 32px; border: 1px solid var(--border); border-radius: 7px; background: #fff; padding: 0 6px; font: 500 13px var(--font); color: var(--navy-800); }
.ds-doc-toolbar .sep { width: 1px; height: 22px; background: var(--border); margin: 0 5px; }
.ds-doc-color { position: relative; min-width: 32px; height: 32px; display: inline-grid; place-items: center; border-radius: 7px; font-weight: 800; color: var(--navy-800); cursor: pointer; }
.ds-doc-color:hover { background: var(--teal-50); }
.ds-doc-color.hl { color: #E7B400; }
.ds-doc-color input { position: absolute; inset: auto 4px 3px 4px; width: calc(100% - 8px); height: 4px; padding: 0; border: 0; opacity: 1; cursor: pointer; }
.ds-doc-color input::-webkit-color-swatch-wrapper { padding: 0; }
.ds-doc-color input::-webkit-color-swatch { border: 0; border-radius: 2px; }
.readonly .ds-doc-toolbar { opacity: .5; pointer-events: none; }

/* Docs */
.ds-doc-canvas { background: #E9EDF3; border-radius: 14px; padding: 28px 16px; margin-top: 12px; overflow-x: auto; }
.ds-doc-page { background: #fff; width: 100%; max-width: 816px; min-height: 1056px; margin: 0 auto; padding: 72px 80px; box-shadow: 0 1px 3px rgba(8,28,56,.12), 0 8px 30px rgba(8,28,56,.08); border-radius: 3px; font: 400 15px/1.65 'Calibri', 'Carlito', var(--font); color: #1a1a1a; outline: none; word-wrap: break-word; }
.ds-doc-page h1 { font-size: 28px; margin: 18px 0 8px; color: var(--navy-800); }
.ds-doc-page h2 { font-size: 21px; margin: 16px 0 6px; color: var(--navy-800); }
.ds-doc-page h3 { font-size: 17px; margin: 14px 0 4px; color: var(--navy-700); }
.ds-doc-page p { margin: 0 0 10px; }
.ds-doc-page ul, .ds-doc-page ol { margin: 0 0 10px; padding-left: 26px; }
.ds-doc-page blockquote { margin: 10px 0; padding: 6px 16px; border-left: 4px solid var(--teal-500); background: var(--teal-50); color: var(--text-2); }
.ds-doc-page pre { background: #0E1D33; color: #E2E8F0; padding: 12px 14px; border-radius: 8px; font: 13px/1.5 ui-monospace, Consolas, monospace; white-space: pre-wrap; }
.ds-doc-page table { border-collapse: collapse; width: 100%; margin: 10px 0; }
.ds-doc-page td, .ds-doc-page th { border: 1px solid #C7CFDA; padding: 6px 8px; min-width: 40px; vertical-align: top; }
.ds-doc-page th { background: #F2F5F9; }
.ds-doc-page hr { border: 0; border-top: 1px solid #C7CFDA; margin: 16px 0; }
.ds-doc-page img { max-width: 100%; }
.ds-doc-page [data-who] { position: relative; box-shadow: -3px 0 0 var(--who); }
.ds-doc-page [data-who]::after { content: attr(data-who); position: absolute; left: -3px; top: -17px; background: var(--who); color: #fff; font: 600 10px/1 var(--font); padding: 3px 6px; border-radius: 4px 4px 4px 0; white-space: nowrap; pointer-events: none; z-index: 2; }
.ds-doc-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 12px; padding: 10px 4px; }
@media print {
  body.ds-app .ds-sidebar, body.ds-app .ds-topbar, .ds-office-head, .ds-doc-toolbar, .ds-doc-foot, .ds-chat, .ds-flash, .ds-alert { display: none !important; }
  .ds-content { padding: 0 !important; max-width: none !important; }
  .ds-doc-canvas { background: none; padding: 0; } .ds-doc-page { box-shadow: none; padding: 0; min-height: 0; max-width: none; }
  .ds-main { margin: 0 !important; padding: 0 !important; }
}

/* Sheets */
.ds-sheet-fxbar { display: flex; align-items: center; gap: 0; margin-top: 8px; background: #fff; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.ds-sheet-name { width: 84px; border: 0; border-right: 1px solid var(--border); padding: 8px 10px; font: 600 13px var(--font); color: var(--navy-800); text-align: center; background: var(--surface-2); }
.ds-sheet-fxbar .fx { padding: 0 10px; font: italic 700 14px Georgia, serif; color: var(--teal-600); border-right: 1px solid var(--border); }
.ds-sheet-fx { flex: 1; border: 0; padding: 8px 10px; font: 400 13px ui-monospace, Consolas, monospace; outline: none; min-width: 0; }
.ds-sheet-grid { position: relative; margin-top: 8px; height: calc(100vh - 330px); min-height: 360px; overflow: auto; background: #fff; border: 1px solid var(--border); border-radius: 10px; user-select: none; }
table.ds-grid { display: table; border-collapse: separate; border-spacing: 0; table-layout: fixed; font: 400 13px/1.2 var(--font); gap: 0; }
table.ds-grid th, table.ds-grid td { height: 26px; border-right: 1px solid #E3E8EF; border-bottom: 1px solid #E3E8EF; padding: 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
table.ds-grid thead th { position: sticky; top: 0; z-index: 3; background: #F3F6FA; color: var(--muted); font-weight: 600; font-size: 12px; text-align: center; }
table.ds-grid tbody th { position: sticky; left: 0; z-index: 2; background: #F3F6FA; color: var(--muted); font-weight: 600; font-size: 12px; text-align: center; width: 46px; }
table.ds-grid th.corner { left: 0; z-index: 4; width: 46px; }
table.ds-grid th.hl { background: var(--teal-100); color: var(--teal-700); }
table.ds-grid td { cursor: cell; background: #fff; }
table.ds-grid td.num { text-align: right; font-variant-numeric: tabular-nums; }
table.ds-grid td.err { color: var(--danger); font-weight: 600; }
table.ds-grid td.sel { background: rgba(15,163,163,.10); }
table.ds-grid td.act { box-shadow: inset 0 0 0 2px var(--teal-500); background: #fff; }
table.ds-grid td.pres { box-shadow: inset 0 0 0 2px var(--who); position: relative; overflow: visible; }
table.ds-grid td.pres::after { content: attr(data-who); position: absolute; right: -1px; top: -14px; background: var(--who); color: #fff; font: 600 9px/1 var(--font); padding: 2px 5px; border-radius: 3px; z-index: 5; pointer-events: none; white-space: nowrap; }
table.ds-grid thead th { position: sticky; }
table.ds-grid .rz { position: absolute; right: -3px; top: 0; bottom: 0; width: 7px; cursor: col-resize; z-index: 5; }
table.ds-grid .rz:hover { background: var(--teal-400); }
.ds-grid-edit { position: absolute; z-index: 10; border: 2px solid var(--teal-500); padding: 0 5px; font: 400 13px var(--font); outline: none; box-shadow: 0 4px 16px rgba(8,28,56,.18); background: #fff; }
.ds-sheet-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; flex-wrap: wrap; }
.ds-sheet-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.ds-sheet-tabs button { border: 1px solid var(--border); background: #fff; border-radius: 8px; padding: 6px 14px; font: 600 13px var(--font); color: var(--text-2); cursor: pointer; }
.ds-sheet-tabs button.on { background: var(--navy-800); color: #fff; border-color: var(--navy-800); }
.ds-sheet-tabs button.add { color: var(--teal-600); border-style: dashed; }
.ds-sheet-stat { color: var(--muted); font-size: 12px; font-weight: 600; }
.ds-sheet-help { margin-top: 10px; color: var(--muted); font-size: 12px; }
.ds-sheet-help summary { cursor: pointer; font-weight: 600; color: var(--teal-600); }
.ds-sheet-help p { margin-top: 6px; line-height: 1.6; }

/* Office home, lists, new modal */
.ds-office-start { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 14px; margin-bottom: 20px; }
.ds-office-start form { display: block; }
.ds-office-start-tile { --c: var(--teal-500); width: 100%; height: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 18px; background: #fff; border: 1px solid var(--border); border-radius: 14px; cursor: pointer; text-align: left; font-family: var(--font); transition: transform .15s, box-shadow .15s, border-color .15s; box-shadow: var(--shadow-sm); }
.ds-office-start-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--c); }
.ds-office-start-tile .ic { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--c); color: #fff; margin-bottom: 8px; }
.ds-office-start-tile.tpl .ic { background: linear-gradient(135deg, var(--navy-700), var(--teal-500)); }
.ds-office-start-tile strong { color: var(--navy-800); font-size: 15px; }
.ds-office-start-tile small { color: var(--muted); font-size: 12px; }
.ds-file-row { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ds-file-row a { font-weight: 600; color: var(--navy-800); }
.ds-new-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.ds-new-col h4 { display: flex; align-items: center; gap: 10px; font-size: 15px; margin-bottom: 10px; color: var(--navy-800); }
.ds-new-col h4 .ds-file-ic { width: 32px; height: 32px; }
.ds-new-col form { display: block; margin-bottom: 6px; }
.ds-new-tile { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); background: #fff; border-radius: 10px; font: 500 14px var(--font); color: var(--text-2); cursor: pointer; text-align: left; }
.ds-new-tile:hover { border-color: var(--teal-500); background: var(--teal-50); color: var(--teal-700); }

/* Notes (Keep-style) */
.ds-note-compose { max-width: 720px; margin: 0 auto 20px; }
.ds-note-compose-form { display: flex; gap: 8px; background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 8px; box-shadow: var(--shadow); }
.ds-note-compose-form input[type=text] { flex: 1; border: 0; font: 500 15px var(--font); padding: 0 10px; outline: none; min-width: 0; }
.ds-notes { columns: 4 240px; column-gap: 14px; margin-top: 16px; }
.ds-note { break-inside: avoid; position: relative; display: block; margin-bottom: 14px; padding: 14px 16px 12px; border: 1px solid var(--border); border-radius: 14px; cursor: pointer; transition: box-shadow .15s, transform .15s; box-shadow: var(--shadow-sm); }
.ds-note:hover, .ds-note:focus { box-shadow: var(--shadow); outline: none; transform: translateY(-1px); }
.ds-note h3 { font-size: 15px; color: var(--navy-900); margin: 0 22px 6px 0; }
.ds-note p { color: var(--text-2); font-size: 13.5px; margin-bottom: 8px; white-space: pre-line; }
.ds-note .pin { position: absolute; right: 12px; top: 10px; font-size: 14px; }
.ds-note footer { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.ds-note-items { list-style: none; margin: 0; padding: 0; font-size: 13.5px; color: var(--text-2); }
.ds-note-items li { display: flex; align-items: flex-start; gap: 8px; padding: 2px 0; }
.ds-note-items .box { width: 14px; height: 14px; flex: none; margin-top: 3px; border: 1.5px solid var(--border-strong); border-radius: 4px; background: #fff; }
.ds-note-items li.done { color: var(--muted); text-decoration: line-through; }
.ds-note-items li.done .box { background: var(--teal-500); border-color: var(--teal-500); box-shadow: inset 0 0 0 2px #fff; }
.ds-note-items li.more { color: var(--muted); font-size: 12px; padding-left: 22px; }
.ds-note-modal { background: var(--note-bg, #fff); width: min(620px, calc(100vw - 24px)); }
.ds-note-edit { padding: 18px 20px 14px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; }
.ds-note-title { border: 0; background: transparent; font: 700 19px var(--font); color: var(--navy-900); outline: none; padding: 4px 0; }
.ds-note-text { border: 0; background: transparent; font: 400 15px/1.55 var(--font); color: var(--text); outline: none; resize: vertical; min-height: 70px; }
.ds-note-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.ds-note-list li { display: flex; align-items: center; gap: 8px; padding: 3px 0; border-radius: 6px; }
.ds-note-list li:hover { background: rgba(8,28,56,.04); }
.ds-note-list input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--teal-500); flex: none; }
.ds-note-list input[type=text] { flex: 1; border: 0; background: transparent; font: 400 15px var(--font); outline: none; padding: 3px 0; color: var(--text); min-width: 0; }
.ds-note-list li.done input[type=text] { text-decoration: line-through; color: var(--muted); }
.ds-note-list button { border: 0; background: none; font-size: 18px; color: var(--muted); cursor: pointer; opacity: 0; }
.ds-note-list li:hover button, .ds-note-list li:focus-within button { opacity: 1; }
.ds-note-add { display: flex; align-items: center; gap: 10px; color: var(--muted); padding: 4px 0; border-top: 1px dashed var(--border); }
.ds-note-add span { width: 18px; text-align: center; font-size: 18px; }
.ds-note-add input { flex: 1; border: 0; background: transparent; outline: none; font: 400 15px var(--font); padding: 6px 0; }
.ds-note-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; border-top: 1px solid rgba(8,28,56,.08); padding-top: 12px; margin-top: 6px; }
.ds-note-colors { display: flex; gap: 5px; }
.ds-note-colors button { width: 22px; height: 22px; border-radius: 50%; border: 1px solid rgba(8,28,56,.18); cursor: pointer; padding: 0; }
.ds-note-colors button:hover { transform: scale(1.12); }
.ds-note-due { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); font-weight: 600; }
.ds-note-due input { border: 1px solid var(--border); border-radius: 8px; padding: 4px 6px; font: 13px var(--font); background: rgba(255,255,255,.7); }
#note-pin.on { background: var(--teal-100); border-color: var(--teal-500); color: var(--teal-700); }

/* Form builder */
.ds-form-tabs { margin-bottom: 12px; }
.ds-formb { --form-c: var(--teal-500); max-width: 780px; margin: 0 auto; }
.ds-formb-card { background: #fff; border: 1px solid var(--border); border-left: 4px solid transparent; border-radius: 12px; padding: 18px 20px; margin-bottom: 12px; box-shadow: var(--shadow-sm); transition: border-color .15s; }
.ds-formb-card:focus-within { border-left-color: var(--form-c); box-shadow: var(--shadow); }
.ds-formb-card.head { border-top: 8px solid var(--form-c); border-left-width: 1px; }
.ds-formb-card.head textarea { width: 100%; border: 0; resize: vertical; font: 400 15px/1.5 var(--font); outline: none; color: var(--text-2); }
.ds-formb-card.section { background: linear-gradient(0deg, #fff, #fff) padding-box; border-top: 4px solid var(--navy-700); }
.ds-formb-card.section .ds-formb-q { font-size: 18px; font-weight: 700; }
.ds-formb-row { display: flex; gap: 12px; align-items: flex-start; }
.ds-formb-q { flex: 1; min-width: 0; border: 0; border-bottom: 1px solid var(--border); background: var(--surface-2); padding: 10px 12px; font: 600 15px var(--font); color: var(--navy-900); outline: none; border-radius: 6px 6px 0 0; }
.ds-formb-q:focus { border-bottom: 2px solid var(--form-c); }
.ds-formb-type { width: 190px; flex: none; }
.ds-formb-help { width: 100%; border: 0; border-bottom: 1px dashed transparent; padding: 6px 12px; margin-top: 4px; font: 400 13px var(--font); color: var(--muted); outline: none; background: transparent; }
.ds-formb-help:focus { border-bottom-color: var(--border-strong); }
.ds-formb-opts { margin-top: 8px; display: grid; gap: 4px; }
.ds-formb-opt { display: flex; align-items: center; gap: 10px; padding: 2px 0; }
.ds-formb-opt .mk { width: 20px; text-align: center; color: var(--muted); font-size: 15px; flex: none; }
.ds-formb-opt input { flex: 1; border: 0; border-bottom: 1px solid transparent; padding: 6px 2px; font: 400 14px var(--font); outline: none; background: transparent; }
.ds-formb-opt input:hover { border-bottom-color: var(--border); }
.ds-formb-opt input:focus { border-bottom: 2px solid var(--form-c); }
.ds-formb-opt .x { border: 0; background: none; font-size: 20px; color: var(--muted); cursor: pointer; width: 28px; height: 28px; border-radius: 50%; }
.ds-formb-opt .x:hover { background: var(--danger-bg); color: var(--danger); }
.ds-formb-opt.other span:not(.mk) { color: var(--muted); flex: 1; }
.ds-formb-opt.add { color: var(--muted); font-size: 14px; }
.ds-formb-fake { margin-top: 10px; border-bottom: 1px dotted var(--border-strong); color: var(--muted); padding: 8px 2px; font-size: 13px; width: 60%; }
.ds-formb-fake.tall { width: 90%; padding-bottom: 26px; }
.ds-formb-stars { margin-top: 10px; color: #E7B400; font-size: 26px; letter-spacing: 4px; }
.ds-formb-scale { margin-top: 10px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }
.ds-formb-scale i { font-style: normal; width: 30px; height: 30px; border: 1.5px solid var(--border-strong); border-radius: 50%; display: grid; place-items: center; font-weight: 600; color: var(--text-2); }
.ds-formb-scaleset { margin-top: 10px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.ds-formb-scaleset input[type=text] { flex: 1; min-width: 140px; border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; font: 13px var(--font); }
.ds-formb-foot { display: flex; align-items: center; justify-content: flex-end; gap: 4px; margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--border); }
.ds-formb-foot .ic { width: 34px; height: 34px; border: 0; border-radius: 50%; background: transparent; color: var(--text-2); cursor: pointer; font-size: 15px; }
.ds-formb-foot .ic:hover:not(:disabled) { background: var(--surface-2); }
.ds-formb-foot .ic.danger:hover { background: var(--danger-bg); }
.ds-formb-foot .ic:disabled { opacity: .3; cursor: default; }
.ds-formb-req { display: inline-flex; align-items: center; gap: 6px; margin-left: 10px; padding-left: 14px; border-left: 1px solid var(--border); font-size: 13px; font-weight: 600; color: var(--text-2); cursor: pointer; }
.ds-formb-req input { accent-color: var(--form-c); width: 16px; height: 16px; }
.ds-formb-empty { text-align: center; color: var(--muted); padding: 36px 20px; background: #fff; border: 2px dashed var(--border); border-radius: 12px; margin-bottom: 12px; }
.ds-formb-add { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; box-shadow: var(--shadow-sm); position: sticky; bottom: 12px; z-index: 10; }
.ds-formb-add > span { font-weight: 700; color: var(--navy-800); margin-right: 4px; font-size: 13px; }
.ds-form-answers { list-style: none; margin: 0; padding: 0; max-height: 320px; overflow-y: auto; }
.ds-form-answers li { padding: 8px 12px; background: var(--surface-2); border-radius: 8px; margin-bottom: 6px; font-size: 13.5px; }

/* Public form page */
body.ds-public .ds-pform { --form-c: var(--teal-500); min-height: 100vh; background: color-mix(in srgb, var(--form-c) 12%, #F2F5F9); }
.ds-pform-top { display: flex; align-items: center; justify-content: space-between; max-width: 760px; margin: 0 auto; padding: 18px 16px 6px; }
.ds-pform-top .ds-brand-text strong { color: var(--navy-900); }
.ds-pform-top .ds-brand-text small { color: var(--teal-600); }
.ds-pform-me { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13px; }
.ds-pform-body { max-width: 760px; margin: 0 auto; padding: 10px 16px 50px; }
.ds-pform-card { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 22px 24px; margin-bottom: 12px; box-shadow: var(--shadow-sm); }
.ds-pform-card.head { border-top: 10px solid var(--form-c); }
.ds-pform-card.head h1 { font-size: 28px; color: var(--navy-900); line-height: 1.25; }
.ds-pform-desc { margin-top: 10px; color: var(--text-2); font-size: 15px; }
.ds-pform-desc p { margin: 0 0 8px; }
.ds-pform-meta { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); font-size: 13px; color: var(--muted); display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: center; }
.ds-pform-meta .req-note, .ds-pform-q .req { color: var(--danger); }
.ds-pform-card h2 { font-size: 19px; color: var(--navy-900); display: flex; align-items: center; gap: 8px; }
.ds-pform-card h2 + p { margin-top: 8px; color: var(--text-2); }
.ds-pform-card.q:focus-within { border-left: 4px solid var(--form-c); padding-left: 21px; }
.ds-pform-card.bad { border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-bg); }
.ds-pform-q { display: block; font-size: 16px; font-weight: 600; color: var(--navy-900); margin-bottom: 4px; }
.ds-pform-help { color: var(--muted); font-size: 13px; margin: 0 0 6px; }
.ds-pform-a { margin-top: 12px; }
.ds-pform-a .ds-input, .ds-pform-a .ds-textarea { max-width: 100%; }
.ds-pform-a .ds-input[type=text], .ds-pform-a .ds-input[type=email], .ds-pform-a .ds-input[type=tel], .ds-pform-a .ds-input[type=number] { max-width: 480px; }
.ds-pform-a .ds-input[type=date], .ds-pform-a .ds-input[type=time] { max-width: 220px; }
.ds-pform-a .ds-select { max-width: 360px; }
.ds-pform-opt { display: flex; align-items: center; gap: 12px; padding: 9px 4px; font-size: 15px; cursor: pointer; border-radius: 8px; }
.ds-pform-opt:hover { background: var(--surface-2); }
.ds-pform-opt input[type=radio], .ds-pform-opt input[type=checkbox] { width: 19px; height: 19px; accent-color: var(--form-c); flex: none; }
.ds-pform-opt.other .ds-input { flex: 1; max-width: 360px; }
.ds-pform-scale { display: flex; align-items: flex-end; gap: 4px; flex-wrap: wrap; }
.ds-pform-scale label { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 6px 10px; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--text-2); border-radius: 8px; }
.ds-pform-scale label:hover { background: var(--surface-2); }
.ds-pform-scale input { width: 20px; height: 20px; accent-color: var(--form-c); }
.ds-pform-scale .lbl { font-size: 13px; color: var(--muted); padding: 0 8px 10px; }
.ds-pform-stars { display: inline-flex; flex-direction: row-reverse; gap: 4px; }
.ds-pform-stars input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ds-pform-stars label { font-size: 34px; line-height: 1; color: #D5DCE6; cursor: pointer; transition: color .1s, transform .1s; }
.ds-pform-stars label:hover, .ds-pform-stars label:hover ~ label, .ds-pform-stars input:checked ~ label { color: #F2B705; }
.ds-pform-stars label:hover { transform: scale(1.1); }
.ds-pform-stars input:focus-visible + label { outline: 2px solid var(--form-c); border-radius: 4px; }
.ds-pform-section { padding: 14px 24px; margin: 22px 0 12px; background: var(--navy-800); color: #fff; border-radius: 12px; }
.ds-pform-section h2 { color: #fff; font-size: 18px; }
.ds-pform-section p { color: #C8D6E8; margin-top: 4px; font-size: 14px; }
.ds-pform-actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 18px; }
.ds-pform-actions .ds-btn.primary { background: var(--form-c); border-color: var(--form-c); min-width: 140px; }
.ds-pform-card.done { text-align: center; padding: 34px 24px; }
.ds-pform-card.done h2 { justify-content: center; margin-top: 8px; }
.ds-pform-tick { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--success-bg); color: var(--success); }
.ds-pform-foot { text-align: center; color: var(--muted); font-size: 12px; margin-top: 24px; }

@media (max-width: 1100px) { .ds-office-start { grid-template-columns: repeat(3, minmax(0,1fr)); } }
@media (max-width: 720px) {
  .ds-office-start { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .ds-doc-page { padding: 32px 22px; min-height: 600px; }
  .ds-doc-canvas { padding: 12px 6px; }
  .ds-doc-toolbar { top: 66px; }
  .ds-sheet-grid { height: calc(100vh - 300px); }
  .ds-formb-row { flex-direction: column; }
  .ds-formb-type { width: 100%; }
  .ds-formb-add { position: static; }
  .ds-pform-card { padding: 18px 16px; }
  .ds-pform-card.head h1 { font-size: 23px; }
  .ds-office-presence { order: 5; }
}

/* ================= v10.5 SWITCH CHAT ================= */
.ds-count { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--teal-500); color: #fff; font: 700 11px/20px var(--font); font-style: normal; text-align: center; }
.ds-count[hidden], [data-chat-badge][hidden] { display: none !important; }
.ds-chat-top i { background: var(--teal-500); }
.ds-bn-ic { position: relative; display: inline-grid; }
.ds-bn-ic i { position: absolute; top: -6px; right: -10px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--teal-500); color: #fff; font: 700 10px/17px var(--font); font-style: normal; text-align: center; border: 2px solid #fff; }

body.view-messages .ds-content { padding: 0; max-width: none; }
body.view-messages .ds-footer, body.view-messages .ds-flashes { display: none; }
.ds-sc { --sc-bg: #EFEAE2; --sc-mine: #D9F4F0; --sc-theirs: #fff; --sc-line: #E3E8EF; display: grid; grid-template-columns: 380px minmax(0,1fr); height: calc(100vh - 66px); height: calc(100dvh - 66px); background: #fff; overflow: hidden; position: relative; }
.ds-sc.info-open { grid-template-columns: 380px minmax(0,1fr) 340px; }
.ds-sc-side { display: flex; flex-direction: column; border-right: 1px solid var(--sc-line); min-height: 0; background: #fff; }
.ds-sc-side-head { display: flex; align-items: center; gap: 6px; padding: 12px 14px; background: var(--surface-2); border-bottom: 1px solid var(--sc-line); }
.ds-sc-side-head h2 { flex: 1; font-size: 19px; color: var(--navy-900); margin-left: 6px; }
.ds-sc-me { width: 38px; height: 38px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--navy-700); color: #fff; font-weight: 700; font-size: 13px; flex: none; }
.ds-sc-me img { width: 100%; height: 100%; object-fit: cover; }
.ds-sc-ic { width: 40px; height: 40px; display: inline-grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: #54656F; cursor: pointer; flex: none; transition: background .12s; text-decoration: none; }
.ds-sc-ic:hover { background: rgba(8,28,56,.07); color: var(--navy-800); }
.ds-sc-ic.on { color: var(--teal-600); }
.ds-sc-ic.danger { color: var(--danger); }
.ds-sc-ic[hidden] { display: none; }
.ds-sc-search { display: flex; align-items: center; gap: 10px; margin: 8px 12px 4px; padding: 0 14px; height: 40px; border-radius: 10px; background: #F0F2F5; color: #54656F; }
.ds-sc-search input { flex: 1; border: 0; background: transparent; font: 400 14px var(--font); outline: none; color: var(--text); min-width: 0; }
.ds-sc-search.in-dlg { margin: 0 0 10px; }
.ds-sc-search svg { flex: none; }
.ds-sc-filters { display: flex; gap: 6px; padding: 6px 12px 8px; overflow-x: auto; scrollbar-width: none; }
.ds-sc-filters button { border: 0; background: #F0F2F5; color: #54656F; border-radius: 16px; padding: 6px 13px; font: 600 13px var(--font); cursor: pointer; white-space: nowrap; }
.ds-sc-filters button.on { background: var(--teal-100); color: var(--teal-700); }
.ds-sc-list { flex: 1; overflow-y: auto; min-height: 0; }
.ds-sc-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 14px; border: 0; background: #fff; cursor: pointer; text-align: left; font-family: var(--font); color: var(--text); position: relative; }
.ds-sc-item::after { content: ""; position: absolute; left: 76px; right: 0; bottom: 0; border-bottom: 1px solid #EEF1F4; }
.ds-sc-item:hover { background: #F5F6F6; }
.ds-sc-item.on { background: #EBEEF0; }
.ds-sc-item .mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ds-sc-item .top, .ds-sc-item .bot { display: flex; align-items: center; gap: 6px; min-width: 0; }
.ds-sc-item .top strong { flex: 1; min-width: 0; font-weight: 600; font-size: 15px; color: #111B21; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds-sc-item time { font-size: 12px; color: #667781; flex: none; }
.ds-sc-item.unread time { color: var(--teal-600); font-weight: 600; }
.ds-sc-item .pv { flex: 1; min-width: 0; font-size: 13.5px; color: #667781; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 3px; }
.ds-sc-item .pv b { font-weight: 600; color: #54656F; }
.ds-sc-item.unread .pv { color: #3B4A54; }
.ds-sc-item .st { color: #8696A0; display: inline-grid; flex: none; }
.ds-sc-item .st svg { width: 16px; height: 16px; }
.ds-sc-item .ct { flex: none; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--teal-500); color: #fff; font: 700 11.5px/20px var(--font); font-style: normal; text-align: center; }
.ds-sc-item .ct.muted { background: #AEBAC1; }
.ds-sc-item.res .mid { padding-left: 4px; }
.ds-sc-item.pp input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--teal-500); flex: none; }
.ds-sc-item.pp[hidden] { display: none; }
.ds-sc-item.newgrp { border-radius: 10px; margin-bottom: 8px; }
.ds-sc-item.newgrp::after { display: none; }
.ds-sc-sec { padding: 14px 16px 6px; font-size: 13px; font-weight: 700; color: var(--teal-700); text-transform: uppercase; letter-spacing: .04em; }
.ds-sc-none { padding: 40px 24px; text-align: center; color: #667781; font-size: 14px; }
.ds-sc-none svg { width: 16px; height: 16px; vertical-align: -3px; }
.ds-sc-loading { display: flex; justify-content: center; gap: 6px; padding: 30px; }
.ds-sc-loading i { width: 8px; height: 8px; border-radius: 50%; background: var(--teal-400); animation: dsDot 1s infinite ease-in-out; }
.ds-sc-loading i:nth-child(2) { animation-delay: .15s; } .ds-sc-loading i:nth-child(3) { animation-delay: .3s; }
@keyframes dsDot { 0%, 80%, 100% { transform: scale(.6); opacity: .4; } 40% { transform: scale(1); opacity: 1; } }

.ds-sc-av { width: 48px; height: 48px; border-radius: 50%; display: inline-grid; place-items: center; flex: none; color: #fff; font: 700 16px var(--font); overflow: visible; position: relative; }
.ds-sc-av img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.ds-sc-av svg { width: 22px; height: 22px; }
.ds-sc-av.online::after { content: ""; position: absolute; right: 0; bottom: 1px; width: 12px; height: 12px; border-radius: 50%; background: #25D366; border: 2px solid #fff; }
.ds-sc-av.xl { width: 110px; height: 110px; font-size: 38px; }
.ds-sc-av.xl svg { width: 48px; height: 48px; }

.ds-sc-main { position: relative; min-width: 0; min-height: 0; display: flex; flex-direction: column; background: var(--sc-bg); }
.ds-sc-welcome { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 30px; background: #F7F8FA; border-bottom: 6px solid var(--teal-500); }
.ds-sc-welcome-art { width: 120px; height: 120px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--teal-100), #E7EEF8); color: var(--teal-600); margin-bottom: 22px; }
.ds-sc-welcome h2 { font-size: 28px; font-weight: 300; color: #41525D; }
.ds-sc-welcome p { max-width: 440px; color: #667781; margin: 10px 0 20px; }
.ds-sc-e2e { margin-top: 30px; color: #8696A0; display: inline-flex; align-items: center; gap: 6px; }
.ds-sc-conv { flex: 1; display: flex; flex-direction: column; min-height: 0; position: relative; }
.ds-sc-conv[hidden] { display: none; }
.ds-sc-head { display: flex; align-items: center; gap: 4px; padding: 8px 12px; background: var(--surface-2); border-bottom: 1px solid var(--sc-line); z-index: 3; }
.ds-sc-back { display: none; }
.ds-sc-headinfo { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; border: 0; background: none; cursor: pointer; text-align: left; font-family: var(--font); padding: 2px 4px; }
.ds-sc-headinfo .ds-sc-av { width: 42px; height: 42px; font-size: 14px; }
.ds-sc-headinfo .t { min-width: 0; display: flex; flex-direction: column; }
.ds-sc-headinfo strong { font-size: 16px; color: #111B21; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds-sc-headinfo small { font-size: 13px; color: #667781; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds-sc-headinfo small.on { color: var(--teal-600); }
.typing i { display: inline-block; width: 4px; height: 4px; margin-left: 2px; border-radius: 50%; background: currentColor; animation: dsDot 1s infinite; vertical-align: middle; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
.ds-sc-menuwrap, .ds-sc-emojiwrap, .ds-sc-attachwrap { position: relative; }
.ds-sc-pop { position: absolute; right: 0; top: calc(100% + 4px); z-index: 60; min-width: 220px; background: #fff; border-radius: 12px; box-shadow: 0 10px 40px rgba(8,28,56,.22); padding: 6px 0; }
.ds-sc-pop[hidden] { display: none; }
.ds-sc-pop.up { top: auto; bottom: calc(100% + 10px); left: 0; right: auto; }
.ds-sc-pop button, .ds-sc-pop a, .ds-sc-pop label { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 18px; border: 0; background: none; font: 500 14.5px var(--font); color: #3B4A54; cursor: pointer; text-align: left; text-decoration: none; }
.ds-sc-pop button:hover, .ds-sc-pop a:hover, .ds-sc-pop label:hover { background: #F5F6F6; }
.ds-sc-pop svg { width: 18px; height: 18px; color: #54656F; flex: none; }
.ds-sc-pop .danger { color: var(--danger); } .ds-sc-pop .danger svg { color: var(--danger); }
.ds-sc-pop label input { display: none; }
.ds-sc-pop .ai { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: #fff; }
.ds-sc-pop .ai svg { color: #fff; }
.ds-m-menu { position: fixed; }
.ds-m-menu .rx { display: flex; gap: 2px; padding: 4px 8px 8px; border-bottom: 1px solid #EEF1F4; margin-bottom: 4px; }
.ds-m-menu .rx button { width: 38px; height: 38px; padding: 0; justify-content: center; font-size: 22px; border-radius: 50%; }
.ds-m-menu .rx button:hover { background: #F0F2F5; transform: scale(1.12); }

.ds-sc-scroll { flex: 1; overflow-y: auto; min-height: 0; position: relative; background-color: var(--sc-bg); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%230FA3A3' stroke-opacity='.10' stroke-width='1.6'%3E%3Ccircle cx='18' cy='20' r='7'/%3E%3Cpath d='M60 12l6 10H54z'/%3E%3Crect x='92' y='14' width='14' height='12' rx='3'/%3E%3Cpath d='M16 70c6-8 14-8 20 0'/%3E%3Cpath d='M64 62h16v12H64zM68 62v-4h8v4'/%3E%3Ccircle cx='100' cy='70' r='3'/%3E%3Cpath d='M20 104l8-8 8 8M60 100h14M96 96l10 10M106 96l-10 10'/%3E%3C/g%3E%3C/svg%3E"); }
.ds-sc-thread { display: flex; flex-direction: column; padding: 14px 7% 18px; gap: 2px; }
.ds-m { display: flex; align-items: flex-end; gap: 6px; max-width: 100%; margin-top: 8px; position: relative; flex-wrap: wrap; }
.ds-m.grouped { margin-top: 2px; }
.ds-m.mine { justify-content: flex-end; }
.ds-m.theirs { justify-content: flex-start; }
.ds-m-av { width: 30px; flex: none; align-self: flex-start; }
.ds-m-av .ds-sc-av { width: 30px; height: 30px; font-size: 11px; }
.ds-m.theirs.grouped { padding-left: 36px; }
.ds-sc-thread:not(:has(.ds-m-av)) .ds-m.theirs.grouped { padding-left: 0; }
.ds-m-b { position: relative; max-width: min(560px, 72%); padding: 6px 9px 8px; border-radius: 8px; background: var(--sc-theirs); box-shadow: 0 1px .5px rgba(11,20,26,.13); font-size: 14.2px; line-height: 1.42; color: #111B21; word-wrap: break-word; overflow-wrap: anywhere; min-width: 80px; }
.ds-m.mine .ds-m-b { background: var(--sc-mine); }
.ds-m:not(.grouped).theirs .ds-m-b { border-top-left-radius: 0; }
.ds-m:not(.grouped).mine .ds-m-b { border-top-right-radius: 0; }
.ds-m:not(.grouped).theirs .ds-m-b::before { content: ""; position: absolute; top: 0; left: -8px; border: 8px solid transparent; border-top-color: var(--sc-theirs); border-right-color: var(--sc-theirs); border-width: 0 8px 10px 0; border-color: transparent var(--sc-theirs) transparent transparent; }
.ds-m:not(.grouped).mine .ds-m-b::before { content: ""; position: absolute; top: 0; right: -8px; border-style: solid; border-width: 0 0 10px 8px; border-color: transparent transparent transparent var(--sc-mine); }
.ds-m-b.big { background: transparent !important; box-shadow: none; font-size: 42px; line-height: 1.1; padding: 2px 4px 18px; }
.ds-m-b.big::before { display: none; }
.ds-m-b.big .ds-m-meta { background: rgba(255,255,255,.8); border-radius: 8px; padding: 0 6px; }
.ds-m-b.media { padding: 3px 3px 6px; }
.ds-m-name { font-size: 12.8px; font-weight: 600; margin-bottom: 2px; }
.ds-m-text { white-space: normal; display: inline; }
.ds-m-text a { color: #027EB5; text-decoration: underline; }
.ds-m-text.deleted { color: #667781; font-size: 13.5px; }
.ds-m-meta { float: right; display: inline-flex; align-items: center; gap: 3px; margin: 6px 0 -4px 10px; font-size: 11px; color: #667781; position: relative; top: 3px; white-space: nowrap; }
.ds-m-meta em { font-style: normal; }
.ds-m-meta em.err { color: var(--danger); font-weight: 600; }
.ds-m-b.media .ds-m-meta { position: absolute; right: 8px; bottom: 8px; margin: 0; top: auto; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.ds-m-b.media .ds-m-text + .ds-m-meta, .ds-m-b.media:has(.ds-m-text) .ds-m-meta { position: relative; right: auto; bottom: auto; color: #667781; text-shadow: none; margin: 6px 0 -4px 10px; }
.ds-m-b.media .ds-m-text { display: block; padding: 4px 6px 0; }
.tk { display: inline-grid; color: #8696A0; }
.tk svg { width: 16px; height: 16px; }
.tk.read { color: #34B7F1; }
.ds-m-img { display: block; max-width: 100%; width: 330px; max-height: 360px; object-fit: cover; border-radius: 6px; cursor: zoom-in; background: #D1D7DB; }
video.ds-m-img { cursor: default; }
.ds-m-file { display: flex; align-items: center; gap: 10px; padding: 8px 10px; margin: 2px 0 4px; min-width: 240px; background: rgba(8,28,56,.05); border-radius: 7px; color: #111B21; text-decoration: none; }
.ds-m-file .fi { width: 38px; height: 44px; border-radius: 5px; background: #E7EEF8; color: var(--navy-700); display: grid; place-items: center; font: 800 10px var(--font); flex: none; }
.ds-m-file .fn { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ds-m-file .fn b { font-weight: 500; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds-m-file .fn small { color: #667781; font-size: 12px; }
.ds-m-file svg { color: #8696A0; flex: none; }
.ds-m-voice { display: flex; align-items: center; gap: 10px; min-width: 240px; padding: 4px 2px; }
.ds-m-voice .pl { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--teal-500); color: #fff; display: grid; place-items: center; cursor: pointer; flex: none; }
.ds-m-voice .pl svg { width: 18px; height: 18px; fill: currentColor; }
.ds-m-voice .wave { flex: 1; height: 22px; position: relative; cursor: pointer; background: repeating-linear-gradient(90deg, #AEBAC1 0 3px, transparent 3px 6px); clip-path: polygon(0 40%, 8% 20%, 16% 45%, 24% 10%, 32% 35%, 40% 0, 48% 30%, 56% 15%, 64% 40%, 72% 5%, 80% 30%, 88% 20%, 100% 40%, 100% 60%, 88% 80%, 80% 70%, 72% 95%, 64% 60%, 56% 85%, 48% 70%, 40% 100%, 32% 65%, 24% 90%, 16% 55%, 8% 80%, 0 60%); }
.ds-m-voice .wave i { position: absolute; left: 0; top: 0; bottom: 0; background: repeating-linear-gradient(90deg, var(--teal-600) 0 3px, transparent 3px 6px); }
.ds-m-voice .du { font-size: 12px; color: #667781; min-width: 34px; }
.ds-m-fwd { font-size: 12.5px; color: #667781; font-style: italic; display: flex; align-items: center; gap: 4px; margin-bottom: 2px; }
.ds-m-fwd svg { width: 14px; height: 14px; }
.ds-m-reply { display: flex; flex-direction: column; width: 100%; text-align: left; border: 0; border-left: 4px solid var(--c, var(--teal-500)); background: rgba(8,28,56,.05); border-radius: 6px; padding: 5px 9px; margin: 1px 0 5px; cursor: pointer; font-family: var(--font); }
.ds-m-reply b { color: var(--c); font-size: 12.8px; }
.ds-m-reply span { color: #54656F; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.ds-m-more { position: absolute; top: 2px; right: 2px; width: 26px; height: 22px; border: 0; border-radius: 0 8px 0 12px; background: linear-gradient(45deg, transparent, inherit 40%); color: #8696A0; cursor: pointer; display: grid; place-items: center; opacity: 0; transition: opacity .12s; }
.ds-m.mine .ds-m-more { background: linear-gradient(to left, var(--sc-mine) 70%, transparent); }
.ds-m.theirs .ds-m-more { background: linear-gradient(to left, var(--sc-theirs) 70%, transparent); }
.ds-m-b:hover .ds-m-more { opacity: 1; }
.ds-m-more svg { width: 18px; height: 18px; }
.ds-m-rx { flex-basis: 100%; display: flex; gap: 3px; margin: -6px 0 2px; position: relative; z-index: 1; }
.ds-m.mine .ds-m-rx { justify-content: flex-end; padding-right: 8px; }
.ds-m.theirs .ds-m-rx { padding-left: 44px; }
.ds-m.theirs.grouped .ds-m-rx { padding-left: 8px; }
.ds-m-rx button { border: 1px solid #E3E8EF; background: #fff; border-radius: 12px; padding: 1px 7px; font-size: 14px; cursor: pointer; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.ds-m-rx button.me { background: var(--teal-50); border-color: var(--teal-300); }
.ds-m-rx small { font-size: 11px; color: #54656F; }
.ds-m.sys { justify-content: center; margin: 8px 0; }
.ds-m.sys span { background: #FFF5C4; color: #54656F; font-size: 12.5px; padding: 5px 12px; border-radius: 8px; box-shadow: 0 1px .5px rgba(11,20,26,.13); text-align: center; max-width: 80%; }
.ds-m-day { display: flex; justify-content: center; margin: 12px 0 6px; position: sticky; top: 6px; z-index: 2; }
.ds-m-day span { background: #fff; color: #54656F; font-size: 12.5px; font-weight: 500; padding: 5px 12px; border-radius: 8px; box-shadow: 0 1px .5px rgba(11,20,26,.13); text-transform: uppercase; letter-spacing: .02em; }
.ds-m-unread { display: flex; justify-content: center; margin: 10px -7%; padding: 5px; background: rgba(255,255,255,.6); }
.ds-m-unread span { background: #fff; color: var(--teal-700); font-size: 12.5px; font-weight: 600; padding: 4px 14px; border-radius: 12px; }
.ds-m-sec { align-self: center; max-width: 480px; margin: 4px auto 10px; background: #FFEECD; color: #54656F; font-size: 12.3px; text-align: center; padding: 6px 12px; border-radius: 8px; display: flex; align-items: center; gap: 6px; }
.ds-m-sec svg { width: 13px; height: 13px; flex: none; }
.ds-m-older { text-align: center; margin: 4px 0 10px; }
.ds-m-older button { border: 0; background: #fff; border-radius: 14px; padding: 6px 14px; font: 600 12.5px var(--font); color: var(--teal-700); cursor: pointer; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.ds-m.flash .ds-m-b { animation: dsFlash 1.6s ease; }
@keyframes dsFlash { 0%, 40% { box-shadow: 0 0 0 3px var(--teal-300); } 100% { box-shadow: 0 1px .5px rgba(11,20,26,.13); } }
.ds-m.failed .ds-m-b { cursor: pointer; opacity: .85; }
.ds-m.del .ds-m-b { min-width: 0; }
.ds-sc-jump { position: absolute; right: 20px; bottom: 86px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: #fff; color: #54656F; box-shadow: 0 2px 8px rgba(0,0,0,.18); cursor: pointer; display: grid; place-items: center; z-index: 5; }
.ds-sc-jump[hidden] { display: none; }
.ds-sc-jump i { position: absolute; top: -6px; right: -4px; background: var(--teal-500); color: #fff; font: 700 11px/18px var(--font); font-style: normal; min-width: 18px; padding: 0 4px; border-radius: 9px; }
.ds-sc-jump i:empty { display: none; }
.ds-sc-drop { position: absolute; inset: 0; z-index: 20; display: none; place-items: center; background: rgba(15,163,163,.14); border: 3px dashed var(--teal-500); color: var(--teal-700); font-weight: 700; text-align: center; }
.ds-sc-drop.on { display: grid; }

.ds-sc-compose { background: #F0F2F5; padding: 6px 12px calc(8px + env(safe-area-inset-bottom)); position: relative; z-index: 4; }
.ds-sc-row { display: flex; align-items: flex-end; gap: 4px; }
.ds-sc-row[hidden] { display: none; }
.ds-sc-row textarea { flex: 1; min-width: 0; min-height: 44px; box-sizing: border-box; resize: none; border: 0; border-radius: 10px; padding: 10px 14px; font: 400 15px/1.4 var(--font); max-height: 140px; outline: none; background: #fff; color: #111B21; margin: 0 4px; }
.ds-sc-send { width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--teal-500); color: #fff; display: grid; place-items: center; cursor: pointer; flex: none; transition: transform .1s, background .15s; }
.ds-sc-send:hover { background: var(--teal-600); }
.ds-sc-send:active { transform: scale(.94); }
.ds-sc-send .i-send { display: none; }
.ds-sc-send.has-text .i-send { display: grid; } .ds-sc-send.has-text .i-mic { display: none; }
.ds-sc-send span { display: grid; }
.ds-sc-ctx { display: flex; align-items: center; gap: 8px; background: #fff; border-radius: 10px 10px 0 0; margin: 0 52px -2px 92px; padding: 6px 6px 6px 8px; }
.ds-sc-ctx[hidden] { display: none; }
.ds-sc-ctx .q { flex: 1; min-width: 0; border-left: 4px solid var(--teal-500); background: #F5F6F6; border-radius: 6px; padding: 6px 10px; display: flex; flex-direction: column; }
.ds-sc-ctx.edit .q { border-left-color: var(--navy-600); }
.ds-sc-ctx .q b { font-size: 13px; display: flex; align-items: center; gap: 6px; }
.ds-sc-ctx .q b svg { width: 14px; height: 14px; }
.ds-sc-ctx .q span { font-size: 13px; color: #667781; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds-sc-uploads:empty { display: none; }
.ds-sc-uploads { display: grid; gap: 6px; padding: 4px 0 8px; }
.ds-sc-up { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 8px; padding: 6px 10px; font-size: 13px; }
.ds-sc-up .n { flex: 0 1 40%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds-sc-up .bar { flex: 1; height: 5px; border-radius: 3px; background: #E3E8EF; overflow: hidden; }
.ds-sc-up .bar i { display: block; height: 100%; width: 0; background: var(--teal-500); transition: width .2s; }
.ds-sc-up button { border: 0; background: none; font-size: 18px; color: #8696A0; cursor: pointer; }
.ds-sc-emoji { position: absolute; bottom: calc(100% + 10px); left: 0; width: 340px; max-width: calc(100vw - 24px); max-height: 280px; overflow-y: auto; display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; padding: 10px; background: #fff; border-radius: 12px; box-shadow: 0 10px 40px rgba(8,28,56,.22); z-index: 60; }
.ds-sc-emoji[hidden] { display: none; }
.ds-sc-emoji button { border: 0; background: none; font-size: 24px; height: 38px; border-radius: 8px; cursor: pointer; }
.ds-sc-emoji button:hover { background: #F0F2F5; }
.ds-sc-rec { display: flex; align-items: center; gap: 12px; height: 50px; }
.ds-sc-rec[hidden] { display: none; }
.ds-sc-rec .dot { width: 12px; height: 12px; border-radius: 50%; background: #EF4444; animation: dsPulse 1s infinite; }
@keyframes dsPulse { 50% { opacity: .3; } }
.ds-sc-rec #msg-rec-time { font: 600 15px var(--font); color: #3B4A54; min-width: 42px; }
.ds-sc-rec .bars { flex: 1; display: flex; align-items: center; gap: 3px; height: 30px; overflow: hidden; }
.ds-sc-rec .bars i { width: 3px; height: 4px; border-radius: 2px; background: var(--teal-500); transition: height .1s; flex: none; }
.ds-sc-readonly { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px; color: #667781; font-size: 13.5px; }
.ds-sc-readonly[hidden] { display: none; }

.ds-sc-info { border-left: 1px solid var(--sc-line); background: #F0F2F5; display: flex; flex-direction: column; min-height: 0; }
.ds-sc-info[hidden] { display: none; }
.ds-sc-info > header { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: var(--surface-2); border-bottom: 1px solid var(--sc-line); font-size: 16px; }
.ds-sc-info-body { flex: 1; overflow-y: auto; }
.ds-sc-info-hero { background: #fff; text-align: center; padding: 26px 20px 20px; margin-bottom: 10px; }
.ds-sc-info-hero h3 { font-size: 20px; margin-top: 14px; color: #111B21; }
.ds-sc-info-hero p { color: #667781; margin-top: 4px; }
.ds-sc-info-hero p.desc { color: #3B4A54; margin-top: 10px; white-space: pre-line; }
.ds-sc-info-sec { background: #fff; padding: 14px 18px; margin-bottom: 10px; }
.ds-sc-info-sec h4 { font-size: 14px; color: #54656F; font-weight: 500; margin-bottom: 10px; display: flex; justify-content: space-between; }
.ds-sc-info-sec.danger button { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; background: none; padding: 10px 0; font: 500 14.5px var(--font); color: var(--danger); cursor: pointer; }
.ds-sc-info-sec.danger svg { width: 18px; height: 18px; }
.ds-sc-media { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.ds-sc-media img, .ds-sc-media a { aspect-ratio: 1; width: 100%; object-fit: cover; border-radius: 6px; cursor: zoom-in; background: #E7EEF8; display: grid; place-items: center; color: var(--navy-700); font: 800 12px var(--font); text-decoration: none; }
.ds-sc-members .mem { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.ds-sc-members .ds-sc-av { width: 40px; height: 40px; font-size: 13px; }
.ds-sc-members .t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ds-sc-members .t b { font-weight: 500; font-size: 14.5px; }
.ds-sc-members .t small { color: #667781; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds-sc-members em { font-style: normal; font-size: 11.5px; color: var(--teal-700); background: var(--teal-50); border: 1px solid var(--teal-100); padding: 1px 7px; border-radius: 10px; }
.ds-sc-members button { border: 0; background: none; color: #8696A0; cursor: pointer; width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; }
.ds-sc-members button:hover { background: #F0F2F5; color: var(--navy-800); }
.ds-sc-members button svg { width: 17px; height: 17px; }
.ds-sc-info-foot { text-align: center; color: #8696A0; font-size: 12px; padding: 6px 0 20px; }
.ds-sc-dialog .ds-modal-body { padding-top: 12px; }
.ds-sc-pp { max-height: 46vh; overflow-y: auto; margin: 0 -20px; }
.ds-sc-pp .ds-sc-item { padding-left: 20px; padding-right: 20px; }
.ds-sc-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.ds-sc-chips:empty { display: none; }
.ds-sc-chips span { background: var(--teal-50); color: var(--teal-700); border: 1px solid var(--teal-100); border-radius: 14px; padding: 3px 10px; font-size: 12.5px; font-weight: 600; }
.ds-sc-h4 { font-size: 13px; color: var(--muted); margin: 16px 0 8px; }
.ds-sc-lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(6,14,24,.94); display: grid; place-items: center; padding: 50px 16px 16px; }
.ds-sc-lightbox[hidden] { display: none; }
.ds-sc-lightbox img { max-width: 100%; max-height: calc(100vh - 80px); border-radius: 4px; }
.ds-sc-lightbox .ds-sc-ic { position: absolute; top: 10px; color: #fff; }
.ds-sc-lightbox [data-lb-close] { right: 12px; } .ds-sc-lightbox #msg-lb-dl { right: 60px; }
.ds-sc-lightbox .ds-sc-ic:hover { background: rgba(255,255,255,.12); }

/* Toasts (app-wide) */
.ds-toast { position: fixed; left: 50%; bottom: 90px; transform: translate(-50%, 20px); opacity: 0; z-index: 300; background: #0E1D33; color: #fff; padding: 11px 18px; border-radius: 12px; font: 500 14px var(--font); box-shadow: 0 10px 30px rgba(0,0,0,.3); transition: opacity .25s, transform .25s; max-width: calc(100vw - 32px); text-decoration: none; }
.ds-toast.in { opacity: 1; transform: translate(-50%, 0); }
.ds-toast.msg { display: flex; align-items: center; gap: 12px; background: #fff; color: var(--text); left: auto; right: 20px; bottom: 24px; transform: translateY(20px); border: 1px solid var(--border); min-width: 280px; max-width: 360px; padding: 12px 16px; }
.ds-toast.msg.in { transform: none; }
.ds-toast.msg .ds-avatar { flex: none; color: #fff; width: 40px; height: 40px; }
.ds-toast.msg .ds-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ds-toast.msg strong { display: block; color: var(--navy-900); }
.ds-toast.msg small { display: block; color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 250px; }

/* Mobile app page */
.ds-app-hero { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 30px; align-items: center; background: linear-gradient(135deg, var(--navy-900), var(--navy-700) 55%, #0A5C66); color: #fff; border-radius: 20px; padding: 34px 38px; margin-bottom: 20px; overflow: hidden; }
.ds-app-kicker { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); padding: 5px 12px; border-radius: 20px; font-size: 12.5px; font-weight: 600; color: var(--teal-300); }
.ds-app-hero h2 { color: #fff; font-size: 32px; margin: 14px 0 16px; }
.ds-app-feats { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 10px; }
.ds-app-feats li { display: flex; align-items: center; gap: 10px; color: #D4E1F0; font-size: 15px; }
.ds-app-feats svg { color: var(--teal-300); flex: none; }
.ds-app-hero .ds-btn.ghost { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.25); }
.ds-app-hero .ds-btn.lg { padding: 12px 20px; font-size: 15px; }
.ds-app-hero .ds-btn[hidden] { display: none; }
.ds-app-status { margin-top: 14px; color: #BFD0E6; font-size: 13.5px; min-height: 20px; }
.ds-app-phone { justify-self: center; width: 230px; height: 440px; border-radius: 38px; background: #0B1220; padding: 10px; box-shadow: 0 30px 70px rgba(0,0,0,.45), inset 0 0 0 2px #2A3547; transform: rotate(4deg); }
.ds-app-phone .scr { height: 100%; border-radius: 30px; overflow: hidden; background: linear-gradient(160deg, #3D7BD9, #7E3FD0 60%, #C06C84); padding: 12px 14px; }
.ds-app-phone .bar { display: flex; justify-content: space-between; color: #fff; font: 600 11px var(--font); margin-bottom: 26px; padding: 0 6px; }
.ds-app-phone .home { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px 8px; }
.ds-app-phone .ico { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.ds-app-phone .ico i { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; color: #fff; box-shadow: 0 4px 10px rgba(0,0,0,.2); }
.ds-app-phone .ico i img { width: 26px; }
.ds-app-phone .ico small { color: #fff; font-size: 9.5px; font-weight: 600; text-shadow: 0 1px 2px rgba(0,0,0,.4); }
.ds-app-phone .ico.me i { animation: dsBob 2.4s ease-in-out infinite; box-shadow: 0 0 0 3px rgba(255,255,255,.7), 0 6px 16px rgba(0,0,0,.3); }
@keyframes dsBob { 50% { transform: translateY(-4px); } }
.ds-app-steps { margin-bottom: 20px; }
.ds-app-ol { margin: 0; padding-left: 20px; display: grid; gap: 8px; color: var(--text-2); }
.ds-kbd { display: inline-block; border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 5px; padding: 0 6px; font-size: 12px; background: var(--surface-2); }
.ds-app-share { display: flex; gap: 8px; flex-wrap: wrap; }
.ds-app-share .ds-input { flex: 1; min-width: 200px; }
.ds-install-link { color: var(--teal-300) !important; }
body.ds-standalone .ds-install-link { display: none; }

@media (max-width: 1280px) { .ds-sc.info-open { grid-template-columns: 340px minmax(0,1fr); } .ds-sc.info-open .ds-sc-info { position: absolute; right: 0; top: 0; bottom: 0; width: 340px; z-index: 30; box-shadow: -10px 0 30px rgba(8,28,56,.15); } }
@media (max-width: 1100px) { .ds-sc { grid-template-columns: 320px minmax(0,1fr); } .ds-sc-thread { padding: 12px 4% 16px; } }
@media (max-width: 760px) {
  .ds-sc, .ds-sc.info-open { grid-template-columns: 1fr; height: calc(100dvh - 60px - 64px - env(safe-area-inset-bottom)); }
  body.msg-in-room .ds-topbar, body.msg-in-room .ds-bottom-nav { display: none !important; }
  body.msg-in-room .ds-sc { height: 100vh; height: 100dvh; }
  .ds-sc.has-room .ds-sc-side { display: none; }
  .ds-sc:not(.has-room) .ds-sc-main { display: none; }
  .ds-sc-back { display: inline-grid; }
  .ds-sc-head { padding: 6px 4px; padding-top: calc(6px + env(safe-area-inset-top)); }
  .ds-sc-headinfo { gap: 8px; }
  .ds-sc-thread { padding: 10px 10px 14px; }
  .ds-m-b { max-width: 84%; }
  .ds-m-more { opacity: 0 !important; pointer-events: none; }
  .ds-sc-info, .ds-sc.info-open .ds-sc-info { position: fixed; inset: 0; width: auto; z-index: 70; }
  .ds-sc-ctx { margin: 0 50px -2px 0; }
  .ds-sc-compose { padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); }
  .ds-sc-row .ds-sc-ic { width: 38px; }
  .ds-sc-jump { bottom: 80px; right: 12px; }
  .ds-toast.msg { left: 12px; right: 12px; bottom: 80px; max-width: none; }
  .ds-app-hero { grid-template-columns: 1fr; padding: 24px 20px; }
  .ds-app-phone { display: none; }
  .ds-app-hero h2 { font-size: 24px; }
  .ds-sc-pp { max-height: 52vh; }
}
@media (display-mode: standalone) { .ds-install-link { display: none !important; } }
.ds-sc [hidden], .ds-sc-lightbox[hidden] { display: none !important; }
