/* ==========================================================
   Orqentra Global Theme Tokens
   Phase 15B.3 - typography foundation + Profile alignment

   Purpose:
   - Hold shared font, weight, size and pill tokens in one place.
   - Profile is the first page wired to these tokens.
   - Other pages can be migrated gradually without changing logic.
   ========================================================== */

:root{
  /* Font family */
  --orq-font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Type scale */
  --orq-fs-hero-title: 38px;
  --orq-fs-page-title: 34px;
  --orq-fs-section-title: 20px;
  --orq-fs-profile-name: 28px;
  --orq-fs-card-title: 13px;
  --orq-fs-body: 13px;
  --orq-fs-input: 13px;
  --orq-fs-meta: 12px;
  --orq-fs-label: 11px;
  --orq-fs-pill: 13px;
  --orq-fs-button: 12px;

  /* Weights */
  --orq-fw-regular: 400;
  --orq-fw-medium: 500;
  --orq-fw-semibold: 600;
  --orq-fw-bold: 700;
  --orq-fw-heavy: 800;
  --orq-fw-black: 900;

  --orq-fw-body: var(--orq-fw-regular);
  --orq-fw-input: var(--orq-fw-regular);
  --orq-fw-card-title: var(--orq-fw-regular);
  --orq-fw-meta: var(--orq-fw-regular);
  --orq-fw-label: var(--orq-fw-bold);
  --orq-fw-pill: var(--orq-fw-regular);
  --orq-fw-button: var(--orq-fw-semibold);
  --orq-fw-profile-name: var(--orq-fw-semibold);

  /* Colours */
  --orq-ink:#111827;
  --orq-ink-strong:#0f172a;
  --orq-muted:#64748b;
  --orq-line:#e5e7eb;
  --orq-field-line:#dbe3ef;
  --orq-panel:#ffffff;

  /* Component-library semantic foundation. These values are intentionally
     selector-free: page components migrate to them one family at a time. */
  --orq-surface-canvas:#f5f7fb;
  --orq-surface-subtle:#f8fafc;
  --orq-surface-raised:#ffffff;
  --orq-surface-inverse:#0f172a;
  --orq-surface-dark-raised:linear-gradient(145deg, rgba(13,28,64,.72), rgba(5,14,31,.62));
  --orq-border-default:#d0d7de;
  --orq-border-strong:#b9c4d0;
  --orq-border-dark:rgba(110,158,242,.24);

  --orq-action-primary:#2563eb;
  --orq-action-primary-hover:#1d4ed8;
  --orq-action-primary-active:#1e40af;
  --orq-action-primary-on:#ffffff;
  --orq-action-secondary-bg:#ffffff;
  --orq-action-secondary-hover:#f8fafc;
  --orq-action-secondary-fg:#111827;
  --orq-action-positive:#15803d;
  --orq-action-warning:#b45309;
  --orq-action-danger:#b91c1c;

  --orq-feedback-success-bg:#dcfce7;
  --orq-feedback-success-fg:#166534;
  --orq-feedback-warning-bg:#fef3c7;
  --orq-feedback-warning-fg:#92400e;
  --orq-feedback-danger-bg:#fee2e2;
  --orq-feedback-danger-fg:#991b1b;
  --orq-feedback-info-bg:#dbeafe;
  --orq-feedback-info-fg:#1d4ed8;

  /* Approved muted semantic pill palette. Existing status selectors migrate
     to these values one family at a time; no legacy status changes here. */
  --orq-semantic-neutral-bg:#f1f4f7;
  --orq-semantic-neutral-fg:#465568;
  --orq-semantic-info-bg:#eaf2fa;
  --orq-semantic-info-fg:#285c85;
  --orq-semantic-success-bg:#eaf5ee;
  --orq-semantic-success-fg:#2f6845;
  --orq-semantic-warning-bg:#fff4d6;
  --orq-semantic-warning-fg:#805a12;
  --orq-semantic-critical-bg:#fcecec;
  --orq-semantic-critical-fg:#a33b3b;

  /* Scheduler relationship meaning is fixed across all future themes. */
  --orq-relationship-primary:#2448a8;
  --orq-relationship-supporting:#0f766e;
  --orq-relationship-linked:#6d5cae;

  --orq-radius-control:10px;
  --orq-radius-card:16px;
  --orq-radius-pill:999px;
  --orq-space-1:4px;
  --orq-space-2:8px;
  --orq-space-3:12px;
  --orq-space-4:16px;
  --orq-space-5:20px;
  --orq-space-6:24px;
  --orq-shadow-control:0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.10);
  --orq-shadow-card:0 8px 20px rgba(15,23,42,.08);
  --orq-shadow-card-dark:0 22px 58px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.06);
  --orq-shadow-none:none;

  /* Status pill palette */
  --orq-status-available-bg:#dcfce7;
  --orq-status-available-fg:#166534;
  --orq-status-assigned-bg:#dbeafe;
  --orq-status-assigned-fg:#1d4ed8;
  --orq-status-accepted-bg:#e0f2fe;
  --orq-status-accepted-fg:#0369a1;
  --orq-status-travel-bg:#111827;
  --orq-status-travel-fg:#ffffff;
  --orq-status-site-bg:#ede9fe;
  --orq-status-site-fg:#6d28d9;
  --orq-status-job-bg:#fef3c7;
  --orq-status-job-fg:#92400e;
  --orq-status-break-bg:#ffedd5;
  --orq-status-break-fg:#c2410c;
  --orq-status-sleep-bg:#0f172a;
  --orq-status-sleep-fg:#ffffff;
  --orq-status-training-bg:#111827;
  --orq-status-training-fg:#ffffff;
  --orq-status-leave-bg:#e5e7eb;
  --orq-status-leave-fg:#374151;
  --orq-status-sick-bg:#fee2e2;
  --orq-status-sick-fg:#991b1b;
  --orq-status-unavailable-bg:#fee2e2;
  --orq-status-unavailable-fg:#991b1b;
  --orq-status-appointment-bg:#fae8ff;
  --orq-status-appointment-fg:#86198f;
  --orq-status-unknown-bg:#eef2ff;
  --orq-status-unknown-fg:#3730a3;
}

