/* ========================================================================
   LUX THEME — איגוד הסופרים
   Overlay stylesheet. Loaded AFTER the inline <style> in index.html so it
   re-maps the existing design tokens (teal/blue → parchment/copper/gold)
   and restyles shared components. app.js reuses these same classes, so this
   reskins every screen with no logic changes.
   Palette source: admin landing page (FbKidush + copper/gold).
   ======================================================================== */

/* ---------- Display font (FbKidush) ---------- */
@font-face{
  font-family:"Kidush";
  src:url("fonts/kidush-bold.woff2") format("woff2");
  font-weight:700; font-display:swap;
}
@font-face{
  font-family:"Kidush";
  src:url("fonts/kidush-regular.woff2") format("woff2");
  font-weight:400; font-display:swap;
}

/* ---------- Re-map the palette tokens ---------- */
:root{
  /* parchment surfaces */
  --bg:            #F6EEDC;
  --surface:       #FFFDF8;
  --surface2:      #F3E9D2;
  --border:        #E0D0A8;
  --border2:       #CEB985;
  --text:          #2E2016;
  --text2:         #6E5A48;
  --text3:         #8C7A64;

  /* copper replaces teal as the primary accent */
  --teal:          #8B4A1C;
  --teal2:         #A85A28;
  --teal3:         #74401C;
  --teal-pale:     #F2E6CB;
  --teal-text:     #74401C;

  /* deep-brown sidebar */
  --sidebar-bg:    #3A1C0B;
  --sidebar-hover: rgba(232,200,120,0.12);
  --sidebar-active:#5A2A0A;

  /* gold */
  --gold:          #B88A2C;
  --gold-pale:     #F4E7C3;

  /* warm, slightly muted status colors that sit well on parchment */
  --green:         #4F7A33;
  --green-pale:    #E9F0DC;
  --red:           #B23B2E;
  --red-pale:      #F7E3DE;

  --shadow-sm:     0 1px 3px rgba(58,28,11,0.08), 0 1px 2px rgba(58,28,11,0.05);
  --shadow-md:     0 6px 20px rgba(58,28,11,0.12), 0 2px 6px rgba(58,28,11,0.07);
}

/* ---------- Parchment background, drop the teal SVG pattern ---------- */
body{
  background-color:var(--bg) !important;
  background-image:
    radial-gradient(circle at 18% 12%, rgba(184,138,44,0.05) 0, transparent 42%),
    radial-gradient(circle at 85% 88%, rgba(139,74,28,0.045) 0, transparent 45%) !important;
  background-attachment:fixed !important;
}

/* ---------- Display font on headings / titles ---------- */
.login-banner h1,
.form-card-title,
.sidebar-logo-text,
.topbar-title,
.section-title,
.card-title,
.stat-number,
.modal-title,
.app-footer-brand,
.footer-brand,
.forum-soon-text,
.sidebar-logo-text{
  font-family:"Kidush","Frank Ruehl CLM","David",serif !important;
  letter-spacing:0 !important;
}
.section-title{ font-size:1.5rem; }
.form-card-title{ font-size:1.7rem; }
.login-banner h1{ font-size:clamp(1.1rem,2.6vw,1.65rem); letter-spacing:.01em; }
.stat-number{ font-weight:700; }

