/* AnuuTech web wallet: the app shell (sidebar, top bar, profile menu, mobile tab bar), the page header every
   page uses, icons, Home and Contacts. Loaded after wallet.css, whose colour tokens it uses. */
:root { --sidebar-w: 240px; --topbar-h: 0px; --tabbar-h: 62px; --list-w: minmax(300px, 360px); }
/* The shell's wrapper lays out nothing itself, so the top bar can stick to the page (it is display:none while locked). */
#appHeader { display: contents; }
.drawer-shade { display: none; }
.ic { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
.ic-lg { width: 22px; height: 22px; }

/* Sidebar */
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); background: var(--bg-secondary); border-right: 1px solid var(--border-color);
  display: flex; flex-direction: column; z-index: 120; overflow-y: auto; }
.sb-brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px; }
.sb-brand .logo-icon { width: 32px; height: 32px; border-radius: 9px; font-size: 15px; }
.sb-brand .t { font-size: 17px; font-weight: 700; }
.sb-brand .t span { background: var(--gradient-main); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.sb-group { color: var(--text-muted); font-size: 12px; font-weight: 600; padding: 16px 20px 6px; }
.sidebar .nav-item { display: flex; align-items: center; gap: 11px; width: calc(100% - 20px); margin: 1px 10px; padding: 8px 10px; border: 0; border-radius: 9px;
  background: none; color: var(--text-secondary); font-family: inherit; font-size: 14px; font-weight: 500; line-height: 1.2; text-align: left; cursor: pointer; }
.sidebar .nav-item:hover { background: var(--bg-card); color: var(--text-primary); }
.sidebar .nav-item.active { background: var(--accent-teal-dim); color: var(--accent-teal); }
.nav-badge { margin-left: auto; min-width: 20px; padding: 1px 7px; border-radius: 10px; font-size: 11px; font-weight: 700; text-align: center;
  background: var(--accent-teal); color: #04121a; }
.nav-badge.red { background: var(--accent-red); color: #fff; }
.sb-more-items { display: none; }
.sb-more.open + .sb-more-items { display: block; }
.sb-more .chev { margin-left: auto; transition: transform .15s; }
.sb-more.open .chev { transform: rotate(180deg); }
.sb-foot { margin-top: auto; padding: 10px 10px 12px; border-top: 1px solid var(--border-color); display: flex; flex-direction: column; gap: 6px; }
.sb-net { display: flex; align-items: center; gap: 8px; width: 100%; padding: 4px 10px; border: 0; background: none; color: var(--text-muted); font-family: inherit; font-size: 12px; cursor: pointer; }
.sb-net:hover { color: var(--text-primary); }
.sb-net .tn { margin-left: auto; }
.sb-profile { width: 100%; max-width: none; }
.sb-profile .pn { flex: 1; }
.tb-profile { margin-left: auto; padding: 0; border-radius: 50%; width: 38px; height: 38px; }

/* Top bar and profile menu */
.topbar { position: sticky; top: 0; z-index: 110; height: 58px; margin-left: var(--sidebar-w); display: none; align-items: center; gap: 12px;
  padding: 0 24px; background: var(--header-bg); backdrop-filter: blur(16px); border-bottom: 1px solid var(--border-color); }
.topbar .tb-title { font-size: 16px; font-weight: 600; display: none; }
.topbar .tb-menu { display: none; }
.icon-btn { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border-color); background: var(--bg-card); color: var(--text-secondary);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.icon-btn:hover { color: var(--text-primary); border-color: var(--accent-teal); }
.profile-btn { display: flex; align-items: center; gap: 10px; padding: 5px 10px 5px 5px; border-radius: 12px; border: 1px solid var(--border-color);
  background: var(--bg-card); color: var(--text-primary); cursor: pointer; font-family: inherit; max-width: 300px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700;
  color: #fff; background: var(--gradient-main); }
.avatar.lg { width: 48px; height: 48px; font-size: 17px; }
.profile-btn .pn { display: flex; flex-direction: column; text-align: left; min-width: 0; line-height: 1.25; }
.profile-btn .pn b { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-btn .pn small { font-size: 12px; color: var(--text-muted); font-family: 'JetBrains Mono', monospace; }
.menu { position: fixed; width: 290px; max-width: calc(100vw - 16px); background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 14px;
  box-shadow: 0 12px 32px rgba(0,0,0,.25); padding: 8px; display: none; z-index: 200; }
.menu.open { display: block; }
.menu-head { display: flex; gap: 10px; align-items: center; padding: 8px 8px 12px; border-bottom: 1px solid var(--border-color); margin-bottom: 6px; }
.menu-head b { display: block; font-size: 14px; overflow-wrap: anywhere; line-height: 1.3; }
.menu-head > div:last-child { min-width: 0; flex: 1; }
.menu-head .mono { font-size: 12px; color: var(--text-muted); word-break: break-all; }
.menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 9px; background: none;
  color: var(--text-primary); font-family: inherit; font-size: 13px; font-weight: 500; cursor: pointer; text-align: left; }
.menu button:hover { background: var(--bg-card-hover); }

/* Main column */
.main { margin-left: var(--sidebar-w); max-width: none; padding: 28px 36px 40px; }
.main > .page { max-width: 1600px; }
.page-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head > div:first-child { flex: 1; min-width: 220px; }
.page-head h1 { font-size: 24px; font-weight: 700; line-height: 1.2; letter-spacing: -.01em; }
.page-head p { color: var(--text-secondary); font-size: 14px; margin-top: 4px; max-width: 720px; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn .ic { margin-right: 6px; }

/* Mobile tab bar */
.tabbar { display: none; }

/* Home */
.home-hello { margin-bottom: 18px; }
.home-hello h1 { font-size: 26px; font-weight: 700; letter-spacing: -.01em; }
.home-hello p { color: var(--text-secondary); font-size: 14px; margin-top: 2px; }
.home-actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.home-actions button { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--border-color);
  background: var(--gradient-card); color: var(--text-primary); font-family: inherit; font-size: 15px; font-weight: 600; cursor: pointer; text-align: left; }
.home-actions button:hover { border-color: var(--accent-teal); }
/* One four-column grid for the start buttons and the blocks under them, so their edges line up. */
.home-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; align-items: start; }
.home-grid > .home-col:first-child { grid-column: span 2; }
.bal-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.wallet-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.send-picks { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.send-picks button { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 16px; border: 1px solid var(--border-color); background: var(--bg-input);
  color: var(--text-primary); font-family: inherit; font-size: 13px; cursor: pointer; }
.send-picks button:hover { border-color: var(--accent-teal); }
.send-picks .avatar { width: 22px; height: 22px; font-size: 10px; }
.msg-row .who { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-row.unread .who::after { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent-teal); margin-left: 7px; vertical-align: 2px; }
@media (max-width: 1300px) { .home-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) { .home-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); } .wallet-grid { grid-template-columns: 1fr; } }
.balance-card { padding: 22px 24px; }
.balance-card .lbl { color: var(--text-secondary); font-size: 13px; }
.balance-card .amt { font-size: 36px; font-weight: 700; letter-spacing: -.02em; margin: 2px 0 2px; }
.balance-card .amt small { font-size: 16px; color: var(--text-secondary); font-weight: 600; margin-left: 6px; }
.balance-card .sub { color: var(--text-muted); font-size: 12px; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 11px 16px; border-bottom: 1px solid var(--border-color); font-size: 14px; }
.list-row:last-child { border-bottom: 0; }
.list-row .meta { margin-left: auto; color: var(--text-muted); font-size: 12px; white-space: nowrap; }
.list-row.click { cursor: pointer; }
.list-row.click:hover { background: var(--bg-card-hover); }
.dot-ic { width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex: none; background: var(--accent-teal-dim); color: var(--accent-teal); }
.dot-ic.red { background: rgba(239,68,68,.14); color: var(--accent-red); }
.dot-ic.orange { background: rgba(245,158,11,.16); color: var(--accent-orange); }
.empty { padding: 22px 16px; color: var(--text-muted); font-size: 13px; text-align: center; }
.people { display: flex; gap: 14px; flex-wrap: wrap; padding: 14px 16px; }
.person { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 64px; cursor: pointer; background: none; border: 0; color: var(--text-primary);
  font-family: inherit; font-size: 12px; font-weight: 500; }
.person span { max-width: 70px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.banner { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 12px; border: 1px solid var(--border-color); background: var(--accent-teal-dim);
  font-size: 13px; margin-bottom: 16px; }
.banner .btn { margin-left: auto; }

/* Contacts */
.contact-row .name { font-weight: 600; }
.contact-row .addr { font-size: 13px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contact-row .acts { margin-left: auto; display: flex; gap: 6px; flex: none; }
.contact-row .acts .icon-btn { width: 34px; height: 34px; }
.search { position: relative; }
.search .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); }
.search input { padding-left: 38px; }

/* Onboarding */
.ob-steps { display: flex; gap: 6px; justify-content: center; margin: 4px 0 18px; }
.ob-steps i { width: 26px; height: 4px; border-radius: 2px; background: var(--border-color); }
.ob-steps i.on { background: var(--accent-teal); }
.seed-groups { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 12px 0; text-align: left; }
.seed-groups div { background: var(--bg-input); border: 1px solid var(--border-color); border-radius: 8px; padding: 6px 8px; font-family: 'JetBrains Mono', monospace; font-size: 13px; }
.seed-groups div small { color: var(--text-muted); margin-right: 6px; font-size: 11px; }
.strength { height: 4px; border-radius: 2px; background: var(--border-color); margin: 0 0 6px; overflow: hidden; }
.strength i { display: block; height: 100%; width: 0; background: var(--accent-red); transition: width .2s; }
.hint-l { font-size: 13px; color: var(--text-muted); text-align: left; margin: 0 0 10px; line-height: 1.5; }
.ob-text { font-size: 15px; color: var(--text-primary); text-align: left; margin: 0 0 14px; line-height: 1.55; }
.unlock-box .form-label, .unlock-box .err { text-align: left; }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent-teal); font: inherit; font-size: 14px; cursor: pointer; }
.link-btn:hover { text-decoration: underline; }
.err { color: var(--accent-red); font-size: 13px; min-height: 18px; text-align: left; }

