/* ServiceHub RC20 visual layer
   Calm executive glass surfaces, theme-aware branding, and restrained motion.
   This file is intentionally additive so application structure and security
   behaviour stay independent from presentation. */

:root,
html[data-theme="light"] {
  color-scheme: light;
  --rc-canvas: #f3f6fc;
  --rc-canvas-deep: #e9eef8;
  --rc-nav: rgba(238, 243, 252, .92);
  --rc-surface: #ffffff;
  --rc-surface-raised: #f7f9fd;
  --rc-surface-selected: #e9edff;
  --rc-surface-soft: #eef2f9;
  --rc-glass: rgba(255, 255, 255, .84);
  --rc-glass-strong: rgba(247, 249, 253, .92);
  --rc-line: #cbd5e7;
  --rc-line-soft: #dce3ef;
  --rc-text: #10182b;
  --rc-muted: #536079;
  --rc-quiet: #68758c;
  --rc-action: #4859d8;
  --rc-action-strong: #3949c2;
  --rc-action-soft: #e5e9ff;
  --rc-focus: #6172ec;
  --rc-danger: #c92d32;
  --rc-danger-soft: #ffe8ea;
  --rc-success: #147a55;
  --rc-success-soft: #e4f6ed;
  --rc-warning: #9a6500;
  --rc-warning-soft: #fff1cf;
  --chart-provider-orange: #e96f00;
  --chart-provider-vodafone: #d71920;
  --chart-provider-etisalat: #8f1f35;
  --chart-provider-we: #147a55;
  --rc-shadow-card: 0 7px 12px rgba(38, 57, 91, .11), 0 2px 4px rgba(38, 57, 91, .08);
  --rc-shadow-elevated: 0 12px 18px rgba(38, 57, 91, .14), 0 3px 6px rgba(38, 57, 91, .1);
  --rc-radius: 16px;
  --page: var(--rc-canvas);
  --surface: var(--rc-surface);
  --border: var(--rc-line);
  --control-border: #8a96aa;
  --control-border-hover: #67738a;
  --focus: var(--rc-focus);
  --text: var(--rc-text);
  --muted: var(--rc-muted);
  --soft: var(--rc-quiet);
  --blue: var(--rc-action);
  --blue-dark: var(--rc-action-strong);
  --blue-soft: var(--rc-action-soft);
  --blue-deep: #111a35;
  --red: var(--rc-danger);
  --red-dark: #a51f29;
  --green: var(--rc-success);
  --amber: var(--rc-warning);
  --radius: var(--rc-radius);
  --shadow-compact: var(--rc-shadow-card);
  --shadow-window: var(--rc-shadow-elevated);
  --shadow: var(--rc-shadow-card);
  --service-line: var(--rc-line);
  --service-subtle: var(--rc-surface-raised);
  --service-highlight: var(--rc-action-soft);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --rc-canvas: #070b18;
  --rc-canvas-deep: #050812;
  --rc-nav: rgba(11, 17, 34, .93);
  --rc-surface: #121c31;
  --rc-surface-raised: #182641;
  --rc-surface-selected: #202f50;
  --rc-surface-soft: #0f182b;
  --rc-glass: rgba(18, 28, 49, .86);
  --rc-glass-strong: rgba(24, 38, 65, .9);
  --rc-line: #34425f;
  --rc-line-soft: #27344f;
  --rc-text: #f6f8ff;
  --rc-muted: #b5bed2;
  --rc-quiet: #9da8bf;
  --rc-action: #7c8cff;
  --rc-action-strong: #6678f4;
  --rc-action-soft: #202d5f;
  --rc-focus: #a8b2ff;
  --rc-danger: #f05a5f;
  --rc-danger-soft: #3d1c2a;
  --rc-success: #35c98b;
  --rc-success-soft: #123b32;
  --rc-warning: #f1b84b;
  --rc-warning-soft: #3a3020;
  --chart-provider-orange: #ff8a1f;
  --chart-provider-vodafone: #f04444;
  --chart-provider-etisalat: #b8324d;
  --chart-provider-we: #35c98b;
  --rc-shadow-card: 0 8px 12px rgba(0, 0, 0, .24), 0 2px 4px rgba(0, 0, 0, .2);
  --rc-shadow-elevated: 0 12px 18px rgba(0, 0, 0, .3), 0 3px 6px rgba(15, 28, 64, .42);
  --page: var(--rc-canvas);
  --surface: var(--rc-surface);
  --border: var(--rc-line);
  --control-border: #68748c;
  --control-border-hover: #8d99b1;
  --focus: var(--rc-focus);
  --text: var(--rc-text);
  --muted: var(--rc-muted);
  --soft: var(--rc-quiet);
  --blue: var(--rc-action);
  --blue-dark: var(--rc-action-strong);
  --blue-soft: var(--rc-action-soft);
  --blue-deep: #070b18;
  --red: var(--rc-danger);
  --red-dark: #ff7478;
  --green: var(--rc-success);
  --amber: var(--rc-warning);
  --service-internal-bg: #302a1d;
  --service-internal-line: #75633d;
  --ticket-new-bg: #182c4f;
  --ticket-new-text: #9fc6ff;
  --ticket-assigned-bg: var(--rc-action-soft);
  --ticket-assigned-text: #c3caff;
  --ticket-progress-bg: #12334a;
  --ticket-progress-text: #91d5ff;
  --ticket-waiting-bg: var(--rc-warning-soft);
  --ticket-waiting-text: #ffd785;
  --ticket-resolved-bg: var(--rc-success-soft);
  --ticket-resolved-text: #8be2ba;
  --ticket-closed-bg: #293247;
  --ticket-closed-text: #d0d7e6;
  --ticket-cancelled-bg: var(--rc-danger-soft);
  --ticket-cancelled-text: #ffb1b4;
  --chart-grid: var(--rc-line-soft);
  --chart-axis: var(--rc-muted);
  --chart-legend: var(--rc-muted);
}

