﻿/* ==========================================================
   AURUM Phase 9.8 — Global Theme Polish
   Loaded last as a compatibility and contrast layer.
   ========================================================== */

:root {
  --aurum-control-height: 38px;
  --aurum-control-radius: 9px;
  --aurum-focus-ring: 0 0 0 3px rgba(215, 177, 91, .16);
}

/* ---------------------------- Dark ---------------------------- */

html[data-theme="dark"] {
  --aurum-bg: #090c12;
  --aurum-bg-soft: #0e121a;

  --aurum-panel: rgba(24, 29, 39, .94);
  --aurum-panel-solid: #181d27;
  --aurum-panel-raised: #222936;
  --aurum-panel-hover: #2a3241;

  --aurum-border: rgba(255, 255, 255, .105);
  --aurum-text: #f5f3ed;
  --aurum-text-soft: #d1d3d9;
  --aurum-muted: #969daa;
}

/* Requested lighter top panel in dark theme. */
html[data-theme="dark"] .aurum-topbar {
  background:
    linear-gradient(
      180deg,
      rgba(48, 56, 72, .97),
      rgba(35, 42, 55, .97)
    ) !important;
  border-bottom-color: rgba(255, 255, 255, .12) !important;
  box-shadow: 0 8px 25px rgba(0, 0, 0, .24);
}

html[data-theme="dark"] .aurum-topbar-profile {
  background: rgba(12, 16, 23, .38) !important;
  border-color: rgba(255, 255, 255, .13) !important;
}

/* ---------------------------- Light --------------------------- */

html[data-theme="light"] {
  --aurum-bg: #edf0f4;
  --aurum-bg-soft: #e4e8ee;

  --aurum-panel: rgba(255, 255, 255, .97);
  --aurum-panel-solid: #ffffff;
  --aurum-panel-raised: #f7f9fc;
  --aurum-panel-hover: #edf1f7;

  --aurum-border: rgba(23, 31, 45, .14);
  --aurum-border-strong: rgba(151, 108, 26, .42);

  --aurum-text: #151b26;
  --aurum-text-soft: #303a4a;
  --aurum-muted: #667184;

  --aurum-gold: #91691c;
  --aurum-gold-bright: #a8791e;
  --aurum-gold-soft: rgba(145, 105, 28, .11);

  --aurum-success: #257a49;
  --aurum-danger: #b63e48;
  --aurum-warning: #9a6811;
  --aurum-info: #2868b2;

  --aurum-shadow-sm: 0 8px 22px rgba(27, 36, 52, .09);
  --aurum-shadow-lg: 0 24px 60px rgba(27, 36, 52, .15);
}

html[data-theme="light"] body {
  color: var(--aurum-text) !important;
  background: var(--aurum-bg) !important;
}

html[data-theme="light"] .aurum-topbar {
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, .98),
      rgba(241, 244, 248, .98)
    ) !important;
  border-bottom-color: rgba(23, 31, 45, .13) !important;
  box-shadow: 0 7px 22px rgba(27, 36, 52, .08);
}

html[data-theme="light"] .aurum-sidebar {
  color: #273143;
  background: #f8fafc !important;
  border-right-color: rgba(23, 31, 45, .12) !important;
}

html[data-theme="light"] .aurum-sidebar .aurum-nav__item,
html[data-theme="light"] .aurum-sidebar summary,
html[data-theme="light"] .aurum-sidebar a {
  color: #3d485a;
}

html[data-theme="light"] .aurum-sidebar .aurum-nav__item:hover,
html[data-theme="light"] .aurum-sidebar summary:hover,
html[data-theme="light"] .aurum-sidebar a:hover {
  color: #171e2a;
  background: #e9edf3;
}

html[data-theme="light"] .aurum-sidebar .is-active {
  color: #7e5915 !important;
  background: rgba(151, 108, 26, .12) !important;
}

/* ---------------------- Global controls ----------------------- */

button,
.button,
input,
select,
textarea {
  transition:
    color var(--aurum-transition),
    background-color var(--aurum-transition),
    border-color var(--aurum-transition),
    box-shadow var(--aurum-transition),
    transform var(--aurum-transition);
}

