@import url("fonts.css");

:root{
  --bg:#f2eee7;
  --bg-2:#e5ddd2;
  --card:#fbf7f1;
  --surface-top:#f8f2eb;
  --chrome-bg:#f4ede5;
  --text:#1d1816;
  --muted:#625852;
  --primary:#b84a2b;
  --primary-600:#9f3f22;
  --accent:#e18a39;
  --danger:#c5393f;
  --warning:#c07a1c;
  --border:#dbcec0;
  --btn-gradient:linear-gradient(135deg, rgb(184, 74, 43) 0%, rgb(217, 106, 67) 100%);
  --spot-1:rgba(184, 74, 43, 0.12);
  --spot-2:rgba(225, 138, 57, 0.10);
  --shadow:0 18px 40px rgba(40,28,24,0.16);
  --radius:18px;
  --page-width:80%;
  --font-body:"Space Grotesk", "Segoe UI", Arial, sans-serif;
  --font-display:"Fraunces", "Times New Roman", serif;
}

*{box-sizing:border-box;margin:0;padding:0}
html{
  scrollbar-gutter:stable;
  background:var(--chrome-bg);
  color-scheme:light;
}
body{
  font-family:var(--font-body);
  background-color:var(--bg);
  color:var(--text);
  background:
    radial-gradient(circle at 12% 8%, var(--spot-1), transparent 42%),
    radial-gradient(circle at 88% 12%, var(--spot-2), transparent 45%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  transition:background-color 0.3s ease, color 0.3s ease;
  font-size:16px;
  overflow-y:scroll;
  min-height:100vh;
  display:flex;
  flex-direction:column;
}

.container{width:var(--page-width);max-width:calc(100% - 48px);margin:0 auto;padding:0 24px}
.topbar .container{width:var(--page-width);max-width:calc(100% - 48px)}
main.container{flex:1}

.topbar{
  background:var(--chrome-bg);
  border-bottom:1px solid var(--border);
  position:sticky;
  top:0;
  z-index:20;
  box-shadow:0 1px 0 rgba(17,24,39,0.04);
}
.topbar-inner{display:flex;align-items:center;gap:18px;padding:16px 0}
.brand{display:inline-flex;align-items:center;justify-content:center;color:var(--text);text-decoration:none}
.brand-logo{width:44px;height:44px}
.brand-logo{color:var(--primary)}
.nav{display:flex;gap:10px;flex:1;flex-wrap:wrap}
.nav a{color:var(--muted);text-decoration:none;font-weight:600;padding:8px 12px;border-radius:999px;transition:all 0.2s ease}
.nav a:hover{background:rgba(184,74,43,0.12);color:var(--primary)}
.actions{display:flex;gap:10px;align-items:center}
.top-action-link{
  color:var(--muted);
  text-decoration:none;
  font-weight:600;
  padding:8px 4px;
  border-radius:999px;
  transition:all 0.2s ease;
}
.top-action-link:hover{background:rgba(184,74,43,0.12);color:var(--primary)}
.mobile-actions{display:none;align-items:center;gap:8px;margin-left:auto}
.admin-mobile-shortcuts{display:flex;align-items:center;gap:8px}
.sr-only{
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0, 0, 0, 0);
  white-space:nowrap;
  border:0;
}
.theme-toggle{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:38px;
  height:38px;
  padding:0;
  border-radius:999px;
  border:1px solid rgba(184,74,43,0.16);
  background:linear-gradient(180deg, rgba(255,250,244,0.94) 0%, rgba(251,242,232,0.94) 100%);
  color:var(--text);
  font:inherit;
  cursor:pointer;
  box-shadow:0 6px 14px rgba(40,28,24,0.07), inset 0 1px 0 rgba(255,255,255,0.55);
  transition:all 0.2s ease;
  position:relative;
  flex-shrink:0;
}
.theme-toggle:hover{
  transform:translateY(-1px);
  border-color:rgba(184,74,43,0.30);
  background:linear-gradient(180deg, rgba(255,248,239,0.98) 0%, rgba(250,238,225,0.98) 100%);
}
.theme-toggle[data-theme-override="true"]{
  border-color:rgba(184,74,43,0.34);
  box-shadow:0 8px 18px rgba(184,74,43,0.14), inset 0 1px 0 rgba(255,255,255,0.55);
}
.theme-toggle__icon{
  position:relative;
  width:16px;
  height:16px;
  border-radius:999px;
  background:linear-gradient(135deg, #ffd479 0%, #f59d2a 100%);
  box-shadow:inset 0 0 0 1px rgba(0,0,0,0.06);
  flex:0 0 auto;
}
.theme-toggle__icon::before,
.theme-toggle__icon::after{
  content:"";
  position:absolute;
  inset:0;
  border-radius:inherit;
}
.theme-toggle[data-theme-state="dark"] .theme-toggle__icon{
  background:linear-gradient(135deg, #f3d7ab 0%, #dfa26d 100%);
}
.theme-toggle[data-theme-state="dark"] .theme-toggle__icon::before{
  inset:2px 0 2px 6px;
  background:rgba(73,52,43,0.92);
}
.theme-toggle[data-theme-state="dark"] .theme-toggle__icon::after{
  inset:auto auto 2px 2px;
  width:4px;
  height:4px;
  background:rgba(255,248,240,0.82);
  box-shadow:8px -5px 0 rgba(255,248,240,0.62), 10px 3px 0 rgba(255,248,240,0.48);
}
.mobile-toggle{display:none;background:#fff;border:1px solid var(--border);border-radius:12px;padding:8px;gap:4px;flex-direction:column;justify-content:center;align-items:center;cursor:pointer;flex-shrink:0;margin-left:8px}
.mobile-toggle span{display:block;width:20px;height:2px;background:var(--text);border-radius:2px}
.mobile-nav{display:none}
.mobile-nav[hidden]{display:none}
.mobile-nav__inner{display:flex;flex-direction:column;gap:10px}
.mobile-nav__inner a{color:var(--text);text-decoration:none;font-weight:600;padding:10px 12px;border-radius:12px;background:#fff;border:1px solid var(--border)}
.mobile-nav__actions{display:flex;gap:10px;flex-wrap:wrap}

.btn{border:none;border-radius:999px;padding:10px 18px;font-weight:700;cursor:pointer;font-size:1rem;transition:all 0.2s ease; text-decoration: none; display: inline-block;}
.btn.primary{
  background:var(--btn-gradient);
  color:#fff;
  box-shadow:0 12px 24px rgba(184,74,43,0.22);
}
.btn.primary:hover{
  background:linear-gradient(135deg, rgb(170, 66, 38) 0%, rgb(205, 96, 58) 100%);
  transform:translateY(-1px);
}
.btn.outline{background:rgba(255,252,249,0.48);border:1px solid rgba(184,74,43,0.18);color:var(--text)}
.btn.ghost{background:rgba(255,252,249,0.30);border:1px solid rgba(184,74,43,0.14);color:var(--primary)}
.btn.danger{background:var(--danger);color:#fff;box-shadow:0 10px 20px rgba(197,57,63,0.20)}
.btn.danger:hover{background:#b22f34;transform:translateY(-1px)}
.btn.small{padding:6px 12px;font-size:0.95rem}
.btn-soft-outline{
  background:rgba(255,250,245,0.54);
  border:1px solid rgba(184,74,43,0.18);
  color:var(--text);
  box-shadow:0 8px 18px rgba(40,28,24,0.08);
}
.btn-soft-outline:hover{
  border-color:rgba(184,74,43,0.32);
  background:rgba(255,248,241,0.82);
  transform:translateY(-1px);
}

.page-header{padding:40px 0 24px;animation:fadeInUp 0.6s ease both;width:100%}
.page-title-row{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.page-title{font-size:2.3rem;font-weight:700;margin-bottom:8px;font-family:var(--font-display)}
.page-subtitle{color:var(--muted);font-size:1rem}

.home-shell{
  display:grid;
  gap:24px;
  padding:34px 0 46px;
}

.home-hero{
  position:relative;
  display:grid;
  grid-template-columns:minmax(0, 1.5fr) minmax(320px, 0.95fr);
  gap:22px;
  align-items:stretch;
}

.home-hero::before{
  content:"";
  position:absolute;
  inset:-14px -10px auto auto;
  width:240px;
  height:240px;
  border-radius:50%;
  background:radial-gradient(circle, rgba(184,74,43,0.20) 0%, rgba(184,74,43,0.05) 45%, transparent 72%);
  pointer-events:none;
  filter:blur(10px);
}

.home-hero__copy,
.home-pulse{
  position:relative;
  background:linear-gradient(180deg, rgba(251,246,240,0.98) 0%, rgba(243,235,226,0.98) 100%);
  border:1px solid rgba(184,74,43,0.10);
  border-radius:28px;
  box-shadow:0 24px 60px rgba(40,28,24,0.12);
}

.home-hero__copy{
  padding:34px 34px 28px;
  overflow:hidden;
}

.home-hero__copy::after{
  content:"";
  position:absolute;
  right:-40px;
  bottom:-60px;
  width:220px;
  height:220px;
  border-radius:44px;
  background:linear-gradient(135deg, rgba(225,138,57,0.16), rgba(184,74,43,0.04));
  transform:rotate(22deg);
  pointer-events:none;
}

.home-hero__eyebrow,
.home-card__eyebrow,
.home-pulse__eyebrow{
  display:inline-flex;
  align-items:center;
  padding:8px 12px;
  border-radius:12px;
  background:rgba(184,74,43,0.07);
  border:1px solid rgba(184,74,43,0.10);
  color:var(--primary);
  font-weight:700;
  font-size:0.88rem;
}

.home-hero__title{
  margin:18px 0 14px;
  max-width:11ch;
  font-family:var(--font-display);
  font-size:clamp(2.6rem, 4vw, 4.5rem);
  line-height:0.96;
  letter-spacing:-0.03em;
}

.home-hero__text{
  max-width:62ch;
  color:#5f544e;
  font-size:1.03rem;
  line-height:1.6;
}

.home-hero__actions{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  margin-top:24px;
}

.home-hero__metrics{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:12px;
  margin-top:28px;
}

.home-metric{
  position:relative;
  z-index:1;
  padding:16px 18px;
  border-radius:18px;
  background:rgba(255,252,249,0.48);
  border:1px solid rgba(184,74,43,0.08);
  backdrop-filter:blur(10px);
}

.home-metric__label{
  display:block;
  color:#736760;
  font-size:0.88rem;
  margin-bottom:8px;
}

.home-metric__value{
  display:block;
  font-size:1.2rem;
  line-height:1.2;
}

.home-pulse{
  padding:24px;
  display:flex;
  flex-direction:column;
  gap:16px;
  overflow:hidden;
}

.home-pulse::after{
  content:"";
  position:absolute;
  right:-34px;
  top:-18px;
  width:160px;
  height:160px;
  border-radius:36px;
  transform:rotate(26deg);
  background:linear-gradient(160deg, rgba(182,103,78,0.14), rgba(255,255,255,0));
}

.home-pulse__head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
}

.home-pulse__state{
  display:inline-flex;
  align-items:center;
  padding:8px 12px;
  border-radius:12px;
  background:rgba(184,74,43,0.08);
  border:1px solid rgba(184,74,43,0.12);
  color:var(--primary);
  font-weight:700;
  font-size:0.85rem;
  text-align:right;
}

.home-pulse__title{
  font-family:var(--font-display);
  font-size:1.9rem;
  line-height:1.02;
}

.home-pulse__subtitle{
  color:#695d57;
  line-height:1.6;
}

.home-pulse__dishes{
  display:grid;
  gap:12px;
}

.home-dish{
  position:relative;
  z-index:1;
  padding:15px 16px;
  border-radius:18px;
  background:rgba(255,251,247,0.56);
  border:1px solid rgba(184,74,43,0.08);
}

.home-dish__label{
  color:#736761;
  font-size:0.82rem;
  margin-bottom:6px;
}

.home-dish__name{
  font-weight:700;
  line-height:1.35;
}

.home-dish__meta{
  margin-top:6px;
  color:var(--primary);
  font-size:0.86rem;
}

.home-empty{
  padding:16px 18px;
  border-radius:18px;
  background:rgba(255,250,245,0.44);
  border:1px dashed rgba(184,74,43,0.16);
  color:var(--muted);
}

.home-empty__title{
  font-weight:700;
  margin-bottom:6px;
  color:var(--text);
}

.home-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:22px;
}

.home-card{
  padding:24px;
  border-radius:24px;
  background:linear-gradient(180deg, rgba(250,245,239,0.98) 0%, rgba(242,235,226,0.98) 100%);
  border:1px solid rgba(184,74,43,0.10);
}

.home-card__top{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:14px;
  margin-bottom:18px;
}

.home-card__title{
  margin-top:12px;
  font-family:var(--font-display);
  font-size:1.8rem;
  line-height:1.02;
}

.home-status-list{
  display:grid;
  gap:12px;
}

.home-status-row{
  display:grid;
  grid-template-columns:160px minmax(0, 1fr);
  gap:16px;
  align-items:flex-start;
  padding:14px 0;
  border-bottom:1px solid rgba(184,74,43,0.08);
}

.home-status-row:last-child{
  border-bottom:none;
}

.home-status-row__label{
  color:#786b65;
  font-size:0.92rem;
}

.home-status-row__value{
  font-weight:700;
  line-height:1.45;
}

.home-card__footer{
  margin-top:10px;
}

.home-action-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:12px;
}

.home-action-tile{
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  min-height:124px;
  padding:18px;
  border-radius:20px;
  text-decoration:none;
  color:var(--text);
  background:
    linear-gradient(180deg, rgba(252,246,241,0.98) 0%, rgba(244,236,227,0.98) 100%);
  border:1px solid rgba(184,74,43,0.14);
  box-shadow:0 12px 28px rgba(40, 28, 24, 0.08);
  transition:transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.home-action-tile:hover{
  transform:translateY(-2px);
  box-shadow:0 18px 34px rgba(40, 28, 24, 0.12);
  border-color:rgba(184,74,43,0.26);
}

.home-action-tile__label{
  color:var(--primary);
  font-size:0.88rem;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:0.04em;
}

.home-action-tile strong{
  font-size:1.14rem;
  line-height:1.25;
}

.home-action-tile__meta{
  margin-top:10px;
  color:#625752;
  font-size:0.92rem;
  line-height:1.45;
}

.home-announcements{
  padding:24px;
  border-radius:24px;
}

.home-announcements__list{
  display:grid;
  gap:12px;
}

.home-announcement{
  padding:16px 18px;
  border-radius:14px;
  background:rgba(184,74,43,0.035);
  border:1px solid rgba(184,74,43,0.08);
  border-left:4px solid rgba(184,74,43,0.42);
  line-height:1.6;
}

.grid{display:grid;gap:18px}
.grid-2{grid-template-columns:repeat(2,1fr)}
.grid-3{grid-template-columns:repeat(3,1fr)}

.card{
  background:var(--card);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  border:1px solid var(--border);
  padding:22px;
  animation:fadeInUp 0.5s ease both;
  width:100%;
}
.card-title{font-weight:700;margin-bottom:12px;font-size:1.1rem}
.qty-control{display:inline-flex;align-items:center;gap:6px}
.order-table{table-layout:fixed}
.week-day .order-table th,.week-day .order-table td{padding:10px 6px}
.week-day .order-table th:nth-child(1), .week-day .order-table td:nth-child(1){width:32%}
.week-day .order-table th:nth-child(2), .week-day .order-table td:nth-child(2){width:14%}
.week-day .order-table th:nth-child(3), .week-day .order-table td:nth-child(3){width:8%}
.week-day .order-table th:nth-child(4), .week-day .order-table td:nth-child(4){width:22%}
.week-day .order-table th:nth-child(5), .week-day .order-table td:nth-child(5){width:24%}
.week-day .order-table th:nth-child(3), .week-day .order-table td:nth-child(3){text-align:right}
.week-day .order-table th:nth-child(4), .week-day .order-table td:nth-child(4){text-align:right}
.week-day .order-table th:nth-child(5), .week-day .order-table td:nth-child(5){text-align:right}
.week-day .order-table .qty-control{width:100%;justify-content:flex-end;gap:8px}
.week-day .order-table .qty-btn{width:36px;height:36px;border-radius:8px}
.week-day .order-table .qty-input{width:58px;padding:6px 6px;font-size:0.95rem}
.day-total{margin-top:10px;text-align:right;font-weight:700;color:#3b322a}
.week-summary{margin:8px 0 16px;text-align:right;font-weight:700;font-size:1.05rem}
.qty-btn{width:30px;height:30px;border-radius:10px;border:1px solid var(--border);background:#fff;font-weight:800;cursor:pointer;font-size:1rem;line-height:1;transition:all 0.2s ease}
.qty-btn:hover{border-color:var(--primary);color:var(--primary)}
.qty-input{width:64px;padding:6px 8px;border:1px solid var(--border);border-radius:10px;text-align:center;font-size:0.95rem}

.form{display:grid;gap:14px}
.field{display:flex;flex-direction:column;gap:6px}
.field label{font-weight:600}
.field .req{color:var(--danger);font-weight:800;margin-left:4px}
.field input,.field select,.field textarea{
  padding:10px 12px;border:1px solid var(--border);border-radius:12px;font-size:0.95rem;background:#fff
}
.field input:focus,.field select:focus,.field textarea:focus{outline:2px solid rgba(184,74,43,0.2);border-color:var(--primary)}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button{
  -webkit-appearance:none;
  margin:0;
}
input[type="number"]{
  appearance:textfield;
  -moz-appearance:textfield;
}

.class-row{display:grid;grid-template-columns:80px 1fr;gap:10px}

.profile-name{font-size:1.5rem;font-weight:700;margin-bottom:8px;font-family:var(--font-display)}

.table{width:100%;border-collapse:collapse}
.table-wrap,
.menu-table-scroll,
.table-wrap--wide,
.admin-table-scroll{
  border-radius:16px;
  overflow:hidden;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
}

.table-wrap{
  background:var(--card);
  border:1px solid rgba(219,206,192,0.9);
}
.table-input{width:100%;min-width:90px}
.table th,.table td{padding:12px 10px;border-bottom:1px solid var(--border);text-align:left}
.table td{white-space:normal;word-break:normal;overflow-wrap:break-word}
.table th{background:#f6f1e8;font-size:0.9rem;color:var(--muted)}
.table-right{table-layout:fixed}
.table-right th,.table-right td{text-align:right}
.table-right th:first-child,.table-right td:first-child{text-align:left}
.table-right td{overflow:hidden;text-overflow:ellipsis}

.badge{display:inline-block;padding:4px 10px;border-radius:999px;font-size:0.85rem;font-weight:700;text-decoration:none;border:1px solid var(--border)}
.badge.ok{background:#e6f4f1;color:#0f5a4f}
.badge.info{background:#e9f1ff;color:#1e4fa6;border-color:#c7d8fb}
.badge.muted{background:#f1f3f5;color:#5b6470;border-color:#d8dde3}
.badge.warn{background:#fff1db;color:#9b5d00}
.badge.fail{background:#fde7e7;color:#b42318}

.admin-status{display:inline-flex;align-items:center;gap:6px}
.admin-panel-link{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:8px 14px;
  border-radius:999px;
  border:1px solid rgba(184,74,43,0.18);
  background:linear-gradient(180deg, rgba(255,247,239,0.98) 0%, rgba(255,240,229,0.98) 100%);
  color:var(--primary-600);
  text-decoration:none;
  font-weight:700;
  box-shadow:0 8px 18px rgba(184,74,43,0.12);
  transition:all 0.2s ease;
}
.admin-panel-link:hover{transform:translateY(-1px);box-shadow:0 12px 24px rgba(184,74,43,0.18);background:linear-gradient(180deg, #fffaf4 0%, #fff1e5 100%)}
.admin-panel-link__label{line-height:1.1}
.admin-panel-link--mobile{padding:6px 12px;font-size:0.92rem}

.admin-dashboard-tabs{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  margin:20px 0 24px;
  align-items:center;
}

.admin-dashboard-tab{
  position:relative;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  min-height:46px;
  padding:11px 18px;
  border-radius:16px;
  border:1px solid rgba(184,74,43,0.16);
  background:linear-gradient(180deg, rgba(255,251,247,0.96) 0%, rgba(255,242,232,0.96) 100%);
  color:#7c4129;
  text-decoration:none;
  font-weight:700;
  line-height:1.1;
  letter-spacing:0.01em;
  box-shadow:0 10px 24px rgba(184,74,43,0.10);
  transition:transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.admin-dashboard-tab:hover{
  transform:translateY(-2px);
  background:linear-gradient(180deg, #fffdf9 0%, #ffeede 100%);
  box-shadow:0 14px 28px rgba(184,74,43,0.16);
  border-color:rgba(184,74,43,0.24);
  color:#6d3822;
}

.admin-dashboard-tab:focus-visible{
  outline:none;
  box-shadow:0 0 0 4px rgba(184,74,43,0.16), 0 12px 26px rgba(184,74,43,0.18);
}

.admin-dashboard-tab.is-active{
  background:linear-gradient(135deg, #b84a2b 0%, #d96a43 100%);
  border-color:rgba(184,74,43,0.36);
  color:#fff;
  box-shadow:0 16px 34px rgba(184,74,43,0.24);
}

.admin-dashboard-tab__badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:28px;
  height:28px;
  padding:0 8px;
  border-radius:999px;
  background:#fff;
  color:#b84a2b;
  font-size:0.8rem;
  font-weight:800;
  line-height:1;
  box-shadow:0 8px 18px rgba(123,58,36,0.14);
}

.admin-dashboard-tab.is-active .admin-dashboard-tab__badge{
  background:rgba(255,255,255,0.18);
  color:#fff;
  box-shadow:none;
  border:1px solid rgba(255,255,255,0.18);
}

.admin-dashboard-panel{
  display:grid;
  gap:20px;
}

.admin-dashboard-section-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
}

.admin-dashboard-section-text{
  margin:8px 0 0;
  color:var(--muted);
  line-height:1.6;
  max-width:760px;
}

.admin-dashboard-section-meta{
  display:inline-flex;
  align-items:center;
  padding:8px 13px;
  border-radius:999px;
  border:1px solid rgba(184,74,43,0.16);
  background:rgba(255,248,241,0.78);
  color:#7c4129;
  font-weight:700;
  white-space:nowrap;
}

.admin-dashboard-summary-grid{
  gap:16px;
}

.admin-dashboard-summary-card{
  display:grid;
  gap:8px;
  align-content:start;
}

.admin-dashboard-summary-card p{
  margin:0;
}

.admin-dashboard-note{
  padding:18px 20px;
  border-radius:16px;
  border:1px solid rgba(219,206,192,0.9);
  background:rgba(255,250,245,0.62);
}

.admin-dashboard-section-tools{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.admin-dashboard-stack{
  display:grid;
  gap:20px;
}

.admin-dashboard-kpi-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(220px, 1fr));
  gap:16px;
}

.admin-dashboard-kpi-card{
  display:grid;
  gap:8px;
  padding:18px 20px;
  border-radius:16px;
  border:1px solid rgba(219,206,192,0.9);
  background:rgba(255,251,247,0.72);
  box-shadow:0 10px 24px rgba(137,92,55,0.05);
}

.admin-dashboard-kpi-label{
  color:var(--muted);
  font-size:0.92rem;
  font-weight:700;
  letter-spacing:0.01em;
}

.admin-dashboard-kpi-value{
  color:var(--text);
  font-size:1.95rem;
  font-weight:800;
  line-height:1;
}

.admin-dashboard-kpi-note{
  color:var(--muted);
  line-height:1.55;
  font-size:0.94rem;
}

.admin-payments-switch{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(260px, 1fr));
  gap:14px;
}

.admin-payments-switch__item{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  padding:14px 16px;
  border-radius:16px;
  border:1px dashed rgba(184,74,43,0.22);
  background:rgba(255,252,248,0.48);
  color:inherit;
  text-decoration:none;
  transition:border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.admin-payments-switch__item:hover{
  border-color:rgba(184,74,43,0.36);
  background:rgba(255,248,241,0.98);
  transform:translateY(-1px);
}

.admin-payments-switch__item > span:first-child{
  min-width:0;
}

.admin-payments-switch__item strong{
  display:block;
  margin-bottom:4px;
  color:var(--text);
}

.admin-payments-switch__item > span:first-child > span:last-child{
  color:var(--muted);
  line-height:1.55;
}

.admin-dashboard-subsection{
  display:grid;
  gap:14px;
  padding:0;
  border-radius:20px;
  border:1px solid rgba(219,206,192,0.9);
  background:rgba(255,252,249,0.64);
  box-shadow:0 12px 28px rgba(137,92,55,0.05);
}

.admin-dashboard-subsection__header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  padding:22px 22px 0;
}

.admin-dashboard-subsection__text{
  margin:8px 0 0;
  color:var(--muted);
  line-height:1.6;
  max-width:720px;
}

.admin-dashboard-subsection .admin-table-scroll{
  margin:0 22px 22px;
  border-radius:16px;
}

.admin-dashboard-empty{
  margin:0 22px 22px;
  padding:18px 20px;
  border-radius:16px;
  border:1px dashed rgba(184,74,43,0.22);
  background:rgba(255,250,245,0.76);
  color:var(--muted);
}

.admin-search-shell{
  display:grid;
  gap:18px;
}

.admin-search-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
}

.admin-search-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.admin-search-form{
  display:grid;
  grid-template-columns:minmax(0, 1fr) auto;
  gap:14px;
  align-items:end;
  padding:18px;
  border:1px solid rgba(219,206,192,0.9);
  border-radius:18px;
  background:rgba(255,251,247,0.72);
}

.admin-search-form--orders{
  grid-template-columns:repeat(2, minmax(0, 1fr)) auto;
}

.admin-search-form__actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.admin-search-summary{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  color:var(--muted);
}

.admin-search-error{
  padding:14px 16px;
  border-radius:14px;
  border:1px solid rgba(183, 28, 28, 0.18);
  background:rgba(183, 28, 28, 0.08);
  color:#9f1d1d;
}

@media (max-width: 720px){
  .home-shell{
    gap:18px;
    padding:20px 0 34px;
  }

  .home-hero{
    grid-template-columns:1fr;
  }

  .home-hero__copy,
  .home-pulse,
  .home-card,
  .home-announcements{
    padding:20px;
    border-radius:22px;
  }

  .home-hero__title{
    max-width:none;
    font-size:2.35rem;
  }

  .home-hero__metrics,
  .home-grid,
  .home-action-grid{
    grid-template-columns:1fr;
  }

  .home-status-row{
    grid-template-columns:1fr;
    gap:6px;
  }

  .admin-dashboard-tabs{
    gap:10px;
  }

  .admin-dashboard-tab{
    flex:1 1 calc(50% - 10px);
    padding:10px 14px;
  }

  .admin-dashboard-section-header,
  .admin-dashboard-subsection__header{
    flex-direction:column;
  }

  .admin-dashboard-section-tools,
  .admin-search-actions,
  .admin-search-form__actions{
    width:100%;
  }

  .admin-dashboard-section-meta{
    white-space:normal;
  }

  .admin-dashboard-kpi-grid,
  .admin-payments-switch{
    grid-template-columns:1fr;
  }

  .admin-search-form,
  .admin-search-form--orders{
    grid-template-columns:1fr;
  }

  .admin-order-review__panel-head,
  .admin-order-review__fact{
    flex-direction:column;
  }

  .admin-order-review__fact strong{
    text-align:left;
  }

  .admin-order-review__receipt-stage,
  .admin-order-review__receipt-stage img,
  .admin-order-review__receipt-stage iframe{
    min-height:320px;
  }

  .admin-order-review__receipt-actions{
    display:grid;
    grid-template-columns:1fr;
  }

  .admin-dashboard-subsection__header{
    padding:18px 18px 0;
  }

  .admin-dashboard-subsection .admin-table-scroll,
  .admin-dashboard-empty{
    margin-left:18px;
    margin-right:18px;
    margin-bottom:18px;
  }
}

@media (max-width: 520px){
  .admin-dashboard-tab{
    flex-basis:100%;
    justify-content:space-between;
  }
}

.notify-dot{
  background:#c5393f;
  color:#fff;
  border-radius:999px;
  font-size:0.75rem;
  font-weight:800;
  padding:2px 0px;
  min-width:18px;
  text-align:center;
  line-height:1.1;
  box-shadow:0 6px 14px rgba(197,57,63,0.24);
}
.notify-dot[hidden]{display:none;visibility:hidden}
.notify-dot--inline{position:static;padding:3px 8px;min-width:24px}

.notice{padding:12px 16px;border-radius:14px;background:#fff4e9;border:1px solid #f0d6be;margin-bottom:16px;color:#7b4b15}
.notice.error{background:#fdeaea;border-color:#f7c9cc;color:#9e1f25}

.module-panel{display:grid;gap:16px;background:linear-gradient(180deg,#fffaf4,#fff);border:1px solid var(--border);border-radius:18px;padding:18px;box-shadow:var(--shadow);margin-bottom:24px}
.module-panel__header{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;flex-wrap:wrap}
.module-panel__title{font-weight:800;font-size:1.05rem;color:var(--text)}
.module-panel__subtitle{color:var(--muted);font-size:0.95rem}
.module-panel__status{padding:10px 14px;border-radius:999px;font-weight:700;font-size:0.92rem;border:1px solid var(--border);background:#f6efe6;color:#6a4a30}
.module-panel__status--ok{background:#e9f8ef;color:#256b42;border-color:#bfe3cc}
.module-panel__status--upcoming{background:#fff3e6;color:#9a5423;border-color:#f0d0af}
.module-panel__status--archived{background:#f6efe6;color:#6a4a30;border-color:#e5d2be}
.weekday-tabs{display:flex;flex-wrap:wrap;gap:10px}
.weekday-tab{display:inline-flex;align-items:center;justify-content:center;padding:11px 16px;border-radius:999px;border:1px solid var(--border);background:#fff;color:var(--text);text-decoration:none;font-weight:700;transition:all .2s ease;box-shadow:0 6px 18px rgba(0,0,0,.04)}
.weekday-tab:hover{border-color:rgba(184,74,43,0.32);transform:translateY(-1px)}
.weekday-tab--active{background:linear-gradient(135deg,var(--primary-600),var(--primary));color:#fff;border-color:transparent;box-shadow:0 12px 24px rgba(184,74,43,0.22)}

.section{margin:24px 0;width:100%}

.footer{
  padding:32px 0;
  color:var(--muted);
  margin-top:auto;
  background:var(--chrome-bg);
  border-top:1px solid rgba(184,74,43,0.10);
}
.footer-inner{display:grid;gap:16px;grid-template-columns:repeat(auto-fit, minmax(260px, 1fr));align-items:start}
.footer-title{font-weight:700;color:var(--text);margin-bottom:6px}
.footer-subtitle{color:var(--muted)}
.footer-list{list-style:none;padding-left:0;margin:0;display:grid;gap:6px;font-size:0.95rem}

:root[data-theme="dark"]{
  --bg:#201715;
  --bg-2:#32241f;
  --card:#4d3c35;
  --surface-top:#5d493f;
  --chrome-bg:#342722;
  --text:#f5e7db;
  --muted:#cfb8a8;
  --primary:#ca6944;
  --primary-600:#af4f2f;
  --accent:#e5ac6a;
  --danger:#e05359;
  --warning:#d29a50;
  --border:#866b5e;
  --btn-gradient:linear-gradient(135deg, #ca6944 0%, #e2a05d 100%);
  --spot-1:rgba(202, 105, 68, 0.18);
  --spot-2:rgba(229, 172, 106, 0.12);
  --shadow:0 24px 56px rgba(8,5,4,0.34);
  color-scheme:dark;
}

html[data-theme="dark"] body{
  background:
    radial-gradient(circle at 16% 8%, var(--spot-1), transparent 32%),
    radial-gradient(circle at 84% 12%, var(--spot-2), transparent 36%),
    linear-gradient(180deg, #271c19 0%, #342723 58%, #2d211d 100%);
}

html[data-theme="dark"] .topbar{
  background:linear-gradient(180deg, rgba(57,42,37,0.95) 0%, rgba(46,34,30,0.97) 100%);
  border-bottom:1px solid rgba(245,229,214,0.10);
  box-shadow:0 16px 40px rgba(8,5,4,0.22);
}

html[data-theme="dark"] .mobile-toggle,
html[data-theme="dark"] .mobile-nav,
html[data-theme="dark"] .mobile-nav__inner a,
html[data-theme="dark"] .qty-btn,
html[data-theme="dark"] .icon-btn,
html[data-theme="dark"] .weekday-tab,
html[data-theme="dark"] .menu-select,
html[data-theme="dark"] .menu-mobile-pill,
html[data-theme="dark"] .module-panel__status,
html[data-theme="dark"] .meal-toggle,
html[data-theme="dark"] .theme-toggle{
  background:linear-gradient(180deg, rgba(101,79,69,0.96) 0%, rgba(74,56,48,0.96) 100%);
  color:var(--text);
  border-color:rgba(234,205,179,0.16);
  box-shadow:0 10px 24px rgba(8,5,4,0.18), inset 0 1px 0 rgba(255,248,240,0.06);
}

html[data-theme="dark"] .theme-toggle:hover,
html[data-theme="dark"] .mobile-nav__inner a:hover,
html[data-theme="dark"] .qty-btn:hover,
html[data-theme="dark"] .icon-btn:hover,
html[data-theme="dark"] .weekday-tab:hover{
  border-color:rgba(240,163,71,0.34);
}

html[data-theme="dark"] .theme-toggle[data-theme-override="true"]{
  border-color:rgba(240,163,71,0.34);
  box-shadow:0 10px 24px rgba(8,5,4,0.24), inset 0 1px 0 rgba(255,248,240,0.08);
}

html[data-theme="dark"] .mobile-toggle span{
  background:var(--text);
}

html[data-theme="dark"] .nav a,
html[data-theme="dark"] .top-action-link{
  color:#eadfd6;
}

html[data-theme="dark"] .nav a:hover,
html[data-theme="dark"] .top-action-link:hover{
  background:rgba(240,163,71,0.14);
  color:#ffe1bf;
}

html[data-theme="dark"] .btn.outline,
html[data-theme="dark"] .btn.ghost,
html[data-theme="dark"] .btn-soft-outline{
  background:linear-gradient(180deg, rgba(98,77,68,0.90) 0%, rgba(70,54,47,0.90) 100%);
  color:#f4ebe6;
  border-color:rgba(234,205,179,0.16);
  box-shadow:0 10px 24px rgba(8,5,4,0.18);
}

html[data-theme="dark"] .btn.outline:hover,
html[data-theme="dark"] .btn.ghost:hover,
html[data-theme="dark"] .btn-soft-outline:hover{
  background:linear-gradient(180deg, rgba(113,89,78,0.96) 0%, rgba(82,63,54,0.96) 100%);
  border-color:rgba(240,163,71,0.30);
}

html[data-theme="dark"] .card,
html[data-theme="dark"] .hero,
html[data-theme="dark"] .hero__card,
html[data-theme="dark"] .menu-card,
html[data-theme="dark"] .module-panel,
html[data-theme="dark"] .menu-mobile-item,
html[data-theme="dark"] .menu-highlight,
html[data-theme="dark"] .home-hero__copy,
html[data-theme="dark"] .home-pulse,
html[data-theme="dark"] .home-card,
html[data-theme="dark"] .home-announcements{
  background:linear-gradient(180deg, rgba(97,77,68,0.98) 0%, rgba(74,58,50,0.98) 100%);
  border-color:rgba(245,226,208,0.14);
  box-shadow:0 24px 56px rgba(8,5,4,0.26);
}

html[data-theme="dark"] .week-day{
  background:linear-gradient(180deg, rgba(90,71,63,0.98) 0%, rgba(68,52,46,0.98) 100%);
  border-color:rgba(238,220,203,0.14);
  box-shadow:0 20px 48px rgba(8,5,4,0.24);
}

html[data-theme="dark"] .home-metric,
html[data-theme="dark"] .home-dish,
html[data-theme="dark"] .home-empty,
html[data-theme="dark"] .home-action-tile,
html[data-theme="dark"] .menu-mobile-pill,
html[data-theme="dark"] .order-table--interactive .order-table__item-row{
  background:linear-gradient(180deg, rgba(121,96,85,0.68) 0%, rgba(92,72,63,0.74) 100%);
  border-color:rgba(238,220,203,0.14);
  box-shadow:0 12px 28px rgba(8,5,4,0.18);
}

html[data-theme="dark"] .home-action-tile:hover{
  border-color:rgba(240,163,71,0.28);
  box-shadow:0 18px 38px rgba(10,7,6,0.22);
}

html[data-theme="dark"] .home-announcement{
  background:rgba(229,172,106,0.09);
  border-color:rgba(238,220,203,0.10);
  border-left-color:rgba(240,163,71,0.56);
}

html[data-theme="dark"] .home-hero::before{
  background:radial-gradient(circle, rgba(240,163,71,0.16) 0%, rgba(217,106,67,0.08) 42%, transparent 72%);
}

html[data-theme="dark"] .home-hero__copy::after,
html[data-theme="dark"] .home-pulse::after{
  background:linear-gradient(160deg, rgba(240,163,71,0.16), rgba(255,255,255,0));
}

html[data-theme="dark"] .home-hero__eyebrow,
html[data-theme="dark"] .home-card__eyebrow,
html[data-theme="dark"] .home-pulse__eyebrow,
html[data-theme="dark"] .home-pulse__state,
html[data-theme="dark"] .hero__badge,
html[data-theme="dark"] .menu-mobile-period__title{
  background:rgba(229,172,106,0.12);
  border-color:rgba(229,172,106,0.20);
  color:#ffe1be;
}

html[data-theme="dark"] .home-card__title,
html[data-theme="dark"] .home-metric__value,
html[data-theme="dark"] .home-status-row__value,
html[data-theme="dark"] .home-action-tile,
html[data-theme="dark"] .home-action-tile strong{
  color:var(--text);
}

html[data-theme="dark"] .home-metric__label,
html[data-theme="dark"] .home-hero__text,
html[data-theme="dark"] .home-pulse__subtitle,
html[data-theme="dark"] .home-action-tile__meta,
html[data-theme="dark"] .home-status-row__label,
html[data-theme="dark"] .home-dish__label,
html[data-theme="dark"] .menu-sub,
html[data-theme="dark"] .module-panel__subtitle,
html[data-theme="dark"] .reports-card__text,
html[data-theme="dark"] .footer-subtitle,
html[data-theme="dark"] .footer,
html[data-theme="dark"] .footer-list,
html[data-theme="dark"] .page-subtitle,
html[data-theme="dark"] .list-compact{
  color:var(--muted);
}

html[data-theme="dark"] .meal-section__title{
  color:#f7e9dd;
}

html[data-theme="dark"] .meal-section--accent .meal-section__title{
  background:linear-gradient(180deg, rgba(242,163,86,0.18) 0%, rgba(207,88,54,0.12) 100%);
  border:1px solid rgba(242,163,86,0.26);
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.04);
}

html[data-theme="dark"] .week-row{
  border-bottom-color:rgba(232,216,203,0.18);
}

html[data-theme="dark"] .week-row__label{
  color:#ebddd1;
  font-weight:700;
}

html[data-theme="dark"] .menu-card__count,
html[data-theme="dark"] .week-day__toggle,
html[data-theme="dark"] .module-panel__status{
  background:linear-gradient(180deg, rgba(100,78,67,0.92) 0%, rgba(74,57,49,0.94) 100%);
  border-color:rgba(232,201,175,0.18);
  color:#f8eadb;
}

html[data-theme="dark"] .module-panel__status--ok{
  background:linear-gradient(180deg, rgba(33,86,59,0.82) 0%, rgba(24,62,42,0.88) 100%);
  border-color:rgba(106,187,140,0.28);
  color:#e8fff1;
}

html[data-theme="dark"] .module-panel__status--upcoming{
  background:linear-gradient(180deg, rgba(114,67,33,0.82) 0%, rgba(80,47,24,0.88) 100%);
  border-color:rgba(224,156,99,0.24);
  color:#fff1e5;
}

html[data-theme="dark"] .module-panel__status--archived{
  background:linear-gradient(180deg, rgba(72,60,50,0.9) 0%, rgba(52,43,36,0.92) 100%);
  border-color:rgba(182,154,130,0.2);
  color:#f3e4d7;
}

html[data-theme="dark"] .week-day__summary:hover{
  background:rgba(255,255,255,0.035);
}

html[data-theme="dark"] .week-day__summary{
  background:rgba(255,255,255,0.02);
}

html[data-theme="dark"] .week-day__meta,
html[data-theme="dark"] .day-total,
html[data-theme="dark"] .week-summary{
  color:#e7d9cf;
}
html[data-theme="dark"] .calendar-overview-stat,
html[data-theme="dark"] .calendar-toggle{
  background:rgba(255,255,255,0.03);
  border-color:rgba(220,203,190,0.14);
}
html[data-theme="dark"] .calendar-overview-card__meta,
html[data-theme="dark"] .student-calendar-note__meta,
html[data-theme="dark"] .student-calendar-note__empty,
html[data-theme="dark"] .calendar-change-row__summary,
html[data-theme="dark"] .calendar-change-row__note{
  color:#e7d9cf;
}
html[data-theme="dark"] .order-table__period-label{
  background:rgba(255,104,62,0.10);
  color:#ffd7bf;
  border-top-color:rgba(220,203,190,0.14);
  border-bottom-color:rgba(220,203,190,0.14);
}
html[data-theme="dark"] .calendar-empty-state{
  background:rgba(255,255,255,0.03);
  border-color:rgba(220,203,190,0.14);
}
html[data-theme="dark"] .calendar-disclosure > summary{
  color:#ffd7bf;
}
html[data-theme="dark"] .calendar-disclosure > summary::after{
  background:rgba(184,74,43,0.18);
}
html[data-theme="dark"] .calendar-change-row{
  border-top-color:rgba(220,203,190,0.14);
}
html[data-theme="dark"] .calendar-exception-item{
  background:rgba(255,255,255,0.04);
  border-color:rgba(220,203,190,0.16);
}
html[data-theme="dark"] .calendar-exception-item__meta{
  color:#f0e2d6;
}
html[data-theme="dark"] .status-badge--success{
  background:rgba(33,86,59,0.82);
  border-color:rgba(106,187,140,0.28);
  color:#e8fff1;
}
html[data-theme="dark"] .status-badge--info{
  background:rgba(121,86,72,0.64);
  border-color:rgba(198,150,126,0.30);
  color:#fbe7d9;
}
html[data-theme="dark"] .status-badge--warning{
  background:rgba(114,67,33,0.82);
  border-color:rgba(224,156,99,0.24);
  color:#fff1e5;
}
html[data-theme="dark"] .flatpickr-day.flatpickr-day--closed{
  background:rgba(183,28,28,0.18);
  border-color:rgba(247,201,204,0.20);
  color:#ffd6d6;
}
html[data-theme="dark"] .flatpickr-day.flatpickr-day--transfer{
  background:rgba(121,86,72,0.30);
  border-color:rgba(198,150,126,0.24);
  color:#fbe7d9;
}
html[data-theme="dark"] .flatpickr-day.flatpickr-day--exception{
  background:rgba(33,86,59,0.22);
  border-color:rgba(106,187,140,0.22);
  color:#e8fff1;
}

html[data-theme="dark"] .table th,
html[data-theme="dark"] .menu-table th{
  background:rgba(116,93,82,0.42);
  color:var(--muted);
}

html[data-theme="dark"] .table-wrap,
html[data-theme="dark"] .menu-table-scroll,
html[data-theme="dark"] .table-wrap--wide,
html[data-theme="dark"] .admin-table-scroll{
  border:1px solid rgba(238,220,203,0.14);
  border-radius:16px;
  background:rgba(66,50,44,0.88);
}

html[data-theme="dark"] .table th,
html[data-theme="dark"] .table td,
html[data-theme="dark"] .menu-table th,
html[data-theme="dark"] .menu-table td,
html[data-theme="dark"] .order-table--interactive .order-table__item-row td + td{
  border-bottom-color:rgba(183,167,159,0.10);
  border-top-color:rgba(183,167,159,0.10);
}

html[data-theme="dark"] .field input,
html[data-theme="dark"] .field select,
html[data-theme="dark"] .field textarea,
html[data-theme="dark"] .qty-input,
html[data-theme="dark"] .table-input{
  background:rgba(255,248,241,0.07);
  color:var(--text);
  border-color:rgba(214,190,170,0.18);
}

html[data-theme="dark"] .field input::placeholder,
html[data-theme="dark"] .field textarea::placeholder,
html[data-theme="dark"] .qty-input::placeholder,
html[data-theme="dark"] .table-input::placeholder{
  color:#baa79a;
}

html[data-theme="dark"] .menu-select,
html[data-theme="dark"] .menu-select option{
  color:#eadfd6;
}

html[data-theme="dark"] .field input:focus,
html[data-theme="dark"] .field select:focus,
html[data-theme="dark"] .field textarea:focus{
  outline:2px solid rgba(240,163,71,0.18);
  border-color:var(--accent);
}

html[data-theme="dark"] .auth-card{
  background:
    radial-gradient(circle at top right, rgba(240,163,71,0.14), transparent 36%),
    linear-gradient(180deg, rgba(56,43,37,0.98) 0%, rgba(43,33,29,0.98) 100%);
  border-color:rgba(240,163,71,0.16);
  box-shadow:0 28px 64px rgba(8,6,5,0.34);
}

html[data-theme="dark"] .auth-card__glow{
  background:linear-gradient(135deg, rgba(240,163,71,0.16), rgba(207,88,54,0.04));
}

html[data-theme="dark"] .auth-card__eyebrow,
html[data-theme="dark"] .auth-stage-panel{
  background:rgba(255,255,255,0.045);
  border-color:rgba(240,163,71,0.14);
}

html[data-theme="dark"] .auth-service-note{
  border-top-color:rgba(240,163,71,0.12);
}

html[data-theme="dark"] .auth-verify-status{
  background:rgba(76,132,94,0.14);
  border-color:rgba(111,176,129,0.18);
}

html[data-theme="dark"] .auth-verify-status__badge{
  background:rgba(111,176,129,0.18);
  color:#d6f0dd;
}

html[data-theme="dark"] .auth-inline-status{
  background:rgba(255,248,241,0.05);
  border-color:rgba(240,163,71,0.14);
}

html[data-theme="dark"] .auth-inline-status.is-success{
  background:rgba(76,132,94,0.14);
  border-color:rgba(111,176,129,0.18);
}

html[data-theme="dark"] .auth-inline-status.is-error{
  background:rgba(156,77,66,0.16);
  border-color:rgba(215,119,101,0.22);
}

html[data-theme="dark"] .auth-inline-status.is-loading{
  background:rgba(240,163,71,0.12);
  border-color:rgba(240,163,71,0.18);
}

html[data-theme="dark"] .auth-password-panel{
  border-top-color:rgba(240,163,71,0.12);
}

html[data-theme="dark"] .auth-password-panel.is-collapsed{
  border-top-color:transparent;
}

html[data-theme="dark"] .auth-code-verify-panel{
  border-top-color:rgba(111,176,129,0.18);
}

html[data-theme="dark"] .auth-code-verify-panel.is-collapsed{
  border-top-color:transparent;
}

html[data-theme="dark"] .auth-verify-status__email{
  background:rgba(255,248,241,0.06);
  border-color:rgba(111,176,129,0.18);
  color:var(--text);
}

html[data-theme="dark"] .badge.ok{
  background:#233930;
  color:#c2ead2;
  border-color:#37604d;
}

html[data-theme="dark"] .badge.info{
  background:#4d3731;
  color:#f6ddd2;
  border-color:#7e5d52;
}

html[data-theme="dark"] .badge.muted{
  background:#43342f;
  color:#e7d6cc;
  border-color:#6b554b;
}

html[data-theme="dark"] .badge.warn{
  background:#443118;
  color:#ffd58d;
  border-color:#7b5827;
}

html[data-theme="dark"] .badge.fail{
  background:#4c2527;
  color:#ffc6ca;
  border-color:#874246;
}

html[data-theme="dark"] .notice{
  background:#453223;
  border-color:#7e5c3a;
  color:#ffe0b2;
}

html[data-theme="dark"] .notice.error{
  background:#47282e;
  border-color:#7b4450;
  color:#ffc9d0;
}

html[data-theme="dark"] .admin-panel-link{
  background:linear-gradient(180deg, rgba(97,76,67,0.96) 0%, rgba(71,55,48,0.96) 100%);
  border-color:rgba(234,205,179,0.18);
  color:#f4ebe6;
  box-shadow:0 10px 26px rgba(8,5,4,0.22);
}

html[data-theme="dark"] .admin-panel-link:hover{
  background:linear-gradient(180deg, rgba(110,86,76,0.98) 0%, rgba(82,63,55,0.98) 100%);
  border-color:rgba(240,163,71,0.26);
}

html[data-theme="dark"] .admin-dashboard-tab{
  background:linear-gradient(180deg, rgba(94,74,66,0.96) 0%, rgba(69,53,47,0.96) 100%);
  border-color:rgba(234,205,179,0.16);
  color:#f4ebe6;
  box-shadow:0 10px 24px rgba(8,5,4,0.22);
}

html[data-theme="dark"] .admin-dashboard-tab span{
  color:inherit;
}

html[data-theme="dark"] .admin-dashboard-tab:hover{
  background:linear-gradient(180deg, rgba(108,85,75,0.98) 0%, rgba(79,61,53,0.98) 100%);
  border-color:rgba(240,163,71,0.28);
}

html[data-theme="dark"] .admin-dashboard-tab:focus-visible{
  box-shadow:0 0 0 4px rgba(240,163,71,0.14), 0 12px 26px rgba(10,7,6,0.24);
}

html[data-theme="dark"] .admin-dashboard-tab.is-active{
  background:var(--btn-gradient);
  color:#fff;
}

html[data-theme="dark"] .admin-dashboard-tab__badge{
  background:rgba(255,255,255,0.10);
  color:#ffd8b0;
  border:1px solid rgba(255,255,255,0.10);
  box-shadow:none;
}

html[data-theme="dark"] .admin-dashboard-section-meta{
  background:rgba(255,248,241,0.06);
  border-color:rgba(240,163,71,0.16);
  color:#f3dfcf;
}

html[data-theme="dark"] .admin-dashboard-note,
html[data-theme="dark"] .admin-dashboard-kpi-card,
html[data-theme="dark"] .admin-dashboard-subsection{
  background:rgba(58,45,39,0.90);
  border-color:rgba(238,220,203,0.14);
  box-shadow:0 14px 32px rgba(8,5,4,0.18);
}

html[data-theme="dark"] .admin-dashboard-kpi-label,
html[data-theme="dark"] .admin-dashboard-kpi-note,
html[data-theme="dark"] .admin-dashboard-section-text,
html[data-theme="dark"] .admin-dashboard-subsection__text,
html[data-theme="dark"] .admin-dashboard-empty{
  color:#d9c9bf;
}

html[data-theme="dark"] .admin-payments-switch__item{
  background:rgba(255,248,241,0.04);
  border-color:rgba(229,172,106,0.16);
}

html[data-theme="dark"] .admin-payments-switch__item:hover{
  background:rgba(255,248,241,0.07);
  border-color:rgba(229,172,106,0.28);
}

html[data-theme="dark"] .admin-payments-switch__item strong{
  color:#f4ebe6;
}

html[data-theme="dark"] .admin-payments-switch__item > span:first-child > span:last-child{
  color:#d9c9bf;
}

html[data-theme="dark"] .admin-dashboard-empty{
  background:rgba(255,248,241,0.04);
  border-color:rgba(240,163,71,0.16);
}

html[data-theme="dark"] .admin-search-form{
  background:rgba(58,45,39,0.90);
  border-color:rgba(238,220,203,0.14);
}

html[data-theme="dark"] .admin-search-error{
  background:rgba(127, 29, 29, 0.18);
  border-color:rgba(248, 113, 113, 0.24);
  color:#fecaca;
}

html[data-theme="dark"] .admin-order-review__receipt-stage,
html[data-theme="dark"] .admin-order-review__fact,
html[data-theme="dark"] .admin-order-review__note,
html[data-theme="dark"] .admin-order-review__state,
html[data-theme="dark"] .admin-order-review__receipt-empty,
html[data-theme="dark"] .admin-order-review__receipt-fallback{
  background:rgba(255,255,255,0.035);
  border-color:rgba(220,203,190,0.14);
}

html[data-theme="dark"] .admin-order-review__panel-text,
html[data-theme="dark"] .admin-order-review__fact span,
html[data-theme="dark"] .admin-order-review__receipt-empty span,
html[data-theme="dark"] .admin-order-review__receipt-fallback span,
html[data-theme="dark"] .admin-order-review__note{
  color:#d9c9bf;
}

html[data-theme="dark"] .admin-order-review__receipt-stage{
  background:rgba(27,22,20,0.92);
}

html[data-theme="dark"] .admin-order-review__receipt-fallback strong,
html[data-theme="dark"] .admin-order-review__receipt-empty strong,
html[data-theme="dark"] .admin-order-review__fact strong{
  color:#f4ebe6;
}

html[data-theme="dark"] .admin-order-review__state--success{
  background:rgba(39,107,67,0.22);
  border-color:rgba(102,180,130,0.28);
  color:#caefd6;
}

html[data-theme="dark"] .admin-order-review__state--warn{
  background:rgba(130,63,46,0.24);
  border-color:rgba(220,128,102,0.30);
  color:#ffd7ca;
}

html[data-theme="dark"] .profile-security-text,
html[data-theme="dark"] .profile-security-hint{
  color:#cbb5a8;
}
html[data-theme="dark"] .profile-avatar{
  background:linear-gradient(145deg, rgba(48,36,30,0.92) 0%, rgba(62,44,36,0.92) 100%);
  border-color:rgba(225,138,57,0.22);
  color:#ffb995;
}
html[data-theme="dark"] .profile-balance-strip{
  background:rgba(255,252,249,0.04);
}
html[data-theme="dark"] .profile-password-toggle[open] .profile-password-toggle__trigger{
  background:rgba(255,248,241,0.08);
  border-color:rgba(225,138,57,0.34);
}
html[data-theme="dark"] .profile-checkbox{
  color:#f3efe9;
}
html[data-theme="dark"] .profile-record{
  background:rgba(255,248,241,0.05);
  border-color:rgba(214,190,170,0.16);
}
html[data-theme="dark"] .payment-method,
html[data-theme="dark"] .payment-proof-block,
html[data-theme="dark"] .payment-confirm,
html[data-theme="dark"] .receipt-preview{
  background:rgba(255,248,241,0.04);
}
html[data-theme="dark"] .form-inline-error{
  background:rgba(130,63,46,0.22);
  border-color:rgba(220,128,102,0.28);
  color:#ffd7ca;
}
html[data-theme="dark"] .receipt-preview__stage{
  background:rgba(35,25,22,0.68);
  border-color:rgba(214,190,170,0.14);
}
html[data-theme="dark"] .receipt-preview__stage img,
html[data-theme="dark"] .receipt-preview__stage iframe{
  background:rgba(29,21,18,0.82);
}

html[data-theme="dark"] .order-status--draft,
html[data-theme="dark"] .order-status--confirmed{
  background:rgba(126,88,25,0.28);
  color:#ffe3a3;
  border-color:rgba(239,188,91,0.34);
}

html[data-theme="dark"] .order-status--paid{
  background:rgba(38,88,144,0.30);
  color:#cfe4ff;
  border-color:rgba(105,158,223,0.34);
}

html[data-theme="dark"] .order-status--approved{
  background:rgba(39,107,67,0.28);
  color:#caefd6;
  border-color:rgba(102,180,130,0.34);
}

html[data-theme="dark"] .order-status--problem{
  background:rgba(130,63,46,0.30);
  color:#ffd7ca;
  border-color:rgba(220,128,102,0.34);
}

html[data-theme="dark"] .order-status--cancelled{
  background:rgba(83,91,103,0.30);
  color:#e1e6ed;
  border-color:rgba(141,153,168,0.34);
}

html[data-theme="dark"] .order-status--pending{
  background:rgba(126,88,25,0.28);
  color:#ffe3a3;
  border-color:rgba(239,188,91,0.34);
}

html[data-theme="dark"] .order-status--cancelled_with_refund{
  background:rgba(39,107,67,0.28);
  color:#caefd6;
  border-color:rgba(102,180,130,0.34);
}

html[data-theme="dark"] .order-status--cancelled_without_refund{
  background:rgba(130,63,46,0.30);
  color:#ffd7ca;
  border-color:rgba(220,128,102,0.34);
}

html[data-theme="dark"] .order-status--rejected{
  background:rgba(136,44,44,0.30);
  color:#ffd1d1;
  border-color:rgba(208,110,110,0.34);
}

.hero{
  display:grid;
  grid-template-columns:1.2fr 0.8fr;
  gap:24px;
  background:linear-gradient(120deg,#fff7ed 0%, #fdf2e2 100%);
  border:1px solid var(--border);
  border-radius:24px;
  padding:26px;
  box-shadow:var(--shadow);
  position:relative;
  overflow:hidden;
  margin-top:12px;
}

.hero__content h1{font-size:2.35rem;margin:10px 0 8px;font-family:var(--font-display)}
.hero__content p{color:var(--muted);font-size:1rem}
.hero__badge{display:inline-flex;align-items:center;gap:8px;background:#fff0dd;color:var(--primary);padding:6px 12px;border-radius:999px;font-weight:700}
.hero__actions{display:flex;gap:10px;margin-top:16px}
.hero__card{background:#ffffff;border:1px dashed #e6d8c4;border-radius:18px;padding:16px}
.hero__card-title{font-weight:700;margin-bottom:8px}
.hero__card ul{color:var(--muted);line-height:1.55;padding-left:16px}

.menu-grid{display:grid;gap:20px;width:100%}
.menu-period-heading{display:flex;align-items:center;gap:15px;margin:40px 0 20px}
.menu-period-heading__line{flex:1;height:1px;background:var(--border)}
.menu-period-heading__title{margin:0;color:var(--primary-600);font-family:var(--font-display);font-size:1.6rem;background:rgba(184,74,43,0.08);padding:8px 24px;border-radius:999px;text-align:center}
.menu-card{background:#fff;border-radius:18px;border:1px solid var(--border);box-shadow:var(--shadow);padding:18px}
.menu-card__header{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}
.menu-card__count{background:#efe3d2;color:#8b4b2f;padding:4px 10px;border-radius:999px;font-weight:700}
.menu-table-scroll{width:100%;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch}
.menu-table-scroll--desktop{display:block}
.menu-table--tablet-fluid{width:100%}
.menu-table{width:100%;border-collapse:collapse;table-layout:fixed}
.menu-table th,.menu-table td{padding:12px 10px;border-bottom:1px solid var(--border);text-align:left;vertical-align:top}
.menu-table td{white-space:normal;word-break:normal;overflow-wrap:break-word}
.menu-table th:last-child,.menu-table td:last-child{text-align:right}
.menu-table th:nth-child(1), .menu-table td:nth-child(1){width:24%}
.menu-table th:nth-child(2), .menu-table td:nth-child(2){width:40%}
.menu-table th:nth-child(3), .menu-table td:nth-child(3){width:10%}
.menu-table th:nth-child(4), .menu-table td:nth-child(4){width:10%}
.menu-table th:nth-child(5), .menu-table td:nth-child(5){width:16%}
.menu-table th{background:#fbf6ee;color:var(--muted);font-size:0.9rem;border-bottom:1px solid rgba(98,88,82,0.14)}
.menu-week-period-cell{
  padding:12px !important;
  background:rgba(184,74,43,0.04);
  color:var(--primary-600);
  font-size:0.95rem;
  font-weight:800;
  letter-spacing:0.05em;
  text-transform:uppercase;
  text-align:center !important;
  border-top:1px solid rgba(98,88,82,0.12);
  border-bottom:1px solid rgba(98,88,82,0.12);
}
.order-table__period-label{
  background:rgba(184,74,43,0.05);
  color:var(--primary-600);
  font-size:0.82rem;
  font-weight:800;
  letter-spacing:0.08em;
  text-transform:uppercase;
  text-align:left !important;
  padding:10px 14px !important;
  border-top:1px solid rgba(98,88,82,0.12);
  border-bottom:1px solid rgba(98,88,82,0.12);
}
.menu-title{font-weight:700;word-break:normal;overflow-wrap:break-word}
.menu-sub{color:var(--muted);font-size:0.85rem}
.menu-muted{color:var(--muted)}
.menu-mobile-list{display:none}
.menu-mobile-period{display:grid;gap:12px}
.menu-mobile-period__items{display:grid;gap:10px}
.menu-mobile-period__title{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:8px 14px;
  border-radius:999px;
  background:rgba(184,74,43,0.08);
  color:var(--primary-600);
  font-weight:800;
  letter-spacing:0.04em;
  text-transform:uppercase;
  font-size:0.82rem;
}
.menu-mobile-item{
  padding:14px;
  border:1px solid var(--border);
  border-radius:16px;
  background:linear-gradient(180deg, rgba(255,252,247,0.96) 0%, rgba(255,247,239,0.96) 100%);
  box-shadow:0 8px 22px rgba(30,28,24,0.06);
}
.menu-mobile-item__main{display:grid;gap:4px}
.menu-mobile-item__composition{margin-top:10px;color:var(--muted);font-size:0.92rem;line-height:1.45}
.menu-mobile-item__meta{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:12px}
.menu-mobile-pill{
  display:grid;
  gap:4px;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid var(--border);
  background:#fff;
}
.menu-mobile-pill__label{font-size:0.76rem;font-weight:700;letter-spacing:0.04em;text-transform:uppercase;color:var(--muted)}
.menu-mobile-pill--price{background:#fff7ef}

.reports-stack{display:grid;gap:24px}
.reports-card{display:grid;gap:16px}
.reports-card__text{color:var(--muted)}
.reports-form{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:16px;align-items:end}
.reports-form__field{min-width:0}
.reports-form__field--compact{max-width:220px}
.reports-form__action{justify-self:start;white-space:nowrap}
.reports-form--stats{grid-template-columns:minmax(180px,1fr) minmax(180px,1fr) minmax(180px,220px) auto;justify-content:start}

.menu-highlight{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;background:#fff;border:1px solid var(--border);border-radius:18px;padding:16px;box-shadow:var(--shadow)}
.menu-highlight h3{margin-bottom:6px}
.menu-highlight p{color:var(--muted)}
.feature-card{position:relative;padding-left:0}
.feature-card__icon{
  width:42px;
  height:42px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin-bottom:10px;
  border-radius:14px;
  background:linear-gradient(180deg, #fff3e8 0%, #fbe7d7 100%);
  border:1px solid rgba(184,74,43,0.14);
  font-size:20px;
  box-shadow:0 10px 18px rgba(184,74,43,0.1);
}
.hero__actions--compact{margin-top:0;gap:10px;justify-content:flex-end;flex-wrap:wrap}

.week-grid{display:grid;gap:16px;width:100%}
.week-day--collapsible{padding:0;overflow:hidden;border-radius:18px}
.week-day--collapsible[open]{padding:0}
.week-day__summary{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:16px;
  cursor:pointer;
  list-style:none;
  border-radius:18px;
  transition:background 0.2s ease, border-radius 0.2s ease;
}
.week-day__summary::-webkit-details-marker{display:none}
.week-day__summary:hover{background:rgba(184,74,43,0.05)}
.week-day--collapsible[open] .week-day__summary{
  border-radius:18px 18px 14px 14px;
}
.week-day__content{padding:0 16px 16px}
.week-day__toggle{position:relative;display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border:1px solid var(--border);border-radius:999px;background:#fffaf2;flex-shrink:0}
.week-day__toggle::before,.week-day__toggle::after{content:"";position:absolute;width:12px;height:2px;background:var(--primary);border-radius:999px;transition:transform 0.2s ease, opacity 0.2s ease}
.week-day__toggle::after{transform:rotate(90deg)}
.week-day--collapsible[open] .week-day__toggle::after{transform:rotate(180deg);opacity:0}
.week-day{background:#fff;border:1px solid var(--border);border-radius:18px;padding:16px;box-shadow:var(--shadow)}
.week-day__head{display:flex;align-items:flex-start;justify-content:space-between;margin-bottom:12px}
.week-day__header{font-weight:700;font-size:1.2rem}
.week-day__meta{display:flex;flex-direction:row;align-items:center;gap:6px;font-weight:700;color:#3b322a;white-space:nowrap}
.week-day__count{font-size:1.1rem}
.week-day__label{font-size:0.95rem;color:var(--muted)}
.week-row{display:grid;grid-template-columns:180px 1fr;gap:12px;align-items:center;padding:10px 0;border-bottom:1px dashed #e6d8c4}
.module-menu-toolbar{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin:4px 0 2px}
.week-row:last-child{border-bottom:none}
.week-row__label{font-weight:600;color:#3b322a}
.week-row__selects{display:grid;grid-template-columns:repeat(auto-fit, minmax(240px, 1fr));gap:10px}
.menu-select{padding:10px 12px;border:1px solid var(--border);border-radius:12px;background:#fffaf2;font-size:0.95rem}

.meal-toggle{display:inline-flex;gap:8px;background:#fff;border:1px solid var(--border);border-radius:999px;padding:8px;box-shadow:var(--shadow)}
.meal-toggle__btn,.meal-toggle__link{background:transparent;border:none;border-radius:999px;padding:8px 18px;font-weight:700;font-size:1rem;color:var(--muted);cursor:pointer;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;min-height:36px}
.meal-toggle__btn.is-active,.meal-toggle__link.is-active{background:var(--accent);color:#fff}
.meal-panel[hidden]{display:none}

.global-toggles{display:flex;flex-wrap:wrap;gap:12px;align-items:center}
.global-toggles .btn{
  padding:10px 16px;
  font-weight:800;
  border-width:1.5px;
  background:linear-gradient(180deg, rgba(255,251,247,0.98) 0%, rgba(255,244,235,0.98) 100%);
  box-shadow:0 8px 18px rgba(30,28,24,0.08);
}
.global-toggles .btn:hover{
  border-color:rgba(184,74,43,0.32);
  color:var(--primary-600);
  box-shadow:0 12px 24px rgba(184,74,43,0.14);
}

.table-wrap--wide .table{
  min-width:1120px;
}
.table-wrap--wide{
  width:100%;
  overflow-y:hidden;
}
.table-wrap--wide .table th,
.table-wrap--wide .table td{
  white-space:nowrap;
}

.menu-global-table th,
.menu-global-table td{
  padding:7px 5px;
}

.menu-global-table{
  position:relative;
  table-layout:auto;
}

.menu-global-table__col-name{
  width:22%;
  min-width:180px;
}

.menu-global-table__col-price,
.menu-global-table__col-weight,
.menu-global-table__col-calories{
  width:72px;
}

.menu-global-table__col-short{
  width:92px;
}

.menu-global-table__col-composition{
  min-width:280px;
  width:34%;
  white-space:normal !important;
  overflow-wrap:anywhere;
  word-break:break-word;
  line-height:1.4;
}

.menu-global-layout{
  align-items:start;
}

.menu-global-table__actions-head,
.menu-global-table__actions-cell{
  position:sticky;
  right:0;
  z-index:2;
  background:var(--card);
  width:132px;
  min-width:132px;
  white-space:nowrap;
  text-align:right;
}

.menu-global-table__actions-head{
  width: 1%;
  z-index:0;
}

.menu-global-table__actions-cell{
  padding-left:0;
  padding-right:0;
}

.menu-global-table__actions-head::before,
.menu-global-table__actions-cell::before{
  content:"";
  position:absolute;
  left:0;
  top:0;
  bottom:0;
  width:1px;
  background:var(--border);
}

.menu-global-table__actions{
  display:flex;
  justify-content:flex-end;
  align-items:center;
  gap:4px;
  min-height:32px;
  width:max-content;
  margin-left:auto;
  padding-left:0;
}

.menu-global-table__actions .btn{
  white-space:nowrap;
  padding:4px 8px;
  font-size:0.88rem;
}

.menu-global-table__actions form{
  display:inline-flex !important;
}

.menu-global-table__actions .icon-btn{
  padding:4px;
}

.meal-section{margin:16px 0 8px}
.meal-section--accent{padding-top:12px}
.meal-section--accent .meal-section__title{background:rgba(15,90,79,0.12);padding:4px 12px;border-radius:999px;display:inline-flex}
.meal-section__title{font-weight:700;color:#3b322a;margin-bottom:6px;font-size:1.1rem}

.week-order{display:grid;gap:16px;width:100%}
.week-actions{display:flex;justify-content:flex-end}
.order-range-summary{font-weight:600;color:var(--muted);text-align:right;margin-top:4px}
.calendar-exception-panel{display:grid;gap:14px}
.calendar-admin-layout{
  display:grid;
  grid-template-columns:minmax(0, 1fr);
  gap:18px;
  align-items:start;
}
.calendar-admin-layout__main,
.calendar-admin-layout__aside{
  display:grid;
  gap:18px;
}
.calendar-admin-layout__aside{
  position:static;
}
.calendar-overview-card{display:grid;gap:16px}
.calendar-overview-card__header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  flex-wrap:wrap;
}
.calendar-toolbar{
  display:grid;
  gap:10px;
  justify-items:end;
  flex:1 1 320px;
}
.calendar-overview-card__actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.calendar-import-form{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.calendar-file-field{
  display:flex;
  align-items:center;
  gap:12px;
  padding:10px 14px;
  border-radius:16px;
  border:1px solid rgba(85, 104, 138, 0.18);
  background:#f7f9fc;
  color:#324261;
  font-weight:700;
}
.calendar-file-field input[type="file"]{
  max-width:260px;
  font-size:0.92rem;
}
.calendar-file-field input[type="file"]::file-selector-button{
  margin-right:10px;
  padding:8px 12px;
  border:0;
  border-radius:12px;
  background:#dde6f4;
  color:#2b3f61;
  font-weight:700;
  cursor:pointer;
}
.calendar-overview-card__stats{display:flex;gap:10px;flex-wrap:wrap}
.calendar-overview-stat{
  display:grid;
  gap:2px;
  min-width:110px;
  padding:12px 14px;
  border-radius:14px;
  border:1px solid rgba(85,104,138,0.14);
  background:#f8fafc;
}
.calendar-overview-stat strong{
  font-size:1.15rem;
  line-height:1.1;
  color:#24344d;
}
.calendar-overview-stat span{
  color:var(--muted);
  font-size:0.88rem;
  font-weight:600;
}
.calendar-overview-card__meta{
  color:#53627c;
  font-weight:600;
}
.calendar-preview-banner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
  padding:16px 18px;
  border-radius:18px;
  border:1px solid #d6e1f0;
  background:#edf3fb;
}
.calendar-preview-banner__body{
  display:grid;
  gap:4px;
}
.calendar-preview-banner__title{
  font-weight:800;
  color:#20385d;
}
.calendar-preview-banner__text{
  color:#4b5e7d;
  line-height:1.5;
}
.calendar-preview-banner__actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.calendar-hero-shortcuts{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.student-calendar-note{
  display:grid;
  gap:12px;
  margin-bottom:18px;
}
.student-calendar-note__header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}
.student-calendar-note__meta,
.student-calendar-note__empty{
  margin:0;
  color:var(--muted);
  font-weight:600;
}
.calendar-empty-state{
  display:grid;
  gap:8px;
  padding:18px;
  border:1px dashed rgba(85,104,138,0.18);
  border-radius:16px;
  background:#f8fafc;
}
.calendar-empty-state__title{
  font-weight:700;
  color:var(--text);
}
.calendar-disclosure{
  display:grid;
  gap:12px;
  padding-top:2px;
}
.calendar-disclosure > summary{
  display:inline-flex;
  align-items:center;
  gap:8px;
  width:max-content;
  list-style:none;
  cursor:pointer;
  color:#31507b;
  font-weight:700;
}
.calendar-disclosure > summary::-webkit-details-marker{display:none}
.calendar-disclosure > summary::after{
  content:"+";
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:18px;
  height:18px;
  border-radius:999px;
  background:#e4ebf5;
  transition:transform 0.18s ease, background 0.18s ease;
}
.calendar-disclosure[open] > summary::after{
  transform:rotate(45deg);
  background:#d4e0f0;
}
.calendar-change-list{display:grid;gap:0}
.calendar-change-list--preview{
  border-top:1px solid rgba(98,88,82,0.12);
  padding-top:2px;
}
.calendar-change-row{
  display:grid;
  grid-template-columns:104px minmax(0, 1fr);
  gap:14px;
  align-items:flex-start;
  padding:14px 0;
  border-top:1px solid rgba(98,88,82,0.12);
}
.calendar-change-list > .calendar-change-row:first-child{border-top:0;padding-top:0}
.calendar-change-list--stacked > .calendar-change-row:last-child{padding-bottom:0}
.calendar-change-row--admin{
  grid-template-columns:104px minmax(0, 1fr) auto;
}
.calendar-change-row__date{
  font-weight:700;
  color:var(--text);
}
.calendar-change-row__content{
  display:grid;
  gap:6px;
  min-width:0;
}
.calendar-change-row__head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
}
.calendar-change-row__title{
  font-weight:700;
  color:var(--text);
}
.calendar-change-row__summary{
  color:var(--muted);
  line-height:1.45;
}
.calendar-change-row__note{
  color:var(--muted);
  font-size:0.95rem;
  line-height:1.45;
}
.calendar-change-row__actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.calendar-change-row__actions form{
  display:inline-flex !important;
}
.calendar-form-toggles{
  display:grid;
  gap:10px;
  margin-bottom:16px;
}
.calendar-toggle{
  display:flex;
  align-items:center;
  gap:10px;
  padding:12px 14px;
  border-radius:14px;
  border:1px solid rgba(184,74,43,0.12);
  background:rgba(255,255,255,0.62);
}
.calendar-exception-list{display:grid;gap:12px}
.calendar-exception-item{
  display:grid;
  gap:10px;
  padding:16px 18px;
  border:1px solid rgba(184,74,43,0.12);
  border-radius:16px;
  background:rgba(255,255,255,0.64);
}
.calendar-exception-item__header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}
.calendar-exception-item__title{margin-top:4px;color:var(--muted);font-size:0.95rem}
.calendar-exception-item__badges{display:flex;gap:8px;flex-wrap:wrap}
.calendar-exception-item__meta{color:#5f4a3b;font-weight:600}
.calendar-exception-item__note{color:var(--muted);line-height:1.5}
.calendar-admin-layout--year{
  grid-template-columns:minmax(0, 1.4fr) minmax(320px, 400px);
}
.calendar-month-pills{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.calendar-month-pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:10px 14px;
  border-radius:999px;
  border:1px solid rgba(85,104,138,0.14);
  background:#f8fafc;
  color:#2b3953;
  text-decoration:none;
  font-weight:700;
}
.calendar-month-pill strong{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:24px;
  height:24px;
  padding:0 8px;
  border-radius:999px;
  background:#e5ecf7;
  color:#31507b;
  font-size:0.82rem;
}
.calendar-month-pill.is-selected{
  border-color:#c9d9ee;
  background:#edf3fb;
  box-shadow:0 10px 24px rgba(40,64,102,0.08);
}
.calendar-legend{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-bottom:18px;
}
.calendar-legend__item{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:9px 12px;
  border-radius:999px;
  background:#f8fafc;
  border:1px solid rgba(85,104,138,0.10);
  font-size:0.9rem;
  font-weight:700;
  color:#314158;
}
.calendar-legend__dot{
  width:10px;
  height:10px;
  border-radius:999px;
  display:inline-block;
}
.calendar-legend__dot--default{background:#d7cdc1}
.calendar-legend__dot--closed{background:#dc6c5b}
.calendar-legend__dot--limited{background:#f0b86e}
.calendar-legend__dot--transfer{background:#78a6ff}
.calendar-legend__dot--custom{background:#6fc59a}
.calendar-legend__dot--module{background:#2b2f3a}
.year-calendar-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:18px;
}
.year-calendar-month{
  display:grid;
  gap:14px;
  padding:18px;
  border-radius:20px;
  border:1px solid rgba(85,104,138,0.12);
  background:#fcfdff;
  box-shadow:0 16px 34px rgba(38,52,78,0.06);
}
.year-calendar-month__header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}
.year-calendar-month__header h2{
  font-family:var(--font-display);
  font-size:1.5rem;
  line-height:1.05;
}
.year-calendar-month__header p{
  margin-top:6px;
  color:var(--muted);
  font-weight:600;
  font-size:0.92rem;
}
.year-calendar-month__stats{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.year-calendar-month__stat{
  display:inline-flex;
  align-items:center;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(85,104,138,0.10);
  background:#f6f9fd;
  color:var(--muted);
  font-size:0.78rem;
  font-weight:800;
}
.year-calendar-month__stat--closed{
  color:#a13d31;
  border-color:rgba(220,108,91,0.18);
  background:rgba(239,94,75,0.10);
}
.year-calendar-month__stat--limited{
  color:#9a5423;
  border-color:rgba(230,166,79,0.20);
  background:rgba(240,184,110,0.14);
}
.year-calendar-month__stat--transfer{
  color:#2454a6;
  border-color:rgba(77,122,216,0.18);
  background:rgba(120,166,255,0.14);
}
.year-calendar-month__stat--custom{
  color:#256b42;
  border-color:rgba(65,146,104,0.18);
  background:rgba(111,197,154,0.14);
}
.year-calendar-weekdays,
.year-calendar-days{
  display:grid;
  grid-template-columns:repeat(7, minmax(0, 1fr));
  gap:8px;
}
.year-calendar-weekdays span{
  display:flex;
  justify-content:center;
  color:var(--muted);
  font-weight:800;
  font-size:0.86rem;
}
.year-calendar-day{
  position:relative;
  isolation:isolate;
  min-height:76px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  gap:10px;
  padding:10px 9px;
  border-radius:16px;
  border:1px solid rgba(86,102,133,0.12);
  background:#f7f8fb;
  color:var(--text);
  text-decoration:none;
  transition:transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}
.year-calendar-day:hover{
  transform:translateY(-1px);
  box-shadow:0 12px 24px rgba(38,52,78,0.10);
  border-color:rgba(86,102,133,0.22);
}
.year-calendar-day--default{
  background:#f7f8fb;
}
.year-calendar-day--closed{
  background:#f8ece8;
  border-color:#efd9d3;
}
.year-calendar-day--limited{
  background:#fbf1df;
  border-color:#f1e2c3;
}
.year-calendar-day--transfer{
  background:#eaf1fb;
  border-color:#d7e3f5;
}
.year-calendar-day--custom{
  background:#eaf5ef;
  border-color:#d6e7dd;
}
.year-calendar-day--empty{
  min-height:76px;
  border-radius:16px;
  background:transparent;
  border:1px dashed rgba(86,102,133,0.08);
}
.year-calendar-day.is-selected{
  border-color:#7c8fae;
  box-shadow:0 0 0 2px rgba(92,118,158,0.12), 0 16px 28px rgba(38,52,78,0.12);
}
.year-calendar-day.is-today::after{
  content:"";
  position:absolute;
  right:9px;
  bottom:9px;
  width:8px;
  height:8px;
  border-radius:999px;
  background:var(--primary);
}
.year-calendar-day.is-active-menu{
  box-shadow:inset 0 0 0 2px rgba(34,48,73,0.16);
}
.year-calendar-day__top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}
.year-calendar-day__number{
  font-size:1rem;
  font-weight:800;
}
.year-calendar-day__markers{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:5px;
}
.year-calendar-day__marker{
  display:block;
  flex:0 0 auto;
  border-radius:999px;
}
.year-calendar-day__marker--default{
  width:18px;
  height:4px;
  background:#d7cdc1;
}
.year-calendar-day__marker--closed{
  width:18px;
  height:6px;
  background:#dc6c5b;
}
.year-calendar-day__marker--limited{
  width:18px;
  height:6px;
  background:#f0b86e;
}
.year-calendar-day__marker--transfer{
  width:18px;
  height:6px;
  background:#78a6ff;
}
.year-calendar-day__marker--custom{
  width:18px;
  height:6px;
  background:#6fc59a;
}
.year-calendar-day__marker--module{
  width:8px;
  height:8px;
  background:#2b2f3a;
}
.year-calendar-day__tooltip{
  position:absolute;
  left:50%;
  bottom:calc(100% + 12px);
  z-index:4;
  width:220px;
  display:grid;
  gap:4px;
  padding:12px 14px;
  border-radius:16px;
  border:1px solid rgba(28,43,67,0.12);
  background:rgba(28,43,67,0.96);
  color:#f8fbff;
  box-shadow:0 18px 36px rgba(19,29,46,0.24);
  opacity:0;
  pointer-events:none;
  transform:translate(-50%, 10px);
  transition:opacity 0.16s ease, transform 0.16s ease;
}
.year-calendar-day__tooltip::after{
  content:"";
  position:absolute;
  left:50%;
  bottom:-7px;
  width:14px;
  height:14px;
  background:rgba(28,43,67,0.96);
  transform:translateX(-50%) rotate(45deg);
}
.year-calendar-day:hover .year-calendar-day__tooltip,
.year-calendar-day:focus-visible .year-calendar-day__tooltip{
  opacity:1;
  transform:translate(-50%, 0);
}
.year-calendar-day__tooltip-date{
  font-size:0.8rem;
  font-weight:700;
  color:#d5e6ff;
}
.year-calendar-day__tooltip-title{
  font-size:0.96rem;
  font-weight:800;
}
.year-calendar-day__tooltip-summary,
.year-calendar-day__tooltip-note{
  font-size:0.85rem;
  line-height:1.45;
  color:rgba(248,251,255,0.88);
}
.calendar-selected-day{
  display:grid;
  gap:12px;
  padding:16px;
  border-radius:18px;
  border:1px solid rgba(85,104,138,0.12);
  background:#f8fafc;
}
.calendar-selected-day__meta{
  display:grid;
  gap:6px;
}
.calendar-selected-day__title{
  font-size:1.02rem;
  font-weight:800;
}
.calendar-selected-day__summary{
  color:var(--muted);
  line-height:1.45;
}
.calendar-selected-day__scope{
  color:#5f4a3b;
  font-size:0.88rem;
  font-weight:700;
}
.calendar-selected-day__badges{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.calendar-selected-day .notice{
  margin-bottom:0;
  background:#edf3fb;
  border-color:#d6e1f0;
  color:#2f4d76;
}
.calendar-selected-day .notice.error{
  background:#f8ebeb;
  border-color:#ecd3d3;
  color:#8e3c3c;
}
.calendar-scope-switcher{
  display:grid;
  gap:10px;
  margin-top:14px;
  padding:14px 16px;
  border-radius:16px;
  border:1px solid rgba(126,156,199,0.16);
  background:#eef4fb;
}
.calendar-scope-switcher__text{
  color:#425066;
  line-height:1.5;
  font-weight:600;
}
.calendar-scope-switcher__actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.calendar-scope-switcher__actions .btn.is-active{
  border-color:rgba(36,84,166,0.28);
  background:#ebf3ff;
  color:#2454a6;
}
.calendar-quick-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-bottom:4px;
}
.calendar-editor-open{
  overflow:hidden;
}
.calendar-editor-modal{
  position:fixed;
  inset:0;
  z-index:120;
  display:grid;
  place-items:center;
  padding:24px;
}
.calendar-editor-modal[hidden]{
  display:none;
}
.calendar-editor-modal__backdrop{
  position:absolute;
  inset:0;
  background:rgba(31,23,18,0.42);
  backdrop-filter:blur(8px);
  opacity:0;
  transition:opacity 0.22s ease;
}
.calendar-editor-modal__panel{
  position:relative;
  z-index:1;
  width:min(820px, 100%);
  max-height:min(88vh, 980px);
  display:grid;
  grid-template-rows:auto minmax(0, 1fr);
  border-radius:26px;
  border:1px solid rgba(85,104,138,0.12);
  background:#ffffff;
  box-shadow:0 30px 80px rgba(24,35,54,0.22);
  transform:translateY(24px) scale(0.98);
  opacity:0;
  transition:transform 0.22s ease, opacity 0.22s ease;
  overflow:hidden;
}
.calendar-editor-modal.is-open .calendar-editor-modal__backdrop{
  opacity:1;
}
.calendar-editor-modal.is-open .calendar-editor-modal__panel{
  transform:translateY(0) scale(1);
  opacity:1;
}
.calendar-editor-modal__header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  padding:24px 24px 16px;
  border-bottom:1px solid rgba(98,88,82,0.10);
}
.calendar-editor-modal__close{
  width:42px;
  height:42px;
  border:0;
  border-radius:999px;
  background:#eef3f9;
  color:var(--text);
  font-size:1.7rem;
  line-height:1;
  cursor:pointer;
}
.calendar-editor-modal__body{
  overflow:auto;
  padding:0 24px 24px;
}
.calendar-editor-modal__body .form{
  margin-top:16px;
}
.calendar-editor-modal__actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-top:4px;
}
.calendar-toast-stack{
  position:fixed;
  right:20px;
  bottom:20px;
  z-index:140;
  display:grid;
  gap:10px;
}
.calendar-toast{
  min-width:min(360px, calc(100vw - 32px));
  padding:13px 16px;
  border-radius:16px;
  border:1px solid rgba(85,104,138,0.12);
  background:#f8fafc;
  box-shadow:0 18px 42px rgba(24,35,54,0.16);
  color:var(--text);
  font-weight:700;
  transition:opacity 0.18s ease, transform 0.18s ease;
}
.calendar-toast--success{background:#edf7f0;border-color:#d1e6d8;color:#275f3e}
.calendar-toast--warning{background:#fbf3e5;border-color:#eeddb8;color:#835425}
.calendar-toast--error{background:#f8ebeb;border-color:#ecd3d3;color:#8d3b3b}
.calendar-toast.is-leaving{
  opacity:0;
  transform:translateY(8px);
}
.status-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:6px 10px;
  border-radius:999px;
  font-size:0.82rem;
  font-weight:800;
  border:1px solid transparent;
  white-space:nowrap;
}
.status-badge--success{background:#e9f8ef;color:#256b42;border-color:#bfe3cc}
.status-badge--info{background:#ebf3ff;color:#2454a6;border-color:#c7d8fb}
.status-badge--warning{background:#fff3e6;color:#9a5423;border-color:#f0d0af}
.module-menu-shell,
.calendar-page-shell{
  width:min(1120px, 80vw);
  max-width:100%;
  margin:0 auto;
  display:grid;
  gap:18px;
}
.module-menu-shell .page-header,
.calendar-page-shell .page-header{
  padding:16px 0 10px;
}
.module-calendar-card{
  display:grid;
  gap:14px;
}
.calendar-hero-card{
  overflow:visible;
  padding:20px 22px;
}
.calendar-hero-section{
  display:grid;
  gap:16px;
  min-width:0;
  padding:18px 20px;
  border-radius:22px;
  border:1px solid rgba(85,104,138,0.12);
  background:linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.72);
}
.calendar-page-shell .page-title-row{
  align-items:flex-end;
  justify-content:space-between;
}
.calendar-page-shell .calendar-admin-layout{
  gap:16px;
}
.calendar-page-shell .calendar-admin-layout__main{
  display:grid;
  gap:16px;
  width:100%;
}
.calendar-page-shell .calendar-admin-layout--year{
  grid-template-columns:minmax(0, 1fr);
}
.calendar-page-shell .calendar-overview-card{
  gap:14px;
}
.calendar-page-shell .calendar-hero-section{
  gap:14px;
}
.calendar-page-shell .calendar-overview-card__header{
  display:grid;
  grid-template-columns:minmax(0, 1fr) minmax(300px, 380px);
  align-items:start;
  gap:24px;
}
.calendar-page-shell .calendar-overview-card__header--calendar{
  gap:28px;
}
.calendar-page-shell .calendar-overview-card__header > div:first-child{
  min-width:0;
  max-width:640px;
  display:grid;
  gap:10px;
}
.calendar-page-shell .calendar-overview-card__header .card-title{
  margin-bottom:0;
}
.calendar-page-shell .calendar-overview-card__meta{
  line-height:1.45;
}
.calendar-page-shell [data-calendar-overview-description]{
  max-width:62ch;
}
.calendar-period-summary{
  display:grid;
  gap:8px;
}
.calendar-period-summary__period{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}
.calendar-period-summary__label{
  display:inline-flex;
  align-items:center;
  padding:6px 10px;
  border-radius:999px;
  background:#eef3fb;
  border:1px solid rgba(85,104,138,0.10);
  color:#41536e;
  font-size:.82rem;
  font-weight:700;
  letter-spacing:.02em;
  text-transform:uppercase;
}
.calendar-period-summary__period strong{
  font-size:1.08rem;
  color:#23344b;
}
.calendar-period-summary__meta{
  color:var(--muted);
  line-height:1.5;
  max-width:72ch;
}
.calendar-page-shell .calendar-toolbar{
  width:min(100%, 380px);
  justify-self:end;
  justify-items:stretch;
  align-content:start;
  gap:12px;
}
.calendar-page-shell .calendar-import-form{
  display:grid;
  grid-template-columns:1fr;
  justify-content:stretch;
  align-items:stretch;
  gap:10px;
}
.calendar-page-shell .calendar-import-form .btn{
  width:100%;
}
.calendar-page-shell .calendar-file-field{
  display:grid;
  gap:10px;
  align-items:stretch;
}
.calendar-file-field__label{
  display:block;
}
.calendar-page-shell .calendar-file-field input[type="file"]{
  width:100%;
  max-width:100%;
  min-width:0;
  overflow:hidden;
}
.calendar-year-switcher{
  display:grid;
  gap:6px;
  justify-items:stretch;
}
.calendar-year-switcher__label{
  font-size:.78rem;
  font-weight:700;
  letter-spacing:.03em;
  text-transform:uppercase;
  color:#52637d;
  text-align:left;
}
.calendar-year-switcher__controls{
  min-width:0;
}
.calendar-year-switcher__controls select{
  width:100%;
  min-height:42px;
  border-radius:14px;
  border:1px solid rgba(85,104,138,0.14);
  background:#fff;
  color:#22334a;
  padding:0 14px;
  font-weight:600;
}
.calendar-year-switcher__controls select:focus{
  border-color:rgba(66,115,198,0.34);
  outline:2px solid rgba(66,115,198,0.14);
}
.calendar-year-switcher__hint{
  max-width:none;
  text-align:left;
  color:var(--muted);
  font-size:.88rem;
  line-height:1.35;
}
.calendar-page-shell .calendar-overview-card__actions{
  justify-content:flex-start;
  gap:8px;
}
.calendar-page-shell .calendar-legend{
  gap:8px;
  margin-bottom:16px;
}
.calendar-page-shell .year-calendar-grid{
  gap:16px;
}
.calendar-page-shell .year-calendar-month{
  gap:12px;
  padding:16px;
  border-radius:22px;
  background:linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}
.calendar-page-shell .year-calendar-weekdays,
.calendar-page-shell .year-calendar-days{
  gap:6px;
}
.calendar-page-shell .year-calendar-day,
.calendar-page-shell .year-calendar-day--empty{
  min-height:0;
  aspect-ratio:1/1;
}
.calendar-page-shell .year-calendar-day{
  align-items:center;
  justify-content:center;
  gap:0;
  padding:0;
  border-radius:18px;
  overflow:visible;
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.62);
}
.calendar-page-shell .year-calendar-day__number{
  display:flex;
  align-items:center;
  justify-content:center;
  width:100%;
  height:100%;
  font-size:1.04rem;
  line-height:1;
  font-variant-numeric:tabular-nums;
}
.calendar-page-shell .year-calendar-day.is-today::after{
  right:8px;
  bottom:8px;
}
.calendar-page-shell .year-calendar-day__top,
.calendar-page-shell .year-calendar-day__markers,
.calendar-page-shell .year-calendar-day__marker{
  display:none;
}
.calendar-page-shell .year-calendar-day__tooltip{
  width:210px;
}
.calendar-page-shell .year-calendar-day--default .year-calendar-day__number{
  color:#314158;
}
.calendar-page-shell .year-calendar-day--closed{
  background:linear-gradient(180deg, #fde9e3 0%, #f8d6ce 100%);
  border-color:#e7aea2;
}
.calendar-page-shell .year-calendar-day--closed .year-calendar-day__number{
  color:#9f392e;
}
.calendar-page-shell .year-calendar-day--limited{
  background:linear-gradient(180deg, #fff4df 0%, #f8dfb3 100%);
  border-color:#efc786;
}
.calendar-page-shell .year-calendar-day--limited .year-calendar-day__number{
  color:#a85d1f;
}
.calendar-page-shell .year-calendar-day--transfer{
  background:linear-gradient(180deg, #edf4ff 0%, #d5e5ff 100%);
  border-color:#aac4f2;
}
.calendar-page-shell .year-calendar-day--transfer .year-calendar-day__number{
  color:#2858b1;
}
.calendar-page-shell .year-calendar-day--custom{
  background:linear-gradient(180deg, #edf9f2 0%, #d2eddc 100%);
  border-color:#9fd5b5;
}
.calendar-page-shell .year-calendar-day--custom .year-calendar-day__number{
  color:#25724b;
}
html[data-theme="dark"] .calendar-page-shell .calendar-hero-card,
html[data-theme="dark"] .calendar-page-shell .calendar-hero-section,
html[data-theme="dark"] .calendar-page-shell .year-calendar-month,
html[data-theme="dark"] .calendar-page-shell .calendar-selected-day,
html[data-theme="dark"] .calendar-page-shell .calendar-scope-switcher,
html[data-theme="dark"] .calendar-page-shell .calendar-editor-modal__panel{
  background:linear-gradient(180deg, rgba(90,74,65,0.98) 0%, rgba(75,61,54,0.98) 100%);
  border-color:rgba(220,203,190,0.18);
  box-shadow:0 22px 52px rgba(10,7,6,0.24);
}
html[data-theme="dark"] .calendar-page-shell .calendar-overview-stat,
html[data-theme="dark"] .calendar-page-shell .calendar-legend__item,
html[data-theme="dark"] .calendar-page-shell .calendar-file-field,
html[data-theme="dark"] .calendar-page-shell .calendar-preview-banner,
html[data-theme="dark"] .calendar-page-shell .year-calendar-month__stat{
  background:rgba(255,255,255,0.045);
  border-color:rgba(220,203,190,0.16);
  color:#f0e2d6;
}
html[data-theme="dark"] .calendar-page-shell .calendar-file-field input[type="file"]::file-selector-button,
html[data-theme="dark"] .calendar-page-shell .calendar-editor-modal__close:hover{
  background:rgba(255,255,255,0.14);
}
html[data-theme="dark"] .calendar-page-shell .calendar-editor-modal__close{
  background:rgba(255,248,241,0.08);
  color:#f5e8d7;
}
html[data-theme="dark"] .calendar-page-shell .calendar-overview-stat strong,
html[data-theme="dark"] .calendar-page-shell .calendar-editor-modal .card-title,
html[data-theme="dark"] .calendar-page-shell .calendar-selected-day__title,
html[data-theme="dark"] .calendar-page-shell .calendar-period-summary__period strong{
  color:#f5e8d7;
}
html[data-theme="dark"] .calendar-page-shell .year-calendar-month__header h2,
html[data-theme="dark"] .calendar-page-shell .year-calendar-day__number{
  color:#f5e8d7;
}
html[data-theme="dark"] .calendar-page-shell .calendar-overview-card__meta,
html[data-theme="dark"] .calendar-page-shell .calendar-selected-day__summary,
html[data-theme="dark"] .calendar-page-shell .calendar-selected-day__scope,
html[data-theme="dark"] .calendar-page-shell .calendar-scope-switcher__text,
html[data-theme="dark"] .calendar-page-shell .calendar-editor-modal .page-subtitle,
html[data-theme="dark"] .calendar-page-shell .calendar-editor-modal .field small,
html[data-theme="dark"] .calendar-page-shell .calendar-editor-modal .field .page-subtitle,
html[data-theme="dark"] .calendar-page-shell .calendar-editor-modal .calendar-toggle span,
html[data-theme="dark"] .calendar-page-shell .calendar-period-summary__meta,
html[data-theme="dark"] .calendar-page-shell .calendar-year-switcher__hint{
  color:#e7d9cf;
}
html[data-theme="dark"] .calendar-page-shell .calendar-selected-day .notice{
  background:#3b2c1e;
  border-color:#6c5436;
  color:#ffdcae;
}
html[data-theme="dark"] .calendar-page-shell .calendar-selected-day .notice.error{
  background:#47282e;
  border-color:#7b4450;
  color:#ffc9d0;
}
html[data-theme="dark"] .calendar-page-shell .calendar-editor-modal__header{
  border-bottom-color:rgba(220,203,190,0.14);
}
html[data-theme="dark"] .calendar-page-shell .calendar-editor-modal__body{
  background:linear-gradient(180deg, rgba(82,67,59,0.98) 0%, rgba(68,54,48,0.98) 100%);
}
html[data-theme="dark"] .calendar-page-shell .calendar-editor-modal__backdrop{
  background:rgba(8,6,5,0.56);
}
html[data-theme="dark"] .calendar-page-shell .calendar-editor-modal .field label{
  color:#f0e2d6;
}
html[data-theme="dark"] .calendar-page-shell .calendar-editor-modal .field input,
html[data-theme="dark"] .calendar-page-shell .calendar-editor-modal .field select,
html[data-theme="dark"] .calendar-page-shell .calendar-editor-modal .field textarea{
  background:rgba(255,255,255,0.045);
  border-color:rgba(183,167,159,0.18);
  color:var(--text);
  box-shadow:none;
}
html[data-theme="dark"] .calendar-page-shell .calendar-editor-modal .field select option{
  background:#4b3d36;
  color:#f0e2d6;
}
html[data-theme="dark"] .calendar-page-shell .calendar-editor-modal .flatpickr-input[readonly]{
  color:var(--text);
  -webkit-text-fill-color:var(--text);
}
html[data-theme="dark"] .calendar-page-shell .calendar-editor-modal .field input::placeholder,
html[data-theme="dark"] .calendar-page-shell .calendar-editor-modal .field textarea::placeholder{
  color:#ccbfb5;
}
html[data-theme="dark"] .calendar-page-shell .calendar-editor-modal .field input:focus,
html[data-theme="dark"] .calendar-page-shell .calendar-editor-modal .field select:focus,
html[data-theme="dark"] .calendar-page-shell .calendar-editor-modal .field textarea:focus{
  border-color:var(--accent);
  outline:2px solid rgba(240,163,71,0.18);
}
html[data-theme="dark"] .calendar-page-shell .calendar-scope-switcher__actions .btn.is-active{
  background:rgba(240,163,71,0.14);
  border-color:rgba(240,163,71,0.24);
  color:#ffe4c2;
}
html[data-theme="dark"] .calendar-page-shell .calendar-toggle{
  background:rgba(255,255,255,0.045);
  border-color:rgba(220,203,190,0.14);
}
html[data-theme="dark"] .calendar-page-shell .calendar-toggle input{
  accent-color:var(--accent);
}
html[data-theme="dark"] .calendar-page-shell .calendar-quick-actions .btn.outline,
html[data-theme="dark"] .calendar-page-shell .calendar-editor-modal__actions .btn.outline,
html[data-theme="dark"] .calendar-page-shell .calendar-scope-switcher__actions .btn.outline{
  background:rgba(255,255,255,0.045);
  border-color:rgba(220,203,190,0.16);
  color:#f0e2d6;
}
html[data-theme="dark"] .calendar-page-shell .calendar-quick-actions .btn.outline:hover,
html[data-theme="dark"] .calendar-page-shell .calendar-editor-modal__actions .btn.outline:hover,
html[data-theme="dark"] .calendar-page-shell .calendar-scope-switcher__actions .btn.outline:hover{
  background:rgba(240,163,71,0.10);
  border-color:rgba(240,163,71,0.22);
  color:#ffe4c2;
}
html[data-theme="dark"] .calendar-page-shell .calendar-editor-modal .status-badge--success{
  background:rgba(53,126,90,0.22);
  border-color:rgba(114,207,161,0.24);
  color:#d7ffea;
}
html[data-theme="dark"] .calendar-page-shell .calendar-editor-modal .status-badge--info{
  background:rgba(53,94,169,0.24);
  border-color:rgba(136,171,245,0.26);
  color:#e6f0ff;
}
html[data-theme="dark"] .calendar-page-shell .calendar-editor-modal .status-badge--warning{
  background:rgba(167,104,42,0.24);
  border-color:rgba(240,190,120,0.24);
  color:#fff0d8;
}
html[data-theme="dark"] .calendar-page-shell .year-calendar-month__header p,
html[data-theme="dark"] .calendar-page-shell .year-calendar-weekdays span{
  color:#e7d9cf;
}
html[data-theme="dark"] .calendar-page-shell .calendar-legend__dot--module{
  background:#d6e5ff;
}
html[data-theme="dark"] .calendar-page-shell .year-calendar-day{
  background:rgba(255,255,255,0.07);
  border-color:rgba(150,175,216,0.16);
  color:#edf3ff;
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.04);
}
html[data-theme="dark"] .calendar-page-shell .year-calendar-day:hover{
  border-color:rgba(118,164,244,0.30);
  box-shadow:0 14px 30px rgba(4,10,18,0.18);
}
html[data-theme="dark"] .calendar-page-shell .year-calendar-day--default{background:rgba(255,255,255,0.07)}
html[data-theme="dark"] .calendar-page-shell .year-calendar-day--closed{
  background:linear-gradient(180deg, rgba(176,66,50,0.54) 0%, rgba(129,44,35,0.42) 100%);
  border-color:rgba(240,151,128,0.32);
}
html[data-theme="dark"] .calendar-page-shell .year-calendar-day--limited{
  background:linear-gradient(180deg, rgba(184,124,45,0.50) 0%, rgba(134,86,29,0.40) 100%);
  border-color:rgba(240,191,116,0.34);
}
html[data-theme="dark"] .calendar-page-shell .year-calendar-day--transfer{
  background:linear-gradient(180deg, rgba(61,94,170,0.52) 0%, rgba(39,66,129,0.42) 100%);
  border-color:rgba(144,182,255,0.34);
}
html[data-theme="dark"] .calendar-page-shell .year-calendar-day--custom{
  background:linear-gradient(180deg, rgba(48,123,87,0.50) 0%, rgba(31,83,59,0.40) 100%);
  border-color:rgba(128,216,178,0.30);
}
html[data-theme="dark"] .calendar-page-shell .year-calendar-day--closed .year-calendar-day__number{
  color:#ffd8d1;
}
html[data-theme="dark"] .calendar-page-shell .year-calendar-day--limited .year-calendar-day__number{
  color:#ffe7c2;
}
html[data-theme="dark"] .calendar-page-shell .year-calendar-day--transfer .year-calendar-day__number{
  color:#dce8ff;
}
html[data-theme="dark"] .calendar-page-shell .year-calendar-day--custom .year-calendar-day__number{
  color:#dcffed;
}
html[data-theme="dark"] .calendar-page-shell .year-calendar-day--empty{
  border-color:rgba(150,175,216,0.08);
}
html[data-theme="dark"] .calendar-page-shell .year-calendar-day.is-selected{
  border-color:rgba(169,197,255,0.58);
  box-shadow:0 0 0 2px rgba(118,164,244,0.20), 0 16px 30px rgba(4,10,18,0.18);
}
html[data-theme="dark"] .calendar-page-shell .year-calendar-day.is-active-menu{
  box-shadow:inset 0 0 0 2px rgba(214,229,255,0.18);
}
html[data-theme="dark"] .calendar-page-shell .year-calendar-day__tooltip,
html[data-theme="dark"] .calendar-page-shell .year-calendar-day__tooltip::after{
  background:rgba(53,41,35,0.97);
}
html[data-theme="dark"] .calendar-page-shell .calendar-period-summary__label{
  background:rgba(240,163,71,0.10);
  border-color:rgba(240,163,71,0.18);
  color:#ffd9af;
}
html[data-theme="dark"] .calendar-page-shell .calendar-year-switcher__label{
  color:#f0e2d6;
}
html[data-theme="dark"] .calendar-page-shell .calendar-year-switcher__controls select{
  background:rgba(255,255,255,0.045);
  border-color:rgba(183,167,159,0.18);
  color:var(--text);
}
@media (max-width: 960px){
  .module-menu-shell,
  .calendar-page-shell{
    width:min(100%, calc(100vw - 32px));
  }
  .calendar-admin-layout{
    grid-template-columns:1fr;
  }
  .calendar-toolbar{
    justify-items:stretch;
  }
  .calendar-page-shell .calendar-toolbar{
    width:100%;
    min-width:0;
    justify-self:stretch;
    justify-items:stretch;
  }
  .calendar-year-switcher{
    justify-items:start;
  }
  .calendar-year-switcher__hint{
    max-width:none;
    text-align:left;
  }
  .calendar-import-form,
  .calendar-overview-card__actions{
    justify-content:flex-start;
  }
  .calendar-editor-modal{
    padding:16px;
  }
  .year-calendar-grid{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 720px){
  .module-menu-shell,
  .calendar-page-shell{
    width:100%;
  }
  .module-menu-shell .page-header,
  .calendar-page-shell .page-header{
    padding:14px 0 10px;
  }
  .calendar-page-shell .calendar-overview-card__header{
    grid-template-columns:1fr;
    gap:18px;
  }
  .calendar-hero-card{
    padding:18px 16px;
  }
  .calendar-hero-section{
    padding:16px;
    border-radius:18px;
  }
  .calendar-period-summary__period{
    align-items:flex-start;
  }
  .week-day__summary{padding:14px}
  .week-day__content{padding:0 14px 14px}
  .week-row{grid-template-columns:1fr;gap:8px}
  .calendar-change-row,
  .calendar-change-row--admin{
    grid-template-columns:1fr;
    gap:10px;
  }
  .calendar-change-row__actions{
    justify-content:flex-start;
  }
  .calendar-overview-stat{
    min-width:calc(50% - 5px);
  }
  .calendar-file-field{
    width:100%;
    justify-content:space-between;
    flex-wrap:wrap;
  }
  .calendar-file-field input[type="file"]{
    max-width:100%;
    width:100%;
  }
  .year-calendar-month__stats{
    justify-content:flex-start;
  }
  .year-calendar-grid{
    grid-template-columns:1fr;
  }
  .year-calendar-month{
    padding:14px;
  }
  .year-calendar-day,
  .year-calendar-day--empty{
    min-height:66px;
  }
  .year-calendar-day__tooltip{
    display:none;
  }
  .calendar-editor-modal{
    padding:0;
    align-items:end;
  }
  .calendar-editor-modal__panel{
    width:100%;
    max-height:92vh;
    border-radius:24px 24px 0 0;
  }
  .calendar-editor-modal__header{
    padding:18px 18px 14px;
  }
  .calendar-editor-modal__body{
    padding:0 18px 18px;
  }
  .calendar-editor-modal__actions .btn{
    flex:1 1 100%;
  }
  .calendar-toast-stack{
    right:12px;
    left:12px;
    bottom:12px;
  }
  .calendar-toast{
    min-width:0;
  }
}
@media (hover: none){
  .year-calendar-day__tooltip{
    display:none;
  }
}
.flatpickr-day.flatpickr-day--closed{
  background:rgba(183,28,28,0.12);
  border-color:rgba(183,28,28,0.16);
  color:#9f1d1d;
}
.flatpickr-day.flatpickr-day--transfer{
  background:rgba(36,84,166,0.12);
  border-color:rgba(36,84,166,0.16);
  color:#2454a6;
}
.flatpickr-day.flatpickr-day--exception{
  background:rgba(37,107,66,0.10);
  border-color:rgba(37,107,66,0.16);
  color:#256b42;
}
.order-table--interactive .qty-control{min-width:max-content;flex-wrap:nowrap}
.order-table--interactive .qty-btn{flex:0 0 36px}
.order-table--interactive .qty-input{flex:0 0 58px}
.order-table--interactive th:nth-child(3),
.order-table--interactive td:nth-child(3){min-width:88px}
.order-table--interactive th:nth-child(4),
.order-table--interactive td:nth-child(4){min-width:168px}
.order-table--interactive th:nth-child(5),
.order-table--interactive td:nth-child(5){min-width:110px}

.active-menu-actions{margin-top:12px}

.auth-shell{
  display:grid;
  place-items:center;
  padding:42px 0 70px;
}

.auth-card{
  position:relative;
  width:min(100%, 560px);
  padding:32px;
  border-radius:28px;
  overflow:hidden;
  background:
    radial-gradient(circle at top right, rgba(225,138,57,0.16), transparent 34%),
    linear-gradient(180deg, rgba(251,246,240,0.98) 0%, rgba(244,236,227,0.98) 100%);
  border:1px solid rgba(184,74,43,0.12);
  box-shadow:0 28px 64px rgba(40,28,24,0.16);
}

.auth-card--wide{
  width:min(100%, 860px);
}

.auth-card__glow{
  position:absolute;
  inset:auto -54px -70px auto;
  width:220px;
  height:220px;
  border-radius:40px;
  transform:rotate(24deg);
  background:linear-gradient(135deg, rgba(184,74,43,0.10), rgba(225,138,57,0.02));
  pointer-events:none;
}

.auth-card__header,
.auth-form,
.auth-verify-status,
.auth-verify-actions{
  position:relative;
  z-index:1;
}

.auth-card__header{
  display:grid;
  gap:12px;
  margin-bottom:22px;
}

.auth-card__eyebrow{
  display:inline-flex;
  align-items:center;
  width:max-content;
  padding:8px 12px;
  border-radius:999px;
  background:rgba(184,74,43,0.08);
  border:1px solid rgba(184,74,43,0.12);
  color:var(--primary);
  font-size:0.86rem;
  font-weight:700;
}

.auth-card__title{
  font-family:var(--font-display);
  font-size:clamp(2.1rem, 4vw, 3rem);
  line-height:0.98;
  letter-spacing:-0.03em;
}

.auth-card__subtitle{
  color:var(--muted);
  line-height:1.6;
  max-width:62ch;
}

.auth-form{
  gap:18px;
}

.auth-stage-panel{
  display:grid;
  gap:16px;
  padding:20px;
  border-radius:22px;
  background:rgba(255,255,255,0.52);
  border:1px solid rgba(184,74,43,0.12);
  box-shadow:0 14px 30px rgba(40,28,24,0.06);
}

.auth-stage-panel__head{
  display:grid;
  gap:8px;
}

.auth-stage-panel__title{
  margin:0;
  font-family:var(--font-display);
  font-size:1.5rem;
  line-height:1.05;
  font-weight:700;
}

.auth-stage-panel__text{
  margin:0;
  color:var(--muted);
  line-height:1.6;
}

.auth-inline-status{
  display:grid;
  gap:10px;
  padding:14px 16px;
  border-radius:18px;
  background:rgba(255,255,255,0.54);
  border:1px solid rgba(184,74,43,0.12);
  box-shadow:0 10px 22px rgba(40,28,24,0.04);
}

.auth-inline-status[hidden]{
  display:none;
}

.auth-inline-status.is-success{
  background:
    radial-gradient(circle at top right, rgba(83,164,109,0.16), transparent 34%),
    rgba(33,131,88,0.08);
  border-color:rgba(33,131,88,0.14);
}

.auth-inline-status.is-error{
  background:rgba(184,74,43,0.08);
  border-color:rgba(184,74,43,0.16);
}

.auth-inline-status.is-loading{
  background:rgba(225,138,57,0.10);
  border-color:rgba(225,138,57,0.18);
}

.auth-inline-status__top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}

.auth-inline-status__badge{
  display:inline-flex;
  width:max-content;
  padding:6px 10px;
  border-radius:999px;
  background:rgba(184,74,43,0.10);
  color:var(--primary);
  font-size:0.84rem;
  font-weight:700;
}

.auth-inline-status.is-success .auth-inline-status__badge{
  background:rgba(33,131,88,0.12);
  color:#1f7a38;
}

.auth-inline-status.is-error .auth-inline-status__badge{
  background:rgba(184,74,43,0.12);
  color:#9b3d24;
}

.auth-inline-status.is-loading .auth-inline-status__badge{
  background:rgba(225,138,57,0.14);
  color:#9b5d18;
}

.auth-inline-status__email{
  display:inline-flex;
  align-items:center;
  min-height:34px;
  padding:6px 12px;
  border-radius:999px;
  background:rgba(255,255,255,0.72);
  border:1px solid rgba(184,74,43,0.10);
  color:var(--text);
  font-size:0.95rem;
  font-weight:600;
}

.auth-inline-status p{
  margin:0;
  color:var(--muted);
  line-height:1.55;
}

.auth-password-panel{
  display:grid;
  gap:14px;
  overflow:hidden;
  max-height:280px;
  opacity:1;
  margin-top:2px;
  padding-top:10px;
  border-top:1px solid rgba(184,74,43,0.10);
  transition:max-height 0.28s ease, opacity 0.22s ease, padding-top 0.22s ease, margin-top 0.22s ease, transform 0.22s ease;
}

.auth-password-panel.is-collapsed{
  max-height:0;
  opacity:0;
  padding-top:0;
  margin-top:-6px;
  border-top-color:transparent;
  pointer-events:none;
  transform:translateY(-6px);
}

.auth-password-field{
  min-width:0;
}

.auth-code-submit{
  width:100%;
  text-align:center;
}

.auth-password-note{
  margin:0;
  color:var(--muted);
  font-size:0.94rem;
  line-height:1.5;
}

.auth-code-verify-panel{
  display:grid;
  gap:14px;
  overflow:hidden;
  max-height:320px;
  opacity:1;
  margin-top:2px;
  padding-top:10px;
  border-top:1px solid rgba(33,131,88,0.14);
  transition:max-height 0.28s ease, opacity 0.22s ease, padding-top 0.22s ease, margin-top 0.22s ease, transform 0.22s ease;
}

.auth-code-verify-panel.is-collapsed{
  max-height:0;
  opacity:0;
  padding-top:0;
  margin-top:-6px;
  border-top-color:transparent;
  pointer-events:none;
  transform:translateY(-6px);
}

.auth-secondary-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.auth-secondary-actions > *{
  flex:1 1 220px;
}

.auth-secondary-actions .btn{
  width:100%;
  text-align:center;
}

.auth-submit{
  width:100%;
  text-align:center;
}

.auth-verify-status{
  display:grid;
  gap:12px;
  margin-bottom:14px;
  padding:20px 22px;
  border-radius:22px;
  background:
    radial-gradient(circle at top right, rgba(83,164,109,0.16), transparent 34%),
    rgba(33,131,88,0.08);
  border:1px solid rgba(33,131,88,0.14);
}

.auth-verify-status__badge{
  display:inline-flex;
  width:max-content;
  padding:6px 10px;
  border-radius:999px;
  background:rgba(33,131,88,0.12);
  color:#1f7a38;
  font-size:0.84rem;
  font-weight:700;
}

.auth-verify-status__top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}

.auth-verify-status__email{
  display:inline-flex;
  align-items:center;
  min-height:34px;
  padding:6px 12px;
  border-radius:999px;
  background:rgba(255,255,255,0.68);
  border:1px solid rgba(33,131,88,0.12);
  color:var(--text);
  font-size:0.95rem;
  font-weight:600;
}

.auth-verify-status p{
  margin:0;
  color:var(--muted);
  line-height:1.6;
}

.auth-verify-status p strong{
  color:var(--text);
}

.auth-verify-status--hero{
  box-shadow:0 18px 36px rgba(33,131,88,0.08);
}

.auth-form--verify{
  gap:14px;
}

.auth-verify-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.auth-verify-actions > *{
  flex:1 1 220px;
}

.auth-verify-actions .btn{
  width:100%;
  text-align:center;
}

.auth-service-note{
  margin-top:18px;
  padding:16px 18px 0;
  border-top:1px solid rgba(184,74,43,0.10);
  color:var(--muted);
  line-height:1.6;
}

.section-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}

.list-compact{list-style:none;padding-left:0;margin:8px 0 0;display:grid;gap:6px;color:var(--muted);font-size:0.92rem}

.payments-actions{white-space:normal}
.payments-actions .btn{padding:6px 10px;font-size:0.9rem}
.procurements-actions{white-space:nowrap}
.procurements-actions .btn{padding:6px 10px;font-size:0.9rem}
.period-cell{white-space:nowrap}
.table th,.table td{padding:10px 8px}

.admin-table-scroll{
  max-height:500px;
  overflow-y:auto;
  background:var(--card);
  border:1px solid rgba(219,206,192,0.9);
}
.section.card{overflow:visible}
.admin-table th,.admin-table td{text-align:left;vertical-align:top}
.admin-table td:last-child,.admin-table th:last-child{text-align:left}
.admin-table .cell-money{text-align:right}
.admin-table .cell-money .menu-sub{text-align:right}
.admin-table{min-width:640px}

.admin-table .col-id{width:40px}
.admin-table .col-name{width:140px}
.admin-table .col-email{width:140px}
.admin-table .col-role{width:80px}
.admin-table .col-action{width:140px}
.admin-table .col-period{width:160px}
.admin-table .col-sum{width:140px}
.admin-table .col-status{width:120px}
.admin-table .col-file{width:100px}
.admin-table .col-date{width:120px}
.admin-table td .menu-sub{white-space:normal;word-break:normal}
.admin-table--payments .col-name{width:220px}
.admin-table--payments .col-date{width:140px}
.admin-table--payments .col-sum{width:170px}
.admin-table--payments .col-status{width:140px}
.admin-table--payments .col-file{width:180px}
.admin-table--payments .col-action{width:210px}
.admin-table--payments td,
.admin-table--payments th{vertical-align:top}

.table-history{table-layout:auto;width:100%}
.table-history td,.table-history th{vertical-align:middle}
.table-history .order-actions{white-space:normal;flex-wrap:wrap;align-items:flex-start}
.table-wrap--history{width:100%}

.profile-page{
  display:grid;
  gap:14px;
  width:100%;
  max-width:880px;
  margin:0 auto;
  padding:32px 0 8px;
  animation:fadeInUp 0.5s ease both;
}
.profile-page__grid{
  display:grid;
  grid-template-columns:1fr;
  gap:16px;
  align-items:start;
}
.profile-page__single{max-width:960px}

.profile-identity{
  display:grid;
  grid-template-columns:minmax(0, 1fr) auto;
  align-items:start;
  gap:18px 20px;
  padding:20px 22px;
  animation-delay:0.04s;
  width:100%;
}
.profile-identity__main{
  display:flex;
  align-items:flex-start;
  gap:16px;
  min-width:0;
}
.profile-identity__body{min-width:0}
.profile-identity__eyebrow{
  margin:0 0 6px;
  color:var(--muted);
  font-size:0.82rem;
  font-weight:700;
  letter-spacing:0.06em;
  text-transform:uppercase;
}
.profile-identity__name{
  margin:0;
  font-size:clamp(1.45rem, 2.4vw, 1.85rem);
  line-height:1.15;
  font-family:var(--font-display);
  font-weight:700;
}
.profile-identity__lead{
  margin:8px 0 0;
  max-width:520px;
  color:var(--muted);
  line-height:1.5;
  font-size:0.92rem;
}
.profile-identity__facts{
  display:flex;
  flex-wrap:wrap;
  gap:6px 16px;
  margin:10px 0 0;
  padding:0;
  list-style:none;
  color:var(--muted);
  font-size:0.9rem;
  line-height:1.45;
}
.profile-identity__facts li{display:inline-flex;align-items:baseline;gap:6px;min-width:0}
.profile-identity__fact-label{
  color:var(--text);
  font-weight:600;
  white-space:nowrap;
}
.profile-identity__fact-label::after{content:":"}

.profile-avatar{
  flex-shrink:0;
  width:58px;
  height:58px;
  border-radius:50%;
  display:grid;
  place-items:center;
  font-size:1.3rem;
  font-weight:700;
  font-family:var(--font-display);
  color:var(--primary);
  background:linear-gradient(145deg, rgba(255,247,239,0.98) 0%, rgba(255,236,220,0.98) 100%);
  border:1px solid rgba(184,74,43,0.16);
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.65);
}

.profile-balance-strip{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:10px;
  padding:14px 16px;
  border-radius:12px;
  background:rgba(255,252,249,0.72);
  border:1px solid var(--border);
  min-width:210px;
  justify-self:end;
}
.profile-balance-strip__info{display:grid;gap:2px;min-width:0}
.profile-balance-strip__label{
  color:var(--muted);
  font-size:0.82rem;
  font-weight:600;
  line-height:1.2;
}
.profile-balance-strip__amount{
  font-size:1.15rem;
  font-weight:700;
  line-height:1.15;
  font-family:var(--font-display);
  white-space:nowrap;
}
.profile-balance-strip__btn{
  flex-shrink:0;
  white-space:nowrap;
  width:100%;
  justify-content:center;
}

.profile-settings{
  display:grid;
  gap:0;
  padding:20px 22px;
  overflow:hidden;
  width:100%;
}
.profile-section-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:14px 18px;
  flex-wrap:wrap;
  padding-bottom:14px;
  margin-bottom:4px;
  border-bottom:1px solid var(--border);
}
.profile-section-head__eyebrow{
  margin:0 0 5px;
  color:var(--muted);
  font-size:0.78rem;
  font-weight:700;
  letter-spacing:0.08em;
  text-transform:uppercase;
}
.profile-section-head__hint{
  margin:8px 0 0;
  color:var(--muted);
  font-size:0.9rem;
  line-height:1.5;
}
.profile-settings__title{
  margin:0;
  font-size:1rem;
  font-weight:700;
}
.profile-setting{
  display:grid;
  grid-template-columns:minmax(180px, 240px) minmax(0, 1fr);
  gap:14px 22px;
  padding:18px 0;
  border-bottom:1px solid var(--border);
  align-items:start;
}
.profile-setting:last-child{
  padding-bottom:0;
  border-bottom:none;
}
.profile-setting__label{display:grid;gap:4px;min-width:0}
.profile-setting__heading{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}
.profile-setting__name{
  font-size:0.95rem;
  font-weight:700;
  line-height:1.3;
}
.profile-setting__hint{
  color:var(--muted);
  font-size:0.85rem;
  line-height:1.45;
}
.profile-setting__control{
  display:grid;
  gap:12px;
  min-width:0;
}

.profile-inline-form{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:10px;
}
.profile-notification-form{
  display:grid;
  gap:12px;
  max-width:100%;
}
.profile-inline-form__field{
  flex:1 1 180px;
  min-width:0;
  margin:0;
}
.profile-inline-form__btn{flex:0 0 auto}
.profile-checkbox{
  display:flex;
  align-items:flex-start;
  gap:10px;
  color:var(--text);
  font-size:0.92rem;
  line-height:1.5;
  cursor:pointer;
}
.profile-checkbox input{
  margin:2px 0 0;
  width:16px;
  height:16px;
  accent-color:var(--primary);
  flex:0 0 auto;
}

.profile-finance{
  display:grid;
  gap:0;
  padding:20px 22px;
  overflow:hidden;
  width:100%;
}
.profile-finance-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:20px 24px;
  padding-top:4px;
}
.profile-finance-stack{
  display:grid;
  gap:14px;
  padding-top:4px;
}
.profile-finance-block{display:grid;gap:10px;min-width:0}
.profile-finance-block__title{
  margin:0;
  font-size:0.92rem;
  font-weight:700;
  color:var(--muted);
  text-transform:uppercase;
  letter-spacing:0.04em;
}
.profile-empty{
  color:var(--muted);
  margin:0;
  line-height:1.55;
  font-size:0.94rem;
}

.profile-table{width:100%;table-layout:auto}
.profile-table th,.profile-table td{
  padding:9px 10px;
  font-size:0.88rem;
  vertical-align:middle;
}
.profile-table th{
  font-size:0.82rem;
  text-transform:uppercase;
  letter-spacing:0.03em;
}
.profile-table__action{text-align:right;white-space:nowrap}
.profile-table .menu-sub{
  font-size:0.82rem;
  margin-top:4px;
  color:var(--muted);
  font-weight:500;
}
.profile-records{
  display:grid;
  gap:12px;
}
.profile-record{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  padding:14px 16px;
  border-radius:14px;
  border:1px solid rgba(219,206,192,0.92);
  background:rgba(255,252,248,0.78);
}
.profile-record__main{
  min-width:0;
  display:grid;
  gap:10px;
  flex:1 1 auto;
}
.profile-record__top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  flex-wrap:wrap;
}
.profile-record__title{
  font-size:1rem;
  font-weight:700;
  line-height:1.35;
}
.profile-record__meta{
  margin-top:4px;
  color:var(--muted);
  font-size:0.88rem;
  line-height:1.45;
}
.profile-record__note{
  color:var(--muted);
  line-height:1.55;
  font-size:0.9rem;
}
.profile-record__note strong{
  color:var(--text);
  font-weight:700;
}
.profile-record__actions{
  display:flex;
  align-items:center;
  flex:0 0 auto;
}

.order-history-panel{
  display:grid;
  gap:20px;
  padding:24px;
  border-radius:24px;
  border:1px solid rgba(219,206,192,0.92);
  background:
    radial-gradient(circle at top left, rgba(255,255,255,0.94), rgba(255,255,255,0) 34%),
    radial-gradient(circle at top right, rgba(225,138,57,0.10), rgba(255,255,255,0) 28%),
    linear-gradient(180deg, rgba(252,248,242,0.98) 0%, rgba(246,238,229,0.96) 100%);
  box-shadow:0 20px 40px rgba(45,31,24,0.08);
  overflow:hidden;
}
.order-history-panel__body{
  display:grid;
  gap:20px;
  width:100%;
}
.order-history-panel__head{
  display:grid;
  gap:16px;
}
.order-history-panel__hero{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
}
.order-history-panel__title{
  margin:6px 0 0;
  font-size:1.65rem;
  line-height:1.15;
  letter-spacing:-0.02em;
}
.order-history-panel__subtitle{
  margin:8px 0 0;
  max-width:760px;
  color:var(--muted);
  line-height:1.55;
}
.order-history-panel__nav,
.order-history-entry__actions,
.order-history-ledger__actions,
.order-history-browser-form{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.order-history-nav-btn,
.order-history-chip{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:38px;
  padding:0 14px;
  border-radius:999px;
  border:1px solid rgba(184,74,43,0.14);
  background:rgba(255,252,249,0.58);
  color:var(--text);
  text-decoration:none;
  font-weight:700;
  font-size:0.95rem;
  transition:all 0.2s ease;
}
.order-history-nav-btn:hover,
.order-history-chip:hover{
  border-color:rgba(184,74,43,0.3);
  background:rgba(255,248,241,0.9);
  transform:translateY(-1px);
}
.order-history-chip.is-active{
  border-color:rgba(184,74,43,0.26);
  background:rgba(184,74,43,0.1);
  color:var(--primary);
}
.order-history-chip.is-accent{
  border-color:rgba(184,74,43,0.22);
  background:rgba(255,244,238,0.9);
}
.order-history-surface{
  display:grid;
  gap:12px;
  width:100%;
  padding:18px;
  border-radius:18px;
  border:1px solid rgba(219,206,192,0.78);
  background:rgba(255,255,255,0.72);
  backdrop-filter:blur(10px);
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.5);
}
.order-history-advanced__summary,
.order-history-panel__summary,
.order-history-ledger__head{
  list-style:none;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
}
.order-history-advanced__summary,
.order-history-panel__summary{
  cursor:pointer;
}
.order-history-panel__summary{
  align-items:center;
}
.order-history-panel[open] .order-history-panel__summary{
  padding-bottom:18px;
  border-bottom:1px solid rgba(219,206,192,0.84);
}
.order-history-advanced__summary::-webkit-details-marker,
.order-history-panel__summary::-webkit-details-marker{
  display:none;
}
.order-history-advanced__summary-copy,
.order-history-ledger__summary-copy{
  display:grid;
  gap:4px;
}
.order-history-advanced__summary-title,
.order-history-ledger__summary-title{
  font-size:1rem;
  font-weight:700;
  color:var(--text);
}
.order-history-advanced__summary-text,
.order-history-ledger__summary-text{
  color:var(--muted);
  font-size:0.92rem;
  line-height:1.5;
}
.order-history-browser-form{
  align-items:end;
  width:100%;
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr)) repeat(3, auto);
  gap:12px;
}
.order-history-browser-form .field{
  min-width:0;
}
.order-history-stats{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:12px;
  width:100%;
}
.order-history-stat{
  padding:15px 16px;
  border-radius:18px;
  border:1px solid rgba(219,206,192,0.82);
  background:rgba(255,255,255,0.74);
  min-width:0;
}
.order-history-stat__label{
  display:block;
  color:var(--muted);
  font-size:0.82rem;
  text-transform:uppercase;
  letter-spacing:0.04em;
}
.order-history-stat__value{
  display:block;
  margin-top:8px;
  font-size:1.2rem;
}
.order-history-days,
.order-history-day__entries{
  display:grid;
  gap:12px;
}
.order-history-days,
.order-history-empty{
  width:100%;
}
.order-history-entry{
  padding:14px 16px;
  border-radius:14px;
  border:1px solid rgba(219,206,192,0.92);
  background:rgba(255,255,255,0.75);
  display:grid;
  gap:12px;
}
.order-history-entry__top,
.order-history-entry__footer{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}
.order-history-entry__title{
  color:var(--text);
  font-weight:700;
  text-decoration:none;
}
.order-history-entry__title:hover{text-decoration:underline}
.order-history-entry__meta,
.order-history-line__meta,
.order-history-empty p{
  color:var(--muted);
  font-size:0.9rem;
  line-height:1.5;
}
.order-history-entry__badges{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  justify-content:flex-end;
}
.order-history-ledger__head{
  margin-bottom:16px;
}
.order-history-entry__lines{
  display:grid;
  gap:8px;
}
.order-history-line{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}
.order-history-line__main{
  display:flex;
  align-items:center;
  gap:8px;
  font-weight:600;
}
.order-history-line__qty{
  min-width:30px;
  color:var(--accent);
}
.order-history-entry__summary{
  display:grid;
  gap:4px;
}
.order-history-empty{
  padding:20px 18px;
  border-radius:16px;
  border:1px dashed rgba(184,74,43,0.28);
  background:rgba(255,248,241,0.64);
}
.order-history-empty h3{
  margin:0 0 8px;
  font-size:1rem;
}
.order-history-ledger{
  display:grid;
  gap:18px;
}
.order-history-ledger__head{
  align-items:center;
}

html[data-theme="dark"] .order-history-panel{
  border-color:rgba(255,255,255,0.08);
  background:
    radial-gradient(circle at top left, rgba(207,88,54,0.20), rgba(207,88,54,0) 34%),
    radial-gradient(circle at top right, rgba(242,163,86,0.14), rgba(242,163,86,0) 26%),
    linear-gradient(180deg, rgba(112,90,80,0.96) 0%, rgba(92,74,65,0.97) 100%);
  box-shadow:0 24px 48px rgba(0,0,0,0.24);
}
html[data-theme="dark"] .order-history-surface,
html[data-theme="dark"] .order-history-stat,
html[data-theme="dark"] .order-history-entry{
  border-color:rgba(245,229,214,0.10);
  background:rgba(255,248,241,0.05);
}
html[data-theme="dark"] .order-history-panel[open] .order-history-panel__summary{
  border-bottom-color:rgba(245,229,214,0.10);
}
html[data-theme="dark"] .order-history-chip,
html[data-theme="dark"] .order-history-nav-btn{
  border-color:rgba(255,255,255,0.12);
  background:rgba(255,255,255,0.04);
}
html[data-theme="dark"] .order-history-chip.is-active{
  background:rgba(184,74,43,0.18);
}
html[data-theme="dark"] .order-history-chip.is-accent{
  background:rgba(184,74,43,0.14);
}
html[data-theme="dark"] .order-history-empty{
  border-color:rgba(241,177,155,0.28);
  background:rgba(184,74,43,0.08);
}

.profile-security-text,
.profile-security-hint{
  color:var(--muted);
  line-height:1.55;
  margin:0;
}
.profile-security-hint{font-size:0.86rem}
.profile-password-toggle{display:grid;gap:12px}
.profile-password-toggle__trigger{
  list-style:none;
  width:fit-content;
  max-width:100%;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.profile-password-toggle__trigger::-webkit-details-marker{display:none}
.profile-password-toggle[open] .profile-password-toggle__trigger{
  border-color:rgba(184,74,43,0.34);
  background:rgba(255,248,241,0.82);
}
.profile-security-form{
  display:grid;
  gap:12px;
  max-width:100%;
}
.profile-security-field{min-width:0}
.profile-security-actions{display:flex;padding-top:2px}

.profile-topup-card{
  width:100%;
  max-width:520px;
  margin:0 auto;
  display:grid;
  gap:16px;
}
.profile-topup-card--wide{
  max-width:none;
  margin:0;
  padding:20px 22px;
}
.profile-topup-card .profile-balance-strip{
  width:100%;
  box-shadow:none;
  border:1px solid var(--border);
  animation:none;
}
.profile-topup-note{
  margin:0;
  color:var(--muted);
  font-weight:600;
}
.profile-topup-form{max-width:100%}
.profile-topup-notice{margin-bottom:0}
.profile-topup-hero{
  display:grid;
  gap:8px;
  padding:20px 22px;
}
.profile-topup-hero .profile-identity__lead{
  max-width:560px;
  margin-top:0;
}

.payment-upload-card{
  width:100%;
  max-width:720px;
  margin:0 auto;
  display:grid;
  gap:18px;
}
.payment-upload-summary{
  display:grid;
  gap:10px;
}
.payment-upload-summary__row{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  padding:10px 0;
  border-bottom:1px solid var(--border);
}
.payment-upload-summary__row:last-child{border-bottom:none;padding-bottom:0}
.payment-upload-summary__label{
  color:var(--muted);
  font-size:0.92rem;
}
.payment-upload-summary__value{
  text-align:right;
  font-weight:700;
}
.payment-upload-form{display:grid;gap:16px}
.payment-methods{
  display:grid;
  gap:10px;
}
.payment-method{
  display:flex;
  align-items:flex-start;
  gap:10px;
  padding:12px 14px;
  border:1px solid var(--border);
  border-radius:14px;
  background:rgba(255,252,249,0.56);
}
.payment-method input{margin-top:3px}
.payment-method__text{
  display:grid;
  gap:2px;
  min-width:0;
}
.payment-method__title{
  font-weight:700;
  line-height:1.35;
}
.payment-method__hint{
  color:var(--muted);
  font-size:0.88rem;
  line-height:1.45;
}
.payment-proof-block{
  display:grid;
  gap:14px;
  padding:16px;
  border:1px dashed var(--border);
  border-radius:16px;
  background:rgba(255,252,249,0.5);
}
.payment-proof-block[hidden]{display:none}
.payment-proof-head{
  display:grid;
  gap:4px;
}
.payment-proof-head__title{
  font-size:0.95rem;
  font-weight:700;
}
.payment-proof-head__hint{
  color:var(--muted);
  font-size:0.88rem;
  line-height:1.45;
}
.payment-confirm{
  display:flex;
  align-items:flex-start;
  gap:10px;
  padding:12px 14px;
  border:1px solid var(--border);
  border-radius:14px;
  background:rgba(255,255,255,0.45);
  cursor:pointer;
}
.payment-confirm-wrap[hidden]{display:none}
.payment-confirm input{
  margin-top:2px;
  flex:0 0 auto;
}
.payment-confirm__text{
  font-size:0.92rem;
  line-height:1.5;
}
.form-inline-error{
  padding:12px 14px;
  border:1px solid rgba(184,74,43,0.22);
  border-radius:12px;
  background:rgba(255,244,239,0.9);
  color:#a54a2f;
  font-size:0.9rem;
  line-height:1.5;
}
.form-inline-error[hidden]{display:none}
.receipt-preview{
  display:grid;
  gap:12px;
  padding:14px;
  border:1px solid var(--border);
  border-radius:14px;
  background:rgba(255,255,255,0.5);
}
.receipt-preview[hidden]{display:none}
.receipt-preview__meta{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}
.receipt-preview__name{
  font-weight:700;
  word-break:break-word;
}
.receipt-preview__size{
  color:var(--muted);
  font-size:0.86rem;
}
.receipt-preview__stage{
  min-height:220px;
  display:grid;
  place-items:center;
  overflow:hidden;
  border-radius:12px;
  background:rgba(242,238,231,0.85);
  border:1px solid rgba(184,74,43,0.08);
}
.receipt-preview__stage img,
.receipt-preview__stage iframe{
  display:block;
  width:100%;
  min-height:220px;
  max-height:420px;
  border:0;
  background:#fff;
}
.receipt-preview__stage img{object-fit:contain}
.receipt-preview__fallback{
  display:grid;
  gap:6px;
  padding:20px;
  text-align:center;
  color:var(--muted);
  line-height:1.5;
}

.menu-global-layout{align-items:start}
.menu-global-card{height:100%}
.menu-global-card--form{max-width:100%}
.menu-global-card .card-title{line-height:1.3}
.menu-global-layout .card{padding:24px}

.order-status{
  display:inline-flex;
  align-items:center;
  padding:6px 10px;
  border-radius:999px;
  font-size:0.9rem;
  font-weight:700;
  line-height:1.2;
  border:1px solid transparent;
}
.order-status--draft,.order-status--confirmed{background:#fff4db;color:#8a5a00;border-color:#f2cf7a}
.order-status--paid{background:#e6f4ff;color:#0b5cab;border-color:#a8d0ff}
.order-status--approved{background:#e9f9ee;color:#1f7a38;border-color:#9ed8ad}
.order-status--problem{background:#ffe9e7;color:#b23b2f;border-color:#f1b0aa}
.order-status--cancelled{background:#f1f3f5;color:#66707a;border-color:#d6dbe1}
.order-status--confirmed{background:#fff7df;color:#8b5e00;border-color:#efd48a}
.order-status--paid{background:#e7f2ff;color:#1f5ea8;border-color:#b9d4fb}
.order-status--approved{background:#e8f7ec;color:#207245;border-color:#b1dec0}
.order-status--problem{background:#fff0ea;color:#b74a28;border-color:#f3c1b4}
.order-status--cancelled{background:#f3f4f6;color:#5f6b76;border-color:#d7dce2}
.order-status--pending{background:#fff4db;color:#8a5a00;border-color:#f2cf7a}
.order-status--cancelled_with_refund{background:#e8f7ec;color:#207245;border-color:#b1dec0}
.order-status--cancelled_without_refund{background:#fff0ea;color:#b74a28;border-color:#f3c1b4}
.order-status--rejected{background:#fdeaea;color:#a23030;border-color:#efb2b2}

.admin-order-cancel-form{display:inline-flex}
.admin-order-cancel-btn{
  min-width:142px;
  justify-content:center;
  text-align:center;
  min-height:34px;
  font-size:0.95rem;
  font-weight:700;
}
.admin-order-cancel-btn--state{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:6px 12px;
  font-size:0.95rem;
  font-weight:700;
  min-width:142px;
  min-height:34px;
}

.admin-table--users td:last-child form{
  display:inline-flex;
  align-items:center;
  gap:6px;
  flex-wrap:wrap;
}
.admin-table--users td:last-child,
.admin-table--users th:last-child{
  width:140px;
  min-width:140px;
  white-space:nowrap;
}

.admin-dashboard-actions{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:8px;
  min-width:0;
}

.admin-dashboard-actions .btn{
  white-space:nowrap;
}

.admin-inline-form{
  display:inline-flex;
}

.admin-inline-form .btn{
  width:100%;
}
.admin-table--users td:last-child select{
  min-width:90px;
}

.admin-table-action-list{
  display:flex;
  flex-direction:column;
  align-items:stretch;
  gap:8px;
  min-width:0;
}

.admin-table-action-list .btn,
.admin-table-action-list .badge{
  justify-content:center;
  text-align:center;
}

.icon-btn{
  border:1px solid var(--border);
  background:#fff;
  color:var(--text);
  border-radius:10px;
  padding:6px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  transition:all 0.2s ease;
  text-decoration:none;
}
.icon-btn:hover{border-color:var(--primary);color:var(--primary)}
.icon-btn svg{width:18px;height:18px;fill:currentColor}
.icon-btn.danger{background:var(--danger);border-color:var(--danger);color:#fff}
.icon-btn.danger:hover{background:#b22f34;border-color:#b22f34;color:#fff}

.order-actions{display:flex;gap:8px;align-items:center;justify-content:flex-start;flex-wrap:wrap}
.order-actions .btn{max-width:100%}
.order-actions--details .btn{white-space:normal;text-align:center}
.action-delete{display:inline-flex}
.action-placeholder{display:inline-block;min-width:10px;height:1.2em}

.order-details-table{table-layout:fixed}
.order-details-table th:nth-child(1), .order-details-table td:nth-child(1){width:44%}
.order-details-table th:nth-child(2), .order-details-table td:nth-child(2){width:22%}
.order-details-table th:nth-child(3), .order-details-table td:nth-child(3){width:18%;text-align:right}
.order-details-table th:nth-child(4), .order-details-table td:nth-child(4){width:16%;text-align:right}
.order-details-qty{text-align:right;white-space:nowrap}
.order-details-qty .badge{min-width:32px;text-align:right;display:inline-block}
.order-details-qty-badge--multi{background:#fde8dd;color:var(--primary-600);border-color:#efbea5}
.order-day-card{margin-bottom:16px}
.order-day-card:last-child{margin-bottom:0}
.order-day-total{margin-top:10px;text-align:right}

.admin-order-review{
  display:grid;
  grid-template-columns:minmax(0, 1.45fr) minmax(320px, 0.95fr);
  gap:20px;
  align-items:start;
  margin-bottom:20px;
}

.admin-order-review__receipt,
.admin-order-review__summary{
  display:grid;
  gap:16px;
  align-content:start;
}

.admin-order-review__sidebar{
  display:grid;
  gap:20px;
}

.admin-order-review__panel-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}

.admin-order-review__panel-text{
  margin:6px 0 0;
  color:var(--muted);
  line-height:1.55;
}

.admin-order-review__receipt-stage{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:540px;
  border:1px solid rgba(219,206,192,0.9);
  border-radius:18px;
  background:linear-gradient(180deg, rgba(255,252,247,0.96) 0%, rgba(255,247,239,0.96) 100%);
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.6);
  overflow:hidden;
}

.admin-order-review__receipt-stage img,
.admin-order-review__receipt-stage iframe{
  display:block;
  width:100%;
  height:100%;
  min-height:540px;
  border:0;
}

.admin-order-review__receipt-stage img{
  object-fit:contain;
  background:#fff;
}

.admin-order-review__receipt-fallback,
.admin-order-review__receipt-empty{
  display:grid;
  gap:8px;
  padding:24px;
  border:1px dashed rgba(184,74,43,0.22);
  border-radius:18px;
  background:rgba(255,250,245,0.76);
}

.admin-order-review__receipt-fallback strong,
.admin-order-review__receipt-empty strong{
  font-size:1rem;
  line-height:1.4;
}

.admin-order-review__receipt-fallback span,
.admin-order-review__receipt-empty span{
  color:var(--muted);
  line-height:1.6;
}

.admin-order-review__receipt-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.admin-order-review__facts{
  display:grid;
  gap:10px;
}

.admin-order-review__fact{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  padding:12px 14px;
  border:1px solid rgba(219,206,192,0.9);
  border-radius:14px;
  background:rgba(255,252,248,0.72);
}

.admin-order-review__fact span{
  color:var(--muted);
  font-size:0.88rem;
  line-height:1.45;
}

.admin-order-review__fact strong{
  text-align:right;
  line-height:1.45;
}

.admin-order-review__note{
  padding:14px 16px;
  border-radius:14px;
  border:1px solid rgba(184,74,43,0.16);
  background:rgba(255,248,241,0.78);
  color:var(--text);
  line-height:1.6;
}

.admin-order-review__actions{
  display:grid;
  gap:10px;
}

.admin-order-review__actions .admin-inline-form,
.admin-order-review__actions .btn,
.admin-order-review__cancel-form,
.admin-order-review__cancel-btn{
  width:100%;
}

.admin-order-review__cancel-form{
  margin-top:10px;
}

.admin-order-review__state{
  padding:14px 16px;
  border-radius:14px;
  border:1px solid rgba(219,206,192,0.9);
  background:rgba(255,252,248,0.72);
  line-height:1.6;
}

.admin-order-review__state--success{
  background:#eef9f1;
  border-color:#b9e1c5;
  color:#1f7a38;
}

.admin-order-review__state--warn{
  background:#fff1eb;
  border-color:#f1c3b3;
  color:#a54a2f;
}

.illness-request-layout{
  display:grid;
  grid-template-columns:minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap:20px;
  align-items:start;
}

.illness-request-card{
  display:grid;
  gap:16px;
  align-content:start;
}

.illness-request-card__head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
}

.illness-request-card__hint{
  margin:6px 0 0;
  color:var(--muted);
  line-height:1.55;
}

.illness-request-card__actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.illness-request-choice-grid{
  display:grid;
  gap:10px;
}

.illness-request-choice{
  display:flex;
  align-items:center;
  gap:10px;
  padding:12px 14px;
  border:1px solid rgba(219,206,192,0.9);
  border-radius:14px;
  background:rgba(255,252,248,0.72);
}

.illness-request-choice input{
  margin:0;
}

.illness-request-lines,
.illness-request-readonly{
  display:grid;
  gap:10px;
}

.illness-request-line,
.illness-request-readonly__row{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  padding:12px 14px;
  border:1px solid rgba(219,206,192,0.9);
  border-radius:14px;
  background:rgba(255,252,248,0.72);
}

.illness-request-readonly__row span{
  color:var(--muted);
}

.illness-request-readonly__row--stack{
  display:grid;
}

.illness-request-line__meta{
  display:grid;
  justify-items:end;
  gap:4px;
  white-space:nowrap;
}

.illness-request-summary{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  padding:14px 16px;
  border-radius:14px;
  border:1px solid rgba(219,206,192,0.9);
  background:rgba(255,252,248,0.72);
}

.illness-request-summary__text{
  line-height:1.6;
}

.illness-request-summary__meta{
  white-space:nowrap;
}

.admin-illness-review__form{
  display:grid;
  gap:14px;
}

.admin-illness-review__actions{
  display:grid;
  gap:10px;
}

.profile-record__actions--stack{
  align-items:stretch;
}

html[data-theme="dark"] .illness-request-choice,
html[data-theme="dark"] .illness-request-line,
html[data-theme="dark"] .illness-request-readonly__row,
html[data-theme="dark"] .illness-request-summary{
  background:rgba(24,31,39,0.84);
  border-color:#38424d;
}

.flatpickr-calendar{
  background:var(--card);
  color:var(--text);
  border:1px solid var(--border);
  box-shadow:var(--shadow);
}
.flatpickr-day.selected,.flatpickr-day.startRange,.flatpickr-day.endRange{background:var(--primary);border-color:var(--primary)}

@keyframes fadeInUp{
  from{opacity:0;transform:translateY(10px)}
  to{opacity:1;transform:translateY(0)}
}

@media (max-width:1180px){
  .container,.topbar .container{width:100%;max-width:100%;padding-left:16px;padding-right:16px}
  .grid-2,.grid-3{grid-template-columns:1fr}
  .nav{display:none}
  .actions{display:none}
  .topbar-inner{gap:12px;padding:12px 0}
  .brand-logo{width:38px;height:38px}
  .mobile-actions{display:flex;min-width:0;flex:1;justify-content:flex-end}
  .mobile-actions .badge,.mobile-actions .admin-panel-link{max-width:100%}
  .admin-mobile-shortcuts{min-width:0;max-width:100%;justify-content:flex-end}
  .admin-mobile-shortcuts > *{min-width:0}
  .mobile-actions .theme-toggle{
    width:34px;
    height:34px;
  }
  .mobile-actions .theme-toggle .theme-toggle__icon{
    width:14px;
    height:14px;
  }
  .mobile-toggle{display:flex}
  .mobile-nav{display:block;position:fixed;inset:66px 12px auto 12px;background:var(--surface-top);border:1px solid var(--border);border-radius:18px;padding:16px;box-shadow:var(--shadow);z-index:30;max-height:calc(100vh - 88px);overflow:auto}
  .page-header{padding:28px 0 20px}
  .page-title{font-size:1.9rem;line-height:1.05}
  .card{padding:18px}
  .hero{grid-template-columns:1fr}
  .hero__actions{flex-wrap:wrap}
  .hero__actions .btn{width:100%;text-align:center}
  .admin-order-review{grid-template-columns:1fr}
  .admin-order-review__receipt-stage,
  .admin-order-review__receipt-stage img,
  .admin-order-review__receipt-stage iframe{min-height:460px}
  .illness-request-layout{grid-template-columns:1fr}
  .illness-request-summary,
  .illness-request-line,
  .illness-request-readonly__row{
    flex-direction:column;
  }
  .illness-request-line__meta,
  .illness-request-summary__meta{
    justify-items:start;
    white-space:normal;
  }
  .menu-highlight{grid-template-columns:1fr}
  .section-head{flex-direction:column;align-items:flex-start;gap:10px}
  .menu-table:not(.menu-table--tablet-fluid):not(.order-table--interactive),
  .order-table:not(.menu-table--tablet-fluid):not(.order-table--interactive),
  .table{display:block;width:100%;overflow-x:auto;white-space:nowrap}
  .menu-table:not(.menu-table--tablet-fluid):not(.order-table--interactive) thead,
  .menu-table:not(.menu-table--tablet-fluid):not(.order-table--interactive) tbody,
  .order-table:not(.menu-table--tablet-fluid):not(.order-table--interactive) thead,
  .order-table:not(.menu-table--tablet-fluid):not(.order-table--interactive) tbody,
  .table thead,
  .table tbody{display:table;min-width:640px;width:max-content}
  .table-wrap--wide .table,
  .admin-table-scroll .admin-table{
    display:table;
    width:max-content;
    overflow:visible;
    white-space:nowrap;
  }
  .admin-table-scroll .admin-table--users{
    width:100%;
  }
  .table-wrap--wide .table thead,
  .admin-table-scroll .admin-table thead{
    display:table-header-group;
    width:auto;
    min-width:unset;
  }
  .table-wrap--wide .table tbody,
  .admin-table-scroll .admin-table tbody{
    display:table-row-group;
    width:auto;
    min-width:unset;
  }
  .week-row{grid-template-columns:1fr}
  .week-row__selects{grid-template-columns:1fr}
  .date-range-buttons{display:grid;grid-template-columns:1fr;gap:8px}
  .date-range-btn{width:100%}
  .module-panel{padding:16px}
  .weekday-tabs{display:grid;grid-template-columns:1fr 1fr;gap:8px}
  .weekday-tab{width:100%}
  .global-toggles{display:grid;grid-template-columns:1fr;gap:8px}
  .global-toggles .btn{width:100%}
  .week-actions .btn{width:100%;text-align:center}
  .profile-page{padding:24px 0 4px}
  .profile-finance-grid{grid-template-columns:1fr}
  .profile-identity{
    grid-template-columns:1fr;
    padding:18px;
  }
  .profile-identity__main{flex-direction:row;align-items:center}
  .profile-identity__lead{max-width:none}
  .profile-avatar{width:52px;height:52px;font-size:1.2rem}
  .profile-balance-strip{
    width:100%;
    min-width:0;
    justify-self:stretch;
    flex-direction:row;
    justify-content:space-between;
    align-items:center;
  }
  .profile-balance-strip__btn{width:auto}
  .profile-settings,.profile-finance{padding:18px}
  .profile-section-head{align-items:flex-start}
  .profile-setting{
    grid-template-columns:1fr;
    gap:10px;
    padding:16px 0;
  }
  .profile-inline-form{
    flex-direction:column;
    align-items:stretch;
    gap:8px;
  }
  .profile-inline-form__field{
    flex:0 0 auto;
    width:100%;
  }
  .profile-inline-form__btn{width:100%}
  .profile-password-toggle__trigger{width:100%}
  .profile-security-actions .btn{width:100%}
  .order-history-panel__hero,
  .order-history-ledger__head{
    flex-direction:column;
    align-items:stretch;
  }
  .order-history-browser-form,
  .order-history-stats{
    display:grid;
    grid-template-columns:1fr;
  }
  .order-history-browser-form,
  .order-history-panel__summary,
  .order-history-entry__actions,
  .order-history-panel__nav,
  .order-history-ledger__actions{
    width:100%;
  }
  .order-history-browser-form .btn,
  .order-history-entry__actions{
    width:100%;
  }
  .order-history-entry__actions .btn{
    width:100%;
    text-align:center;
  }
  .order-history-browser-form .field{
    min-width:0;
  }
  .order-history-line,
  .order-history-entry__top,
  .order-history-entry__footer,
  .order-history-panel__summary,
  .order-history-ledger__head{
    flex-direction:column;
  }
  .order-history-entry__badges{justify-content:flex-start}
  .profile-record,
  .profile-record__top{
    flex-direction:column;
  }
  .profile-record__actions{
    width:100%;
  }
  .profile-record__actions .btn{
    width:100%;
    text-align:center;
  }
  .payment-upload-summary__row{
    flex-direction:column;
    gap:6px;
  }
  .payment-upload-summary__value{text-align:left}
  .payment-method,
  .payment-confirm{
    padding:12px;
  }
  .menu-global-layout .card{padding:18px}
  .hero__actions--compact{justify-content:flex-start}
}

@media (min-width:721px) and (max-width:1180px){
  .table-history{
    display:table;
    width:100%;
    white-space:normal;
    table-layout:auto;
  }

  .table-history thead{display:table-header-group}
  .table-history tbody{display:table-row-group;width:100%;min-width:0}

  .menu-table--tablet-fluid{
    display:table;
    width:100%;
    overflow:visible;
    white-space:normal;
    table-layout:fixed;
  }

  .menu-table--tablet-fluid thead{display:table-header-group}
  .menu-table--tablet-fluid tbody{display:table-row-group}

  .order-table--interactive{
    display:block;
    width:100%;
    overflow-x:auto;
    white-space:nowrap;
  }

  .order-table--interactive thead,
  .order-table--interactive tbody{
    display:table;
    width:100%;
    min-width:780px;
  }
}

@media (max-width:900px){
  .footer-inner{grid-template-columns:1fr}
  .reports-form__field--compact{max-width:none}
}

@media (max-width:720px){
  .mobile-actions{display:flex;min-width:0;flex:1;justify-content:flex-end}
  .mobile-actions .badge,
  .mobile-actions .admin-panel-link{
    max-width:100%;
    white-space:nowrap;
  }
  .topbar-inner{gap:10px}
  .page-title{font-size:1.7rem}
  .page-subtitle{font-size:0.95rem}
  .btn{padding:10px 16px}
  .btn.small{padding:8px 12px;font-size:0.92rem}
  .container,.topbar .container{padding-left:12px;padding-right:12px}
  .menu-period-heading{gap:10px;margin:28px 0 16px}
  .menu-period-heading__title{font-size:1.1rem;padding:8px 14px;max-width:100%}

  .auth-shell{
    padding:24px 0 44px;
  }

  .auth-card{
    padding:22px 18px;
    border-radius:24px;
  }

  .auth-card__header{
    gap:10px;
    margin-bottom:18px;
  }

  .auth-card__title{
    font-size:clamp(1.8rem, 8vw, 2.35rem);
  }

  .auth-stage-panel{
    padding:18px;
    border-radius:20px;
  }

  .auth-password-panel{
    max-height:320px;
  }

  .auth-inline-status__top{
    align-items:flex-start;
  }

  .auth-code-verify-panel{
    max-height:360px;
  }

  .auth-verify-status__top{
    align-items:flex-start;
  }

  .auth-secondary-actions{
    flex-direction:column;
  }

  .auth-secondary-actions > *{
    flex:1 1 auto;
  }

  .auth-verify-actions{
    flex-direction:column;
  }

  .auth-verify-actions > *{
    flex:1 1 auto;
  }

  .table-history,
  .table-history thead,
  .table-history tbody,
  .table-history tr,
  .table-history th,
  .table-history td{
    display:block;
    width:100%;
  }

  .table-history colgroup,
  .table-history thead{
    display:none;
  }

  .table-history tbody{
    min-width:0;
  }

  .table-history tr{
    padding:14px;
    border:1px solid var(--border);
    border-radius:16px;
    background:#fff;
    box-shadow:0 10px 24px rgba(28,23,18,0.08);
    margin-bottom:14px;
  }

  .table-history tr:last-child{
    margin-bottom:0;
  }

  .table-history td{
    border-bottom:1px solid rgba(225,215,200,0.75);
    padding:10px 0;
    white-space:normal;
    overflow:visible;
  }

  .table-history td:last-child{
    border-bottom:none;
    padding-bottom:0;
  }

  .table-history td::before{
    content:attr(data-label);
    display:block;
    margin-bottom:6px;
    font-size:0.8rem;
    font-weight:700;
    color:var(--muted);
    text-transform:uppercase;
    letter-spacing:0.04em;
  }

  .table-history .order-actions{
    gap:8px;
    white-space:normal;
  }

  .table-history .order-actions .btn,
  .table-history .order-actions .badge,
  .table-history .order-actions .action-delete{
    width:100%;
    justify-content:center;
  }

  .table-history .order-actions .action-delete .icon-btn{
    width:100%;
    min-height:40px;
    border-radius:999px;
  }

  .table-history .order-status{
    width:max-content;
    max-width:100%;
  }

  .menu-table-scroll{
    margin:0 -4px;
    padding:0 4px 4px;
  }

  .menu-card .menu-table-scroll--desktop,
  .week-day .menu-table-scroll--desktop{
    display:none;
  }

  .menu-card .menu-mobile-list,
  .week-day .menu-mobile-list{
    display:grid;
    gap:12px;
  }

  .menu-card__header{
    align-items:flex-start;
    gap:10px;
  }

  .menu-card__count{
    flex-shrink:0;
  }

  .week-day__summary{
    align-items:flex-start;
    gap:12px;
  }

  .week-day__meta{
    margin-left:auto;
  }

  .week-day__header{
    font-size:1.05rem;
    line-height:1.2;
  }

  .menu-mobile-item{
    padding:12px;
  }

  .menu-mobile-item__composition{
    font-size:0.88rem;
  }

  .menu-mobile-item__meta{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .menu-mobile-pill--price{
    grid-column:1 / -1;
  }

  .reports-form{
    grid-template-columns:1fr;
  }

  .reports-form__action{
    width:100%;
    text-align:center;
  }

  .order-table--interactive{
    display:block;
    width:100%;
    overflow:visible;
    white-space:normal;
  }

  .order-table--interactive thead{
    display:none;
  }

  .order-table--interactive tbody{
    display:block;
    width:100%;
    min-width:0;
  }

  .order-table--interactive .order-table__period-row{
    display:block;
    margin:14px 0 8px;
  }

  .order-table--interactive .order-table__period-row td{
    display:block;
    width:100% !important;
    border:none;
    padding:0;
    background:transparent !important;
    text-align:left !important;
  }

  .order-table--interactive .order-table__period-label{
    color:var(--primary-600);
    font-weight:800;
    letter-spacing:0.04em;
    text-transform:uppercase;
  }

  .order-table--interactive .order-table__item-row{
    display:block;
    margin-bottom:12px;
    padding:14px;
    border:1px solid var(--border);
    border-radius:16px;
    background:#fff;
    box-shadow:0 10px 24px rgba(28,23,18,0.08);
  }

  .order-table--interactive .order-table__item-row td{
    display:block;
    width:100% !important;
    border-bottom:none;
    padding:0;
    text-align:left !important;
    white-space:normal;
  }

  .order-table--interactive .order-table__item-row td + td{
    margin-top:10px;
    padding-top:10px;
    border-top:1px solid rgba(225,215,200,0.75);
  }

  .order-table--interactive .order-table__item-row td::before{
    content:attr(data-label);
    display:block;
    margin-bottom:6px;
    font-size:0.8rem;
    font-weight:700;
    color:var(--muted);
    text-transform:uppercase;
    letter-spacing:0.04em;
  }

  .order-table--interactive .order-table__item-row .qty-control{
    display:grid;
    grid-template-columns:40px 72px 40px;
    gap:8px;
    width:max-content;
    max-width:100%;
    justify-content:flex-start;
    align-items:center;
  }

  .order-table--interactive .order-table__item-row .qty-btn{
    width:40px;
    height:40px;
    min-width:40px;
  }

  .order-table--interactive .order-table__item-row .qty-input{
    width:100%;
    min-width:0;
    text-align:center;
  }

  .order-table--interactive .row-total{
    font-weight:700;
  }

  .table,
  .order-table:not(.order-table--interactive){
    overflow-x:visible;
    white-space:normal;
  }

  .table thead,
  .table tbody,
  .order-table:not(.order-table--interactive) thead,
  .order-table:not(.order-table--interactive) tbody{
    min-width:0;
    width:100%;
  }

  .table-wrap--wide .table,
  .admin-table-scroll .admin-table{
    display:table;
    width:max-content;
    white-space:nowrap;
  }

  .admin-table-scroll .admin-table--users{
    width:100%;
  }

  .table-wrap--wide .table thead,
  .admin-table-scroll .admin-table thead{
    display:table-header-group;
    width:auto;
    min-width:unset;
  }

  .table-wrap--wide .table tbody,
  .admin-table-scroll .admin-table tbody{
    display:table-row-group;
    width:auto;
    min-width:unset;
  }

  .menu-global-table__actions-head,
  .menu-global-table__actions-cell{
    right:0;
  }

  .menu-global-table__actions{
    min-width:124px;
  }

  .admin-table-scroll .admin-table--users .col-action,
  .admin-table-scroll .admin-table--users td:last-child,
  .admin-table-scroll .admin-table--users th:last-child{
    width:140px;
    min-width:140px;
  }

  .week-day .order-table .qty-control{
    justify-content:flex-start;
  }

  .week-day .order-table .qty-input{
    width:72px;
  }

  .day-total,
  .week-summary,
  .order-range-summary{
    text-align:left;
  }
}

@media (max-width:520px){
  .auth-shell{
    padding:18px 0 36px;
  }

  .auth-card{
    padding:18px 14px;
    border-radius:20px;
  }

  .auth-verify-status{
    padding:14px;
    border-radius:16px;
  }

  .auth-verify-status__email{
    width:100%;
    justify-content:center;
  }

  .auth-inline-status__email{
    width:100%;
    justify-content:center;
  }

  .auth-stage-panel{
    padding:16px 14px;
    border-radius:18px;
  }

  .auth-password-panel{
    gap:12px;
  }

  .auth-code-verify-panel{
    gap:12px;
  }

  .auth-stage-panel__title{
    font-size:1.32rem;
  }

  .auth-service-note{
    margin-top:16px;
    padding:14px 0 0;
  }
}
