/* Twinstars CRM shared styles. Light is the default. [data-theme="dark"] switches the content area to dark. */
:root {
  --bg:#F3F5FA; --card:#FFFFFF; --card2:#F8FAFD; --line:#E3E8F1; --text:#0B1220; --muted:#5B6B82;
  --input:#FFFFFF; --accent:#2563EB; --accent-soft:rgba(37,99,235,.12);
  --gold:#F5B82E; --err:#D92D20; --ok:#12804A;
  --warn-bg:#FFF7E0; --warn-text:#7A4E00; --warn-line:#F2D58A;
  --shadow:0 1px 2px rgba(16,24,40,.05),0 4px 14px rgba(16,24,40,.04);
  --side:#0B1224; --side-2:#141F3A; --side-active:#1B2A50; --side-text:#AFBBD3; --side-line:rgba(255,255,255,.08);
}
[data-theme="dark"] {
  --bg:#070B18; --card:#0F1730; --card2:#131D3D; --line:rgba(255,255,255,.10); --text:#FFFFFF; --muted:#B6C2D9;
  --input:#070B18; --accent:#00D4FF; --accent-soft:rgba(0,212,255,.14);
  --gold:#FFC83D; --err:#FF6B6B; --ok:#7EE787;
  --warn-bg:rgba(255,200,61,.08); --warn-text:#FFE19A; --warn-line:rgba(255,200,61,.35);
  --shadow:none;
  --side:#050914; --side-2:#0C1428; --side-active:#13213F; --side-text:#B6C2D9; --side-line:rgba(255,255,255,.08);
}

* { box-sizing:border-box; }
body { margin:0; min-height:100vh; background:var(--bg); color:var(--text); font-family:system-ui,-apple-system,"Segoe UI",Roboto,sans-serif; -webkit-font-smoothing:antialiased; }
a { color:inherit; }
button, input, select, textarea { font-family:inherit; }

/* Layout */
.shell { display:flex; min-height:100vh; }
.content { flex:1; min-width:0; display:flex; flex-direction:column; }
main { padding:24px; width:100%; max-width:1180px; margin:0 auto; }

