/* SkillMiinds SEO-inspired light workspace (theme v3 cues) + legacy class aliases */
:root {
  --bg: #e8ecf2;
  --surface: #ffffff;
  --surface-soft: #f4f6f9;
  --text: #1a1d21;
  --muted: #667085;
  --border: rgba(0, 0, 0, 0.1);
  --blue: #1a73e8;
  --green: #188038;
  --yellow: #e37400;
  --danger: #c5221f;
  --radius: 14px;
  --radius-sm: 10px;
  --font: "IBM Plex Sans", Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
  --sidebar-w: 230px;
}

/*
 * Workspace shell palette lives on <html class="theme-app-shell"> so it wins over :root.
 * (A later global `body { background }` was wiping a separate theme file — keep everything here.)
 */
html.theme-app-shell {
  color-scheme: only light;
  --accent: #2563eb;
  --accent-strong: #1e40af;
  --accent-soft: #eff6ff;
  --accent-ring: rgba(37, 99, 235, 0.35);
  --accent-muted: #93c5fd;
  --accent-border: #bfdbfe;
  --bg: #f1f5f9;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --blue: var(--accent);
  --green: #059669;
  --yellow: #ca8a04;
  --danger: #dc2626;
  --header-bg: rgba(255, 255, 255, 0.94);
}

html.theme-app-shell body {
  margin: 0;
  padding: 0;
  background-color: var(--bg);
  background-image:
    radial-gradient(1000px 420px at 8% -8%, rgba(37, 99, 235, 0.07), transparent 55%),
    radial-gradient(700px 320px at 96% 4%, rgba(14, 165, 233, 0.06), transparent 48%);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.5;
}

html.theme-app-shell a {
  color: var(--accent-strong);
}

html.theme-app-shell a:hover {
  color: var(--accent);
}

* { box-sizing: border-box; }

html:not(.theme-app-shell) body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.5;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 18px; }
.main-pad { padding: 28px 18px 72px; }

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}
.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 14px 0;
}
.brand a { font-weight: 700; letter-spacing: 0.02em; color: var(--text); }
.brand a:hover { text-decoration: none; opacity: 0.85; }

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.1rem;
  align-items: center;
  font-size: 0.95rem;
}
.nav-links a { color: var(--text); font-weight: 500; }
.nav-links a:hover { color: var(--blue); text-decoration: none; }
.nav-user { color: var(--muted); font-size: 0.88rem; }
.nav-signout { color: var(--muted); font-weight: 500; }

.site-footer {
  border-top: 1px solid var(--border);
  padding: 22px 0;
  font-size: 13px;
  color: var(--muted);
}