input,
select,
textarea {
  color: var(--aurum-text);
  background: var(--aurum-panel-solid);
  border-color: var(--aurum-border);
}

input::placeholder,
textarea::placeholder {
  color: var(--aurum-muted);
  opacity: .88;
}

input:focus,
select:focus,
textarea:focus,
button:focus-visible,
.button:focus-visible,
a:focus-visible {
  outline: none;
  border-color: var(--aurum-border-strong) !important;
  box-shadow: var(--aurum-focus-ring) !important;
}

html[data-theme="light"] input,
html[data-theme="light"] select,
html[data-theme="light"] textarea {
  color: #17202e !important;
  background: #ffffff !important;
  border-color: rgba(23, 31, 45, .18) !important;
}

html[data-theme="light"] select {
  color-scheme: light;
}

html[data-theme="light"] select option {
  color: #17202e;
  background: #ffffff;
}

/* ----------------------- Generic cards ------------------------ */

html[data-theme="light"] .card,
html[data-theme="light"] .form-card,
html[data-theme="light"] .panel,
html[data-theme="light"] .aurum-card,
html[data-theme="light"] .aurum-panel {
  color: var(--aurum-text);
  background: var(--aurum-panel);
  border-color: var(--aurum-border);
  box-shadow: var(--aurum-shadow-sm);
}

/* ----------------------- Generic tables ----------------------- */

html[data-theme="light"] table {
  color: #202a39;
}

html[data-theme="light"] thead th {
  color: #465268 !important;
  background: #eef2f7 !important;
  border-color: rgba(23, 31, 45, .13) !important;
}

html[data-theme="light"] tbody td {
  color: #202a39;
  border-color: rgba(23, 31, 45, .11) !important;
}

html[data-theme="light"] tbody tr:hover td {
  filter: none !important;
  background-color: #edf3fb !important;
}

/* -------------------------- ABSpass --------------------------- */

html[data-theme="dark"] .aurum-abspass-header,
html[data-theme="dark"] .aurum-abspass-toolbar,
html[data-theme="dark"] .aurum-abspass-card,
html[data-theme="dark"] .aurum-abspass-palette {
  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, .035),
      transparent 58%
    ),
    var(--aurum-panel) !important;
}

html[data-theme="light"] .aurum-abspass-header,
html[data-theme="light"] .aurum-abspass-toolbar,
html[data-theme="light"] .aurum-abspass-card,
html[data-theme="light"] .aurum-abspass-palette {
  color: #192230;
  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, .85),
      transparent 58%
    ),
    #f8fafc !important;
  border-color: rgba(23, 31, 45, .13) !important;
  box-shadow: 0 8px 24px rgba(27, 36, 52, .08);
}

html[data-theme="light"] .aurum-abspass-header h1,
html[data-theme="light"] .aurum-abspass-header p,
html[data-theme="light"] .aurum-abspass-card-head,
html[data-theme="light"] .aurum-abspass-card-head span {
  color: #1d2736 !important;
}

html[data-theme="light"] .aurum-abspass-card-head span {
  color: #687489 !important;
}

html[data-theme="light"] .aurum-abspass-toolbar input,
html[data-theme="light"] .aurum-abspass-card .account-col input {
  color: #182231 !important;
  background: #ffffff !important;
  border-color: rgba(23, 31, 45, .17) !important;
}

html[data-theme="light"] .aurum-abspass-toolbar button,
html[data-theme="light"] .aurum-abspass-toolbar a {
  color: #344055 !important;
  background: #f7f9fc !important;
  border-color: rgba(23, 31, 45, .16) !important;
}

html[data-theme="light"] .aurum-abspass-toolbar button:hover,
html[data-theme="light"] .aurum-abspass-toolbar a:hover {
  color: #17202d !important;
  background: #e9eef5 !important;
}