/* ---------- Sidebar (deep brown + gold active) ---------- */
.sidebar{
  background:linear-gradient(185deg,#43220E 0%, #3A1C0B 55%, #30160A 100%);
  border-left:1px solid rgba(232,200,120,0.14);
}
.sidebar-logo{ border-bottom-color:rgba(232,200,120,0.14); }
.sidebar-logo img{ filter:drop-shadow(0 0 8px rgba(232,200,120,0.35)); }
.sidebar-logo-text{ color:#F3E6CC; }
.sidebar-logo-text small{ color:rgba(243,230,204,0.55); }
.sidebar-user{ border-bottom-color:rgba(232,200,120,0.14); }
.sidebar-user-name{ color:#F3E6CC; }
.sidebar-user-role{ color:rgba(243,230,204,0.5); }
.nav-item{ color:rgba(243,230,204,0.72); }
.nav-item:hover{ background:var(--sidebar-hover); color:#FBEFD2; }
.nav-item.active{
  background:rgba(232,200,120,0.15);
  color:#F0C96B;
  border-right-color:var(--gold);
}
.sidebar-bottom{ border-top-color:rgba(232,200,120,0.14); }
.sidebar-logout{ color:rgba(243,230,204,0.5); }
.sidebar-logout:hover{ color:#FBEFD2; }

/* ---------- Topbar ---------- */
.app-topbar{ border-bottom:1px solid var(--border); }
.topbar-title{ color:var(--copper,#8B4A1C); color:var(--teal); }
.topbar-heb-date{
  color:#74401C; background:var(--teal-pale);
  border:1px solid rgba(139,74,28,0.22);
}

/* ---------- Cards: copper frame ---------- */
.card{
  border:2px solid var(--teal);
  border-radius:14px;
  box-shadow:var(--shadow-sm);
  background:var(--surface) !important;
}
.card-title{
  color:var(--text);
  border-bottom:1px solid var(--border);
}

/* ---------- Stat cards ---------- */
.stat-card{
  border:2px solid var(--teal);
  border-radius:14px;
}
.stat-card::before{ background:var(--gold); opacity:1; height:4px; }
.stat-card:hover{ box-shadow:var(--shadow-md); }
.stat-label{ color:var(--text2); }

/* ---------- Section headings ---------- */
.section-title span{ color:var(--gold); }

/* ---------- Tables ---------- */
.table-wrap{
  border:1.5px solid var(--border2);
  border-radius:14px;
  box-shadow:var(--shadow-sm);
}
thead tr{ background:#F0E4C6; border-bottom:1px solid var(--border2); }
thead th{ color:#5A4428; font-weight:700; }
tbody tr{ border-bottom:1px solid var(--border); }
tbody tr:hover{ background:#FAF4E4; }

/* ---------- Badges ---------- */
.badge-green{ background:var(--green-pale); color:#3C5E26; }
.badge-red  { background:var(--red-pale);   color:#8E2D22; }
.badge-gold { background:var(--gold-pale);  color:#7A5410; }
.badge-gray { background:#EFE7D4; color:var(--text2); }
.badge-teal { background:var(--teal-pale);  color:var(--teal-text); }

/* ---------- Filter bar ---------- */
.filter-bar{ border:1.5px solid var(--border); border-radius:12px; background:var(--surface); }
.filter-bar select, .filter-bar input{ background:#FBF6EA; border-color:var(--border); color:var(--text); }
.filter-bar select:focus, .filter-bar input:focus{ border-color:var(--gold); }

/* ---------- Buttons ---------- */
.btn-primary{
  background:linear-gradient(180deg,var(--teal2),var(--teal));
  color:#FFF6E8;
  box-shadow:0 3px 10px rgba(139,74,28,0.28);
}
.btn-primary:hover{
  background:linear-gradient(180deg,var(--teal),var(--teal3));
  box-shadow:0 5px 16px rgba(139,74,28,0.36);
}
.btn-outline{ border:1.5px solid var(--border2); color:var(--text2); }
.btn-outline:hover{ border-color:var(--teal); color:var(--teal); background:var(--teal-pale); }
.btn-gold{
  background:linear-gradient(180deg,var(--gold-2,#E8C878),var(--gold));
  color:#3A1C0B; border:1px solid #D9B65A;
}
.btn-gold:hover{ background:var(--gold); color:#FFF6E8; }
.btn-green{ background:var(--green-pale); color:#3C5E26; border:1px solid #BcD39A; }
.btn-green:hover{ background:var(--green); color:#fff; }
.btn-danger{ background:var(--red-pale); color:var(--red); border:1px solid #E6B4AC; }
.btn-danger:hover{ background:var(--red); color:#fff; }

/* login primary button */
#login-screen .btn-primary{
  background:linear-gradient(180deg,var(--teal2),var(--teal));
  box-shadow:0 4px 16px rgba(139,74,28,0.32);
}
#login-screen .btn-primary:hover{
  background:linear-gradient(180deg,var(--teal),var(--teal3));
  box-shadow:0 6px 20px rgba(139,74,28,0.42);
}

/* ---------- Form fields focus → gold ---------- */
.form-group input:focus, .form-group select:focus, .form-group textarea:focus{
  border-color:var(--gold);
  box-shadow:0 0 0 3px rgba(184,138,44,0.16);
}
.input-field{
  border:1px solid var(--border); border-radius:7px; background:#FBF6EA;
  font-family:'Heebo',sans-serif; color:var(--text); padding:0.65rem 0.9rem;
}
.input-field:focus{ border-color:var(--gold); box-shadow:0 0 0 3px rgba(184,138,44,0.16); outline:none; }

/* ---------- Login screen ---------- */
.login-banner{
  background:linear-gradient(185deg,#43220E,#3A1C0B);
  border-bottom:2px solid var(--gold);
  box-shadow:0 2px 16px rgba(58,28,11,0.28);
}
.login-banner::before{
  background:radial-gradient(ellipse at 50% 50%, rgba(232,200,120,0.12) 0%, transparent 70%);
}
.banner-ornament, .footer-ornament, .app-footer-ornament{ color:var(--gold); }
.login-scroll-bg img{ opacity:0.09; filter:grayscale(10%) sepia(18%); }
.login-body::before{
  background-image:radial-gradient(circle, rgba(139,74,28,0.06) 1px, transparent 1px);
}
.form-card{
  border:1px solid var(--border);
  box-shadow:0 10px 44px rgba(58,28,11,0.12), 0 1px 0 rgba(255,255,255,0.9) inset;
}
.form-card::before{
  background:linear-gradient(90deg,var(--teal3),var(--gold),var(--teal2));
}
.form-card-sub{ color:var(--text3); }
.teal-rule span{ color:var(--gold); }
.login-footer{ background:linear-gradient(0deg,#43220E,#3A1C0B); border-top-color:rgba(232,200,120,0.12); }
.footer-brand{ color:rgba(243,230,204,0.7); }
.footer-text{ color:rgba(243,230,204,0.38); }

/* ---------- App footer ---------- */
.app-footer{ border-top:1px solid var(--border); background:var(--surface); }
.app-footer-brand{ color:var(--text); }

/* ---------- Misc accents ---------- */
.avail-dot.green{ background:var(--green); }
.avail-dot.red{ background:var(--red); }
.checkbox-group input[type="checkbox"]{ accent-color:var(--teal); }
.spinner{ border-top-color:var(--teal); }
.ornament{ color:var(--gold); }
.nav-badge{ color:#7A5410; background:var(--gold-pale); border:1px solid var(--gold); }
.sample-link{ color:var(--teal); }
.toggle-btn.active-green{ border-color:var(--green); background:var(--green-pale); color:#3C5E26; }
.toggle-btn.active-red{ border-color:var(--red); background:var(--red-pale); color:#8E2D22; }
.avail-card.available{ border-color:var(--green); }
.avail-card.busy{ border-color:var(--red); }

/* keep windows opaque above the textured bg */
.card, .modal, .table-wrap, .stat-card, .filter-bar, .form-card{ position:relative; z-index:1; }

/* ========================================================================
   ADD-ITEM WIZARD (3 steps) — lux
   ======================================================================== */
.wiz-modal{ max-width:560px; }
.stepper{ display:flex; align-items:center; justify-content:center; margin:0 0 1.6rem; }
.stepper-step{ display:flex; flex-direction:column; align-items:center; gap:.4rem; flex-shrink:0; }
.stepper-dot{
  width:40px; height:40px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  font-family:"Kidush","Frank Ruehl CLM",serif; font-weight:700; font-size:1.05rem;
  background:#EDE0C2; color:#8C7A64; border:2px solid var(--border2); transition:all .25s;
}
.stepper-lbl{ font-size:.72rem; color:var(--text3); font-weight:600; white-space:nowrap; }
.stepper-step.active .stepper-dot{
  background:linear-gradient(180deg,var(--teal2),var(--teal)); color:#FFF6E8;
  border-color:var(--teal); box-shadow:0 3px 10px rgba(139,74,28,.3);
}
.stepper-step.active .stepper-lbl{ color:var(--teal); }
.stepper-step.done .stepper-dot{ background:var(--gold); color:#3A1C0B; border-color:var(--gold); }
.stepper-step.done .stepper-lbl{ color:#8A5A14; }
.stepper-line{ flex:1; height:2px; background:var(--border2); margin:0 .5rem 1.35rem; min-width:22px; max-width:90px; transition:background .25s; }
.wiz-panel{ animation:wizIn .3s ease both; }
@keyframes wizIn{ from{opacity:0;transform:translateX(14px);} to{opacity:1;transform:translateX(0);} }
.wiz-actions{ display:flex; align-items:center; gap:.6rem; margin-top:1.3rem; padding-top:1rem; border-top:1px solid var(--border); }
.wiz-summary-title{ font-size:.82rem; color:var(--text2); font-weight:600; margin-bottom:.7rem; text-align:center; }
.wiz-summary{ border:1.5px solid var(--border2); border-radius:12px; overflow:hidden; background:#FBF6EA; }
.sum-row{ display:flex; justify-content:space-between; gap:1rem; padding:.62rem 1rem; border-bottom:1px solid var(--border); }
.sum-row:last-child{ border-bottom:none; }
.sum-k{ color:var(--text3); font-size:.8rem; font-weight:600; }
.sum-v{ color:var(--text); font-weight:700; text-align:left; }

/* ========================================================================
   ADMIN CATALOG — variation catalog (Design ד) — lux
   ======================================================================== */
:root{ --gold-2:#E8C878; --gold-deep:#8A5A14; }

/* product-type tabs */
.ptabs{ display:flex; flex-wrap:wrap; gap:6px; margin:4px 0 22px; }
.ptab{ position:relative; display:inline-flex; align-items:center; gap:9px; border:0; background:transparent;
  color:var(--text2); font-size:1rem; font-weight:600; padding:11px 18px; border-radius:12px; cursor:pointer;
  transition:all .2s; font-family:'Heebo',sans-serif; }
.ptab:hover{ background:rgba(139,74,28,.08); color:var(--text); }
.ptab[aria-selected="true"]{ background:var(--surface); color:var(--text); box-shadow:var(--shadow-sm); border:1.5px solid var(--border2); }
.ptab[aria-selected="true"]::after{ content:""; position:absolute; inset-inline:16px; bottom:-1px; height:3px; border-radius:3px; background:linear-gradient(90deg,var(--gold),var(--teal)); }
.ptab .tico{ width:22px; height:22px; color:var(--teal); display:inline-flex; flex:none; }
.ptab .tico svg{ width:100%; height:100%; display:block; }
.ptab .n{ color:var(--teal2); font-weight:700; }

/* catalog page header */
.eyebrow{ font-size:.72rem; font-weight:700; letter-spacing:.14em; color:var(--gold-deep); text-transform:uppercase; }
.cat-head{ display:flex; flex-wrap:wrap; justify-content:space-between; align-items:flex-end; gap:16px; margin-bottom:20px; }
.cat-head h1{ font-family:"Kidush","Frank Ruehl CLM",serif; font-size:2.3rem; font-weight:700; color:var(--text); display:flex; align-items:center; gap:14px; margin-top:4px; }
.cat-head .htico{ width:42px; height:42px; color:var(--teal); display:inline-flex; flex:none; }
.cat-head .htico svg{ width:100%; height:100%; display:block; }
.cat-head .sub{ font-size:.86rem; color:var(--text2); margin-top:6px; }
.cat-actions{ display:flex; gap:10px; align-items:center; }
.inp{ font:0.9rem 'Heebo',sans-serif; color:var(--text); padding:10px 14px; min-height:44px; border:1.5px solid var(--border2); border-radius:12px; background:var(--surface); transition:border-color .2s,box-shadow .2s; }
.inp:focus{ outline:none; border-color:var(--gold); box-shadow:0 0 0 4px rgba(184,138,44,.18); }

/* filter panel */
.filters{ background:var(--surface); border:2px solid var(--teal); border-radius:14px; box-shadow:var(--shadow-sm); padding:16px 20px; margin-bottom:30px; display:flex; flex-direction:column; gap:12px; }
.frow{ display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.frow + .frow{ border-top:1px solid var(--border); padding-top:12px; }
.flabel{ font-size:.82rem; color:var(--text2); font-weight:600; margin-inline-end:4px; }
.chip{ font:0.85rem 'Heebo',sans-serif; padding:7px 14px; min-height:38px; border-radius:999px; border:1.5px solid var(--border2); background:var(--surface); color:var(--text); cursor:pointer; transition:all .18s; }
.chip:hover{ border-color:var(--teal); }
.chip[aria-pressed="true"]{ background:linear-gradient(180deg,#F3E7CC,#EBD9AF); border-color:var(--gold-deep); color:#5A2A0A; font-weight:700; }
.chip .c{ opacity:.65; font-size:.78rem; }
.chip-clear{ margin-inline-start:auto; border:0; background:transparent; color:#9A2E2E; cursor:pointer; font-size:.85rem; font-weight:600; }
.summ{ font-size:.82rem; color:var(--text2); }
.summ b{ color:var(--text); }

/* variation cards grid */
.grid{ display:grid; grid-template-columns:1fr; gap:64px; }
.vcard{ position:relative; background:var(--surface); border:2px solid var(--teal); border-radius:18px; box-shadow:var(--shadow-sm); padding:32px 30px; display:flex; flex-direction:column; gap:18px; transition:transform .25s,box-shadow .25s,border-color .25s; }
.vcard:hover{ transform:translateY(-5px); box-shadow:0 20px 40px rgba(60,32,8,.2); border-color:var(--gold-deep); }
.vcard.feature{ border:2.5px solid var(--teal); box-shadow:0 0 0 4px rgba(232,200,120,.35),0 16px 36px rgba(139,74,28,.24); }
.vcard.feature::before{ content:"המובילה במלאי"; position:absolute; top:-12px; inset-inline-start:22px; background:linear-gradient(180deg,var(--gold-2),var(--gold)); color:#3A1C0B; font-size:.72rem; font-weight:700; padding:3px 12px; border-radius:999px; box-shadow:var(--shadow-sm); }
.vc-top{ display:flex; justify-content:space-between; align-items:flex-start; gap:12px; }
.vc-title{ font-family:"Kidush","Frank Ruehl CLM",serif; font-size:1.5rem; font-weight:700; color:var(--text); display:flex; align-items:center; gap:12px; }
.vc-title .htico{ width:34px; height:34px; color:var(--gold-deep); display:inline-flex; flex:none; }
.vc-title .htico svg{ width:100%; height:100%; display:block; }
.flex-tag{ font-size:.7rem; font-weight:600; color:var(--gold-deep); background:#F6ECD4; border:1px solid var(--gold); border-radius:6px; padding:2px 8px; margin-inline-start:6px; vertical-align:middle; }
.btn-sm{ font-size:.82rem; padding:7px 14px; border-radius:9px; }
.vcard .badge{ display:block; text-align:center; border-radius:12px; padding:7px 14px; line-height:1; background:var(--bg); border:1px solid var(--border2); min-width:64px; }
.vcard .badge b{ font-family:"Kidush",serif; font-size:1.55rem; color:var(--teal); display:block; }
.vcard .badge span{ font-size:.66rem; color:var(--text2); }
.vcard .badge.hot{ background:linear-gradient(180deg,#F3E7CC,#E9D5A8); border-color:var(--gold-deep); }
.vcard .badge.hot b{ color:var(--gold-deep); }
.tags{ display:flex; flex-wrap:wrap; gap:6px; }
.tag{ font-size:.72rem; padding:3px 10px; border-radius:7px; background:var(--bg); color:var(--text2); border:1px solid var(--border); }
.tag.ok{ background:#E9F2E4; color:#2C6B3F; border-color:#CFE4C2; }
.tag.warn{ background:#FBE7DD; color:#8B3A1C; border-color:#F0CDBB; }
.price{ font-family:"Kidush",serif; font-size:1.3rem; font-weight:700; color:var(--text); }
.vc-foot{ display:flex; align-items:center; justify-content:space-between; gap:10px; border-top:1px solid var(--border); padding-top:13px; }
.vc-foot .ppl{ font-size:.84rem; color:var(--text2); }
.mini{ display:grid; grid-template-columns:1fr; gap:10px; }
.mini .row{ border:1.5px solid var(--border2); border-radius:12px; padding:11px 14px; display:flex; justify-content:space-between; align-items:center; gap:10px; background:#FFFDF8; font-size:.86rem; }
.mini .row b{ font-weight:700; color:var(--text); }
.mini .srow .chev{ font-size:.76rem; color:var(--gold-deep); font-weight:600; white-space:nowrap; }
.mini .srow{ transition:background .15s; }
.mini .srow:hover{ background:#FBF4E6; }
.mini .subrow{ background:#FAF6EC; border-style:dashed; border-color:var(--border); margin-inline-start:14px; font-size:.82rem; color:var(--text2); }
@media (max-width:820px){ .grid{ grid-template-columns:1fr; } .cat-head h1{ font-size:1.9rem; } }