/* ==========================================================
   Component Library theme profiles

   Orqentra is the default profile and preserves the accepted UAT appearance.
   Light, dark and system profiles are dormant until a future owner/licence
   setting writes data-orq-theme on the document root or body.
   ========================================================== */
:root{
  color-scheme:light;
  --orq-theme-page-background:
    radial-gradient(circle at 8% 6%, rgba(147,51,234,.12), transparent 25%),
    radial-gradient(circle at 92% 8%, rgba(37,99,235,.20), transparent 31%),
    linear-gradient(135deg,#020814 0%,#06162f 52%,#082d62 100%);
  --orq-theme-canvas:#f5f7fb;
  --orq-theme-surface:#ffffff;
  --orq-theme-surface-subtle:#f8fafc;
  --orq-theme-text:#111827;
  --orq-theme-text-strong:#0f172a;
  --orq-theme-text-muted:#64748b;
  --orq-theme-border:#e5e7eb;
  --orq-theme-border-strong:#b9c4d0;
  --orq-theme-primary:#2563eb;
  --orq-theme-primary-hover:#1d4ed8;
  --orq-theme-primary-active:#1e40af;
  --orq-theme-hero-background:
    radial-gradient(circle at 16% 18%, rgba(68,185,255,.085), transparent 30%),
    radial-gradient(circle at 86% 16%, rgba(37,99,235,.055), transparent 34%),
    linear-gradient(145deg, rgba(9,18,42,.96) 0%, rgba(9,24,54,.92) 52%, rgba(6,22,47,.94) 100%);
  --orq-theme-hero-border:rgba(105,162,255,.28);
  --orq-theme-hero-shadow:0 34px 90px rgba(0,0,0,.36), inset 0 1px 0 rgba(255,255,255,.08);

  --orq-surface-canvas:var(--orq-theme-canvas);
  --orq-surface-subtle:var(--orq-theme-surface-subtle);
  --orq-surface-raised:var(--orq-theme-surface);
  --orq-panel:var(--orq-theme-surface);
  --orq-ink:var(--orq-theme-text);
  --orq-ink-strong:var(--orq-theme-text-strong);
  --orq-muted:var(--orq-theme-text-muted);
  --orq-line:var(--orq-theme-border);
  --orq-field-line:var(--orq-theme-border);
  --orq-border-default:var(--orq-theme-border);
  --orq-border-strong:var(--orq-theme-border-strong);
  --orq-action-primary:var(--orq-theme-primary);
  --orq-action-primary-hover:var(--orq-theme-primary-hover);
  --orq-action-primary-active:var(--orq-theme-primary-active);
  --orq-action-secondary-bg:var(--orq-theme-surface);
  --orq-action-secondary-hover:var(--orq-theme-surface-subtle);
  --orq-action-secondary-fg:var(--orq-theme-text);
}

[data-orq-theme="orqentra"]{
  color-scheme:light;
}

[data-orq-theme="light"],
[data-orq-theme="system"]{
  color-scheme:light;
  --orq-theme-page-background:
    radial-gradient(circle at 92% 4%, rgba(37,99,235,.08), transparent 28%),
    linear-gradient(180deg,#f8fafc 0%,#eef2f7 100%);
  --orq-theme-canvas:#f5f7fb;
  --orq-theme-surface:#ffffff;
  --orq-theme-surface-subtle:#f8fafc;
  --orq-theme-text:#111827;
  --orq-theme-text-strong:#0f172a;
  --orq-theme-text-muted:#64748b;
  --orq-theme-border:#e5e7eb;
  --orq-theme-border-strong:#b9c4d0;
}

[data-orq-theme="dark"]{
  color-scheme:dark;
  --orq-theme-page-background:
    radial-gradient(circle at 10% 6%, rgba(59,130,246,.16), transparent 28%),
    linear-gradient(135deg,#020814 0%,#07162f 55%,#0a244a 100%);
  --orq-theme-canvas:#071326;
  --orq-theme-surface:#101d33;
  --orq-theme-surface-subtle:#17243a;
  --orq-theme-text:#e8eef8;
  --orq-theme-text-strong:#f8fbff;
  --orq-theme-text-muted:#aebbd0;
  --orq-theme-border:#2a3b55;
  --orq-theme-border-strong:#405574;
}

@media(prefers-color-scheme:dark){
  [data-orq-theme="system"]{
    color-scheme:dark;
    --orq-theme-page-background:
      radial-gradient(circle at 10% 6%, rgba(59,130,246,.16), transparent 28%),
      linear-gradient(135deg,#020814 0%,#07162f 55%,#0a244a 100%);
    --orq-theme-canvas:#071326;
    --orq-theme-surface:#101d33;
    --orq-theme-surface-subtle:#17243a;
    --orq-theme-text:#e8eef8;
    --orq-theme-text-strong:#f8fbff;
    --orq-theme-text-muted:#aebbd0;
    --orq-theme-border:#2a3b55;
    --orq-theme-border-strong:#405574;
  }
}

/* Base typography foundation */
body,
input,
select,
textarea,
button{
  font-family:var(--orq-font-family) !important;
}

body{
  font-size:var(--orq-fs-body) !important;
  font-weight:var(--orq-fw-body) !important;
}

/* Profile page first-pass alignment */
.engineer-name,
.filter-option,
.filter-field select,
.multi-select-btn,
.field input,
.field select,
.field textarea{
  font-family:var(--orq-font-family) !important;
  font-size:var(--orq-fs-input) !important;
  font-weight:var(--orq-fw-input) !important;
  letter-spacing:0 !important;
}

.engineer-name{
  color:var(--orq-ink-strong) !important;
  line-height:1.25 !important;
}

.engineer-meta,
.profile-sub,
.hint,
.panel-sub{
  font-family:var(--orq-font-family) !important;
  font-size:var(--orq-fs-meta) !important;
  font-weight:var(--orq-fw-meta) !important;
  color:var(--orq-muted) !important;
}

.field label,
.filter-field label,
.competency-label,
.notes-collapsed summary{
  font-family:var(--orq-font-family) !important;
  font-size:var(--orq-fs-label) !important;
  font-weight:var(--orq-fw-label) !important;
}

.profile-name{
  font-family:var(--orq-font-family) !important;
  font-size:var(--orq-fs-profile-name) !important;
  font-weight:var(--orq-fw-profile-name) !important;
  letter-spacing:-.02em !important;
}

.panel-title,
.filter-modal-title{
  font-family:var(--orq-font-family) !important;
  font-weight:var(--orq-fw-semibold) !important;
}

/* Status and general pills: deliberately aligned closer to input text.
   The pill colour still carries the status emphasis. */
.pill,
.status-pill,
.filter-chip{
  font-family:var(--orq-font-family) !important;
  font-size:var(--orq-fs-pill) !important;
  font-weight:var(--orq-fw-pill) !important;
  letter-spacing:0 !important;
  line-height:1.2 !important;
}

.status-pill{
  min-width:auto !important;
  padding:5px 10px !important;
}

/* Status palette sourced from central tokens */
.status-available{background:var(--orq-status-available-bg) !important;color:var(--orq-status-available-fg) !important;}
.status-assigned{background:var(--orq-status-assigned-bg) !important;color:var(--orq-status-assigned-fg) !important;}
.status-accepted{background:var(--orq-status-accepted-bg) !important;color:var(--orq-status-accepted-fg) !important;}
.status-travel{background:var(--orq-status-travel-bg) !important;color:var(--orq-status-travel-fg) !important;}
.status-site{background:var(--orq-status-site-bg) !important;color:var(--orq-status-site-fg) !important;}
.status-job{background:var(--orq-status-job-bg) !important;color:var(--orq-status-job-fg) !important;}
.status-break{background:var(--orq-status-break-bg) !important;color:var(--orq-status-break-fg) !important;}
.status-sleep{background:var(--orq-status-sleep-bg) !important;color:var(--orq-status-sleep-fg) !important;}
.status-training{background:var(--orq-status-training-bg) !important;color:var(--orq-status-training-fg) !important;}
.status-leave{background:var(--orq-status-leave-bg) !important;color:var(--orq-status-leave-fg) !important;}
.status-sick{background:var(--orq-status-sick-bg) !important;color:var(--orq-status-sick-fg) !important;}
.status-unavailable{background:var(--orq-status-unavailable-bg) !important;color:var(--orq-status-unavailable-fg) !important;}
.status-appointment{background:var(--orq-status-appointment-bg) !important;color:var(--orq-status-appointment-fg) !important;}
.status-unknown{background:var(--orq-status-unknown-bg) !important;color:var(--orq-status-unknown-fg) !important;}

.btn,
.profile-actions .btn,
.filter-modal-actions .btn,
.icon-btn{
  font-family:var(--orq-font-family) !important;
  font-weight:var(--orq-fw-button) !important;
}

/* Documented target values for Profile after Phase 15B.3:
   - Input/select values: Inter 13px / 400
   - Engineer card name: Inter 13px / 400
   - Engineer card meta/team: Inter 12px / 400
   - Status pill text: Inter 13px / 400
   - Labels: Inter 11px / 700
*/


/* ==========================================================
   Phase 15B.4 - Global menu typography + protected Home skin
   Purpose:
   - One menu typography/style across all pages.
   - Restore Home to the darker login-aligned Orqentra colour scheme.
   ========================================================== */
:root{
  --orq-menu-item-fs:15px;
  --orq-menu-item-fw:500;
  --orq-menu-title-fs:11px;
  --orq-menu-title-fw:700;
  --orq-menu-radius:18px;
  --orq-menu-item-min-h:56px;
}

.menu-drawer{
  font-family:var(--orq-font-family) !important;
  background:
    radial-gradient(circle at 10% 8%, rgba(68,185,255,.10), transparent 30%),
    radial-gradient(circle at 92% 14%, rgba(255,255,255,.06), transparent 28%),
    linear-gradient(145deg, rgba(13,28,64,.96), rgba(5,14,31,.92)) !important;
  border:1px solid rgba(110,158,242,.30) !important;
  color:#f8fbff !important;
  box-shadow:0 42px 110px rgba(0,0,0,.48), inset 0 1px 0 rgba(255,255,255,.08), 0 0 36px rgba(68,185,255,.10) !important;
}

.menu-eyebrow{
  font-family:var(--orq-font-family) !important;
  font-size:var(--orq-menu-title-fs) !important;
  font-weight:var(--orq-menu-title-fw) !important;
  letter-spacing:.10em !important;
  text-transform:uppercase !important;
  color:rgba(214,226,245,.66) !important;
}

.menu-title{display:none !important;}

.menu-item,
.menu-item-title{
  font-family:var(--orq-font-family) !important;
  font-size:var(--orq-menu-item-fs) !important;
  font-weight:var(--orq-menu-item-fw) !important;
  letter-spacing:-.01em !important;
  line-height:1.15 !important;
}

.menu-item{
  min-height:var(--orq-menu-item-min-h) !important;
  padding:16px 18px !important;
  border-radius:var(--orq-menu-radius) !important;
  background:rgba(255,255,255,.07) !important;
  border:1px solid rgba(146,183,255,.13) !important;
  color:rgba(248,251,255,.94) !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.06) !important;
}

.menu-item:hover{
  background:rgba(255,255,255,.10) !important;
  transform:translateY(-1px) !important;
  box-shadow:0 12px 26px rgba(0,0,0,.16), inset 0 1px 0 rgba(255,255,255,.08) !important;
}

.menu-item-arrow{
  font-family:var(--orq-font-family) !important;
  font-size:15px !important;
  font-weight:400 !important;
  color:rgba(214,226,245,.72) !important;
}

.menu-close{
  font-family:var(--orq-font-family) !important;
  font-weight:600 !important;
}

.menu-logout{
  font-family:var(--orq-font-family) !important;
  font-size:14px !important;
  font-weight:500 !important;
}

/* Home only: keep the global typography file from washing out the home skin. */
body.orq-home-page{
  background:
    radial-gradient(circle at 14% 16%, rgba(255,84,95,.14), transparent 24%),
    radial-gradient(circle at 84% 12%, rgba(68,185,255,.16), transparent 30%),
    radial-gradient(circle at 52% 76%, rgba(63,231,186,.08), transparent 22%),
    linear-gradient(135deg,#020814 0%,#04152d 42%,#072457 100%) !important;
  color:#f8fbff !important;
}

body.orq-home-page .hero{
  background:
    radial-gradient(circle at 18% 18%, rgba(68,185,255,.16), transparent 28%),
    radial-gradient(circle at 84% 18%, rgba(63,231,186,.08), transparent 24%),
    linear-gradient(145deg, rgba(9,18,42,.90), rgba(8,28,66,.78)) !important;
  border:1px solid rgba(105,162,255,.28) !important;
  box-shadow:0 34px 90px rgba(0,0,0,.36), inset 0 1px 0 rgba(255,255,255,.08) !important;
}

body.orq-home-page .summary-card,
body.orq-home-page .workspace-card,
body.orq-home-page .activity-card,
body.orq-home-page .insight-card{
  background:
    radial-gradient(circle at 12% 10%, rgba(255,255,255,.055), transparent 30%),
    radial-gradient(circle at 88% 12%, rgba(68,185,255,.075), transparent 34%),
    linear-gradient(145deg, rgba(13,28,64,.82), rgba(5,14,31,.70)) !important;
  border:1px solid rgba(105,162,255,.24) !important;
  color:#f8fbff !important;
  box-shadow:0 24px 64px rgba(0,0,0,.30), inset 0 1px 0 rgba(255,255,255,.07) !important;
}

body.orq-home-page .summary-label,
body.orq-home-page .section-sub,
body.orq-home-page .activity-meta,
body.orq-home-page .activity-time,
body.orq-home-page .insight-sub{
  color:rgba(214,226,245,.68) !important;
}

body.orq-home-page .summary-value,
body.orq-home-page .section-title,
body.orq-home-page .activity-title,
body.orq-home-page .insight-value{
  color:#f8fbff !important;
}

body.orq-home-page .summary-sub,
body.orq-home-page .insight-label{
  color:rgba(214,226,245,.64) !important;
}

/* ==========================================================
   Phase 15B.5 - Shared dark page shell, hero and hero buttons
   Purpose:
   - Keep Profile and sub-pages aligned to the Home/Login dark Orqentra scheme.
   - Remove the split dark/light page background on sub-pages.
   - Standardise hero button typography and surface styling.
   ========================================================== */
:root{
  --orq-bg-dark-0:#020814;
  --orq-bg-dark-1:#04152d;
  --orq-bg-dark-2:#072457;
  --orq-hero-grad:linear-gradient(145deg, rgba(9,18,42,.92), rgba(8,28,66,.80));
  --orq-hero-border:rgba(105,162,255,.28);
  --orq-hero-shadow:0 34px 90px rgba(0,0,0,.36), inset 0 1px 0 rgba(255,255,255,.08);
  --orq-hero-btn-bg:linear-gradient(180deg, rgba(93,132,214,.20), rgba(58,91,168,.12));
  --orq-hero-btn-bg-hover:linear-gradient(180deg, rgba(93,132,214,.28), rgba(58,91,168,.18));
  --orq-hero-btn-border:rgba(146,183,255,.18);
  --orq-hero-btn-fg:#f8fbff;
  --orq-hero-btn-fw:500;
}

body.orq-subpage{
  background:
    radial-gradient(circle at 14% 16%, rgba(255,84,95,.14), transparent 24%),
    radial-gradient(circle at 84% 12%, rgba(68,185,255,.16), transparent 30%),
    radial-gradient(circle at 52% 76%, rgba(63,231,186,.08), transparent 22%),
    linear-gradient(135deg,var(--orq-bg-dark-0) 0%,var(--orq-bg-dark-1) 42%,var(--orq-bg-dark-2) 100%) !important;
  color:var(--orq-ink) !important;
  min-height:100vh !important;
}

body.orq-subpage .shell,
body.orq-subpage .page-shell{
  width:min(1540px, calc(100vw - 56px)) !important;
  max-width:1540px !important;
  margin:0 auto !important;
  padding:24px 0 44px !important;
}

body.orq-subpage .hero,
body.orq-subpage .page-header,
body.orq-subpage .ops-hero,
body.orq-subpage .planner-hero{
  color:#f8fbff !important;
  background:
    radial-gradient(circle at 18% 18%, rgba(68,185,255,.16), transparent 28%),
    radial-gradient(circle at 84% 18%, rgba(63,231,186,.08), transparent 24%),
    var(--orq-hero-grad) !important;
  border:1px solid var(--orq-hero-border) !important;
  box-shadow:var(--orq-hero-shadow) !important;
  border-radius:34px !important;
}

body.orq-subpage .hero{
  min-height:142px !important;
  padding:24px 34px !important;
}

body.orq-subpage .hero::before,
body.orq-subpage .ops-hero::before,
body.orq-subpage .planner-hero::before{
  background:
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px) !important;
  background-size:56px 56px !important;
  opacity:.9 !important;
}

body.orq-subpage h1,
body.orq-subpage .page-title,
body.orq-subpage .ops-hero-title,
body.orq-subpage .planner-hero-title{
  color:#f8fbff !important;
  font-family:var(--orq-font-family) !important;
  font-weight:600 !important;
  letter-spacing:-.035em !important;
}

body.orq-subpage .hero-btn,
body.orq-subpage .menu-btn,
body.orq-subpage .filter-toggle-btn,
body.orq-subpage .filter-action-btn,
body.orq-subpage .view-btn,
body.orq-subpage .week-nav-btn{
  font-family:var(--orq-font-family) !important;
  min-height:38px !important;
  padding:0 15px !important;
  border-radius:999px !important;
  border:1px solid var(--orq-hero-btn-border) !important;
  background:var(--orq-hero-btn-bg) !important;
  color:var(--orq-hero-btn-fg) !important;
  font-size:13px !important;
  font-weight:var(--orq-hero-btn-fw) !important;
  box-shadow:0 16px 34px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.10) !important;
  text-decoration:none !important;
}

body.orq-subpage .hero-btn:hover,
body.orq-subpage .menu-btn:hover,
body.orq-subpage .filter-toggle-btn:hover,
body.orq-subpage .filter-action-btn:hover,
body.orq-subpage .view-btn:hover,
body.orq-subpage .week-nav-btn:hover{
  background:var(--orq-hero-btn-bg-hover) !important;
  border-color:rgba(146,183,255,.28) !important;
}

/* Keep Profile content white and readable over the dark page shell. */
body.orq-profile-page .panel,
body.orq-requirements-page .panel,
body.orq-site-diary-page .panel,
body.orq-system-page .panel{
  background:#fff !important;
  color:#111827 !important;
}

@media(max-width:640px){
  body.orq-subpage .shell,
  body.orq-subpage .page-shell{
    width:calc(100vw - 28px) !important;
    padding:16px 0 34px !important;
  }
  body.orq-subpage .hero{padding:22px !important;border-radius:28px !important;}
}


/* Phase 15B.6 - final global menu alignment */
html body .menu-overlay{
  position:fixed !important;
  inset:0 !important;
  background:rgba(15,23,42,.28) !important;
  backdrop-filter:blur(8px) !important;
  opacity:0 !important;
  pointer-events:none !important;
  transition:opacity .2s ease !important;
  z-index:9000 !important;
  display:block !important;
}
html body .menu-overlay.open{opacity:1 !important;pointer-events:auto !important;}
html body .menu-drawer{
  position:fixed !important;
  top:24px !important;
  right:24px !important;
  width:min(380px,calc(100vw - 32px)) !important;
  max-height:calc(100vh - 48px) !important;
  overflow:auto !important;
  padding:18px !important;
  border-radius:30px !important;
  background:rgba(20,31,56,.94) !important;
  border:1px solid rgba(146,183,255,.16) !important;
  box-shadow:0 34px 90px rgba(0,0,0,.34) !important;
  backdrop-filter:blur(18px) !important;
  transform:translateX(24px) scale(.98) !important;
  opacity:0 !important;
  pointer-events:none !important;
  transition:transform .22s ease, opacity .22s ease !important;
  z-index:9001 !important;
  display:block !important;
}
html body .menu-drawer.open{transform:translateX(0) scale(1) !important;opacity:1 !important;pointer-events:auto !important;}
html body .menu-drawer-head{display:flex !important;align-items:flex-start !important;justify-content:space-between !important;gap:16px !important;padding:8px 6px 16px !important;}
html body .menu-eyebrow{font-size:11px !important;font-weight:700 !important;letter-spacing:.08em !important;text-transform:uppercase !important;color:rgba(214,226,245,.72) !important;}
html body .menu-title{display:none !important;}
html body .menu-close{width:44px !important;height:44px !important;display:inline-flex !important;align-items:center !important;justify-content:center !important;border:0 !important;border-radius:999px !important;background:rgba(255,255,255,.08) !important;color:#fff !important;font-size:30px !important;font-weight:600 !important;line-height:1 !important;cursor:pointer !important;}
html body .menu-list{display:grid !important;gap:12px !important;}
html body .menu-drawer .menu-list .menu-item{
  width:100% !important;
  min-height:56px !important;
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:14px !important;
  padding:0 18px !important;
  border-radius:16px !important;
  background:rgba(255,255,255,.07) !important;
  border:1px solid rgba(255,255,255,.10) !important;
  box-shadow:none !important;
  color:rgba(248,251,255,.94) !important;
  text-decoration:none !important;
  font-family:var(--orq-font-family,'Inter',system-ui,sans-serif) !important;
  font-size:15px !important;
  font-weight:500 !important;
  line-height:1.15 !important;
  white-space:nowrap !important;
  cursor:pointer !important;
  box-sizing:border-box !important;
}
html body .menu-drawer .menu-list .menu-item:hover{transform:translateY(-1px) !important;background:rgba(255,255,255,.12) !important;}
html body .menu-drawer .menu-item-title,
html body .menu-drawer .menu-list .menu-item span:first-child{font-weight:500 !important;}
html body .menu-drawer .menu-item-arrow,
html body .menu-drawer .menu-list .menu-item span:last-child{color:rgba(214,226,245,.72) !important;font-weight:400 !important;}
html body .menu-logout{
  margin-top:14px !important;
  min-height:50px !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  border-radius:999px !important;
  background:linear-gradient(90deg,#7894ff,#3cb8ff) !important;
  color:#fff !important;
  text-decoration:none !important;
  font-family:var(--orq-font-family,'Inter',system-ui,sans-serif) !important;
  font-size:14px !important;
  font-weight:500 !important;
}
@media(max-width:640px){html body .menu-drawer{right:16px !important;top:16px !important;width:calc(100vw - 32px) !important;}}

/* ==========================================================
   Phase 15B.7 - Profile hero Q badge trial
   Purpose:
   - Trial a reusable sub-page hero pattern before applying globally.
   - Q badge left, page title centred, actions right.
   ========================================================== */
body.orq-profile-page .profile-hero-trial{
  position:relative !important;
  display:grid !important;
  grid-template-columns:minmax(82px, 120px) minmax(0, 1fr) auto !important;
  align-items:center !important;
  gap:22px !important;
  overflow:hidden !important;
}
body.orq-profile-page .profile-hero-mark{
  justify-self:center !important;
  align-self:center !important;
  width:88px !important;
  height:88px !important;
  border-radius:26px !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  background:radial-gradient(circle at 50% 42%, rgba(255,255,255,.08), rgba(255,255,255,.02) 62%, transparent 72%) !important;
  filter:drop-shadow(0 16px 28px rgba(0,0,0,.28)) drop-shadow(0 0 22px rgba(68,185,255,.10)) !important;
}
body.orq-profile-page .profile-hero-mark img{
  width:78px !important;
  height:78px !important;
  object-fit:contain !important;
  display:block !important;
}
body.orq-profile-page .profile-hero-title-wrap{
  justify-self:center !important;
  text-align:center !important;
  min-width:0 !important;
}
body.orq-profile-page .profile-hero-title-wrap h1{
  margin:0 !important;
  font-size:38px !important;
  line-height:1 !important;
  font-weight:600 !important;
  letter-spacing:-.04em !important;
}
body.orq-profile-page .profile-hero-trial .hero-actions{
  justify-self:end !important;
  align-self:center !important;
  display:flex !important;
  align-items:center !important;
  gap:10px !important;
  flex-wrap:wrap !important;
}
@media(max-width:900px){
  body.orq-profile-page .profile-hero-trial{
    grid-template-columns:78px 1fr !important;
  }
  body.orq-profile-page .profile-hero-trial .hero-actions{
    grid-column:1 / -1 !important;
    justify-self:center !important;
  }
  body.orq-profile-page .profile-hero-mark{width:74px !important;height:74px !important;}
  body.orq-profile-page .profile-hero-mark img{width:66px !important;height:66px !important;}
}
@media(max-width:640px){
  body.orq-profile-page .profile-hero-trial{
    grid-template-columns:1fr !important;
    justify-items:center !important;
    text-align:center !important;
  }
  body.orq-profile-page .profile-hero-trial .hero-actions{justify-content:center !important;}
}


/* ==========================================================
   Phase 15B.8 - Profile clean white content panels
   Purpose:
   - Keep the approved Profile hero exactly as-is.
   - Remove the grey/shaded banding from Profile content cards.
   - Keep Profile main panels as clean white cards.
   ========================================================== */
body.orq-profile-page .layout > .panel,
body.orq-profile-page aside.panel,
body.orq-profile-page section.panel{
  background:#ffffff !important;
  background-image:none !important;
  color:#111827 !important;
  box-shadow:0 18px 48px rgba(15,23,42,.12) !important;
}

body.orq-profile-page .layout > .panel::before,
body.orq-profile-page aside.panel::before,
body.orq-profile-page section.panel::before,
body.orq-profile-page .profile-header::before{
  display:none !important;
  content:none !important;
}

body.orq-profile-page .profile-header{
  background:#ffffff !important;
  background-image:none !important;
  backdrop-filter:none !important;
  -webkit-backdrop-filter:none !important;
}

body.orq-profile-page .profile-header,
body.orq-profile-page .field-grid,
body.orq-profile-page .competency-block,
body.orq-profile-page .engineer-list{
  background-color:transparent !important;
}


/* ==========================================================
   Phase 15D - Profile controlled skills/access and on-call switch
   Purpose:
   - Keep controlled toggle controls aligned to global Profile typography.
   ========================================================== */
body.orq-profile-page .toggle-row,
body.orq-profile-page .toggle-panel summary,
body.orq-profile-page .oncall-label,
body.orq-profile-page .selected-pill{
  font-family:var(--orq-font-family) !important;
  font-size:var(--orq-fs-input) !important;
  font-weight:var(--orq-fw-input) !important;
  letter-spacing:0 !important;
}
body.orq-profile-page .pill-x{
  font-family:var(--orq-font-family) !important;
  font-weight:var(--orq-fw-medium) !important;
}

/* Phase 15D.2 - small global on-call indicator
   Keep On Call visually separate from core availability/status. */
.oncall-mini-badge{
  font-family:var(--orq-font-family) !important;
  font-weight:var(--orq-fw-medium) !important;
  letter-spacing:0 !important;
}

/* Phase 16B.2 - Lone worker visibility badge */
.lone-worker-badge{display:inline-flex;align-items:center;gap:5px;min-height:22px;padding:3px 8px;border-radius:999px;border:1px solid rgba(245,158,11,.34);background:#fff7ed;color:#c2410c;font-size:11px;font-weight:600;line-height:1;white-space:nowrap;vertical-align:middle;}
.lone-worker-badge::before{content:'👤';font-size:11px;line-height:1;}
.lone-worker-badge.alert{border-color:rgba(239,68,68,.34);background:#fee2e2;color:#b91c1c;}
.lone-worker-badge.alert::before{content:'🔴';}
.lone-worker-badge.escalated{border-color:rgba(185,28,28,.46);background:#991b1b;color:#fff;box-shadow:0 0 0 3px rgba(239,68,68,.12);}
.lone-worker-badge.escalated::before{content:'🚨';}
.engineer-with-badges{display:inline-flex;align-items:center;gap:6px;flex-wrap:wrap;}


/* ==========================================================
   Phase 17C.6Z — responsive UAT safeguard
   Purpose: make core pages fit cleanly across monitor, laptop,
   tablet and mobile widths without changing business logic.
   ========================================================== */
html{max-width:100%;overflow-x:hidden;}
body{max-width:100%;overflow-x:hidden;}
img,svg,canvas,video{max-width:100%;height:auto;}
.shell,.home-shell,.page-shell,.orq-page-shell{
  width:min(100%, calc(100vw - 24px));
}
table{max-width:100%;}
.table-wrap{max-width:100%;overflow:auto;}
@media(max-width:1180px){
  .summary-grid,.summary,.grid{grid-template-columns:repeat(2,minmax(0,1fr)) !important;}
  .layout,.content{grid-template-columns:1fr !important;}
  .hero,.page-header{grid-template-columns:1fr !important;display:grid !important;text-align:center;}
  .hero-actions,.view-links,.utility{justify-content:center !important;}
}
@media(max-width:760px){
  .shell,.home-shell,.page-shell{padding:14px 12px 28px !important;width:100% !important;}
  .hero{border-radius:22px !important;padding:18px 16px !important;min-height:auto !important;}
  h1,.hero-title,.page-title{font-size:28px !important;line-height:1.08 !important;}
  .summary-grid,.summary,.grid{grid-template-columns:1fr !important;}
  .panel,.card,.summary-card{border-radius:18px !important;}
  .hero-actions,.toolbar-top,.filter-actions,.view-links,.page-nav{gap:7px !important;}
  .hero-btn,.view-btn,.primary-btn,.secondary-btn,.filter-toggle-btn,.filter-action-btn,.page-nav-link{min-height:36px !important;padding:0 11px !important;font-size:12px !important;}
  table{display:block;overflow-x:auto;white-space:nowrap;}
  .modal-card,.job-detail-modal,.mywork-raise-modal,.diary-job-modal{width:calc(100vw - 18px) !important;max-width:calc(100vw - 18px) !important;}
}