/* Phone and small tablet */
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); visibility: hidden; transition: transform .2s, visibility .2s; box-shadow: 0 0 40px rgba(0,0,0,.35); }
  body.drawer-open .sidebar { transform: none; visibility: visible; }
  body.drawer-open .drawer-shade { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 115; border: 0; }
  :root { --topbar-h: 58px; }
  .topbar, .main { margin-left: 0; }
  .topbar { padding: 0 12px; display: flex; }
  .topbar .tb-title, .topbar .tb-menu { display: inline-flex; }
  .main { padding: 18px 14px calc(var(--tabbar-h) + 24px); }
  .page-head h1 { font-size: 21px; }
  .home-grid { grid-template-columns: 1fr; }
  .home-grid > .home-col:first-child { grid-column: auto; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; height: var(--tabbar-h); z-index: 110;
    background: var(--bg-secondary); border-top: 1px solid var(--border-color); padding-bottom: env(safe-area-inset-bottom); }
  .tabbar .nav-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 0; background: none; color: var(--text-muted);
    font-family: inherit; font-size: 11px; font-weight: 600; position: relative; padding: 0; }
  .tabbar .nav-item.active { color: var(--accent-teal); }
  .tabbar .nav-badge { position: absolute; top: 6px; left: calc(50% + 6px); min-width: 16px; padding: 0 5px; font-size: 10px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr) !important; }
  /* Wide inline grids of the older pages stack on a phone. */
  .main .page [style*="grid-template-columns"]:not(.stats-grid) { grid-template-columns: 1fr !important; }
  .cols { flex-direction: column; }
  .cols > * { flex: none !important; width: 100%; }
  #callIncoming { bottom: calc(var(--tabbar-h) + 12px) !important; }
  table { font-size: 12px; }
  .seed-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .contact-row .acts .icon-btn { width: 32px; height: 32px; }
  .contact-row .avatar { display: none; }
}