html { min-width: 320px; background: var(--rc-canvas-deep); }
body {
  min-height: 100dvh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 78% 4%, color-mix(in srgb, var(--rc-action) 12%, transparent), transparent 28%),
    radial-gradient(circle at 18% 88%, color-mix(in srgb, var(--rc-focus) 9%, transparent), transparent 34%),
    var(--rc-canvas);
  color: var(--rc-text);
}

body::before {
  content: "";
  position: fixed;
  z-index: -1;
  width: 70vw;
  height: 38vw;
  left: 15vw;
  bottom: -31vw;
  border: 1px solid color-mix(in srgb, var(--rc-action) 28%, transparent);
  border-radius: 50%;
  box-shadow: 0 0 40px color-mix(in srgb, var(--rc-action) 8%, transparent);
  pointer-events: none;
  transform: rotate(-7deg);
}

a { color: var(--rc-action); }
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible { outline-color: var(--rc-focus); }

.app-shell { grid-template-columns: 232px minmax(0, 1fr); }
.sidebar {
  background: var(--rc-nav);
  color: var(--rc-text);
  border-right: 1px solid var(--rc-line);
  box-shadow: 7px 0 16px rgba(0, 0, 0, .1);
}
@supports ((backdrop-filter: blur(14px)) or (-webkit-backdrop-filter: blur(14px))) {
  .sidebar,
  .topbar,
  .card,
  .kpi-card,
  .dashboard-kpi-card,
  .dashboard-support-operations,
  .auth-card {
    -webkit-backdrop-filter: saturate(118%) blur(14px);
    backdrop-filter: saturate(118%) blur(14px);
  }
}

.brand-panel {
  min-height: 76px;
  height: 76px;
  padding: 0 18px;
  gap: 9px;
  background: transparent;
  border-bottom: 1px solid var(--rc-line);
}
.brand-logo-frame {
  position: relative;
  display: block;
  flex: 0 0 auto;
  width: 128px;
  aspect-ratio: 4396 / 757;
  overflow: hidden;
}
.brand-logo-frame .theme-logo {
  position: absolute;
  left: -1.18%;
  top: -40.82%;
  width: 102.37%;
  max-width: none;
  height: auto;
}
/* The legacy shell applies a more specific 96px image cap when the desktop
   sidebar is expanded. Scale the supplied padded artwork to its crop frame. */
.app-shell .brand-panel .brand-logo-frame .theme-logo {
  height: 38px;
  max-width: 125px;
}
.theme-logo-on-light { display: block; }
.theme-logo-on-dark { display: none; }
html[data-theme="dark"] .theme-logo-on-light { display: none; }
html[data-theme="dark"] .theme-logo-on-dark { display: block; }
.brand-panel .brand-copy {
  min-width: 0;
  padding-left: 9px;
  border-left-color: var(--rc-line);
  color: var(--rc-text);
}
.brand-panel .brand-copy strong { color: var(--rc-text); }
.brand-panel .brand-copy small { color: var(--rc-muted); }