.page-head h1 { margin: 0 0 0.25rem; font-size: 1.65rem; font-weight: 700; }
.page-head .muted { margin: 0 0 1.25rem; color: var(--muted); max-width: 70ch; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 18px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.card h2, .card h3 { margin-top: 0; font-size: 1.05rem; }
.danger-zone { border-color: rgba(197, 34, 31, 0.35); background: #fff8f7; }

.hero { padding: 2.5rem 0 1rem; }
.hero h1 { font-size: 2rem; margin: 0.5rem 0; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.72rem; color: var(--muted); margin: 0; }
.lede { font-size: 1.1rem; max-width: 62ch; color: #3c424b; }
.disclosure { max-width: 70ch; color: var(--muted); font-size: 0.95rem; border-left: 3px solid var(--blue); padding-left: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; margin: 2rem 0; }
.viz h2 { margin-top: 0; font-size: 1.1rem; }
.viz-note { color: var(--muted); font-size: 0.88rem; margin: 0 0 0.75rem; }
.viz-val { font-size: 1.25rem; margin: 0.25rem 0 0; }
.viz-val.big { font-size: 2rem; font-weight: 700; }
.bar-track { height: 12px; background: var(--surface-soft); border-radius: 999px; overflow: hidden; border: 1px solid var(--border); }
.bar-fill { height: 100%; background: linear-gradient(90deg, var(--blue), #4285f4); border-radius: 999px; transition: width 0.4s ease; }
.cta-row { margin-top: 2rem; }

.login-page .wrap { max-width: 480px; }
.login-shell { padding: 2rem 0; }
.login-brand h1 { margin: 0 0 0.25rem; }

.form-card label, .form-grid label { display: block; margin: 0.65rem 0; color: var(--muted); font-size: 0.9rem; }
.form-card input, .form-card textarea, .form-card select,
.form-grid input, .form-grid textarea, .form-grid select {
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.55rem 0.65rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font: inherit;
}
.form-row { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: flex-end; }
.form-row input { flex: 1; min-width: 120px; }
.form-grid { display: grid; gap: 0.5rem; }
.inline { display: inline-flex; align-items: center; gap: 0.35rem; margin-right: 1rem; }

.btn {
  display: inline-block;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  background: var(--surface-soft);
  color: var(--text);
  border-color: var(--border);
}
.btn:hover { filter: brightness(0.97); }
.btn-primary, .btn.primary {
  background: var(--blue);
  color: #fff;
  border-color: transparent;
}
.btn-secondary {
  background: var(--surface-soft);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-danger, .btn.danger {
  background: #fde7e6;
  color: var(--danger);
  border: 1px solid rgba(197, 34, 31, 0.4);
}
.btn-small, .btn.small { padding: 6px 10px; font-size: 0.85rem; }
.btn-outline-danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid rgba(197, 34, 31, 0.45);
}

.toolbar { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-bottom: 0.75rem; }
.code, textarea.code {
  width: 100%;
  font-family: var(--mono);
  font-size: 0.85rem;
  line-height: 1.4;
  background: var(--surface-soft);
  color: #1a1d21;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
}

.error { color: #a50e0e; }
.ok { color: var(--green); }
.highlight { background: var(--surface-soft); border: 1px dashed var(--border); padding: 0.75rem 1rem; border-radius: var(--radius-sm); }
.muted { color: var(--muted); }
.fine-print { font-size: 0.85rem; color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.table th, .table td { border-bottom: 1px solid var(--border); padding: 10px 8px; text-align: left; vertical-align: top; }
.table th { color: var(--muted); font-weight: 600; }
.mono { font-family: var(--mono); }
.small { font-size: 0.8rem; }

.team-inline { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; }
.team-inline input { min-width: 120px; padding: 0.35rem 0.5rem; border-radius: 8px; border: 1px solid var(--border); }
.team-inline select { padding: 0.35rem 0.5rem; border-radius: 8px; border: 1px solid var(--border); }

.branch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.branch-card { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0.75rem; background: var(--surface-soft); }
.branch-card form { margin-bottom: 0.35rem; }
.row-actions { margin-top: 0.5rem; }
.inline-form { display: flex; gap: 0.35rem; align-items: center; flex-wrap: wrap; }

.website-list { display: grid; gap: 16px; }
.website-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  background: var(--surface-soft);
}
.website-card-head {
  margin-bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.site-link { word-break: break-all; font-size: 0.9rem; }
.delete-row { margin-top: 10px; }

.badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.badge-neutral {
  background: rgba(26, 115, 232, 0.1);
  color: var(--blue);
}

.muted-block { background: var(--surface-soft); }
.muted-block summary { cursor: pointer; font-weight: 600; }

.app-shell {
  display: flex;
  min-height: 100vh;
}

.os-sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

.os-sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}

.os-logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(26, 115, 232, 0.25), rgba(24, 128, 56, 0.2));
  border: 1px solid var(--border);
}

.os-brand-name a {
  font-weight: 600;
  font-size: 13px;
  color: var(--text);
}
.os-brand-name a:hover { text-decoration: none; opacity: 0.88; }

.os-brand-sub {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 2px;
}

.os-sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
}

.os-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
  font-family: var(--mono);
}

.os-avatar-admin { background: rgba(26, 115, 232, 0.12); color: var(--blue); }
.os-avatar-incharge { background: rgba(227, 116, 0, 0.15); color: var(--yellow); }
.os-avatar-manager { background: rgba(227, 116, 0, 0.12); color: var(--yellow); }
.os-avatar-member { background: rgba(24, 128, 56, 0.12); color: var(--green); }

.os-user-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.os-user-role {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.06em;
}

.os-nav {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0 12px;
}

.os-nav-section {
  padding: 14px 18px 5px;
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-family: var(--mono);
}

.os-nav-item {
  display: flex;
  align-items: center;
  padding: 9px 18px;
  margin: 0 8px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text);
  border-left: 2px solid transparent;
}
.os-nav-item:hover {
  background: var(--surface-soft);
  color: var(--blue);
  text-decoration: none;
}
.os-nav-item.active {
  background: var(--surface-soft);
  color: var(--blue);
  border-left-color: var(--blue);
  font-weight: 500;
}

.os-nav-highlight:not(.active) {
  margin-top: 4px;
  border: 1px solid rgba(26, 115, 232, 0.25);
  background: linear-gradient(135deg, rgba(26, 115, 232, 0.08), rgba(24, 128, 56, 0.06));
}

.os-sidebar-bottom {
  padding: 14px 18px;
  border-top: 1px solid var(--border);
}

.os-logout-btn {
  display: block;
  width: 100%;
  padding: 8px 12px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
  font-family: var(--font);
  text-align: left;
}
.os-logout-btn:hover {
  background: rgba(217, 48, 37, 0.1);
  color: var(--danger);
  border-color: rgba(234, 67, 53, 0.3);
  text-decoration: none;
}

.os-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.os-sidebar-depth {
  box-shadow:
    inset -1px 0 0 rgba(255, 255, 255, 0.5),
    8px 0 28px rgba(15, 23, 42, 0.075);
}

.os-main-inner { flex: 1; min-height: 0; }

.os-main-scene {
  padding: 24px 28px 44px;
  background:
    radial-gradient(1200px 420px at 8% -12%, rgba(26, 115, 232, 0.085), transparent),
    radial-gradient(900px 340px at 96% 6%, rgba(24, 128, 56, 0.065), transparent),
    var(--bg);
}

.os-main-foot {
  padding: 12px 28px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  background: var(--surface-soft);
}

.os-iframe-shell {
  height: min(82vh, calc(100vh - 220px));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 6px 18px rgba(14, 20, 34, 0.06);
}

.os-iframe { width: 100%; height: 100%; border: 0; display: block; }

.os-embed-head { margin-bottom: 14px; }

.role-legend-card .role-def-list { margin: 0.75rem 0 0; }
.role-def-list dt { font-weight: 600; font-size: 0.9rem; margin-top: 0.75rem; }
.role-def-list dd { margin: 0.35rem 0 0 0; font-size: 0.88rem; line-height: 1.45; padding-left: 0; max-width: 72ch; }
.zero-top { margin-top: 0; }
.req { color: var(--danger); margin-left: 2px; }

.badge-soft {
  background: var(--surface-soft);
  color: var(--muted);
  border: 1px solid var(--border);
  font-weight: 500;
}

.btn-ghost {
  background: transparent;
  border: 1px dashed var(--border);
  color: var(--muted);
}

.form-grid .full-row { grid-column: 1 / -1; }

.task-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.task-count-pill {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  background: var(--surface-soft);
  min-width: 100px;
}

.task-count-pill strong {
  display: block;
  font-size: 1.25rem;
  margin-top: 4px;
}

.task-card .task-card-head {
  align-items: flex-start;
  flex-direction: column;
  gap: 6px;
}

.task-form-actions { margin-top: 0.35rem; }

.task-inline-form {
  display: inline-block;
  margin: 8px 0 0;
}

.task-thread {
  margin: 12px 0;
  padding: 8px 10px;
  background: var(--surface-soft);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.task-thread summary { cursor: pointer; font-weight: 600; }

.task-updates-list {
  margin: 10px 0 0;
  padding-left: 1.15rem;
  list-style: disc;
}

.task-updates-list li { margin: 0.65rem 0; }

.task-update-body { margin-top: 4px; line-height: 1.45; }

.task-lead-note {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}

.task-title { margin: 0 0 0.5rem; font-size: 1.05rem; }

.task-desc {
  margin: 0 0 0.75rem;
  line-height: 1.45;
  color: var(--text);
}

.page-head-hero.card { margin-bottom: 22px !important; padding: 20px 22px !important; }
.page-head-hero .muted { margin-bottom: 0 !important; }

.card-3d {
  border-radius: 16px !important;
  background: linear-gradient(165deg, #ffffff 0%, #fafbfd 42%, #f1f5f9 100%) !important;
  border: 1px solid rgba(26, 32, 44, 0.08) !important;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.9),
    inset 0 -2px 4px rgba(15, 23, 42, 0.04),
    0 12px 30px rgba(15, 23, 42, 0.1),
    0 4px 10px rgba(15, 23, 42, 0.05) !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-3d:hover {
  transform: translateY(-3px);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.95),
    inset 0 -2px 4px rgba(15, 23, 42, 0.03),
    0 20px 42px rgba(15, 23, 42, 0.12),
    0 6px 14px rgba(15, 23, 42, 0.06) !important;
}

.card-3d.danger-zone:hover {
  transform: translateY(-1px);
}

.page-hero-mini {
  padding: 22px 24px !important;
  border-radius: 16px !important;
  border-left: 4px solid var(--blue) !important;
}

.page-hero-mini h1 {
  margin: 0 0 0.35rem !important;
  font-size: 1.6rem !important;
  letter-spacing: -0.02em;
}

.page-head-bar { margin-bottom: 20px !important; padding: 18px 20px !important; }
.page-head-bar h1 { margin: 0 0 0.3rem !important; font-size: 1.5rem !important; letter-spacing: -0.02em; }
.page-head-bar .muted { margin-bottom: 0 !important; }

.card-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.card-h {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 600;
}

.grid-2-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.os-avatar-hr {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.2), rgba(26, 115, 232, 0.16));
  color: #5b21b6;
}

