/* Shared screen theme. Print documents and semantic status colours stay independent. */
@media screen {
  :root {
    --admin-bg:#fff;
    --admin-sidebar-bg:#f3f4f6;
    --admin-topbar-bg:#fff;
    --admin-blue-accent:#2563eb;
    --admin-blue-hover:#1d4ed8;
    --admin-teal-primary:#2563eb;
    --admin-teal-dark:#1d4ed8;
    --admin-border:#dfe4eb;
    --admin-border-strong:#cbd3df;
    --radius-sm:4px;
    --radius-md:4px;
    --radius-lg:6px;
    --radius-xl:8px;
  }
  body { font-size:14px; }
  .admin-layout *,dialog * { letter-spacing:0; }
  .admin-main { min-width:0; background:#fff; }
  .admin-sidebar {
    width:212px;
    height:100dvh;
    background:#f3f4f6;
    box-shadow:none;
  }
  .admin-sidebar-header {
    height:56px;
    min-height:56px;
    padding:0 14px;
    background:#fff;
    border-color:var(--admin-border);
  }
  .admin-sidebar-brand img { height:29px; max-width:130px; filter:none; }
  .admin-sidebar-brand .badge { font-size:9px!important; padding:1px 4px!important; background:#eff6ff!important; color:#2563eb!important; border-color:#bfdbfe!important; }
  .admin-nav-group { padding:8px 5px; gap:1px; min-height:0; scrollbar-width:thin; }
  .admin-nav-btn {
    min-height:32px;
    padding:5px 9px;
    gap:7px;
    flex:none;
    justify-content:flex-start;
    border-radius:4px;
    font-size:13px;
    font-weight:500;
    line-height:20px;
    color:#303b4c;
  }
  .admin-nav-btn > div { gap:8px!important; min-width:0; }
  .admin-nav-btn > div > span:last-child { white-space:nowrap; }
  .admin-nav-btn > span:not(.nav-icon):not(.admin-nav-badge-pill) { white-space:nowrap; }
  .admin-nav-btn .nav-icon,.admin-nav-btn .nav-icon svg { width:18px; height:18px; flex:none; }
  .admin-nav-btn:hover { background:#e8edf3; }
  .admin-sidebar .admin-nav-btn.active {
    color:#1558dc!important;
    background:#dbeafe!important;
    border-color:transparent!important;
    box-shadow:inset 3px 0 #2563eb;
    font-weight:600;
  }
  .admin-nav-badge-pill { margin-left:auto; font-size:10px; line-height:16px; min-width:17px; padding:0 4px; text-align:center; }
  .admin-sidebar-footer { height:36px; flex:0 0 36px; border-top:1px solid var(--admin-border); display:flex; justify-content:center; }
  #admin-sidebar-toggle { border:0; background:transparent; color:#475569; cursor:pointer; width:100%; display:flex; align-items:center; justify-content:center; }
  #admin-sidebar-toggle:hover { background:#e8edf3; }
  #admin-sidebar-toggle svg { width:18px; height:18px; }
  .admin-topbar-custom { min-height:56px; padding:8px 20px; gap:12px; flex-wrap:nowrap; background:#fff; box-shadow:none; }
  .admin-topbar-custom svg { width:18px; height:18px; stroke-width:1.75; flex:none; }
  .topbar-back-btn,#admin-guide-button,#admin-logout-button { width:34px; height:34px; min-height:34px; flex:0 0 34px; padding:6px!important; border-radius:4px; display:inline-flex; align-items:center; justify-content:center; }
  .topbar-back-btn,#admin-guide-button { border:1px solid var(--admin-border); background:#fff; color:#475569; box-shadow:none; }
  .topbar-omnisearch { min-width:0; max-width:640px; border:1px solid var(--admin-border-strong); border-radius:4px; background:#fafbfc; }
  .topbar-omnisearch input { width:0; min-width:0; padding:7px 10px; font-size:13px; font-weight:400; }
  .topbar-omnisearch-btn { flex:0 0 36px; height:34px; padding:7px; background:transparent; }
  .topbar-actions { gap:10px!important; flex-shrink:0; }
  #admin-user-badge { min-width:0; max-width:180px; padding:0!important; border:0!important; background:transparent!important; border-radius:0!important; gap:8px!important; }
  #admin-user-badge > div { min-width:0; }
  #admin-user-name { color:#303b4c!important; font-size:13px!important; font-weight:500!important; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
  #admin-user-role { display:none; }
  #admin-user-icon { display:flex; align-items:center; justify-content:center; width:30px; height:30px; flex:0 0 30px; font-size:11px!important; font-weight:600; border-radius:50%; background:#dbeafe; color:#1558dc; }
  .phase2-health { background:transparent; border:0; color:#3f4b5b; padding:0; border-radius:0; }
  .admin-workspace { background:#fff; padding:20px; gap:16px; }
  .admin-workspace > .data-panel-card,.admin-workspace > .module-header-box {
    border:0!important;
    border-bottom:1px solid var(--admin-border)!important;
    border-radius:0;
    padding:0 0 16px;
    box-shadow:none;
  }
  .admin-workspace > .data-panel-card:hover { box-shadow:none; }
  .admin-workspace :is(.data-panel-title,.pr-heading h1,.mc-page-header h2) { font-size:24px; font-weight:650; }
  .admin-workspace :is(.btn,.pr-button) { border-radius:4px; box-shadow:none; font-weight:500; }
  .admin-workspace :is(.btn-primary,.btn-teal-action),.pr-button.pr-primary {
    background:#2563eb!important;
    border-color:#2563eb!important;
    color:#fff!important;
    box-shadow:none;
  }
  .admin-workspace :is(.btn-primary,.btn-teal-action):hover,.pr-button.pr-primary:hover { background:#1d4ed8!important; border-color:#1d4ed8!important; }
  .admin-workspace :is(.btn-primary,.btn-teal-action):disabled { opacity:.5; }
  .admin-workspace .btn-secondary { background:#fff; border-color:var(--admin-border-strong); color:#334155; }
  .admin-workspace :is(input,select,textarea) { border-radius:4px; }
  .admin-workspace :is(.status-tabs-container,.pr-tabs,.mc-tabs) { border-bottom:1px solid var(--admin-border); gap:14px; padding-bottom:0; }
  .admin-workspace .status-tab-btn { border:0!important; border-bottom:3px solid transparent!important; border-radius:0; background:transparent!important; color:#475569!important; padding:9px 4px; font-weight:500; box-shadow:none; }
  .admin-workspace .status-tab-btn.active { color:#1558dc!important; border-bottom-color:#2563eb!important; box-shadow:none; }
  .admin-workspace :is(.admin-data-table,.pr-table,.mc-table) th { background:#f3f5f7; color:#475569; font-size:12px; font-weight:600; text-transform:none; }
  .admin-workspace :is(.admin-data-table,.pr-table,.mc-table) td { font-size:13px; }
  .admin-workspace :is(.admin-data-table,.pr-table,.mc-table) th,
  .admin-workspace :is(.admin-data-table,.pr-table,.mc-table) td { letter-spacing:0; }
  :is(.admin-nav-btn,#admin-sidebar-toggle,.topbar-back-btn,#admin-guide-button,#admin-logout-button):focus-visible { outline:2px solid #2563eb; outline-offset:-2px; }

  @media(min-width:761px) {
    body.admin-nav-collapsed .admin-sidebar { width:60px; }
    body.admin-nav-collapsed .admin-sidebar-header { padding:0 8px; justify-content:center; }
    body.admin-nav-collapsed .admin-sidebar-brand img { width:40px; height:auto; }
    body.admin-nav-collapsed .admin-sidebar-brand .badge,
    body.admin-nav-collapsed .admin-nav-btn > div > span:not(.nav-icon),
    body.admin-nav-collapsed .admin-nav-btn > span:not(.nav-icon):not(.admin-nav-badge-pill) { display:none; }
    body.admin-nav-collapsed .admin-nav-btn { position:relative; justify-content:center; padding:6px; }
    body.admin-nav-collapsed .admin-nav-badge-pill { position:absolute; right:0; top:0; font-size:8px; min-width:12px; line-height:12px; padding:0 2px; }
    body.admin-nav-collapsed #admin-sidebar-toggle svg { transform:rotate(180deg); }
  }
  @media(min-width:761px) and (max-width:1100px) {
    .admin-sidebar { width:202px; }
    .admin-topbar-custom { padding:8px 12px; gap:8px; }
    #admin-user-badge { max-width:100px; }
    .admin-workspace { padding:16px; }
  }
  @media(max-width:760px) {
    .admin-sidebar { width:min(260px,calc(100vw - 40px)); }
    .admin-sidebar-header { padding:0 12px; }
    .admin-nav-btn { min-height:40px; font-size:13px; }
    .admin-sidebar-footer { display:none; }
    .admin-topbar-custom { flex-wrap:wrap; padding:8px 10px; gap:8px; }
    .topbar-omnisearch { flex:0 0 100%; max-width:none; order:4; }
    .topbar-omnisearch input { width:0; }
    .admin-topbar-custom .topbar-actions { gap:8px!important; }
    .admin-workspace { padding:14px 10px; }
    .admin-workspace :is(.data-panel-title,.pr-heading h1,.mc-page-header h2) { font-size:22px; }
  }
  @media(prefers-reduced-motion:reduce) { .admin-sidebar,.admin-nav-btn { transition:none; } }
}