.nav-list { padding: 20px 14px; gap: 5px; scrollbar-color: var(--rc-line) transparent; }
.nav-item {
  min-height: 45px;
  padding-inline: 13px;
  border: 0;
  color: var(--rc-muted);
  font-weight: 650;
  transition: background-color .18s ease, color .18s ease, transform .18s ease;
}
.nav-item:hover { background: var(--rc-surface-raised); color: var(--rc-text); }
.nav-item:active { transform: translateY(1px); }
.nav-item.active {
  color: #fff;
  background: linear-gradient(135deg, var(--rc-action-strong), var(--rc-action));
  box-shadow: 0 6px 10px rgba(54, 69, 195, .26);
}
.sidebar-footer,
.sidebar-signout { border-color: var(--rc-line); color: var(--rc-quiet); }
.sidebar-signout-button { color: var(--rc-muted); }

.topbar {
  min-height: 76px;
  height: 76px;
  padding: 0 26px;
  background: var(--rc-glass-strong);
  border-bottom-color: var(--rc-line);
  box-shadow: 0 6px 12px rgba(0, 0, 0, .08);
}
.global-search {
  width: min(520px, 46vw);
  max-width: 520px;
  height: 44px;
  background: var(--rc-surface-soft);
  border-color: var(--rc-line);
  color: var(--rc-quiet);
}
.global-search input { color: var(--rc-text); }
.global-search kbd { border-color: var(--rc-line); background: var(--rc-surface); color: var(--rc-quiet); }
.global-search:focus-within { border-color: var(--rc-focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--rc-focus) 20%, transparent); }
.icon-button,
.notification-bell {
  border: 0;
  background: var(--rc-surface-raised);
  color: var(--rc-muted);
  transition: background-color .16s ease, color .16s ease, transform .16s ease;
}
.icon-button:hover,
.notification-bell:hover { background: var(--rc-surface-selected); color: var(--rc-text); text-decoration: none; }
.icon-button:active,
.notification-bell:active { transform: translateY(1px); }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .theme-icon-sun { display: none; }
html[data-theme="dark"] .theme-toggle .theme-icon-moon { display: none; }
html[data-theme="dark"] .theme-toggle .theme-icon-sun { display: block; }
.admin-chip small { color: var(--rc-quiet); }
.avatar { background: linear-gradient(145deg, var(--rc-action-strong), var(--rc-action)); color: #fff; box-shadow: 0 5px 9px rgba(55, 69, 200, .22); }

.content { max-width: 1780px; padding: 30px; }
.page-header { margin-bottom: 25px; }
.page-header h1 { font-size: 30px; color: var(--rc-text); }
.page-header p,
.field-help,
.helper { color: var(--rc-muted); }
.eyebrow { color: var(--rc-action); }

.card,
.kpi-card,
.dashboard-kpi-card,
.dashboard-support-operations {
  border: 0;
  border-radius: var(--rc-radius);
  background: var(--rc-glass);
  box-shadow: var(--rc-shadow-card);
}
.card,
.kpi-card,
.dashboard-kpi-card { position: relative; }
.card::before,
.kpi-card::after,
.dashboard-kpi-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  border-radius: inherit;
  border-top: 1px solid color-mix(in srgb, var(--rc-focus) 20%, transparent);
  opacity: .75;
}
.card > *,
.kpi-card > *,
.dashboard-kpi-card > * { position: relative; z-index: 1; }
.kpi-card::before,
.dashboard-kpi-card::before { display: none; }
.table-card,
.ticket-register,
.report-results-card { overflow: hidden; }
.card-header,
.admin-form-step,
.admin-create-user-card > .admin-section-heading,
.report-filter-heading { border-color: var(--rc-line-soft); }

@media (hover: hover) and (pointer: fine) {
  .content .card:not(.table-card):not(.ticket-filter-bar):not(.dashboard-filter-panel):not(.report-filter-card),
  .content .kpi-card,
  .content .dashboard-kpi-card,
  .content .ticket-summary-item,
  .content .admin-jump-nav a,
  .content .report-tab {
    transition: transform .2s cubic-bezier(.22, 1, .36, 1), box-shadow .2s cubic-bezier(.22, 1, .36, 1), background-color .2s ease;
  }
  .content .card:not(.table-card):not(.ticket-filter-bar):not(.dashboard-filter-panel):not(.report-filter-card):hover,
  .content .kpi-card:hover,
  .content .dashboard-kpi-card:hover,
  .content .ticket-summary-item:hover,
  .content .admin-jump-nav a:hover,
  .content .report-tab:hover {
    transform: translateY(-3px);
    box-shadow: var(--rc-shadow-elevated), 0 0 0 1px color-mix(in srgb, var(--rc-focus) 15%, transparent);
  }
}

