/* ==========================================================================
   Sumarrry: "Linear" theme
   Applied with <html data-theme="linear">. Everything here is scoped to it,
   so the default Notion look is untouched. Dark-first, like Linear itself:
   near-black surfaces, hairline borders, Inter, indigo accent, compact type.
   ========================================================================== */

:root[data-theme="linear"] {
  --bg: #0b0c0d;
  --sidebar: #08090a;
  --card: #111213;
  --surface-1: #141516;
  --surface-2: #191a1c;
  --text: #f7f8f8;
  --text-2: #8a8f98;
  --text-3: #62666d;
  --border: rgba(255, 255, 255, .07);
  --border-strong: rgba(255, 255, 255, .11);
  --hover: rgba(255, 255, 255, .045);
  --hover-2: rgba(255, 255, 255, .08);
  --input: rgba(255, 255, 255, .03);
  --blue: #5e6ad2;
  --blue-hover: #6c78e6;
  --blue-soft: rgba(94, 106, 210, .18);
  --red: #eb5757;
  --red-soft: rgba(235, 87, 87, .14);
  --green: #4cb782;
  --tooltip: #1c1d1f;
  --dd-bg: #18191b;
  --card-shadow: 0 0 0 1px rgba(255, 255, 255, .07), 0 1px 0 0 rgba(255, 255, 255, .04) inset;
  --card-shadow-hover: 0 0 0 1px rgba(255, 255, 255, .13), 0 8px 24px rgba(0, 0, 0, .45);
  --pop-shadow: 0 0 0 1px rgba(255, 255, 255, .09), 0 8px 16px rgba(0, 0, 0, .35), 0 24px 48px rgba(0, 0, 0, .45);
  --font: "Inter", "Inter Variable", -apple-system, "Segoe UI", system-ui, sans-serif;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  color-scheme: dark;
}

[data-theme="linear"] body {
  font-size: 13px;
  letter-spacing: -.011em;
  font-feature-settings: "cv11", "ss01", "ss03";
  background:
    radial-gradient(1200px 380px at 50% -140px, rgba(94, 106, 210, .13), transparent 70%),
    var(--bg);
  background-attachment: fixed;
}
[data-theme="linear"] ::selection { background: rgba(94, 106, 210, .45); }
[data-theme="linear"] .ico { width: 15px; height: 15px; }

/* ---------- shell ---------- */
[data-theme="linear"] .sidebar { background: var(--sidebar); box-shadow: inset -1px 0 0 var(--border); padding-top: 10px; }
[data-theme="linear"] .sb-ws { font-size: 13.5px; font-weight: 600; margin-bottom: 10px; }
[data-theme="linear"] .sb-ws-icon {
  background: linear-gradient(135deg, #7480ff, #5e6ad2 55%, #4651b8); color: #fff; border-radius: 6px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 2px 6px rgba(94, 106, 210, .4);
}
[data-theme="linear"] .sb-item { height: 28px; font-size: 13px; font-weight: 500; color: var(--text-2); border-radius: 6px; }
[data-theme="linear"] .sb-item:hover { background: var(--hover); color: var(--text); }
[data-theme="linear"] .sb-item.active { background: var(--hover-2); color: var(--text); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .04); }
[data-theme="linear"] .sb-item .ico { width: 16px; height: 16px; }
[data-theme="linear"] .sb-section { font-size: 11.5px; font-weight: 500; letter-spacing: .01em; color: var(--text-3); }
[data-theme="linear"] .sb-foot { color: var(--text-3); }