/* Shared pieces for every page */
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 11px; background: var(--bg-input); border: 1px solid var(--border-color); margin-bottom: 14px; flex-wrap: wrap; }
.seg button { border: 0; background: none; padding: 7px 14px; border-radius: 8px; color: var(--text-secondary); font-family: inherit; font-size: 14px; font-weight: 500; cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px; }
.seg button:hover { color: var(--text-primary); }
.seg button.active { background: var(--bg-card); color: var(--text-primary); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.18); }
.cols { display: flex; gap: 16px; align-items: flex-start; }
.note { font-size: 13px; color: var(--text-muted); line-height: 1.55; }
.amount-lg { font-size: 32px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.amount-lg small { font-size: 15px; color: var(--text-secondary); font-weight: 600; margin-left: 6px; }
details.more { margin-top: 8px; }
details.more > summary { cursor: pointer; color: var(--text-secondary); font-size: 14px; font-weight: 600; padding: 10px 0; list-style: none; display: flex; align-items: center; gap: 8px; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary .ic { transition: transform .15s; }
details.more[open] > summary .ic { transform: rotate(180deg); }
.empty-big { padding: 34px 16px; text-align: center; color: var(--text-muted); font-size: 14px; }
.empty-big .ic { width: 30px; height: 30px; display: block; margin: 0 auto 10px; opacity: .6; }
.empty-big .btn { margin-top: 12px; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 10px; font-size: 12px; font-weight: 500; background: var(--accent-teal-dim); color: var(--accent-teal); }
.list-row .sub2 { font-size: 13px; color: var(--text-muted); }
.list-row .grow { flex: 1; min-width: 0; }
.list-row .grow > div { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.amt-in { color: var(--accent-green); font-weight: 600; font-variant-numeric: tabular-nums; }
.amt-out { color: var(--text-primary); font-weight: 600; font-variant-numeric: tabular-nums; }

/* Incoming call card, over every page */
#callIncoming { position: fixed; right: 18px; bottom: 18px; z-index: 9999; width: 340px; max-width: calc(100vw - 24px); display: none; box-shadow: 0 16px 40px rgba(0,0,0,.35); }
#callIncoming .ci-top { display: flex; align-items: center; gap: 12px; }
#callIncoming .ci-name { font-size: 17px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#callIncoming .ci-kind { font-size: 13px; color: var(--text-secondary); }
#callIncoming .ci-addr { font-size: 12px; color: var(--text-muted); font-family: 'JetBrains Mono', monospace; }
#callIncoming .ci-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
#callIncoming .ci-btns .btn { padding: 11px; }
.btn-green { background: var(--accent-green); color: #fff; }
@media (max-width: 600px) { #callIncoming { left: 12px; right: 12px; width: auto; } }

/* Lock screen */
.lock-logo { width: 56px; height: 56px; font-size: 24px; margin: 0 auto 14px; border-radius: 15px; }
.unlock-box h2 { font-size: 24px; font-weight: 700; }
.unlock-box h2 .grad { background: var(--gradient-main); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.unlock-box .ob-h { font-size: 18px; font-weight: 600; text-align: left; margin: 4px 0 4px; }
.unlock-box .ob-text { font-size: 14px; color: var(--text-secondary); margin: 0 0 16px; }
.unlock-box .form-group { text-align: left; }
.lbl-note { font-weight: 400; color: var(--text-muted); margin-left: 6px; }
.btn-lg { padding: 12px 18px; font-size: 15px; }
.lock-links { display: flex; justify-content: center; gap: 22px; flex-wrap: wrap; margin-top: 18px; }
.lock-foot { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--border-color);
  font-size: 13px; color: var(--text-muted); }
.check-line { display: flex; gap: 10px; align-items: center; font-size: 14px; color: var(--text-primary); margin: 4px 0 10px; text-align: left; cursor: pointer; }
.check-line input { width: 18px; height: 18px; }
@media (max-width: 600px) { .unlock-box { padding: 24px 20px; } .unlock-overlay { align-items: flex-start; padding-top: 16px; } }

/* Contacts */
.contact-form-row { grid-template-columns: 1fr 2fr; gap: 10px; }
.contact-row .mid { min-width: 0; flex: 1; }
.contact-row .acts { position: relative; }
/* The row menu must not be cut off by the card around the list. */
.row-menu { position: absolute; right: 0; top: calc(100% + 6px); width: 200px; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0,0,0,.25); padding: 6px; z-index: 50; }
.row-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: none; color: var(--text-primary);
  font-family: inherit; font-size: 14px; cursor: pointer; text-align: left; }
.row-menu button:hover { background: var(--bg-card-hover); }
.row-menu button.danger { color: var(--accent-red); }
@media (max-width: 600px) { .contact-form-row { grid-template-columns: 1fr; } }

/* Exchange (advanced) */
.dex-grid { display: grid; grid-template-columns: 1fr 320px 1fr; gap: 1rem; margin-bottom: 1rem; }
.dex-bottom { display: grid; grid-template-columns: 300px 1fr; gap: 1rem; margin-bottom: 1rem; }
@media (max-width: 1200px) { .dex-grid { grid-template-columns: 1fr 1fr; } .dex-grid > .card:nth-child(2) { grid-row: 1; grid-column: 1 / -1; } }
@media (max-width: 900px) { .dex-grid, .dex-bottom { grid-template-columns: 1fr; } }

/* Files */
#vDropZone.drop-over { border-color: var(--accent-teal); background: var(--accent-teal-dim); }
#vUploadStatus:not(:empty) { padding: 10px 16px; border-bottom: 1px solid var(--border-color); }
.alert .ic { flex: none; margin-top: 1px; }

/* Apps */
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin-bottom: 8px; }
.app-card { background: var(--gradient-card); border: 1px solid var(--border-color); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.app-card .top { display: flex; align-items: center; gap: 12px; }
.app-card .ico { width: 42px; height: 42px; border-radius: 12px; background: var(--accent-teal-dim); color: var(--accent-teal); display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 700; flex: none; }
.app-card .nm { font-size: 15px; font-weight: 600; }
.app-card .desc { font-size: 14px; color: var(--text-secondary); flex: 1; }
.app-card .foot { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-muted); }
.app-grid > .empty, .app-grid > .card { grid-column: 1 / -1; }


/* App pages (Mail, Chats, Sign): edge to edge, the full height, like a native app */
.main:has(> .app-page.active) { padding: 0; }
.app-page { height: 100vh; height: 100dvh; max-width: none !important; }
.app-head { display: flex; align-items: center; gap: 8px; padding: 18px 16px 12px; }
.app-head h1 { font-size: 22px; font-weight: 700; flex: 1; letter-spacing: -.01em; }
.seg.app-tabs { display: flex; margin: 0 16px 12px; }
.seg.app-tabs button { flex: 1; justify-content: center; }
@media (max-width: 900px) {
  .app-page { height: calc(100dvh - var(--topbar-h) - var(--tabbar-h)); }
  .app-head { padding-top: 12px; }
}

/* Two panes: a list and what you picked (Contacts, Calls) */
.two-pane { display: grid; grid-template-columns: var(--list-w) 1fr; height: 100%; background: var(--bg-card); }
.pane-list { border-right: 1px solid var(--border-color); display: flex; flex-direction: column; min-width: 0; background: var(--bg-primary); }
.pane-scroll { flex: 1; overflow-y: auto; overflow-x: hidden; border-top: 1px solid var(--border-color); }
.pane-scroll .list-row { padding-left: 16px; padding-right: 16px; }
.pane-main { display: flex; flex-direction: column; min-width: 0; overflow-y: auto; }
.pane-empty { margin: auto; text-align: center; color: var(--text-muted); font-size: 15px; padding: 24px; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.pane-empty > .ic { width: 40px; height: 40px; opacity: .55; }
.pane-back { display: none; align-self: flex-start; padding-left: 0; }
.list-head { padding: 12px 16px 4px; font-size: 12px; font-weight: 600; color: var(--text-muted); }
.list-row.sel { background: var(--accent-teal-dim); box-shadow: inset 3px 0 0 var(--accent-teal); }
.contact-detail { padding: 32px 36px; max-width: 760px; width: 100%; }
.contact-detail h2 { font-size: 24px; font-weight: 700; margin: 6px 0 18px; }
.cd-top { display: flex; align-items: center; gap: 18px; margin-bottom: 22px; }
.cd-top .avatar { width: 72px; height: 72px; font-size: 26px; }
.cd-top h2 { margin: 0; }
.cd-actions { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; margin-bottom: 26px; }
.cd-actions button { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 8px; border-radius: 12px; border: 1px solid var(--border-color);
  background: var(--bg-input); color: var(--text-primary); font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.cd-actions button:hover { border-color: var(--accent-teal); color: var(--accent-teal); }
.cd-field { border: 1px solid var(--border-color); border-radius: 12px; overflow: hidden; margin-bottom: 18px; }
.cd-field .list-row { padding: 12px 16px; }
.cd-field label { font-size: 12px; color: var(--text-muted); display: block; }
@media (max-width: 900px) {
  .two-pane { grid-template-columns: 1fr; }
  .two-pane .pane-main { display: none; }
  .two-pane.open .pane-main { display: flex; }
  .two-pane.open .pane-list { display: none; }
  .pane-back { display: inline-flex; }
  .contact-detail { padding: 18px 16px; }
}

/* A four-column grid for the overview pages, so their blocks line up like Home */
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; align-items: start; }
.grid4 > .card { margin-bottom: 0; }
.grid4 > .span2 { grid-column: span 2; }
.grid4 > .span4 { grid-column: 1 / -1; }
.page-narrow { max-width: 820px !important; }
@media (max-width: 1100px) { .grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .grid4 { grid-template-columns: 1fr; } .grid4 > .span2 { grid-column: auto; } }
.pane-foot { padding: 10px 16px; border-top: 1px solid var(--border-color); }
.pane-foot .link-btn { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
#nExitView .net-frame { height: 62vh; flex: none; }