.button { border-radius: 11px; transition: background-color .16s ease, color .16s ease, transform .16s ease, box-shadow .16s ease; }
.button-primary { background: linear-gradient(135deg, var(--rc-action-strong), var(--rc-action)); box-shadow: 0 7px 11px rgba(58, 73, 206, .23); }
.button-primary:hover { background: linear-gradient(135deg, color-mix(in srgb, var(--rc-action-strong) 87%, white), color-mix(in srgb, var(--rc-action) 88%, white)); }
.button-secondary { border-color: var(--rc-line); background: var(--rc-surface); color: var(--rc-text); }
.button-secondary:hover,
.button-ghost:hover { background: var(--rc-surface-selected); }
.button-ghost { color: var(--rc-text); }
.button-danger { background: var(--rc-danger); }
.button-compact { min-height: 34px; padding-inline: 10px; font-size: 12px; }
.admin-user-search { padding: 16px 22px; border-bottom: 1px solid var(--rc-line-soft); background: var(--rc-surface-raised); }
.admin-user-search > label { display: block; margin-bottom: 7px; font-weight: 800; color: var(--rc-text); }
.admin-user-search-row { display: flex; gap: 9px; }
.admin-user-search-row input { max-width: 620px; }
.admin-user-search [data-user-search-status] { display: block; margin-top: 7px; color: var(--rc-muted); }
.asset-spec-editor { margin: 20px 0; border: 1px solid var(--rc-line); border-radius: 14px; background: var(--rc-surface-raised); }
.asset-spec-editor > summary { cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 18px; color: var(--rc-text); }
.asset-spec-editor > summary span { color: var(--rc-muted); font-size: 12px; font-weight: 500; }
.asset-spec-editor[open] > summary { border-bottom: 1px solid var(--rc-line-soft); }
.asset-spec-editor > .form-grid,
.asset-spec-editor > label,
.asset-spec-editor > p { margin: 18px; }

input,
select,
textarea,
.stack-form input,
.stack-form select,
.stack-form textarea,
.searchable-select.is-enhanced .searchable-select-trigger {
  border-color: var(--control-border);
  border-radius: 11px;
  background: var(--rc-surface);
  color: var(--rc-text);
}
input::placeholder,
textarea::placeholder,
.stack-form input::placeholder,
.stack-form textarea::placeholder { color: var(--rc-quiet); }
input:focus,
select:focus,
textarea:focus,
.searchable-select-trigger[aria-expanded="true"] { border-color: var(--rc-focus); outline-color: color-mix(in srgb, var(--rc-focus) 20%, transparent); }
.searchable-select-popover,
.searchable-select.is-enhanced .searchable-select-popover:not([hidden]),
.searchable-select-popover.is-viewport-layer:not([hidden]) { background: var(--rc-surface); border-color: var(--rc-line); color: var(--rc-text); }

th { background: var(--rc-surface); color: var(--rc-quiet); }
th,
td { border-bottom-color: var(--rc-line-soft); }
tbody tr:hover { background: var(--rc-surface-raised); }
.empty-cell,
.empty-inline { color: var(--rc-muted); background: var(--rc-surface-raised); }
.status-info { background: var(--rc-action-soft); color: var(--rc-action); }
.status-success { background: var(--rc-success-soft); color: var(--rc-success); }
.alert-error { background: var(--rc-danger-soft); border-color: color-mix(in srgb, var(--rc-danger) 48%, transparent); color: var(--rc-danger); }
.alert-success { background: var(--rc-success-soft); border-color: color-mix(in srgb, var(--rc-success) 48%, transparent); color: var(--rc-success); }
.alert-warning { background: var(--rc-warning-soft); border-color: color-mix(in srgb, var(--rc-warning) 48%, transparent); color: var(--rc-warning); }

.kpi-icon,
.dashboard-kpi-icon,
.ticket-device-icon,
.location-command-chip { background: var(--rc-action-soft); color: var(--rc-action); }
.kpi-label,
.dashboard-kpi-label,
.dashboard-kpi-meta,
.ticket-summary-item small { color: var(--rc-muted); }
.kpi-card:hover,
.dashboard-kpi-main:hover { background: var(--rc-glass-strong); }
.dashboard-support-operations { background: linear-gradient(180deg, var(--rc-glass-strong), var(--rc-glass)); }
.dashboard-support-operations .dashboard-kpi-card { box-shadow: none; background: var(--rc-surface); }
.dashboard-help,
.notification-filters,
.dashboard-chart-switcher,
.dashboard-filter-chip { border-color: var(--rc-line); background: var(--rc-surface-raised); color: var(--rc-muted); }
.dashboard-tooltip { background: var(--rc-surface); color: var(--rc-text); border-color: var(--rc-line); }
.bar-track { background: var(--rc-line-soft); }

