/* ══════════════════════════════════════════════════════════
   SCHEDULE + NOTIFICATIONS CSS
   Paste at the bottom of css/app.css
   ══════════════════════════════════════════════════════════ */

/* ── Schedule screen ───────────────────────────────────── */
#screen-schedule{
  position:fixed;inset:0;background:var(--cream);
  transform:translateX(100%);
  transition:transform 0.3s cubic-bezier(0.4,0,0.2,1);
  z-index:200;overflow-y:auto;-webkit-overflow-scrolling:touch;
}
#screen-schedule.open{transform:translateX(0)}

.sched-header{
  background:var(--brand-dark);
  padding:max(env(safe-area-inset-top),16px) 20px 18px;
  display:flex;align-items:center;gap:12px;position:sticky;top:0;z-index:10;
}
.sched-header-title{font-size:17px;font-weight:600;color:#fff;flex:1}

.sched-tabs{
  display:flex;gap:8px;padding:14px 16px 0;
  overflow-x:auto;scrollbar-width:none;
}
.sched-tabs::-webkit-scrollbar{display:none}

.sched-tab{
  flex-shrink:0;background:var(--surface);
  border:0.5px solid var(--cream-dark);border-radius:20px;
  padding:6px 14px;font-size:12px;font-weight:600;
  color:var(--brown-mid);cursor:pointer;
}
.sched-tab-active{background:var(--brand-dark);color:#fff;border-color:var(--brand-dark)}
.sched-tab-empty{
  background:var(--cream);border:0.5px dashed var(--cream-dark);
  color:var(--brown-light);cursor:default;
}

.sched-summary{
  background:var(--brand-dark);border-radius:var(--radius-sm);
  padding:12px 16px;margin-bottom:12px;
  display:flex;align-items:center;justify-content:space-between;
}
.sched-summary-title{font-size:14px;font-weight:600;color:#fff}
.sched-summary-sub{font-size:11px;color:rgba(255,255,255,.6);margin-top:2px}
.sched-badge{
  font-size:11px;font-weight:600;
  background:rgba(255,255,255,.15);color:#fff;
  padding:3px 10px;border-radius:20px;
}

.sched-row{
  display:grid;
  grid-template-columns:80px repeat(7,1fr);
  gap:2px;margin-bottom:2px;
}
.sched-day-hdr{
  text-align:center;font-size:9px;font-weight:600;
  color:var(--brown-light);padding:3px 0;
  text-transform:uppercase;letter-spacing:0.3px;
  line-height:1.3;
}
.sched-day-date{font-size:9px;font-weight:500;color:var(--brown-light);opacity:.75;text-transform:none;letter-spacing:0}
.sched-today-hdr{color:var(--brand)}
.sched-today-hdr .sched-day-date{color:var(--brand)}

.sched-name-cell{display:flex;align-items:center;gap:5px;padding:2px 0}
.sched-avatar{
  width:22px;height:22px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  font-size:9px;font-weight:700;color:#fff;flex-shrink:0;
}
.sched-name-text{
  font-size:10px;font-weight:600;color:var(--brown);
  white-space:normal;word-break:break-word;line-height:1.25;
}
.sched-name-first{display:block}
.sched-name-last{font-size:9px;font-weight:500;color:var(--brown-mid)}

.sched-cell{
  border-radius:4px;padding:2px 1px;text-align:center;
  font-size:9px;font-weight:700;min-height:30px;
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  line-height:1.3;
}
.sched-cell-time{font-size:8px;font-weight:500;opacity:.75}
.sched-open {background:#D4EDDA;color:#1A5C2E}
.sched-mid  {background:#FFF3CC;color:#7A5200}
.sched-close{background:#D6E4FF;color:#1A3A7C}
.sched-off  {color:var(--brown-light);font-size:9px}
.sched-today-cell{outline:1.5px solid var(--brand);outline-offset:-1px}

.sched-legend{
  display:flex;gap:10px;flex-wrap:wrap;
  margin-top:14px;padding-top:12px;
  border-top:0.5px solid var(--cream-dark);
}
.sched-legend-item{display:flex;align-items:center;gap:5px;font-size:10px;color:var(--brown-mid)}
.sched-legend-dot{width:10px;height:10px;border-radius:3px}

/* ── Notify admin tab ──────────────────────────────────── */
.notify-mode-bar{display:flex;gap:6px;margin-bottom:16px}
.notify-mode-btn{
  flex:1;padding:8px;font-size:13px;font-weight:600;
  background:var(--surface);border:1px solid var(--cream-dark);
  border-radius:var(--radius-sm);color:var(--brown-mid);cursor:pointer;
}
.notify-mode-btn.active{
  background:var(--brand-light);border-color:var(--brand);color:var(--brand);
}

/* ══════════════════════════════════════════════════════════
   NOTIFICATION BELL & BADGE
══════════════════════════════════════════════════════════ */
.notif-bell-btn { position: relative; }

.notif-badge {
  position: absolute;
  top: 2px; right: 2px;
  min-width: 16px; height: 16px;
  background: #E53935; color: #fff;
  border-radius: 99px;
  font-size: 9px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px; line-height: 1;
  pointer-events: none;
  border: 1.5px solid var(--brand);
  animation: badge-pop 0.2s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes badge-pop {
  from { transform: scale(0); } to { transform: scale(1); }
}

/* ══════════════════════════════════════════════════════════
   NOTIFICATION INBOX PANEL — slides down from top
══════════════════════════════════════════════════════════ */
.notif-panel {
  position: fixed;
  top: 0;           /* JS sets this to header bottom on open */
  left: 0; right: 0;
  max-height: 60vh; /* JS overrides with exact available space */
  background: var(--surface);
  border-radius: 0 0 20px 20px;
  z-index: 2000;    /* above header(100), nav(150), hamburger, everything */
  display: flex;
  flex-direction: column;
  transform: translateY(-120%);
  opacity: 0;
  transition: transform 0.28s cubic-bezier(0.4,0,0.2,1), opacity 0.2s ease;
  box-shadow: 0 8px 28px rgba(28,20,16,0.18);
  pointer-events: none;
}
.notif-panel.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.notif-panel::before { display: none; } /* no drag handle on top-panel */

.notif-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px 10px;
  border-bottom: 1px solid var(--cream-dark);
  flex-shrink: 0;
}

.notif-list {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1;
  padding: 4px 0 16px;
}
.notif-empty {
  text-align: center; padding: 40px 24px; color: var(--brown-light);
}
.notif-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--cream);
  position: relative;
}
.notif-item:last-child { border-bottom: none; }
.notif-item.notif-unread { background: #F5FAF6; }
.notif-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--brand); flex-shrink: 0; margin-top: 6px;
}
.notif-body { flex: 1; min-width: 0; cursor: default; }
.notif-body[onclick] { cursor: pointer; }
.notif-title {
  font-size: 14px; font-weight: 600; color: var(--brown);
  margin-bottom: 3px; line-height: 1.3;
}
.notif-msg {
  font-size: 13px; color: var(--brown-mid);
  line-height: 1.4; margin-bottom: 5px;
}
.notif-time { font-size: 11px; color: var(--brown-light); }
.notif-del-btn {
  background: none; border: none; cursor: pointer;
  font-size: 16px; padding: 4px 6px;
  border-radius: var(--radius-sm);
  color: var(--brown-light); flex-shrink: 0;
  opacity: 0.6; transition: opacity 0.15s, background 0.15s;
}
.notif-del-btn:hover, .notif-del-btn:active {
  opacity: 1; background: var(--cream-dark);
}

/* ── MONTHLY SALES REPORT ──────────────────────────────────────── */
.report-month-nav {
  display: flex; align-items: center; gap: 10px; margin-bottom: 16px;
  position: sticky; z-index: 5; background: var(--cream);
  padding: 8px 0 10px; border-bottom: 1px solid var(--cream-dark);
}
.report-step-btn {
  width: 38px; height: 38px; flex-shrink: 0; border-radius: var(--radius-sm);
  font-size: 18px; font-weight: 600; line-height: 1; color: #fff;
  background: var(--brand); border: 1px solid var(--brand);
  cursor: pointer; transition: opacity 0.15s;
}
.report-step-btn:disabled {
  background: var(--surface); color: var(--cream-dark);
  border-color: var(--cream-dark); cursor: default;
}
.report-month-label {
  flex: 1; text-align: center; font-family: 'Fraunces', serif;
  font-size: 17px; font-weight: 500; font-style: italic; color: var(--brown);
}
.report-panel { display: none; }
.report-panel.active { display: block; }

/* Hero */
.rep-hero {
  background: linear-gradient(135deg, var(--brand-dark), var(--brand));
  border-radius: var(--radius); padding: 20px; margin-bottom: 14px;
}
.rep-hero-label {
  font-size: 10px; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: rgba(255,255,255,0.65); margin-bottom: 4px;
}
.rep-hero-month {
  font-family: 'Fraunces', serif; font-size: 26px; font-weight: 300;
  font-style: italic; color: #fff; margin-bottom: 16px;
}
.rep-hero-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rep-hero-stat {
  background: rgba(255,255,255,0.12); border-radius: var(--radius-sm); padding: 12px 14px;
}
.rep-hero-val {
  font-family: 'Fraunces', serif; font-size: 22px; font-weight: 300;
  font-style: italic; color: #fff; line-height: 1;
}
.rep-hero-sub {
  font-size: 10px; font-weight: 500; text-transform: uppercase;
  letter-spacing: 0.06em; color: rgba(255,255,255,0.6); margin-top: 4px;
}

/* Section headers */
.rep-section-head {
  display: flex; align-items: center; gap: 8px; margin: 16px 0 8px;
}
.rep-section-title {
  font-size: 10px; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--brown-light);
}

/* Cards */
.rep-card {
  background: var(--surface); border: 1px solid var(--cream-dark);
  border-radius: var(--radius-sm); margin-bottom: 8px; overflow: hidden;
}

/* Donut */
.rep-donut-wrap { display: flex; align-items: center; gap: 14px; padding: 14px; }
.rep-legend { flex: 1; }
.rep-legend-item {
  display: flex; align-items: center; gap: 7px; margin-bottom: 7px;
}
.rep-legend-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.rep-legend-name { flex: 1; font-size: 11px; color: var(--brown-mid); }
.rep-legend-pct { font-size: 11px; font-weight: 600; color: var(--brown); }

/* Category card */
.rep-cat-head {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  cursor: pointer;
}
.rep-cat-icon {
  width: 32px; height: 32px; border-radius: 8px; display: flex;
  align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0;
}
.rep-cat-info { flex: 1; min-width: 0; }
.rep-cat-name { font-size: 13px; font-weight: 500; color: var(--brown); }
.rep-cat-meta { font-size: 11px; color: var(--brown-light); margin-top: 2px; }
.rep-cat-sales {
  font-family: 'Fraunces', serif; font-size: 16px; font-weight: 300;
  font-style: italic; color: var(--brown); flex-shrink: 0;
}
.rep-cat-chevron {
  font-size: 11px; color: var(--brown-light); transition: transform 0.2s; flex-shrink: 0;
}
.rep-cat-card.open .rep-cat-chevron { transform: rotate(180deg); }

/* Cat bar */
.rep-cat-bar-bg { height: 4px; background: var(--cream-dark); }
.rep-cat-bar { height: 100%; transition: width 0.6s ease; }

/* Item list */
.rep-item-list { display: none; border-top: 1px solid var(--cream-dark); }
.rep-cat-card.open .rep-item-list { display: block; }
.rep-item-row {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-bottom: 1px solid var(--cream-dark);
}
.rep-item-row:last-child { border-bottom: none; }
.rep-item-rank { font-size: 10px; font-weight: 600; color: var(--brown-light); width: 14px; flex-shrink: 0; }
.rep-item-name { flex: 1; font-size: 12px; color: var(--brown); min-width: 0; }
.rep-item-bar-wrap { width: 60px; height: 4px; background: var(--cream-dark); border-radius: 2px; overflow: hidden; flex-shrink: 0; }
.rep-item-bar { height: 100%; border-radius: 2px; }
.rep-item-qty { font-size: 11px; color: var(--brown-light); width: 32px; text-align: right; flex-shrink: 0; }
.rep-item-sales { font-size: 12px; font-weight: 500; color: var(--brown); width: 64px; text-align: right; flex-shrink: 0; }

/* Channel grid */
.rep-channel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rep-chan-card { padding: 12px 14px; }
.rep-chan-name { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--brown-light); margin-bottom: 4px; }
.rep-chan-sales { font-family: 'Fraunces', serif; font-size: 18px; font-weight: 300; font-style: italic; color: var(--brown); line-height: 1; }
.rep-chan-qty { font-size: 11px; color: var(--brown-light); margin-top: 3px; }
.rep-chan-pct {
  font-size: 11px; font-weight: 600; color: var(--brand-dark);
  background: var(--brand-light); border-radius: 20px;
  padding: 2px 8px; display: inline-block; margin-top: 6px;
}

/* Footer */
.rep-footer {
  margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--cream-dark);
  font-size: 10px; color: var(--brown-light); text-align: center;
}

/* Toppings inside Bowls card */
.rep-topping-section { border-top: 1px solid var(--cream-dark); }
.rep-topping-head {
  padding: 7px 13px 5px;
  background: var(--cream);
  border-bottom: 0.5px solid var(--cream-dark);
  border-top: 0.5px solid var(--cream-dark);
}
.rep-topping-head:first-child { border-top: none; }
.rep-topping-label {
  font-size: 10px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--brown-light);
}
.rep-item-qty-wide { width: 44px; }

/* Traffic bar charts */
.rep-bar-chart { padding: 12px 13px; }
.rep-bar-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.rep-bar-row:last-child { margin-bottom: 0; }
.rep-bar-lbl { font-size: 11px; color: var(--brown-mid); width: 30px; flex-shrink: 0; text-align: right; }
.rep-bar-bg { flex: 1; height: 18px; background: var(--cream-dark); border-radius: 4px; overflow: hidden; }
.rep-bar-fill { height: 100%; border-radius: 4px; display: flex; align-items: center; padding-left: 7px; min-width: 28px; }
.rep-bar-text { font-size: 10px; font-weight: 500; color: #fff; }
