/* Shared reference palette. Screen only: invoice/print colors remain legible.
   Brand artwork and operational state colors belong to their existing components. */
@media screen {
  :root {
    --ink: #10194f;
    --muted: #6174af;
    --line: #dce5fc;
    --paper: #edf4ff;
    --green: #293eff;
    --green-deep: #102779;
    --brand-blue: #243bff;
    --brand-navy: #061957;
    --brand-gradient: linear-gradient(110deg, #233dff 0%, #8018f5 38%, #e918be 66%, #ff376b 85%, #ff9c32 100%);
    --brand-shadow: 0 8px 26px #334bb510;
    --ui-radius: 11px;
  }
  html body {
    color: var(--ink);
    background: radial-gradient(ellipse at 65% 0%, #e7d9ff 0, transparent 42%), radial-gradient(ellipse at 95% 12%, #ffe7f1 0, transparent 36%), linear-gradient(135deg, #e7f1ff, #f5f7ff 55%, #e7f4ff) !important;
    background-attachment: fixed;
  }
  html body :is(.admin-main, .portal-dashboard, .login-view, .signup-page) { background-color: transparent !important; }
  html body :is(.sidebar, .dealer-sidebar, .partner-sidebar, .delivery-sidebar, .dealer-sidenav) {
    background: radial-gradient(ellipse at 0 0, #1257cf 0, transparent 35%), radial-gradient(ellipse at 100% 100%, #064fb3 0, transparent 32%), linear-gradient(160deg, #07185e, #041444 65%, #06296e) !important;
    border-color: #244aa1;
    color: #fff;
  }
  html body .sidebar :is(.admin-brand, .admin-brand strong, .admin-brand small, .nav-item, .sidebar-bottom a) { color: #fff; }
  html body .sidebar :is(.sidebar-label, .nav-group-label, .sidebar-bottom > span) { color: #a9c6ff; }
  html body .sidebar .nav-item { border-radius: 12px; }
  html body .sidebar .nav-item:hover { background: #ffffff18; color: #fff; }
  html body .sidebar .nav-item.is-active, html body .dealer-sidenav button.is-active {
    background: linear-gradient(105deg, #ff9c32, #ff327e 48%, #eb08c7) !important;
    color: #fff;
    box-shadow: inset 0 0 0 1px #ffffff55, 0 4px 16px #f527a74d;
  }
  html body :is(.panel, .ov-card, .metric-card, .ov-kpi, .ov-partner, .login-card, .auth-card, .delivery-card, .product-card, .signup-page fieldset) {
    border-color: #e1e8fc;
    border-radius: 17px;
    background-color: #ffffffed;
    box-shadow: var(--brand-shadow);
  }
  html body :is(.metric-card, .ov-kpi, .ov-partner) {
    background-image: linear-gradient(120deg, #fff, #eef6ff80);
    border: 1px solid #fff;
  }
  html body :is(.metric-card, .ov-kpi, .ov-partner):nth-child(4n + 2) { background-image: linear-gradient(120deg, #fff, #e4fff380); }
  html body :is(.metric-card, .ov-kpi, .ov-partner):nth-child(4n + 3) { background-image: linear-gradient(120deg, #fff, #fff1d980); }
  html body :is(.metric-card, .ov-kpi, .ov-partner):nth-child(4n + 4) { background-image: linear-gradient(120deg, #fff, #ffe4ef80); }
  html body :is(.admin-button, .btn-primary, .primary-button, .auth-submit, .checkout-button, .button.primary) {
    background: var(--brand-gradient) !important;
    color: #fff;
    border: 1px solid transparent;
    border-radius: 12px;
    box-shadow: 0 4px 14px #7b2cff24;
  }
  html body :is(.admin-button, .btn-primary, .primary-button, .auth-submit, .checkout-button, .button.primary):hover { filter: brightness(1.07); }
  html body :is(.quiet-button, .refresh-button, .catalog-footer button, .catalog-filters button:not(.admin-button)) {
    background: #f9fbff;
    color: #283cdf;
    border: 1px solid #ccd7ff;
    border-radius: 11px;
  }
  html body :is(input:not([type=checkbox], [type=radio], [type=range], [type=hidden], [type=color]), select, textarea) {
    border-color: #ced8fa;
    border-radius: 10px;
    color: #17265c;
  }
  html body :is(button, a, input, select, textarea):focus-visible { outline: 3px solid #6988ff; outline-offset: 3px; }
  html body :is(input[type=checkbox], input[type=radio]) { accent-color: #3445ff; }
  html body :is(.catalog-filters, .orders-filters, .dealer-filters, .commission-filters, .net-filters) {
    background-color: #ffffffeb;
    border: 1px solid #fff;
    border-radius: 14px;
    box-shadow: var(--brand-shadow);
  }
  /* Paint one continuous gradient across the row, not one gradient per cell. */
  html body table thead { background: var(--brand-gradient) !important; }
  html body table thead tr { background: transparent; }
  html body table thead th {
    background: transparent !important;
    color: #fff !important;
    border-color: #ffffff26 !important;
  }
  html body table tbody tr:nth-child(even) { background-color: #f3f7ff; }
  html body table tbody tr:hover { background-color: #eaf0ff; }
  html body table tbody td { border-bottom-color: #e9eefb; }
  html body .catalog-category { background: #e6f1ff; color: #0755c9; border-radius: 16px; }
  html body tr:nth-child(3n + 2) .catalog-category { background: #efe8ff; color: #6730cf; }
  html body tr:nth-child(3n) .catalog-category { background: #fce7f5; color: #bd087c; }
  html body .catalog-offer { background: #ffe5ef; color: #c9114c; border-radius: 18px; }
  html body .table-action { border-radius: 10px; background-color: #eceaff; color: #303bda; }
  html body .table-action:is(.danger, .delete, [data-delete-product]) { background-color: #ffe5ee; color: #c70e45; }
  html body :is(.registration-intro, .site-footer, .landing-promo) { background: linear-gradient(120deg, #071957, #124fc3); color: #fff; }
  @media (min-width: 1000px) {
    html body .admin-main { padding: 26px 24px 48px !important; }
  }
}