.ticket-filter-bar,
.dashboard-filter-panel,
.report-filter-card { background: var(--rc-glass-strong); }
.ticket-summary-item { background: var(--rc-glass); color: var(--rc-text); }
.ticket-summary-item:hover { background: var(--rc-surface-selected); }
.ticket-summary-item.is-active { background: var(--rc-action-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rc-action) 35%, transparent); }
.ticket-form-section,
.ticket-form-footer,
.ticket-case-meta,
.ticket-composer,
.ticket-linked-list article,
.ticket-link-asset-form { border-color: var(--rc-line-soft); }
.ticket-form-footer,
.ticket-composer,
.ticket-link-asset-form,
.ticket-event-message,
.ticket-resolution-action form,
.ticket-reopen-action form { background: var(--rc-surface-raised); }
.ticket-asset-option,
.impact-option,
.ticket-rating label,
.custody-choice { background: var(--rc-surface); border-color: var(--rc-line); color: var(--rc-text); }
.ticket-asset-option:hover,
.impact-option:hover,
.ticket-rating label:hover,
.custody-choice:hover { background: var(--rc-surface-selected); }
.ticket-asset-option:has(input:checked),
.impact-option:has(input:checked),
.ticket-rating label:has(input:checked),
.custody-choice:has(input:checked) { background: var(--rc-action-soft); border-color: var(--rc-action); }
.ticket-security-note { background: var(--rc-danger-soft); border-color: color-mix(in srgb, var(--rc-danger) 42%, transparent); }
.ticket-history-note { background: var(--rc-action-soft); border-color: color-mix(in srgb, var(--rc-action) 42%, transparent); }
.ticket-resolution-card { border-color: color-mix(in srgb, var(--rc-success) 48%, transparent); }
.ticket-timer-strip strong,
.ticket-rating-result strong { color: var(--rc-text); }
.ticket-status-neutral { background: var(--rc-surface-raised); color: var(--rc-muted); }
.ticket-priority-urgent { color: var(--rc-danger); }

.admin-jump-nav a,
.report-tab,
.account-identity-facts div,
.security-unlock-form,
.location-continuous-option,
.stock-intake-code-form,
.admin-linked-employee-step,
.admin-restricted-scope-grid { background: var(--rc-glass); border-color: var(--rc-line); color: var(--rc-text); }
.admin-create-submit { background: var(--rc-action-soft); }
.admin-form-step > .field-help { color: var(--rc-muted); }
.report-results-card th { background: var(--rc-surface); }

.auth-body { background: var(--rc-canvas); }
.auth-shell { position: relative; }
.auth-brand {
  background: radial-gradient(circle at 20% 25%, rgba(102, 120, 244, .28), transparent 34%), linear-gradient(145deg, #070b18, #172653);
}
.auth-brand::after { height: 3px; background: linear-gradient(90deg, var(--rc-action) 0 18%, rgba(255, 255, 255, .16) 18% 100%); }
.auth-logo-frame {
  position: relative;
  display: block;
  width: min(230px, 68vw);
  aspect-ratio: 4396 / 757;
  overflow: hidden;
}
.auth-logo-frame img {
  position: absolute;
  left: -1.18%;
  top: -40.82%;
  width: 102.37%;
  max-width: none;
  height: auto;
}
.auth-panel { background: transparent; }
.auth-card { background: var(--rc-glass); border: 0; box-shadow: var(--rc-shadow-elevated); }
.auth-heading h2 { color: var(--rc-text); }
.auth-card label,
.auth-card p,
.auth-card small { color: var(--rc-text); }
.auth-card .helper,
.auth-card .field-help,
.auth-card .auth-heading p { color: var(--rc-muted); }
html[data-theme="dark"] .stack-form input,
html[data-theme="dark"] .stack-form select,
html[data-theme="dark"] .stack-form textarea {
  background: var(--rc-surface);
  color: var(--rc-text);
  -webkit-text-fill-color: var(--rc-text);
  caret-color: var(--rc-text);
}
html[data-theme="dark"] .auth-card input:-webkit-autofill,
html[data-theme="dark"] .auth-card input:-webkit-autofill:hover,
html[data-theme="dark"] .auth-card input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--rc-text);
  caret-color: var(--rc-text);
  -webkit-box-shadow: 0 0 0 1000px var(--rc-surface) inset;
}
.auth-theme-toggle { position: fixed; z-index: 20; top: 18px; right: 18px; }
.secret-panel,
.recovery-grid code,
.totp-qr-panel { background: var(--rc-surface-raised); border-color: var(--rc-line); color: var(--rc-text); }