.badge-blue {
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  display: inline-block;
  background: rgba(26, 115, 232, 0.12);
  color: var(--blue);
  border: 1px solid rgba(26, 115, 232, 0.22);
}

.badge-greenish {
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  display: inline-block;
  background: rgba(24, 128, 56, 0.12);
  color: var(--green);
  border: 1px solid rgba(24, 128, 56, 0.2);
}

.badge-warm {
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  display: inline-block;
  background: rgba(227, 116, 0, 0.14);
  color: var(--yellow);
  border: 1px solid rgba(227, 116, 0, 0.25);
}

.table-elevated {
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px var(--border);
}

.int-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}

.int-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.int-card { min-height: 132px; }

.int-card-blue { border-top: 3px solid var(--blue); }
.int-card-yellow { border-top: 3px solid var(--yellow); }
.int-card-green { border-top: 3px solid var(--green); }
.int-card-warm { border-top: 3px solid #ea8600; }
.int-card-slate { border-top: 3px solid #64748b; }

.explain-panel {
  background: rgba(26, 115, 232, 0.07);
  border: 1px solid rgba(26, 115, 232, 0.16);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 14px;
  line-height: 1.5;
}

.explain-panel ol { margin: 8px 0 0 1.1rem; padding: 0; }

.hr-msg-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.card-nested {
  margin: 0 !important;
  padding: 14px !important;
  border-radius: var(--radius-sm) !important;
  background: var(--surface-soft) !important;
  box-shadow: none !important;
  border: 1px solid var(--border) !important;
}

.card-nested:hover { transform: none !important; }

.hr-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.form-card-login {
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: 10000;
}

.skip-link:focus {
  left: 12px;
  top: 12px;
  width: auto;
  height: auto;
  padding: 10px 14px;
  background: var(--accent-strong, #1e40af);
  color: #fff !important;
  border-radius: 8px;
  font-weight: 600;
  outline: 2px solid var(--accent-muted, #93c5fd);
  outline-offset: 2px;
  text-decoration: none;
}

html.theme-app-shell .skip-link:focus {
  color: #fff !important;
}

.app-accent-bar {
  height: 3px;
  width: 100%;
  flex-shrink: 0;
  background: linear-gradient(
    90deg,
    var(--accent-strong, #1e40af) 0%,
    var(--accent, #2563eb) 45%,
    #38bdf8 100%
  );
}

.app-shell-stacked {
  flex-direction: column !important;
  min-height: 100vh;
  background: transparent;
}

.app-sticky-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 12px clamp(14px, 3vw, 28px) 8px;
  background: var(--header-bg, rgba(255, 255, 255, 0.92));
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.app-header-toolbar {
  padding: 12px 14px !important;
  margin-bottom: 0 !important;
  max-width: 1400px;
  margin-left: auto !important;
  margin-right: auto !important;
}

.app-header-toolbar-grid {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr) minmax(0, auto);
  gap: 10px 16px;
  align-items: center;
}

.app-header-brand-col {
  min-width: 0;
}

.app-header-nav-col {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.app-header-eyebrow {
  margin: 0 !important;
}

.app-header-user-col {
  min-width: 0;
  justify-self: end;
}

.app-header-secondary-row {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  padding-top: 10px;
  margin-top: 4px;
  border-top: 1px solid var(--border);
}

.app-header-secondary-label {
  margin: 0 !important;
  flex-shrink: 0;
  align-self: center;
}

.app-header-logo-mark {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
  background: linear-gradient(145deg, #1e3a8a 0%, #2563eb 52%, #38bdf8 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 2px rgba(15, 23, 42, 0.12);
}

.app-header-toolbar.card-3d:hover {
  transform: translateY(-1px);
}

.header-brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none !important;
  color: var(--text) !important;
}

.header-brand-lockup:hover {
  opacity: 0.92;
}

.header-brand-text {
  display: flex;
  flex-direction: column;
}

.header-brand-title {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.header-brand-sub {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.header-user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-card-eyebrow {
  margin: 0 0 8px 0;
  font-size: 10px;
  font-weight: 700;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.header-primary-nav {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 8px;
  align-items: center;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 4px;
  margin: 0 -2px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
  -webkit-overflow-scrolling: touch;
}

.header-primary-nav::-webkit-scrollbar {
  height: 6px;
}

.header-primary-nav::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 999px;
}

.header-nav-link {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  padding: 9px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text) !important;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  text-decoration: none !important;
  border-bottom: 3px solid transparent;
  transition: background 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  min-height: 44px;
}

.header-nav-link:hover {
  background: var(--surface);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.08);
}

.header-nav-link.is-active {
  background: var(--surface);
  border-color: var(--accent, var(--blue));
  border-bottom-color: var(--accent, var(--blue));
  box-shadow: 0 0 0 1px var(--accent-ring, rgba(37, 99, 235, 0.2));
  font-weight: 600;
}

.header-secondary-nav {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.header-secondary-nav .header-nav-link {
  font-size: 12px;
  min-height: 40px;
  padding: 7px 12px;
  background: #fff;
}

.header-nav-highlight {
  background: var(--accent-soft, #eff6ff) !important;
  border-color: var(--accent-border, #bfdbfe) !important;
}

.os-main-stacked {
  flex: 1 !important;
  display: flex;
  flex-direction: column !important;
  min-height: 0;
  background: transparent !important;
}

html.theme-app-shell .os-main-scene {
  background: transparent !important;
  flex: 1;
}

.app-footer-ease {
  margin-top: auto;
  padding: 16px clamp(14px, 3vw, 28px) 20px !important;
  border-radius: 16px !important;
  margin-left: clamp(14px, 3vw, 28px);
  margin-right: clamp(14px, 3vw, 28px);
  margin-bottom: 18px !important;
}

.app-footer-ease.card-3d:hover {
  transform: translateY(-1px);
}

.app-footer-ease-inner {
  max-width: 1400px;
  margin: 0 auto;
}

.footer-ease-title {
  margin: 0 0 10px 0;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.footer-ease-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.footer-ease-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none !important;
  border: 2px solid var(--border);
  background: var(--surface-soft);
  color: var(--text) !important;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.footer-ease-btn:hover {
  box-shadow: 0 4px 14px rgba(32, 33, 36, 0.14);
  transform: translateY(-1px);
}

.footer-ease-signout {
  border-color: rgba(220, 38, 38, 0.35);
  background: rgba(220, 38, 38, 0.06);
  color: var(--danger, #dc2626) !important;
}

.footer-ease-signout:hover {
  background: rgba(220, 38, 38, 0.11);
}

.footer-ease-meta {
  margin: 12px 0 0 0;
  font-size: 0.8rem;
}

.footer-ease-nav-public {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.footer-ease-link {
  font-weight: 600;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

@media (max-width: 700px) {
  .grid-2-cards { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }

  .app-header-toolbar-grid {
    grid-template-columns: 1fr;
    justify-items: stretch;
  }

  .app-header-user-col {
    justify-self: stretch;
    border-top: 1px dashed var(--border);
    padding-top: 8px;
  }

  .app-shell-stacked .app-sticky-header { padding-left: 14px; padding-right: 14px; }
  .footer-ease-nav .footer-ease-btn { flex: 1 1 auto; min-width: 44%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .card-3d,
  .footer-ease-btn,
  .header-nav-link {
    transition-duration: 0s !important;
  }
  .card-3d:hover,
  .footer-ease-btn:hover,
  .header-nav-link:hover {
    transform: none !important;
  }
}