/* Sidebar */
.sidebar { width:248px; flex:0 0 248px; background:var(--side); color:var(--side-text); display:flex; flex-direction:column; padding:18px 12px; position:sticky; top:0; height:100vh; overflow-y:auto; }
.side-brand { text-align:center; padding:8px 8px 22px; }
.side-logo { width:64px; height:64px; margin:0 auto 12px; border-radius:50%; background:radial-gradient(circle at 30% 30%, #1B2A50, #070B18); border:2px solid #FFC83D; display:flex; align-items:center; justify-content:center; overflow:hidden; }
.side-logo svg { width:30px; height:30px; }
.side-logo.has-logo { background:none; border:0; }
.side-logo img { width:100%; height:100%; object-fit:cover; border-radius:50%; display:block; }
.side-name { color:#fff; font-weight:700; font-size:15px; line-height:1.3; }
.side-sub { color:#FFC83D; font-size:12px; font-weight:700; letter-spacing:.08em; margin-top:4px; }
.side-nav { display:grid; gap:4px; }
.side-nav a { display:flex; align-items:center; gap:12px; padding:11px 12px; border-radius:10px; text-decoration:none; color:var(--side-text); font-size:14px; font-weight:500; }
.side-nav a:hover { background:var(--side-2); color:#fff; }
.side-nav a.active { background:var(--side-active); color:#fff; box-shadow:inset 3px 0 0 var(--accent); }
.side-nav a.soon { opacity:.45; pointer-events:none; }
.side-tag { margin-left:auto; font-size:11px; background:var(--side-2); color:var(--side-text); padding:2px 8px; border-radius:999px; }
.side-foot { margin-top:auto; padding-top:14px; border-top:1px solid var(--side-line); display:grid; gap:6px; }
.side-btn { display:flex; align-items:center; gap:12px; width:100%; padding:11px 12px; border-radius:10px; border:0; background:transparent; color:var(--side-text); font-size:14px; font-weight:500; cursor:pointer; text-align:left; }
.side-btn:hover { background:var(--side-2); color:#fff; }
a.side-btn { text-decoration:none; }
.side-btn.active { background:var(--side-active); color:#fff; box-shadow:inset 3px 0 0 var(--accent); }
.side-nav svg, .side-btn svg { width:18px; height:18px; flex:0 0 18px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }

/* Top bar */
.topbar { position:sticky; top:0; z-index:4; display:flex; align-items:center; justify-content:space-between; gap:12px; padding:14px 24px; background:var(--card); border-bottom:1px solid var(--line); }
.top-left { display:flex; align-items:center; gap:12px; min-width:0; }
.topbar h2 { margin:0; font-size:17px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.top-right { display:flex; align-items:center; gap:10px; font-size:14px; color:var(--muted); }
.menu-btn { display:none; width:40px; height:40px; border-radius:10px; border:1px solid var(--line); background:var(--card); color:var(--text); cursor:pointer; align-items:center; justify-content:center; padding:0; }
.menu-btn svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; }
.scrim { position:fixed; inset:0; background:rgba(3,6,14,.55); opacity:0; pointer-events:none; transition:opacity .2s; z-index:25; }

/* Page heading */
.page-head { display:flex; justify-content:space-between; align-items:flex-end; gap:14px; flex-wrap:wrap; margin-bottom:18px; }
.page-head h1 { margin:0 0 4px; font-size:24px; }
.sub { margin:0; color:var(--muted); font-size:14px; line-height:1.5; }

/* Cards */
.card { background:var(--card); border:1px solid var(--line); border-radius:16px; box-shadow:var(--shadow); padding:20px; }
.card h2 { margin:0 0 14px; font-size:16px; }
.muted { color:var(--muted); }
.hero h1 { margin:0 0 6px; font-size:22px; }
.hero p { margin:0; color:var(--muted); font-size:15px; }

/* Buttons and fields */
.btn { min-height:42px; padding:0 16px; border-radius:10px; border:1px solid var(--line); background:var(--card); color:var(--text); font-size:14px; font-weight:600; cursor:pointer; display:inline-flex; align-items:center; justify-content:center; gap:8px; line-height:1; text-align:center; white-space:nowrap; text-decoration:none; box-sizing:border-box; font-family:inherit; }
.btn.file-btn { margin:0; }
.btn:disabled { opacity:.4; cursor:not-allowed; }
.btn-primary { background:var(--gold); border-color:transparent; color:#0B1224; font-weight:700; }
.btn-danger { color:var(--err); border-color:rgba(217,45,32,.35); }
.btn-danger-solid { background:var(--err); border-color:transparent; color:#fff; font-weight:700; }
.ic { min-width:40px; min-height:40px; border-radius:10px; border:1px solid var(--line); background:var(--card); color:var(--text); font-size:16px; cursor:pointer; }
.ic:disabled { opacity:.3; cursor:not-allowed; }
input, select, textarea { width:100%; min-height:44px; padding:10px 14px; border-radius:10px; border:1px solid var(--line); background:var(--input); color:var(--text); font-size:15px; }
input:focus, select:focus, textarea:focus { outline:none; border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-soft); }
textarea { min-height:96px; resize:vertical; }
label { display:block; font-size:13px; font-weight:600; color:var(--muted); margin:14px 0 6px; }
label:first-child { margin-top:0; }
.two { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.badge { font-size:11px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:var(--accent); border:1px solid var(--accent-soft); background:var(--accent-soft); border-radius:999px; padding:4px 10px; }
.msg { font-size:14px; color:var(--err); min-height:20px; margin:10px 0 0; }
.warn { font-size:14px; line-height:1.5; color:var(--warn-text); background:var(--warn-bg); border:1px solid var(--warn-line); border-radius:12px; padding:12px 14px; margin:0 0 14px; }
.empty { text-align:center; color:var(--muted); padding:40px 16px; background:var(--card); border:1px dashed var(--line); border-radius:16px; font-size:15px; }
.ok { color:var(--muted); font-size:14px; padding:6px 0; }

/* Sheet (side panel for add, edit, and delete) */
.overlay { position:fixed; inset:0; background:rgba(3,6,14,.55); display:none; z-index:40; }
.overlay.show { display:block; }
.sheet { position:fixed; right:0; top:0; bottom:0; width:100%; max-width:460px; background:var(--card2); border-left:1px solid var(--line); transform:translateX(100%); transition:transform .25s ease; display:flex; flex-direction:column; z-index:41; }
.overlay.show .sheet { transform:none; }
.sheet-head { display:flex; justify-content:space-between; align-items:center; padding:18px 20px; border-bottom:1px solid var(--line); }
.sheet-head h2 { margin:0; font-size:18px; }
.x { width:40px; height:40px; border-radius:10px; border:1px solid var(--line); background:transparent; color:var(--text); font-size:20px; cursor:pointer; }
.sheet-body { padding:18px 20px; overflow-y:auto; flex:1; }
.sheet-foot { display:flex; gap:10px; padding:14px 20px; border-top:1px solid var(--line); justify-content:flex-end; align-items:center; }
.sheet-foot .grow { flex:1; }
.text { font-size:15px; line-height:1.5; margin:0 0 14px; }

/* Toast */
.toast { position:fixed; left:50%; bottom:24px; transform:translateX(-50%); background:var(--card); border:1px solid var(--line); box-shadow:var(--shadow); padding:12px 18px; border-radius:12px; font-size:14px; opacity:0; pointer-events:none; transition:opacity .2s; z-index:60; }
.toast.show { opacity:1; }

/* Contacts */
.toolbar { display:flex; gap:10px; flex-wrap:wrap; align-items:center; margin-bottom:14px; }
.search { flex:1; min-width:200px; min-height:46px; border-radius:12px; }
.chips { display:flex; gap:8px; overflow-x:auto; padding-bottom:6px; margin-bottom:16px; scrollbar-width:none; }
.chips::-webkit-scrollbar { display:none; }
.chip { flex:0 0 auto; min-height:36px; padding:0 14px; border-radius:999px; border:1px solid var(--line); background:var(--card); color:var(--muted); font-size:13px; font-weight:600; cursor:pointer; }
.chip.on { background:var(--gold); border-color:var(--gold); color:#0B1224; }
.count { font-size:13px; color:var(--muted); margin:0 0 12px; }
.list { display:grid; gap:10px; }
.row { width:100%; text-align:left; background:var(--card); border:1px solid var(--line); border-radius:14px; padding:14px 16px; color:var(--text); cursor:pointer; display:flex; justify-content:space-between; gap:14px; align-items:center; box-shadow:var(--shadow); }
.row:hover { border-color:var(--accent); }
.row-name { font-weight:700; font-size:15px; }
.row-meta { font-size:13px; color:var(--muted); margin-top:3px; word-break:break-word; }
.row-top { display:flex; align-items:center; justify-content:space-between; gap:8px; flex-wrap:wrap; }
.src-badge { font-size:11px; font-weight:700; padding:3px 9px; border-radius:999px; white-space:nowrap; }
.src-web { background:#e0e7ff; color:#4338ca; }
.src-fb { background:#dbeafe; color:#1d4ed8; }
.src-other { background:#f3f4f6; color:#4b5563; }
.svc-chip { display:inline-block; margin-top:6px; font-size:13px; font-weight:700; color:#312e81; background:#eef2ff; border:1px solid #c7d2fe; padding:4px 10px; border-radius:8px; }
.svc-none { color:#9ca3af; background:#f9fafb; border-color:#e5e7eb; font-weight:600; }
.row-pay { font-size:12px; color:var(--muted); margin-top:6px; }
.due-badge { display:inline-block; margin-top:6px; font-size:12px; font-weight:700; padding:4px 10px; border-radius:999px; }
.due-soon { background:#fef3c7; color:#b45309; }
.due-over { background:#fee2e2; color:#b91c1c; }
.row-due-soon { border-left:4px solid #f59e0b; }
.row-due-over { border-left:4px solid #ef4444; }
.stage-pill { flex:0 0 auto; font-size:12px; font-weight:700; color:#0B1224; border-radius:999px; padding:5px 10px; white-space:nowrap; }

/* Pipeline */
.stats { display:flex; gap:12px; flex-wrap:wrap; margin-bottom:16px; }
.stat { background:var(--card); border:1px solid var(--line); border-radius:14px; padding:12px 16px; min-width:150px; box-shadow:var(--shadow); }
.stat b { display:block; font-size:22px; }
.stat span { font-size:12px; color:var(--muted); }
.srow { background:var(--card); border:1px solid var(--line); border-left:4px solid var(--c, var(--accent)); border-radius:14px; padding:14px 16px; display:flex; align-items:center; gap:14px; flex-wrap:wrap; box-shadow:var(--shadow); }
.pos { width:34px; height:34px; border-radius:10px; background:var(--card2); display:flex; align-items:center; justify-content:center; font-size:13px; font-weight:700; color:var(--c, var(--accent)); flex:0 0 auto; }
.info { flex:1; min-width:160px; }
.sname { font-weight:700; font-size:15px; display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.sys { font-size:10px; font-weight:700; color:var(--gold); border:1px solid rgba(245,184,46,.45); border-radius:999px; padding:2px 8px; letter-spacing:.05em; text-transform:uppercase; }
.meta { font-size:13px; color:var(--muted); margin-top:3px; }
.bar { height:6px; background:var(--line); border-radius:999px; overflow:hidden; margin-top:9px; }
.bar span { display:block; height:100%; background:var(--c, var(--accent)); border-radius:999px; }
.actions { display:flex; gap:6px; flex-wrap:wrap; }
.readonly { font-size:13px; color:var(--muted); background:var(--card); border:1px dashed var(--line); border-radius:12px; padding:12px 14px; margin-bottom:14px; }
.swatches { display:grid; grid-template-columns:repeat(5, 1fr); gap:10px; }
.swatch { height:44px; border-radius:12px; border:2px solid transparent; background:var(--c); cursor:pointer; padding:0; }
.swatch[aria-pressed="true"] { border-color:var(--text); box-shadow:0 0 0 3px var(--accent-soft); }
.preview { margin-top:16px; display:flex; align-items:center; gap:10px; font-size:13px; color:var(--muted); }
.preview .dot { width:12px; height:12px; border-radius:50%; background:var(--c); }
.preview b { color:var(--text); font-size:15px; }

/* Dashboard */
.main-grid { display:grid; gap:16px; }
.kpis { display:grid; gap:12px; grid-template-columns:repeat(4, 1fr); }
.kpi { background:var(--card); border:1px solid var(--line); border-top:3px solid var(--k, var(--accent)); border-radius:16px; padding:16px 18px; min-width:0; box-shadow:var(--shadow); }
.kpi .label { display:block; font-size:12px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:var(--muted); }
.kpi b { display:block; font-size:30px; margin-top:8px; color:var(--k, var(--text)); }
.kpi small { display:block; font-size:12px; color:var(--muted); margin-top:4px; }
.split { display:grid; gap:16px; grid-template-columns:1fr 1fr; }
.bar-row { display:grid; grid-template-columns:120px 1fr 84px; gap:12px; align-items:center; margin-bottom:12px; font-size:14px; }
.bar-label { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.track { height:10px; background:var(--line); border-radius:999px; overflow:hidden; }
.track span { display:block; height:100%; border-radius:999px; background:var(--c, var(--accent)); }
.bar-val { text-align:right; font-weight:700; font-variant-numeric:tabular-nums; }
.bar-val small { display:block; font-size:11px; font-weight:500; color:var(--muted); }
.week { display:flex; align-items:flex-end; gap:8px; height:190px; padding-top:8px; }
.col { flex:1; display:flex; flex-direction:column; align-items:center; justify-content:flex-end; height:100%; min-width:0; }
.col .cnt { font-size:12px; font-weight:700; margin-bottom:6px; }
.colbar { width:100%; max-width:44px; flex:1; display:flex; align-items:flex-end; background:var(--card2); border-radius:10px; overflow:hidden; }
.colbar span { display:block; width:100%; background:linear-gradient(180deg, var(--accent), var(--accent-soft)); border-radius:10px 10px 0 0; }
.col .wd { font-size:12px; color:var(--muted); margin-top:8px; }
.attn { display:flex; justify-content:space-between; gap:12px; align-items:center; padding:12px 0; border-bottom:1px solid var(--line); text-decoration:none; }
.attn:last-of-type { border-bottom:0; }
.attn .n { font-weight:600; }
.attn .d { font-size:13px; color:var(--warn-text); white-space:nowrap; }
.more { display:inline-block; margin-top:12px; font-size:14px; font-weight:600; color:var(--accent); text-decoration:none; }

/* Responsive */
@media (max-width:1000px) {
  .kpis { grid-template-columns:repeat(2, 1fr); }
  .split { grid-template-columns:1fr; }
}
@media (max-width:860px) {
  .sidebar { position:fixed; left:0; top:0; bottom:0; height:100vh; width:262px; flex:none; transform:translateX(-100%); transition:transform .25s ease; z-index:30; }
  .shell.nav-open .sidebar { transform:none; }
  .shell.nav-open .scrim { opacity:1; pointer-events:auto; }
  .menu-btn { display:inline-flex; }
  .topbar { padding:12px 14px; }
  main { padding:16px; }
  .sheet { max-width:100%; }
}
@media (max-width:640px) {
  .two { grid-template-columns:1fr; }
  .kpi b { font-size:24px; }
  .bar-row { grid-template-columns:90px 1fr 60px; gap:8px; }
  .week { height:160px; gap:5px; }
  .srow { padding:12px; }
  .actions { width:100%; justify-content:flex-end; }
  .stat { min-width:0; flex:1; }
  .top-right .who-name { display:none; }
}

/* Sidebar: collapse button, count badges, icon-only mode (desktop only) */
.side-top { display:flex; justify-content:flex-end; margin:-6px -4px 0 0; }
.side-collapse { width:30px; height:30px; border-radius:9px; border:1px solid var(--side-line); background:var(--side-2); color:var(--side-text); cursor:pointer; display:inline-flex; align-items:center; justify-content:center; padding:0; }
.side-collapse:hover { color:#fff; }
.side-collapse svg { width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; transition:transform .2s ease; }
.side-count { margin-left:auto; min-width:26px; text-align:center; font-size:12px; font-weight:600; background:var(--side-2); color:var(--side-text); padding:2px 8px; border-radius:999px; }
.side-nav a.active .side-count { background:var(--accent-soft); color:var(--accent); }
@media (min-width:861px) {
  .shell.collapsed .sidebar { width:76px; flex-basis:76px; padding:18px 10px; }
  .shell.collapsed .side-collapse svg { transform:rotate(180deg); }
  .shell.collapsed .side-top { justify-content:center; margin-right:0; }
  .shell.collapsed .side-logo { width:44px; height:44px; margin-bottom:6px; }
  .shell.collapsed .side-name, .shell.collapsed .side-sub, .shell.collapsed .side-nav a span:not(.side-count):not(.side-tag), .shell.collapsed .side-btn span, .shell.collapsed .side-count, .shell.collapsed .side-tag { display:none; }
  .shell.collapsed .side-nav a, .shell.collapsed .side-btn { justify-content:center; padding:11px 0; }
  .shell.collapsed .side-brand { padding-bottom:14px; }
}

/* Centered editor with live preview (used by Forms and Email) */
.overlay.center { display:none; align-items:center; justify-content:center; padding:24px; }
.overlay.center.show { display:flex; }
.overlay.center .sheet { position:relative; right:auto; top:auto; bottom:auto; transform:none; transition:none; width:min(1080px, 100%); max-width:none; height:auto; max-height:calc(100vh - 48px); border:1px solid var(--line); border-radius:20px; box-shadow:var(--shadow); overflow:hidden; }
.modal-cols { display:grid; grid-template-columns:1fr 1fr; flex:1; min-height:0; }
.modal-cols > .sheet-body { overflow-y:auto; }
.preview-pane { background:var(--bg); border-left:1px solid var(--line); overflow-y:auto; padding:20px; }
.preview-label { font-size:12px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:var(--muted); margin-bottom:12px; }
.prev-card { background:var(--card); border:1px solid var(--line); border-radius:16px; overflow:hidden; box-shadow:var(--shadow); }
.prev-header { background:var(--input); display:flex; align-items:center; justify-content:center; min-height:96px; padding:14px; }
.prev-header img { max-width:100%; max-height:140px; object-fit:contain; display:block; }
.prev-header.empty { color:var(--muted); font-size:13px; }
.prev-body { padding:22px; }
.prev-title { margin:0 0 6px; font-size:20px; text-align:center; }
.prev-desc { margin:0 0 18px; color:var(--muted); font-size:14px; line-height:1.55; text-align:center; }
.prev-meta { font-size:13px; color:var(--muted); border-bottom:1px solid var(--line); padding-bottom:12px; margin-bottom:14px; }
.prev-meta strong { color:var(--text); }
.prev-text { font-size:15px; line-height:1.65; white-space:pre-wrap; word-break:break-word; }
.prev-atts { display:grid; gap:10px; margin-top:16px; }
.prev-atts img { width:100%; border-radius:12px; border:1px solid var(--line); }
.prev-field { margin-bottom:14px; }
.prev-field label { display:block; font-size:13px; font-weight:600; color:var(--text); margin:0 0 6px; }
.prev-field .req { color:var(--err); margin-left:2px; }
.prev-field .box { width:100%; border:1px solid var(--line); border-radius:12px; background:var(--input); color:var(--muted); padding:11px 12px; font-size:14px; min-height:42px; box-sizing:border-box; }
.prev-field .box.tall { min-height:84px; }
.prev-submit { width:100%; margin-top:6px; padding:12px; border:0; border-radius:12px; background:var(--accent); color:#fff; font-weight:700; font-size:15px; }
.prev-empty { color:var(--muted); font-size:14px; text-align:center; padding:30px 10px; }
.header-row { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.header-row .thumb { width:64px; height:64px; border-radius:12px; border:1px dashed var(--line); background:var(--input); display:flex; align-items:center; justify-content:center; overflow:hidden; flex:none; }
.header-row .thumb img { width:100%; height:100%; object-fit:contain; }
.header-row .thumb span { font-size:11px; color:var(--muted); }
@media (max-width:860px) {
  .overlay.center { padding:0; align-items:stretch; }
  .overlay.center .sheet { width:100%; height:100%; max-height:100vh; border-radius:0; border:0; }
  .modal-cols { grid-template-columns:1fr; overflow-y:auto; }
  .modal-cols > .sheet-body { overflow:visible; }
  .preview-pane { border-left:0; border-top:1px solid var(--line); }
}

/* Make the hidden attribute win over display rules (used by upload buttons) */
[hidden] { display:none !important; }

/* Test / Live mode */
.mode-pill { min-height:34px; padding:0 14px; border-radius:999px; border:1px solid var(--line); background:var(--card); color:var(--text); font:inherit; font-size:12px; font-weight:700; letter-spacing:.04em; text-transform:uppercase; cursor:pointer; margin-right:10px; }
.mode-pill.is-test { background:#FFF4E5; border-color:#F5B82E; color:#8A5A00; }
.test-band { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; padding:10px 18px; background:#FFF4E5; border-bottom:1px solid #F5B82E; color:#8A5A00; font-size:13px; }
.test-clear { min-height:32px; padding:0 12px; border-radius:8px; border:1px solid #D92D20; background:transparent; color:#D92D20; font:inherit; font-weight:600; font-size:12px; cursor:pointer; }

/* Image picker */
.pick-overlay { position:fixed; inset:0; background:rgba(3,6,14,.55); display:flex; align-items:center; justify-content:center; z-index:60; padding:16px; }
.pick-box { background:var(--card); border:1px solid var(--line); border-radius:18px; width:min(640px,100%); max-height:86vh; display:flex; flex-direction:column; box-shadow:var(--shadow); }
.pick-head { display:flex; justify-content:space-between; align-items:center; padding:16px 18px; border-bottom:1px solid var(--line); }
.pick-x { background:none; border:0; font-size:24px; line-height:1; cursor:pointer; color:var(--muted); }
.pick-tabs { display:flex; gap:6px; padding:12px 18px 0; }
.pick-tab { min-height:36px; padding:0 14px; border-radius:10px; border:1px solid var(--line); background:var(--card2); color:var(--muted); font:inherit; font-weight:600; font-size:13px; cursor:pointer; }
.pick-tab.on { background:var(--accent-soft); color:var(--accent); border-color:transparent; }
.pick-body { padding:16px 18px 18px; overflow-y:auto; }
.pick-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(120px,1fr)); gap:10px; }
.pick-item { display:flex; flex-direction:column; gap:6px; padding:8px; border:1px solid var(--line); border-radius:12px; background:var(--card2); cursor:pointer; font:inherit; color:var(--text); text-align:left; }
.pick-item:hover { border-color:var(--accent); }
.pick-item img { width:100%; height:90px; object-fit:contain; border-radius:8px; background:#fff; }
.pick-item span { font-size:12px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.pick-note { font-size:13px; color:var(--muted); line-height:1.6; margin:6px 0 12px; }

/* Shared date and time in the top bar */
.top-clock { font-size:13px; font-weight:600; color:var(--muted); white-space:nowrap; padding:6px 10px; border:1px solid var(--line); border-radius:999px; background:var(--card2); }
@media (max-width: 720px) { .top-clock { display:none; } }

/* Personal reminders on the profile page */
.rem-add { display:grid; grid-template-columns:1fr 1fr auto; gap:8px; align-items:end; margin-bottom:14px; }
.rem-list { display:flex; flex-direction:column; gap:8px; }
.rem-row { display:grid; grid-template-columns:1fr auto auto; gap:10px; align-items:center; padding:10px 12px; border:1px solid var(--line); border-radius:12px; background:var(--card2); }
.rem-row.done span { text-decoration:line-through; opacity:.6; }
.rem-check { display:flex; align-items:center; gap:8px; font-weight:600; cursor:pointer; }
.rem-meta { font-size:12px; color:var(--muted); white-space:nowrap; }
@media (max-width: 720px) { .rem-add { grid-template-columns:1fr; } .rem-row { grid-template-columns:1fr; } }

/* Profile page: reminders and password share the right column */
.side-stack { display:flex; flex-direction:column; gap:16px; min-width:0; }
.rem-note { grid-column:1 / -1; }
.rem-add { grid-template-columns:1fr 1fr auto; }
.rem-note textarea { width:100%; min-height:84px; resize:vertical; }
.rem-check { margin:0; }
.rem-check input[type=checkbox] { width:auto; margin:0; flex:0 0 auto; }
.rem-row label { margin:0; }

/* Reminder alert: stays until dismissed */
.rem-alert { position:fixed; right:18px; bottom:18px; z-index:80; display:flex; gap:14px; align-items:center; justify-content:space-between; max-width:360px; padding:14px 16px; border-radius:14px; background:var(--card); border:1px solid var(--accent); box-shadow:var(--shadow); }
.rem-alert-text { font-size:14px; margin-top:4px; }
@media (max-width: 720px) { .rem-alert { left:12px; right:12px; bottom:12px; max-width:none; } }

/* Reminder alert: blinking red, with Snooze and Done */
.rem-alert { max-width:400px; flex-direction:column; align-items:stretch; justify-content:flex-start; gap:10px; }
.rem-alert.blink { border:2px solid #dc2626; animation: remBlink .9s ease-in-out infinite; }
@keyframes remBlink {
  0%, 100% { background:#fee2e2; color:#7f1d1d; }
  50% { background:#dc2626; color:#ffffff; }
}
.rem-alert.blink .btn { color:inherit; }
.rem-alert-actions { display:flex; gap:6px; flex-wrap:wrap; align-items:center; }
.rem-alert-actions .btn { min-height:34px; }
.rem-snooze { min-height:34px; border-radius:8px; border:1px solid var(--line); background:var(--card); color:var(--text); padding:0 8px; font:inherit; font-size:13px; }