[data-theme="linear"] .topbar {
  height: 44px; background: rgba(11, 12, 13, .72); backdrop-filter: saturate(1.6) blur(14px);
  box-shadow: inset 0 -1px 0 var(--border);
}
[data-theme="linear"] .crumb { font-size: 13px; font-weight: 500; color: var(--text-2); }
[data-theme="linear"] .crumb:last-child { color: var(--text); }
[data-theme="linear"] .brand-mark { background: linear-gradient(135deg, #7480ff, #5e6ad2); }

/* ---------- buttons, inputs, segmented ---------- */
[data-theme="linear"] .btn { height: 30px; border-radius: 6px; font-size: 13px; font-weight: 500; color: var(--text-2); }
[data-theme="linear"] .btn:hover { background: var(--hover-2); color: var(--text); }
[data-theme="linear"] .btn-sm { height: 26px; font-size: 12.5px; border-radius: 5px; }
[data-theme="linear"] .btn-lg { height: 36px; font-size: 13.5px; border-radius: 7px; }
[data-theme="linear"] .btn-outline { color: var(--text); background: var(--surface-1); box-shadow: 0 0 0 1px var(--border-strong), inset 0 1px 0 rgba(255, 255, 255, .04); }
[data-theme="linear"] .btn-outline:hover { background: var(--surface-2); }
[data-theme="linear"] .btn-primary {
  color: #fff; background: linear-gradient(180deg, #6a75db, #5e6ad2);
  box-shadow: 0 0 0 1px rgba(94, 106, 210, .9), inset 0 1px 0 rgba(255, 255, 255, .22), 0 1px 3px rgba(0, 0, 0, .4);
}
[data-theme="linear"] .btn-primary:hover { background: linear-gradient(180deg, #7581e6, #6873dc); color: #fff; }
[data-theme="linear"] .btn-rec { background: linear-gradient(180deg, #f06a6a, #e5484d); box-shadow: 0 0 0 1px rgba(229, 72, 77, .9), inset 0 1px 0 rgba(255, 255, 255, .22); }
[data-theme="linear"] .btn-danger { color: #f2777a; }
[data-theme="linear"] .btn.copied { color: var(--green); }

[data-theme="linear"] .input, [data-theme="linear"] .select, [data-theme="linear"] .textarea, [data-theme="linear"] .dd-btn {
  border-radius: 6px; background: var(--input); box-shadow: inset 0 0 0 1px var(--border-strong); font-size: 13px; color: var(--text);
}
[data-theme="linear"] .input:focus, [data-theme="linear"] .textarea:focus, [data-theme="linear"] .dd-btn:focus-visible, [data-theme="linear"] .dd.open .dd-btn {
  background: rgba(255, 255, 255, .04); box-shadow: inset 0 0 0 1px var(--blue), 0 0 0 3px rgba(94, 106, 210, .22);
}
[data-theme="linear"] .dd-pop { border-radius: 9px; font-size: 13px; backdrop-filter: blur(20px); background: rgba(24, 25, 27, .96); }
[data-theme="linear"] .dd-opt { min-height: 30px; border-radius: 5px; }
[data-theme="linear"] .dd-opt.active { background: rgba(255, 255, 255, .06); }
[data-theme="linear"] .label { font-size: 12px; font-weight: 500; color: var(--text-2); }

[data-theme="linear"] .seg { background: rgba(255, 255, 255, .035); box-shadow: inset 0 0 0 1px var(--border); border-radius: 7px; }
[data-theme="linear"] .seg::before { background: var(--surface-2); border-radius: 5px; box-shadow: 0 0 0 1px var(--border-strong), inset 0 1px 0 rgba(255, 255, 255, .05), 0 1px 2px rgba(0, 0, 0, .4); }
[data-theme="linear"] .seg button { font-size: 12.5px; font-weight: 500; }

[data-theme="linear"] .card { background: var(--card); border-radius: 10px; box-shadow: var(--card-shadow); }
[data-theme="linear"] dialog { background: #121314; border-radius: 12px; box-shadow: var(--pop-shadow); }
[data-theme="linear"] dialog::backdrop { backdrop-filter: blur(3px); }
[data-theme="linear"] .dlg-body h3 { font-size: 15px; font-weight: 600; }
[data-theme="linear"] .toast { background: #1c1d1f; color: var(--text); box-shadow: 0 0 0 1px rgba(255, 255, 255, .1), 0 12px 32px rgba(0, 0, 0, .5); font-size: 13px; }
[data-theme="linear"] .toast .ico { color: var(--green); }
[data-theme="linear"] .toast.error { background: #3a1517; box-shadow: 0 0 0 1px rgba(235, 87, 87, .4); }
[data-theme="linear"] .code { background: rgba(255, 255, 255, .04); color: #c9cbff; box-shadow: inset 0 0 0 1px var(--border); }
[data-theme="linear"] .progress { background: rgba(255, 255, 255, .06); }
[data-theme="linear"] .progress > div { background: linear-gradient(90deg, #5e6ad2, #8b93ff); }
[data-theme="linear"] .tag { border-radius: 99px; padding: 0 8px; font-weight: 500; background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 1px var(--border); }
[data-theme="linear"] .tag.orange { color: #f2a65a; background: rgba(242, 166, 90, .1); }

/* ---------- page headers: compact, no emoji icons ---------- */
[data-theme="linear"] .page-icon { display: none; }
[data-theme="linear"] .page-title { font-size: 24px; font-weight: 600; letter-spacing: -.022em; margin-top: 40px; }
[data-theme="linear"] .page-sub { font-size: 13.5px; color: var(--text-2); }
[data-theme="linear"] .watch .page-title { margin-top: 22px; font-size: 22px; }

/* views bar: pill tabs instead of an underline */
[data-theme="linear"] .views { box-shadow: none; padding-bottom: 0; margin: 24px 0 16px; gap: 4px; }
[data-theme="linear"] .views-ind { display: none; }
[data-theme="linear"] .vtab { height: 28px; padding: 0 10px; border-radius: 99px; font-size: 12.5px; color: var(--text-2); box-shadow: inset 0 0 0 1px transparent; }
[data-theme="linear"] .vtab.on { color: var(--text); background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 1px var(--border-strong); }
[data-theme="linear"] .side-tabs { box-shadow: none; padding-bottom: 8px; }
[data-theme="linear"] .side-tabs .views-ind { display: none; }

/* ---------- library ---------- */
[data-theme="linear"] .grid { gap: 14px; }
[data-theme="linear"] .vcard { background: var(--card); border-radius: 10px; box-shadow: var(--card-shadow); }
[data-theme="linear"] .vcard:hover { transform: translateY(-2px); box-shadow: var(--card-shadow-hover); }
[data-theme="linear"] .vthumb { border-bottom: 1px solid var(--border); }
[data-theme="linear"] .vtitle { font-size: 13.5px; font-weight: 500; }
[data-theme="linear"] .vmeta { font-size: 12px; color: var(--text-3); }
[data-theme="linear"] .badge { border-radius: 5px; background: rgba(8, 9, 10, .78); box-shadow: 0 0 0 1px rgba(255, 255, 255, .1); font-weight: 500; }
[data-theme="linear"] .vactions { background: #18191b; border-radius: 8px; }
[data-theme="linear"] .play-hint { background: rgba(255, 255, 255, .95); }
[data-theme="linear"] .table { box-shadow: none; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--card); }
[data-theme="linear"] .trow { min-height: 40px; box-shadow: inset 0 -1px 0 var(--border); }
[data-theme="linear"] .trow:last-child { box-shadow: none; }
[data-theme="linear"] .thead { background: rgba(255, 255, 255, .02); color: var(--text-3); font-size: 12px; font-weight: 500; }
[data-theme="linear"] .trow:not(.thead):hover { background: rgba(255, 255, 255, .03); }
[data-theme="linear"] .tname { font-weight: 500; }
[data-theme="linear"] .empty .big-ico { filter: grayscale(.2); }
[data-theme="linear"] .skel { background: linear-gradient(90deg, rgba(255,255,255,.03) 25%, rgba(255,255,255,.07) 37%, rgba(255,255,255,.03) 63%); background-size: 400% 100%; }

/* ---------- watch ---------- */
[data-theme="linear"] .player { border-radius: 12px; box-shadow: 0 0 0 1px var(--border-strong), 0 20px 60px rgba(0, 0, 0, .5); }
[data-theme="linear"] .plyr { --plyr-color-main: #5e6ad2; }
[data-theme="linear"] .props { padding: 6px 0; }
[data-theme="linear"] .prop { min-height: 30px; font-size: 13px; }
[data-theme="linear"] .prop-k { color: var(--text-3); }
[data-theme="linear"] .toolbar { box-shadow: inset 0 1px 0 var(--border), inset 0 -1px 0 var(--border); }
[data-theme="linear"] .react { height: 28px; background: rgba(255, 255, 255, .03); box-shadow: inset 0 0 0 1px var(--border-strong); font-size: 14px; }
[data-theme="linear"] .react:hover { background: rgba(255, 255, 255, .07); }
[data-theme="linear"] .react.mine { background: rgba(94, 106, 210, .16); box-shadow: inset 0 0 0 1px rgba(94, 106, 210, .7); }
[data-theme="linear"] .desc { font-size: 14px; line-height: 1.6; color: #d0d2d6; }
[data-theme="linear"] .comments { background: var(--card); border-radius: 12px; padding: 12px; box-shadow: var(--card-shadow); }
[data-theme="linear"] .comment:hover { background: rgba(255, 255, 255, .03); }
[data-theme="linear"] .avatar { box-shadow: 0 0 0 2px var(--card); }
[data-theme="linear"] .tchip { background: rgba(94, 106, 210, .16); color: #a4abff; border-radius: 5px; }
[data-theme="linear"] .cform { background: rgba(255, 255, 255, .025); box-shadow: inset 0 0 0 1px var(--border-strong); }
[data-theme="linear"] .cform:focus-within { box-shadow: inset 0 0 0 1px var(--blue), 0 0 0 3px rgba(94, 106, 210, .2); }
[data-theme="linear"] .owner-tag { background: rgba(94, 106, 210, .2); color: #b3b9ff; }
[data-theme="linear"] .t-seg { color: var(--text-2); }
[data-theme="linear"] .t-seg.on { background: rgba(94, 106, 210, .14); color: var(--text); box-shadow: inset 2px 0 0 #5e6ad2; }
[data-theme="linear"] .t-seg.on .t-time { color: #a4abff; }
[data-theme="linear"] .t-working { background: rgba(255, 255, 255, .03); box-shadow: inset 0 0 0 1px var(--border); }
[data-theme="linear"] .t-menu { background: #18191b; }
[data-theme="linear"] .svo-marker { background: #8b93ff; }
[data-theme="linear"] .email-preview { background: #f7f8f8; color: #111; }
[data-theme="linear"] .hint.warn { background: rgba(242, 166, 90, .08); box-shadow: inset 0 0 0 1px rgba(242, 166, 90, .25); color: var(--text); }

/* ---------- recorder ---------- */
[data-theme="linear"] .stage { border-radius: 12px; box-shadow: 0 0 0 1px var(--border-strong), 0 20px 60px rgba(0, 0, 0, .45); }
[data-theme="linear"] .panel { border-radius: 12px; }
[data-theme="linear"] .panel-title { font-size: 12px; font-weight: 500; color: var(--text-3); }
[data-theme="linear"] .mode { border-radius: 8px; box-shadow: inset 0 0 0 1px var(--border-strong); background: rgba(255, 255, 255, .02); }
[data-theme="linear"] .mode.on { background: rgba(94, 106, 210, .14); box-shadow: inset 0 0 0 1px #5e6ad2, 0 0 0 3px rgba(94, 106, 210, .14); }
[data-theme="linear"] .overlay { background: rgba(8, 9, 10, .6); }

/* ---------- login / misc ---------- */
[data-theme="linear"] .login-card { background: #111213; }
[data-theme="linear"] .login-card .page-icon { display: inline-block; font-size: 44px; }
[data-theme="linear"] .whisper-status { background: rgba(255, 255, 255, .03); box-shadow: inset 0 0 0 1px var(--border); }

/* ---------- theme switch (both themes) ---------- */
.sb-theme { display: flex; align-items: center; gap: 8px; margin: 8px 12px 2px 18px; font-size: 12px; color: var(--text-3); }
.sb-theme .seg { flex: 1; }
.sb-theme .seg button { height: 24px; font-size: 12px; }

/* smooth hand-off when switching themes */
.theme-switching *, .theme-switching *::before, .theme-switching *::after {
  transition: background-color .35s ease, color .35s ease, border-color .35s ease, box-shadow .35s ease, fill .35s ease !important;
}
.sb-theme .dd { flex: 1; }
.sb-theme .dd-btn { height: 28px; font-size: 12.5px; }

/* ---------- Sumarrry logo ---------- */
.brand-mark, [data-theme="linear"] .brand-mark {
  background: #0a0a0b url(/logo-mark.png) center / 70% no-repeat;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1);
}
.brand-mark::after { display: none !important; }
.sb-ws-icon, [data-theme="linear"] .sb-ws-icon {
  background: #0a0a0b; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12), 0 2px 6px rgba(0, 0, 0, .4);
  display: grid; place-items: center; overflow: hidden;
}
.sb-ws-icon img { width: 74%; height: 74%; display: block; transition: transform .6s cubic-bezier(.34, 1.56, .64, 1); }
.sb-ws:hover .sb-ws-icon img { transform: rotate(60deg); }