html[data-theme="dark"] .notification-filters a.is-active,
html[data-theme="dark"] .token-display code,
html[data-theme="dark"] .stock-intake-secret .token-display code,
html[data-theme="dark"] .ticket-link-asset-form .searchable-select,
html[data-theme="dark"] .ticket-satisfaction blockquote,
html[data-theme="dark"] .health-row,
html[data-theme="dark"] .location-facts > div,
html[data-theme="dark"] .qr-preview-panel { background: var(--rc-surface); color: var(--rc-text); }
html[data-theme="dark"] .location-facts { background: var(--rc-line); border-color: var(--rc-line); }
html[data-theme="dark"] .qr-label-card { background: #fff; color: #101e4a; }

/* Data-backed executive dashboard: the approved compact RC20 composition. */
.executive-page-heading { align-items: center; margin-bottom: 24px; }
.executive-page-heading h1 { margin-top: 6px; font-size: clamp(30px, 3vw, 42px); letter-spacing: -.045em; }
.executive-page-heading > div:first-child > p { margin: 6px 0 0; color: var(--rc-muted); }
.executive-page-heading .dashboard-updated-line { font-size: inherit; color: var(--rc-muted); }
.executive-page-heading .dashboard-header-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.executive-page-heading .dashboard-header-actions .button-primary { box-shadow: 0 10px 24px rgba(66, 78, 214, .24); }

.executive-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 18px;
}
.executive-card {
  min-width: 0;
  padding: 22px;
  border: 1px solid color-mix(in srgb, var(--rc-line) 78%, transparent);
  border-radius: 16px;
  background: var(--rc-surface);
  box-shadow: var(--rc-shadow-card);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.executive-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--rc-action) 22%, var(--rc-line));
  box-shadow: var(--rc-shadow-elevated);
}
.executive-card-glass {
  background: linear-gradient(145deg, color-mix(in srgb, var(--rc-glass-strong) 92%, transparent), color-mix(in srgb, var(--rc-glass) 82%, transparent));
  -webkit-backdrop-filter: blur(18px) saturate(125%);
  backdrop-filter: blur(18px) saturate(125%);
}
.executive-availability-card { grid-column: span 9; }
.executive-availability-card-wide { grid-column: span 12; }
.executive-support-card { grid-column: span 3; }
.executive-manufacturer-card { grid-column: span 5; }
.executive-provider-card { grid-column: span 4; }
.executive-cost-card { grid-column: span 3; }
.executive-activity-card,
.executive-confirmation-card { grid-column: span 6; }

.executive-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}
.executive-card-heading.compact { align-items: center; margin-bottom: 18px; }
.executive-card-heading h2,
.executive-confirmation-heading h2 { margin: 0; color: var(--rc-text); font-size: 20px; letter-spacing: -.025em; }
.executive-card-heading > span,
.executive-card-heading a,
.executive-confirmation-heading > a { color: var(--rc-action); font-size: 13px; font-weight: 800; }
.executive-card-label {
  display: block;
  margin-bottom: 5px;
  color: var(--rc-action);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .015em;
}

.executive-availability-body {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  align-items: center;
  gap: 28px;
}
.executive-donut { position: relative; width: 190px; aspect-ratio: 1; display: grid; place-items: center; margin-inline: auto; }
.executive-donut svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.executive-donut circle { fill: none; stroke-width: 5.4; }
.executive-donut-track { stroke: var(--rc-surface-raised); }
.executive-donut-segment { transition: stroke-dasharray .2s ease, stroke-dashoffset .2s ease; }
.segment-assigned,
.dot-assigned { stroke: var(--rc-action); background: var(--rc-action); }
.segment-available,
.dot-available { stroke: var(--rc-success); background: var(--rc-success); }
.segment-repair,
.dot-repair { stroke: var(--rc-warning); background: var(--rc-warning); }
.segment-reserved,
.dot-reserved { stroke: var(--rc-action-hover); background: var(--rc-action-hover); }
.segment-retired,
.dot-retired,
.segment-muted,
.dot-muted { stroke: var(--rc-muted); background: var(--rc-muted); }
.segment-danger,
.dot-danger { stroke: var(--rc-danger); background: var(--rc-danger); }
.executive-donut > span { position: relative; display: grid; justify-items: center; gap: 3px; }
.executive-donut strong { color: var(--rc-text); font-size: 38px; line-height: 1; letter-spacing: -.05em; }
.executive-donut small { color: var(--rc-muted); font-size: 12px; }
.executive-legend { margin: 0; }
.executive-legend > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 13px 0;
  border-bottom: 1px solid var(--rc-line);
}
.executive-legend > div:last-child { border-bottom: 0; }
.executive-legend dt { display: flex; align-items: center; gap: 10px; color: var(--rc-muted); }
.executive-dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; }
.executive-legend dd { display: flex; align-items: baseline; gap: 18px; margin: 0; }
.executive-legend dd strong { color: var(--rc-text); font-size: 16px; }
.executive-legend dd span { min-width: 38px; color: var(--rc-muted); text-align: right; }

