/* WorkRoom interface foundations. Module styles build on these shared tokens. */
:root {
  --font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ink: #1c2938;
  --muted: #566370;
  --navy: #142132;
  --green: #08766e;
  --teal: var(--green);
  --green-dark: #075d58;
  --mint: #eaf4f1;
  --line: #dfe5e4;
  --paper: #f5f6f4;
  --amber: #855515;
  --purple: #65528b;
  --sand: #ede6d5;
  --radius: 12px;
  --sidebar-width: 240px;
  color-scheme: light;
}
body { margin: 0; color: var(--ink); background: var(--paper); font: 15px/1.6 var(--font-ui); }
h1, h2, h3 { color: var(--ink); font-family: var(--font-ui); overflow-wrap: anywhere; }
h1 { font-size: 32px; font-weight: 700; line-height: 1.22; letter-spacing: -.8px; margin-bottom: 8px; }
h2 { font-size: 20px; font-weight: 650; line-height: 1.35; letter-spacing: -.35px; margin-bottom: 12px; }
h3 { font-size: 16px; font-weight: 650; line-height: 1.45; margin-bottom: 10px; }
a { color: var(--green-dark); }
small { font-size: 12px; }
input, select, textarea { font-size: 15px; border-color: #b8c5c5; border-radius: 8px; min-height: 46px; }
button, a, summary { touch-action: manipulation; }
:where(a, button, input, select, textarea, summary):focus-visible { outline: 3px solid #128c85; outline-offset: 3px; }
[hidden] { display: none !important; }
.ui-icon { display: inline-block; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; vertical-align: middle; }
.icon-definitions { position: absolute; width: 0; height: 0; overflow: hidden; }
.brand { display: flex; align-items: center; color: inherit; text-decoration: none; margin: 0 8px 25px; }
/* Component links use placement and focus states; prose links keep underlines. */
.brand, .mobile-brand, .brand-lockup, .workspace-name,
.sidebar nav a, .mobile-menu-panel nav a, .mobile-nav a,
.sidebar-bottom > a, .account-menu-panel a, .mobile-account-actions a,
.footer-links > a, .footer-disclosure a, a.card, .metric {
  text-decoration: none;
}
.brand:hover, .mobile-brand:hover, .brand-lockup:hover { text-decoration: none; }
.brand-lockup { display: flex; flex-direction: row; align-items: center; gap: 10px; color: var(--navy); }
.brand-lockup img { display: block; width: 38px; height: 38px; border-radius: 8px; }
.brand-wordmark { display: flex; flex-direction: column; }
.product-name { font: 700 24px/1.15 var(--font-ui); letter-spacing: -.8px; }
.brand-attribution { margin-top: 5px; font-size: 9px; font-weight: 600; letter-spacing: 1.4px; text-transform: uppercase; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar-width); background: var(--navy); color: #d1dbe5; padding: 26px 16px 18px; display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; z-index: 30; }
.sidebar .brand-lockup { color: #fff; }
.sidebar .brand-attribution { color: #b9c8d6; }
.workspace-name { display: flex; gap: 10px; align-items: center; border: 1px solid #405062; border-radius: 9px; padding: 12px; margin: 0 0 18px; color: #f3f6f8; }
.workspace-name:hover { background: #213247; text-decoration: none; }
.workspace-name strong { display: block; font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; }
.workspace-name small { display: block; font-size: 11px; color: #bdcad7; margin-top: 4px; }
.workspace-name .avatar { background: #344558; color: #eee6d3; border-radius: 7px; }
.nav-label { margin: 22px 12px 8px; color: var(--muted); font-size: 11px; font-weight: 650; letter-spacing: 1px; }
.sidebar .nav-label { color: #aebfce; }
.sidebar nav a { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 10px 12px; margin: 3px 0; border-radius: 7px; color: #c9d4e0; font-size: 14px; font-weight: 500; line-height: 1.4; }
.sidebar nav a:hover { background: #233549; color: #fff; text-decoration: none; }
.sidebar nav a.active { background: #29424d; color: #fff; box-shadow: inset 3px 0 #89c8ba; font-weight: 650; }
.sidebar nav a > span:not([data-inbox-count]) { min-width: 0; }
.nav-group { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 5px; }
.nav-group summary { cursor: pointer; font-size: 13px; font-weight: 600; padding: 12px; min-height: 44px; border-radius: 7px; }
.sidebar .nav-group { border-color: #354455; }
.sidebar .nav-group summary { color: #c9d4e0; }
.sidebar .nav-group summary:hover { background: #233549; }
.sidebar .nav-group a { padding-left: 22px; font-size: 13px; }
.nav-group[open] { padding-bottom: 8px; }
.sidebar-bottom { margin-top: auto; padding: 24px 10px 0; color: #b9c8d6; font-size: 12px; }
.sidebar-bottom a { display: flex; align-items: center; gap: 10px; min-height: 44px; color: #e2eaf0; }
.sidebar-bottom .connection-status { border-top: 1px solid #354455; padding-top: 14px; margin-top: 10px; font-size: 11px; }
.sidebar [data-inbox-count]:not(:empty) { background: #324d5c; color: #eff8f7; margin-left: auto; }
.shell { margin-left: var(--sidebar-width); min-height: 100vh; display: flex; flex-direction: column; }
.shell.no-sidebar { margin-left: 0; }
.topbar { min-height: 72px; padding: 12px 32px; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font-size: 13px; color: var(--muted); min-width: 0; overflow-wrap: anywhere; }
.breadcrumb span { color: #647582; }
.top-actions { display: flex; align-items: center; gap: 14px; font-size: 13px; flex-shrink: 0; }
.top-actions form { margin: 0; }
.user-name { font-weight: 600; }
.account-menu { position: relative; }
.account-menu > summary { display: flex; align-items: center; gap: 9px; list-style: none; cursor: pointer; min-height: 44px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; font-weight: 600; }
.account-menu > summary::-webkit-details-marker { display: none; }
.account-menu > summary .avatar { width: 28px; height: 28px; font-size: 12px; }
.account-menu-panel { position: absolute; right: 0; top: calc(100% + 8px); width: 240px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px #14213215; background: #fff; z-index: 50; }
.account-menu-panel a, .account-menu-panel button { display: flex; width: 100%; align-items: center; min-height: 44px; padding: 10px; text-align: left; font-size: 14px; }
.account-menu-panel a:hover, .account-menu-panel button:hover { background: var(--paper); border-radius: 6px; text-decoration: none; }
.account-menu-panel p { margin: 4px 10px 8px; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.mobile-brand, .mobile-menu, .mobile-workspace, .mobile-nav, .mobile-account-actions { display: none; }
.public-brand { display: flex; }
.public-caption { color: var(--muted); font-size: 13px; }
.demo-banner { padding: 9px 32px; background: #edf2f5; color: #4a6071; font-size: 12px; border-bottom: 1px solid var(--line); }
.demo-banner span { font-size: 10px; font-weight: 700; letter-spacing: .7px; margin-right: 10px; }
main { width: 100%; max-width: 1560px; margin: 0 auto; padding: 28px 32px 40px; flex: 1 0 auto; min-width: 0; }
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.page-heading > div { min-width: 0; }
.page-heading h1 { max-width: 900px; }
.page-heading p { color: var(--muted); font-size: 14px; margin-bottom: 0; max-width: 760px; }
.eyebrow { display: block; color: var(--muted); font-size: 11px; font-weight: 650; letter-spacing: 1.2px; margin-bottom: 10px; }
.button-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.button-row form { display: flex; flex-wrap: wrap; gap: 8px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 10px 16px; border: 1px solid var(--green); border-radius: 8px; background: var(--green); color: #fff; font-size: 14px; font-weight: 600; line-height: 1.4; text-decoration: none; white-space: normal; text-align: center; }
.button:hover { background: var(--green-dark); border-color: var(--green-dark); color: #fff; text-decoration: none; }
.button.secondary { background: #fff; color: var(--ink); border-color: #c7d2d2; }
.button.secondary:hover { background: var(--mint); border-color: #8aafaa; }
.button.danger { background: #fff; color: #9e302b; border-color: #dba8a3; }
.button.danger:hover { background: #fff1ef; }
.button.full { width: 100%; font-size: 16px; }
.text-button { display: inline-flex; align-items: center; min-height: 44px; border: 0; background: none; color: var(--green-dark); padding: 9px 4px; font-size: 13px; text-align: left; }
.metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin-bottom: 24px; }
.metric { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; color: var(--ink); display: flex; flex-direction: column; min-width: 0; }
.metric:hover { border-color: #8aafaa; text-decoration: none; }
.metric > span { font-size: 13px; color: var(--muted); }
.metric strong { font-size: 30px; font-weight: 650; letter-spacing: -.7px; line-height: 1.3; margin: 8px 0 3px; }
.metric em { font-size: 17px; font-style: normal; color: var(--muted); margin-left: 5px; }
.metric small { font-size: 12px; color: var(--muted); }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; min-width: 0; }
.card-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; }
.card-grid a.card { color: var(--ink); }
.card-grid a.card:hover { text-decoration: none; border-color: #8aafaa; }
.card-grid .card p { color: var(--muted); font-size: 14px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.section-head h2 { margin-bottom: 4px; }
.section-head p { font-size: 13px; color: var(--muted); margin: 0; }
.section-head a { font-size: 13px; font-weight: 600; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0,1.8fr) minmax(280px,1fr); gap: 24px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.badge { display: inline-block; padding: 4px 8px; border-radius: 5px; font-size: 12px; font-weight: 600; line-height: 1.5; color: #47596c; background: #edf1f5; white-space: normal; }
.badge.scheduled, .badge.uploaded { background: #edf1f5; color: #47596c; }
.badge.active, .badge.processing, .badge.queued { background: #eeebf6; color: #615080; }
.badge.review, .badge.open { background: #fcf1dd; color: #78521e; }
.badge.complete, .badge.approved, .badge.resolved { background: #e5f2ee; color: #186258; }
.badge.failed { background: #fae9e6; color: #973e32; }
.badge.blocked, .badge.overdue { background: #fff0e3; color: #855019; }
.badge.done, .badge.ready { background: #e5f2ee; color: #186258; }
.badge.unassigned, .badge.triage { background: #fcf1dd; color: #78521e; }
.badge.cancelled { background: #eef0f1; color: #59616a; }
.badge.urgent { background: #fbe7e5; color: #972a23; }
.badge.large { font-size: 13px; padding: 8px 12px; }
.notice { padding: 14px 18px; border: 1px solid #c7dcd8; border-left: 3px solid var(--green); border-radius: 8px; background: #edf6f3; color: #264c47; margin: 0 0 18px; font-size: 14px; overflow-wrap: anywhere; }
.notice p:last-child { margin-bottom: 0; }
.notice.error { color: #8f3028; border-color: #dfb1a9; border-left-color: #ad4137; background: #fff2ef; }
.notice.success { color: #225a43; border-color: #a8d0b9; background: #edf7f0; }
.context-help { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin: 0 0 18px; font-size: 12px; color: var(--muted); }
.context-help a { display: inline-flex; align-items: center; min-height: 32px; }
.utility-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 0 32px; padding: 18px 0 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.footer-identity { margin: 0; }
.footer-identity strong { color: var(--ink); font-weight: 650; }
.footer-links { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.footer-links > a, .footer-links > details > summary { display: flex; align-items: center; gap: 5px; min-height: 44px; color: var(--muted); font-size: 12px; padding: 8px 0; cursor: pointer; list-style: none; }
.footer-links summary::-webkit-details-marker { display: none; }
.footer-links details { position: relative; }
.footer-disclosure { position: absolute; z-index: 25; bottom: calc(100% + 8px); right: 0; width: 260px; max-width: calc(100vw - 32px); padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px #14213215; }
.footer-disclosure a { display: flex; align-items: center; min-height: 44px; padding: 8px; border-radius: 6px; color: var(--ink); }
.footer-disclosure a:hover { background: var(--paper); text-decoration: none; }
.footer-disclosure p { font-size: 12px; margin: 8px; overflow-wrap: anywhere; }
.footer-disclosure small { display: block; border-top: 1px solid var(--line); padding: 12px 8px 4px; color: var(--muted); }
th { color: #52616a; background: #f3f6f4; font-size: 12px; }
.back-link { font-size: 13px; }
.field-label, .helptext { font-size: 13px; }
.status-dot { background: #5d967d; }
.status-dot.unavailable { background: #a76616; }
@media (max-width:1200px) {
  .dashboard-grid { grid-template-columns: minmax(0,1.6fr) minmax(250px,1fr); }
  .topbar, main { padding-left: 24px; padding-right: 24px; }
  .utility-footer { margin-left: 24px; margin-right: 24px; }
  .card-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width:960px) {
  .sidebar { display: none; }
  .shell { margin-left: 0; padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .shell.no-sidebar { padding-bottom: 0; }
  .topbar { min-height: 64px; padding: 10px 20px; gap: 12px; }
  .mobile-brand { display: flex; }
  .mobile-brand .product-name { font-size: 21px; }
  .mobile-brand .brand-attribution { font-size: 8px; }
  .mobile-brand .brand-lockup img { width: 32px; height: 32px; }
  .topbar > .breadcrumb, .topbar > .hotel-logo, .public-caption, .workspace-account-actions { display: none; }
  .mobile-menu { display: block; margin-left: auto; }
  .mobile-menu > summary { display: flex; align-items: center; gap: 7px; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; list-style: none; font-size: 13px; font-weight: 600; }
  .mobile-menu > summary::-webkit-details-marker { display: none; }
  .mobile-menu-panel { position: fixed; top: 76px; right: 12px; left: 12px; bottom: calc(82px + env(safe-area-inset-bottom)); padding: 20px; background: #fff; border: 1px solid #bdcdca; border-radius: 12px; box-shadow: 0 12px 35px #14213225; overflow: auto; overscroll-behavior: contain; z-index: 60; }
  .mobile-menu-panel > strong { display: block; overflow-wrap: anywhere; }
  .mobile-menu-panel > p { font-size: 12px; color: var(--muted); }
  .mobile-menu-panel nav a { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 10px 12px; color: var(--ink); border-radius: 7px; font-size: 14px; }
  .mobile-menu-panel nav a.active { color: var(--green-dark); background: var(--mint); box-shadow: inset 3px 0 var(--green); }
  .mobile-menu-panel .nav-label { margin-left: 12px; }
  .mobile-menu-panel .nav-group a { padding-left: 24px; }
  .mobile-account-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); margin-top: 16px; padding-top: 8px; }
  .mobile-account-actions a { display: inline-flex; align-items: center; min-height: 44px; }
  .mobile-account-actions form { margin: 0; }
  .mobile-workspace { display: flex; gap: 10px; flex-wrap: wrap; justify-content: space-between; align-items: center; padding: 10px 20px; background: #fff; border-bottom: 1px solid var(--line); font-size: 12px; }
  .mobile-workspace strong { min-width: 0; overflow-wrap: anywhere; }
  .mobile-workspace span { color: var(--muted); }
  .mobile-nav { display: flex; position: fixed; inset: auto 0 0; justify-content: space-around; align-items: stretch; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); min-height: 68px; background: #fff; border-top: 1px solid var(--line); z-index: 40; }
  .mobile-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; flex: 1; min-width: 0; min-height: 50px; padding: 6px; border-radius: 8px; color: var(--muted); font-size: 12px; }
  .mobile-nav a.active { background: var(--mint); color: var(--green-dark); font-weight: 650; }
  .mobile-nav a small { font-size: 11px; }
  .demo-banner { padding-left: 20px; padding-right: 20px; }
  .dashboard-grid { grid-template-columns: minmax(0,1fr); }
}
@media (max-width:600px) {
  main { padding: 22px 16px 28px; }
  .topbar { padding: 10px 16px; }
  .no-sidebar .topbar { flex-wrap: wrap; }
  .top-actions { margin-left: auto; }
  h1 { font-size: 27px; }
  h2 { font-size: 19px; }
  .page-heading { flex-wrap: wrap; gap: 16px; margin-bottom: 22px; }
  .page-heading p { font-size: 14px; }
  input, select, textarea { font-size: 16px; }
  .card { padding: 18px; }
  .card-grid { grid-template-columns: minmax(0,1fr); gap: 16px; }
  .metrics { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .metric { padding: 14px; }
  .metric strong { font-size: 27px; }
  .metric > span, .metric small { font-size: 12px; }
  .section-head { flex-wrap: wrap; gap: 10px; }
  .utility-footer { margin: 0 16px; padding: 16px 0; gap: 4px; flex-direction: column; align-items: flex-start; }
  .footer-links { width: 100%; gap: 22px; }
  .footer-disclosure { left: 0; right: auto; }
  .footer-links details:last-child .footer-disclosure { left: auto; right: 0; }
  .context-help { justify-content: flex-start; flex-wrap: wrap; margin-bottom: 14px; }
  .account-menu > summary .user-name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
@media (prefers-reduced-motion:reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
@media print {
  .sidebar, .topbar, .mobile-nav, .mobile-workspace, .demo-banner, .utility-footer, .context-help, .button-row, form, button, .back-link { display: none !important; }
  .shell { margin: 0; padding: 0; display: block; }
  main { max-width: none; margin: 0; padding: 0; }
  body { background: #fff; color: #000; font-size: 11pt; }
  h1, h2, h3, a { color: #000; }
  .card { box-shadow: none; break-inside: avoid; }
  details > :not(summary) { display: block !important; }
  .page-heading::before { content: "ArdanShield WorkRoom"; display: block; font-size: 10pt; font-weight: 600; }
}
