/* ================================================================
   REDIN PREMIUM GLOBAL DESIGN SYSTEM  |  2026-11-21  |  v1.0
   Emerald / Champagne Gold / Warm Ivory
   Visual styles only. No auth, business, form or application JS.
   The entire theme is screen-only: print/receipts keep their styling.
   ================================================================ */
@media screen {
  :root {
    --bg:#f4f5f0;
    --cream:#f4f5f0;
    --paper:#fffefa;
    --ink:#192b22;
    --ink2:#243d2e;
    --dark:#162a20;
    --line:#dfe7dd;
    --muted:#718177;
    --gray:#718177;
    --gold:#c9a466;
    --gold2:#eddec1;
    --green:#25734e;
    --red:#ad4e4a;
    --orange:#a47535;
    --blue:#416e88;
    --shadow:0 15px 40px rgba(18,39,25,.07),0 2px 7px rgba(18,39,25,.025);
    --redin-emerald:#162c21;
    --redin-emerald-light:#294936;
    --redin-gold:#c9a466;
    --redin-cream:#f4f5f0;
  }
  html {scroll-behavior:smooth}
  body {
    color:var(--ink);
    background:
      radial-gradient(ellipse at 97% 0,rgba(201,164,102,.085),transparent 36rem),
      radial-gradient(ellipse at 0 46%,rgba(47,111,73,.055),transparent 42rem),
      var(--redin-cream);
    font-family:Vazirmatn,Tahoma,Arial,sans-serif;
  }
  ::selection{background:#d8e9dc;color:#183b28}
  a,button,input,select,textarea { -webkit-tap-highlight-color:transparent }
  button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible {
    outline:3px solid rgba(201,164,102,.50);outline-offset:2px;
  }

  /* Distinctive dark-emerald navigational surfaces, unchanged layout. */
  header:not(.topbar),header.header,header.top,.header:not(.product-header) {
    background:linear-gradient(108deg,#13281d 0%,#1d3728 66%,#294333 100%);
    border-bottom-color:rgba(255,255,255,.13);
    color:#f4f7f1;
    box-shadow:0 7px 26px rgba(16,39,25,.12);
  }
  header a,.header a {color:inherit}
  header .brand,.header .brand strong,header .logo,header .auth-brand,
  .header .brand,.header .brand strong,.header .logo {color:#e5c184}
  header .brand small,.header .brand span,header .brandtitle {color:#d6e3d8}
  header .btn:not(.primary),header .secondary,.header .btn:not(.primary) {
    border-color:rgba(255,255,255,.20);
    background:rgba(255,255,255,.09);
    color:#f7faf5;
  }
  header .btn:not(.primary):hover,.header .btn:not(.primary):hover {
    background:rgba(255,255,255,.16);
  }
  .sidebar {
    background:linear-gradient(165deg,#13261c 0%,#1a3324 57%,#253d2d 100%);
    color:#ecf2e8;
    border-color:rgba(255,255,255,.1);
  }
  .sidebar .brand strong,.sidebar .brand,.sidebar .nav .ico {color:#dfbc7b}
  .sidebar .navtitle {color:#99b29e}
  .sidebar .nav button,.sidebar .nav a {color:#d6e5d9}
  .sidebar .nav button.active,.sidebar .nav button:hover,
  .sidebar .nav a.active,.sidebar .nav a:hover {
    color:#fff9eb;background:rgba(255,255,255,.10);
  }
  .sidebar .nav button.active {box-shadow:inset -3px 0 #d4ac66}
  .app .top {background:rgba(255,254,250,.98);color:var(--ink);border-color:var(--line);box-shadow:0 4px 18px rgba(17,41,24,.045)}
  .app .top .pill {background:#eff5ed;color:#31593d;border-color:#dce9db}

  /* Premium cards, data tables, roles and forms, matching the preview. */
  .card,.panel,.stat,.benefit,.product,.auth-card,.modal,
  .notice:not(.danger):not(.error),.promo,.item-row {
    border-radius:18px;
    border-color:var(--line);
  }
  .card,.panel,.stat,.benefit,.product,.auth-card,.modal,.item-row {
    background:#fff;
    box-shadow:0 13px 34px rgba(20,48,29,.055),0 2px 5px rgba(20,48,29,.025);
  }
  .card,.panel,.stat,.product,.benefit {transition:box-shadow .2s ease,border-color .2s ease,transform .2s ease}
  .card:hover,.panel:hover,.stat:hover,.product:hover,.benefit:hover {
    border-color:#d1dfd0;
    box-shadow:0 17px 41px rgba(20,48,29,.085);
  }
  .cardtitle h2,.cardtitle h3,.panelhead h2,.card > h2:first-child {font-weight:800;color:#172f21}
  .card > h2:first-child {border-right:4px solid var(--gold);padding-right:12px}
  .stat strong,.price,.totalrow strong {color:#1c4931}
  .stat.success strong {color:#23764e}
  .stat.failed strong {color:#b54e4a}
  .muted,.sub,.caption,.smalltext,.intro,.hint {color:var(--muted)}
  .notice,.banner {
    background:linear-gradient(90deg,#fffaf0,#faf5e8);
    color:#765d32;border:1px solid #eaddbf;border-radius:14px;
  }
  .notice.success,.message.ok {background:#ebf6ee;color:#22573a;border-color:#cae5d0}
  .message.error,.alert.show {background:#fff0ee;color:#a0413c;border-color:#eccdcc}
  .grid,.formgrid,.stats,.departments,.products {row-gap:16px}

  .btn,.secondary,.addbtn,.filter,.tab,.close,.xbtn,.iconbtn {
    border-radius:11px;
    border-color:#dfe7dd;
    transition:background .15s ease,border-color .15s ease,box-shadow .15s ease,transform .15s ease;
  }
  .btn:not(.primary):not(.danger):not(.dark),.secondary,.iconbtn {
    background:#fff;color:#294133;
  }
  .btn.primary,.primary,.cartbtn {
    background:linear-gradient(125deg,#e6ca94 0%,#c9a466 100%);
    color:#252419;border-color:#cba666;
    box-shadow:0 5px 14px rgba(173,130,62,.18);
  }
  .btn.primary:hover:not(:disabled),.primary:hover:not(:disabled),.cartbtn:hover:not(:disabled) {
    background:linear-gradient(135deg,#eed6aa,#d6b474);
    box-shadow:0 8px 22px rgba(173,130,62,.23);
  }
  .btn.danger {background:#fff7f6;border-color:#eccac6;color:#b54b45}
  .btn.dark {background:#1d3928;color:#fff;border-color:#1d3928}
  .btn:hover:not(:disabled),.secondary:hover:not(:disabled),.addbtn:hover:not(:disabled),.tab:hover:not(:disabled) {transform:translateY(-1px)}
  .btn:disabled,.primary:disabled {opacity:.58;cursor:not-allowed}
  .field input,.field textarea,.field select,.auth-card input,
  input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),select,textarea {
    border-color:#dae3d8;
    border-radius:11px;
    background:#fcfdfb;
    color:#1a3024;
    font-family:Vazirmatn,Tahoma,Arial,sans-serif;
  }
  .field input:focus,.field select:focus,.field textarea:focus,
  input:focus,select:focus,textarea:focus {
    border-color:#c9a466;
    box-shadow:0 0 0 3px rgba(201,164,102,.16);
  }
  input[type="checkbox"],input[type="radio"] {accent-color:#267347}
  .roles label,.warehouses label {
    border-color:#e0e9df;
    background:#f7faf6;
    border-radius:12px;
    transition:background .16s ease,border-color .16s ease;
  }
  .roles label:hover,.warehouses label:hover {background:#eff6ec;border-color:#c5dcc7}
  .roles label:has(input:checked),.warehouses label:has(input:checked) {
    background:#eaf5eb;border-color:#b9d6bb;color:#215d3b;
  }
  .tablewrap,.tablebox {border-color:#e0e8dc;border-radius:14px;background:#fff;box-shadow:0 2px 8px rgba(19,44,28,.025)}
  table th,table thead td,th {background:#f0f5ef;color:#607467;border-bottom-color:#e2eae0}
  table td,td {border-bottom-color:#e9eee7}
  tbody tr:nth-child(even) {background:rgba(246,249,244,.50)}
  tbody tr:hover {background:#eef7ee}
  .pill,.status.green,.tag.success {background:#e5f3e9;color:#237247;border-color:#cde5d4}
  .pill.off,.status.red,.tag.failed {background:#fff0ed;color:#ac4c49}
  .status.orange,.tag.denied {background:#fff2df;color:#967035}
  .modal {box-shadow:0 25px 85px rgba(17,35,24,.25);border:1px solid #e5ece4}
  .overlay,.modalback.show {backdrop-filter:blur(3px)}
  .auth-screen {background:radial-gradient(circle at 70% 5%,#2a4c35,#13251c 65%)}
  .auth-card {border-color:#d5dfd1}
  .auth-brand {color:#c49b5c}
  .toast.show {box-shadow:0 15px 40px rgba(15,42,25,.2)}

  /* Public storefront — preserve grids, cart actions, checkout and JS. */
  html[data-redin-page="index"] .topbar {background:#10241a;color:#cfe0d0}
  html[data-redin-page="index"] .header {background:linear-gradient(110deg,#13281d,#25412f);color:#eef6ec}
  html[data-redin-page="index"] .brand {color:#e3bc79}
  html[data-redin-page="index"] .brand small {color:#d2e0d5}
  html[data-redin-page="index"] .navrow {color:#d5e4d7}
  html[data-redin-page="index"] .navrow a:hover,
  html[data-redin-page="index"] .navrow a.active {color:#edce92}
  html[data-redin-page="index"] .searchbox {background:#f6f9f4;border-color:#dbe6da}
  html[data-redin-page="index"] .searchbox input {background:transparent;border:0;box-shadow:none;color:#1d3929}
  html[data-redin-page="index"] .searchbox button {color:#43664a}
  html[data-redin-page="index"] .iconbtn {background:rgba(255,255,255,.10);color:#fff;border-color:rgba(255,255,255,.2)}
  html[data-redin-page="index"] .cartbtn {color:#21351f}
  html[data-redin-page="index"] .hero {
    background:radial-gradient(ellipse at 67% 45%,#44654a 0,#25452f 44%,#10251b 88%);
    border-radius:25px;box-shadow:0 24px 50px rgba(24,57,34,.18);
  }
  html[data-redin-page="index"] .hero:before {background:linear-gradient(90deg,rgba(14,34,23,.91),rgba(14,34,23,.53) 60%,rgba(14,34,23,.08))}
  html[data-redin-page="index"] .hero-badge {border-color:#d8c39b}
  html[data-redin-page="index"] .eyebrow {color:#f0d69d}
  html[data-redin-page="index"] .dept {background:#1d3928;border-radius:19px}
  html[data-redin-page="index"] .dept:after {background:linear-gradient(0deg,#102a1fee,rgba(16,42,31,.10) 82%)}
  html[data-redin-page="index"] .prodvisual {background:#ecf1e9}
  html[data-redin-page="index"] .prodtag {background:#fffdf3;color:#765b32}
  html[data-redin-page="index"] .prodcat,.product .prodcat {color:#a0783d}
  html[data-redin-page="index"] .addbtn {background:#f9f3e7;color:#775d33;border-color:#e5d1a9}
  html[data-redin-page="index"] .addbtn:hover {background:#dfc491}
  html[data-redin-page="index"] .filter.active {background:#1b422e;color:#fff;border-color:#1b422e}
  html[data-redin-page="index"] .promo {background:linear-gradient(100deg,#e4eee1,#f5ead7);border:1px solid #d9e2d0}
  html[data-redin-page="index"] .footer {background:linear-gradient(115deg,#11271c,#213a2b);color:#ebf2e7}
  html[data-redin-page="index"] .footer a,html[data-redin-page="index"] .footer p {color:#becfc0}
  html[data-redin-page="index"] .drawer {background:#fffefa}
  html[data-redin-page="index"] .drawer .cartfoot {background:#f8faf5}

  /* Inventory/operations sections and their toolbar surfaces. */
  header.top .brand,header.top .brand small {color:#e4bd7c}
  header.top .top-actions .btn:not(.primary) {color:#fff;border-color:rgba(255,255,255,.23);background:rgba(255,255,255,.08)}
  .tabs .tab.active {background:#214b32;color:#fff;border-color:#214b32}
  .symbol {background:#e7f1e4;color:#2f7147}
  .status.blue {background:#eaf3f7;color:#43728b}

  @media (max-width:720px) {
    .card,.panel,.stat,.auth-card {border-radius:15px}
    .btn,.secondary,.filter,.tab {min-height:34px}
    .modal {border-radius:17px}
    html[data-redin-page="index"] .headmain {gap:12px}
    html[data-redin-page="index"] .header {background:#182f23}
  }
  @media (prefers-reduced-motion:reduce) {
    *,*::before,*::after {scroll-behavior:auto!important;animation-duration:.01ms!important;transition-duration:.01ms!important}
  }
}