.executive-support-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.executive-support-metrics a {
  min-height: 126px;
  display: grid;
  align-content: space-between;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--rc-line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--rc-surface) 92%, transparent);
  color: var(--rc-muted);
}
.executive-support-metrics a:hover { border-color: color-mix(in srgb, var(--rc-action) 34%, var(--rc-line)); text-decoration: none; }
.executive-support-metrics strong { color: var(--rc-text); font-size: 30px; line-height: 1; }
.executive-support-metrics small { color: var(--rc-muted); font-size: 11px; line-height: 1.35; }

.executive-bar-list { display: grid; gap: 13px; }
.executive-bar-list a {
  display: grid;
  grid-template-columns: minmax(74px, auto) minmax(90px, 1fr) 34px;
  align-items: center;
  gap: 12px;
  color: var(--rc-text);
}
.executive-bar-list a:hover { text-decoration: none; color: var(--rc-action); }
.executive-bar-list strong { text-align: right; font-variant-numeric: tabular-nums; }
.executive-bar-list progress,
.executive-coverage {
  width: 100%; height: 8px; overflow: hidden; border: 0; border-radius: 999px;
  background: var(--rc-surface-raised); color: var(--rc-action); accent-color: var(--rc-action);
}
.executive-bar-list progress::-webkit-progress-bar,
.executive-coverage::-webkit-progress-bar { border-radius: 999px; background: var(--rc-surface-raised); }
.executive-bar-list progress::-webkit-progress-value,
.executive-coverage::-webkit-progress-value { border-radius: 999px; background: currentColor; }
.executive-bar-list progress::-moz-progress-bar,
.executive-coverage::-moz-progress-bar { border-radius: 999px; background: currentColor; }
.provider-orange { color: var(--chart-provider-orange) !important; }
.provider-vodafone { color: var(--chart-provider-vodafone) !important; }
.provider-etisalat { color: var(--chart-provider-etisalat) !important; }
.provider-we { color: var(--chart-provider-we) !important; }
.provider-muted { color: var(--rc-muted) !important; }
.executive-bar-list a > span,
.executive-bar-list a > strong { color: var(--rc-text); }
.executive-card-note,
.executive-empty,
.executive-positive { margin: 16px 0 0; color: var(--rc-muted); font-size: 12px; line-height: 1.5; }

.executive-cost-card { display: flex; flex-direction: column; }
.executive-cost-value { display: block; margin: 12px 0 8px; color: var(--rc-text); font-size: clamp(27px, 2.3vw, 34px); letter-spacing: -.04em; }
.executive-cost-card > p { min-height: 42px; margin: 0 0 22px; color: var(--rc-muted); font-size: 13px; line-height: 1.5; }
.executive-coverage { height: 10px; margin-top: auto; }

.executive-activity-list { list-style: none; display: grid; gap: 0; margin: 0; padding: 0; }
.executive-activity-list li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 10px 0;
  border-bottom: 1px solid var(--rc-line);
}
.executive-activity-list li:last-child { border-bottom: 0; }
.executive-activity-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--rc-action-soft); position: relative; }
.executive-activity-mark::after { content: ""; position: absolute; inset: 11px; border: 2px solid var(--rc-action); border-radius: 3px; }
.executive-activity-list span { min-width: 0; }
.executive-activity-list strong,
.executive-activity-list small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.executive-activity-list strong { color: var(--rc-text); font-size: 14px; }
.executive-activity-list small { margin-top: 4px; color: var(--rc-muted); font-size: 12px; }