html[data-theme="light"] .aurum-abspass-toolbar .primary {
  color: #ffffff !important;
  background:
    linear-gradient(145deg, #b5842c, #8f651c) !important;
  border-color: #8f651c !important;
}

/* Highly readable light table header. */
html[data-theme="light"] .aurum-abspass-card thead th {
  color: #344055 !important;
  background: #e9eef5 !important;
  border-color: rgba(23, 31, 45, .14) !important;
}

/* Light table rows. */
html[data-theme="light"] .aurum-abspass-card tbody tr > td {
  color: #1d2736 !important;
  background: #ffffff !important;
  border-color: rgba(23, 31, 45, .11) !important;
}

html[data-theme="light"] .aurum-abspass-card tbody tr:hover > td {
  background: #edf3fb !important;
}

/* Sticky columns remain opaque and readable. */
html[data-theme="light"] .aurum-abspass-card .account-col,
html[data-theme="light"] .aurum-abspass-card .points-col {
  color: #17202d !important;
  background: #f3f6fa !important;
  box-shadow:
    7px 0 15px rgba(27, 36, 52, .10);
}

html[data-theme="light"] .aurum-abspass-card .points-col {
  box-shadow:
    -7px 0 15px rgba(27, 36, 52, .10);
}

html[data-theme="light"] .aurum-abspass-card .points-col strong {
  color: #121a26 !important;
}

html[data-theme="light"] .aurum-abspass-card .points-col span {
  color: #8e6517 !important;
}

/* Day selectors in light theme. */
html[data-theme="light"] .aurum-abspass-card .day-cell-controls select,
html[data-theme="light"] .aurum-abspass-card .day-cell select {
  color: #17202d !important;
  background: #ffffff !important;
  border-color: rgba(23, 31, 45, .17) !important;
  color-scheme: light !important;
}

html[data-theme="light"] .aurum-abspass-card .day-cell-controls select option,
html[data-theme="light"] .aurum-abspass-card .day-cell select option {
  color: #17202d !important;
  background: #ffffff !important;
}

/* Light-theme row colours. */
html[data-theme="light"] .aurum-abspass-card .row-color-white > td {
  background: #ffffff !important;
}

html[data-theme="light"] .aurum-abspass-card .row-color-green > td {
  background: #e7f6ec !important;
}

html[data-theme="light"] .aurum-abspass-card .row-color-red > td {
  background: #fdebed !important;
}

html[data-theme="light"] .aurum-abspass-card .row-color-yellow > td {
  background: #fbf3dc !important;
}

html[data-theme="light"] .aurum-abspass-card .row-color-blue > td {
  background: #e7f1fb !important;
}

html[data-theme="light"] .aurum-abspass-card .row-color-purple > td {
  background: #f1eafb !important;
}

html[data-theme="light"] .aurum-abspass-card .row-color-orange > td {
  background: #fbeedf !important;
}

html[data-theme="light"] .aurum-abspass-card .row-color-gray > td {
  background: #edf0f4 !important;
}

/* Preserve selected row colour on sticky cells. */
html[data-theme="light"] .aurum-abspass-card tbody tr.row-color-green .account-col,
html[data-theme="light"] .aurum-abspass-card tbody tr.row-color-green .points-col {
  background: #dcefe3 !important;
}

html[data-theme="light"] .aurum-abspass-card tbody tr.row-color-red .account-col,
html[data-theme="light"] .aurum-abspass-card tbody tr.row-color-red .points-col {
  background: #f8dfe2 !important;
}

html[data-theme="light"] .aurum-abspass-card tbody tr.row-color-yellow .account-col,
html[data-theme="light"] .aurum-abspass-card tbody tr.row-color-yellow .points-col {
  background: #f5e9c9 !important;
}

html[data-theme="light"] .aurum-abspass-card tbody tr.row-color-blue .account-col,
html[data-theme="light"] .aurum-abspass-card tbody tr.row-color-blue .points-col {
  background: #dceaf8 !important;
}

html[data-theme="light"] .aurum-abspass-card tbody tr.row-color-purple .account-col,
html[data-theme="light"] .aurum-abspass-card tbody tr.row-color-purple .points-col {
  background: #e8ddf6 !important;
}

html[data-theme="light"] .aurum-abspass-card tbody tr.row-color-orange .account-col,
html[data-theme="light"] .aurum-abspass-card tbody tr.row-color-orange .points-col {
  background: #f5e3d1 !important;
}

html[data-theme="light"] .aurum-abspass-card tbody tr.row-color-gray .account-col,
html[data-theme="light"] .aurum-abspass-card tbody tr.row-color-gray .points-col {
  background: #e2e6ec !important;
}

/* Notifications and modal contrast. */
html[data-theme="light"] .aurum-notification,
html[data-theme="light"] .aurum-abspass-modal__dialog {
  color: #17202d;
  background: #ffffff !important;
  border-color: rgba(23, 31, 45, .16) !important;
  box-shadow: 0 20px 55px rgba(27, 36, 52, .18);
}

html[data-theme="light"] .aurum-notification__content span,
html[data-theme="light"] .aurum-abspass-modal__content p {
  color: #5b677a !important;
}

/* ---------------- Other current AURUM pages ------------------ */

html[data-theme="light"] .aurum-businesses-page,
html[data-theme="light"] .aurum-users-page,
html[data-theme="light"] .aurum-archive-page {
  color: var(--aurum-text);
}

html[data-theme="light"] .aurum-businesses-page table th,
html[data-theme="light"] .aurum-users-page table th,
html[data-theme="light"] .aurum-archive-page table th {
  color: #3d495d !important;
  background: #edf1f6 !important;
}

html[data-theme="light"] .aurum-businesses-page table td,
html[data-theme="light"] .aurum-users-page table td,
html[data-theme="light"] .aurum-archive-page table td {
  color: #1d2736 !important;
  background: #ffffff;
}

/* ---------------- Reduced motion ----------------------------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
/* PHASE 9.8.1 DARK TABLE HEADER START */
/* ??????? ????? ??????? ABSpass ? ?????? ???? */
html[data-theme="dark"] .aurum-abspass-card thead th,
html[data-theme="dark"] .aurum-abspass-card table thead th {
    background: #303846 !important;
    color: #f0f3f8 !important;
    border-color: rgba(255, 255, 255, 0.14) !important;
}
/* ???????????? ??????? ????????? */
html[data-theme="dark"] .aurum-abspass-card th.account-col,
html[data-theme="dark"] .aurum-abspass-card td.account-col {
    background: #272f3c !important;
    color: #f3f5f9 !important;
}
/* ???????????? ??????? ?????? */
html[data-theme="dark"] .aurum-abspass-card th.points-col,
html[data-theme="dark"] .aurum-abspass-card td.points-col {
    background: #272f3c !important;
    color: #ffffff !important;
}
html[data-theme="dark"] .aurum-abspass-card .points-col strong {
    color: #ffffff !important;
}
html[data-theme="dark"] .aurum-abspass-card .points-col span {
    color: #e7c665 !important;
}
/* PHASE 9.8.1 DARK TABLE HEADER END */

/* PHASE 9.8.2 ABSPASS HEADER START */
html[data-theme="dark"] .aurum-abspass-card table thead th,
html[data-theme="dark"] .aurum-abspass-card thead th {
    background-color: #465266 !important;
    background-image: none !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, .18) !important;
    text-align: center !important;
    vertical-align: middle !important;
    font-weight: 700 !important;
}
/* ????????? ????????? ???? ?? ?????? */
html[data-theme="dark"] .aurum-abspass-card thead th.account-col {
    background-color: #465266 !important;
    color: #ffffff !important;
    text-align: center !important;
}
/* ????????? ?????? */
html[data-theme="dark"] .aurum-abspass-card thead th.points-col {
    background-color: #465266 !important;
    color: #ffffff !important;
    text-align: center !important;
}
/* ???? ???????? ? ??????? ????????? ????? */
html[data-theme="dark"] .aurum-abspass-card tbody td.account-col {
    text-align: left !important;
}
/* PHASE 9.8.2 ABSPASS HEADER END */