.executive-confirmation-heading { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 14px; margin-bottom: 12px; }
.executive-confirmation-heading p { margin: 4px 0 0; color: var(--rc-muted); font-size: 12px; }
.executive-warning-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: var(--rc-warning-soft); color: var(--rc-warning); font-size: 20px; font-weight: 900; }
.executive-confirmation-list { display: grid; }
.executive-confirmation-list a { display: flex; justify-content: space-between; gap: 18px; padding: 15px 4px; border-bottom: 1px solid var(--rc-line); color: var(--rc-text); }
.executive-confirmation-list a:last-child { border-bottom: 0; }
.executive-confirmation-list a:hover { color: var(--rc-action); text-decoration: none; }
.executive-confirmation-list strong { color: var(--rc-warning); }

html[data-theme="dark"] .executive-card-glass { background: linear-gradient(145deg, rgba(26, 39, 66, .88), rgba(17, 28, 49, .82)); }

.activity-log-header { align-items: center; }
.activity-log-filters { justify-content: flex-start; align-items: end; padding: 18px; }
.activity-log-filters .field { min-width: 190px; }
.activity-log-filters .activity-log-search { flex: 1; min-width: 280px; }
.activity-log-card td small { display: block; margin-top: 4px; color: var(--rc-muted); font-size: 12px; }
.activity-log-card td code { display: inline-block; max-width: 220px; overflow: hidden; color: var(--rc-muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
.activity-log-card tbody tr { transition: background-color .16s ease; }
.activity-log-card tbody tr:hover { background: var(--rc-action-soft); }
html[data-theme="dark"] .activity-log-card tbody tr:hover { background: rgba(91, 108, 255, .09); }

@media (max-width: 1280px) {
  .executive-availability-card { grid-column: span 8; }
  .executive-support-card { grid-column: span 4; }
  .executive-manufacturer-card,
  .executive-provider-card { grid-column: span 6; }
  .executive-cost-card { grid-column: span 12; }
}

@media (max-width: 900px) {
  .executive-page-heading { align-items: flex-start; }
  .executive-page-heading .dashboard-header-actions { width: 100%; }
  .executive-page-heading .dashboard-header-actions .button { flex: 1; }
  .executive-availability-card,
  .executive-support-card,
  .executive-manufacturer-card,
  .executive-provider-card,
  .executive-cost-card,
  .executive-activity-card,
  .executive-confirmation-card { grid-column: span 12; }
}

@media (max-width: 620px) {
  .executive-dashboard-grid { gap: 14px; }
  .executive-card { padding: 18px; border-radius: 14px; }
  .executive-availability-body { grid-template-columns: 1fr; gap: 12px; }
  .executive-donut { width: 166px; }
  .executive-support-metrics { grid-template-columns: 1fr 1fr; }
  .executive-support-metrics a { min-height: 112px; padding: 14px; }
  .executive-confirmation-heading { grid-template-columns: 42px minmax(0, 1fr); }
  .executive-confirmation-heading > a { grid-column: 2; }
  .activity-log-filters { align-items: stretch; }
  .activity-log-filters .field,
  .activity-log-filters .activity-log-search { min-width: 100%; }
}

@media (max-width: 1199px) {
  .app-shell { grid-template-columns: 76px minmax(0, 1fr); }
  .brand-panel { padding: 0 10px; justify-content: center; }
  .brand-logo-frame { width: 54px; }
  .app-shell.sidebar-expanded { grid-template-columns: 232px minmax(0, 1fr); }
  .app-shell.sidebar-expanded .brand-panel { padding: 0 18px; justify-content: flex-start; }
  .app-shell.sidebar-expanded .brand-logo-frame { width: 128px; }
}

@media (max-width: 767px) {
  .brand-panel { justify-content: flex-start; padding: 0 18px; }
  .brand-logo-frame { width: 128px; }
  .topbar { min-height: 66px; height: 66px; padding-inline: 14px; }
  .content { padding: 22px 14px; }
  .auth-theme-toggle { top: 12px; right: 12px; }
}

@media (max-width: 520px) {
  .topbar-actions { gap: 6px; }
  .theme-toggle { width: 42px; min-width: 42px; }
  .content { padding-inline: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .content .card,
  .content .kpi-card,
  .content .dashboard-kpi-card,
  .content .ticket-summary-item,
  .content .admin-jump-nav a,
  .content .report-tab,
  .content .executive-card { transform: none !important; }
}

@media print {
  html { color-scheme: light; }
  body { background: #fff; }
  body::before,
  .theme-toggle { display: none !important; }
}
