/* =========================================
   DONATO FAMILY HUB CALENDAR
   Family Hub browser runs at 200% zoom by default.
   zoom:0.5 on html corrects so 1920px CSS = 1920px physical.
   All measurements are in final physical pixels.
   NO clamp(), NO CSS-var-in-calc — older Chromium safe.
   ========================================= */

/* House Colors */
/* Dark Hunter Green  #3A4A3F */
/* Urbane Bronze      #54504A */
/* Alabaster          #EDEAE0 */
/* Roycroft Copper Red #7B3728 */

html {
  zoom: 0.5; /* corrects Family Hub 200% default zoom */
  -moz-transform: scale(0.5);
  -moz-transform-origin: 0 0;
}

*, *::before, *::after {
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  width: 1920px;
  height: 2160px; /* 1080 x2 because zoom:0.5 halves it back to 1080 */
  overflow: hidden;
  font-family: 'Nunito', Arial, sans-serif;
  background: #2B3730;
  color: #EDEAE0;
  font-size: 28px; /* large base — halved to 14px by zoom:0.5 */
  -webkit-font-smoothing: antialiased;
}

/* ══════════════════════════════════════════
   TOP BAR  — 112px tall (= 56px after zoom)
══════════════════════════════════════════ */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 112px;
  background: #3A4A3F;
  border-bottom: 2px solid rgba(237,234,224,0.2);
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: space-between;
  justify-content: space-between;
  padding: 0 48px;
  z-index: 200;
  -webkit-box-shadow: 0 4px 32px rgba(0,0,0,0.35);
  box-shadow: 0 4px 32px rgba(0,0,0,0.35);
}

.topbar-left {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  gap: 32px;
  -webkit-flex: 1;
  flex: 1;
}

.topbar-right {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  gap: 20px;
}

/* Hamburger */
.hamburger {
  width: 80px; height: 80px;
  background: transparent;
  border: 2px solid rgba(237,234,224,0.25);
  border-radius: 12px;
  cursor: pointer;
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
  flex-direction: column;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  gap: 10px;
  padding: 16px;
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
  -webkit-transition: background 0.2s;
  transition: background 0.2s;
}
.hamburger:hover { background: #4E5C51; }
.hamburger span {
  display: block;
  width: 36px; height: 4px;
  background: #B8B4AA;
  border-radius: 2px;
  -webkit-transition: all 0.25s;
  transition: all 0.25s;
}
body.sb-open .hamburger span:nth-child(1) { -webkit-transform: translateY(14px) rotate(45deg); transform: translateY(14px) rotate(45deg); }
body.sb-open .hamburger span:nth-child(2) { opacity: 0; }
body.sb-open .hamburger span:nth-child(3) { -webkit-transform: translateY(-14px) rotate(-45deg); transform: translateY(-14px) rotate(-45deg); }

.family-name {
  font-family: 'Playfair Display', serif;
  font-size: 44px;
  color: #EDEAE0;
  border-bottom: 4px solid #7B3728;
  padding-bottom: 2px;
  white-space: nowrap;
}

.live-clock {
  font-size: 30px;
  font-weight: 700;
  color: #B8B4AA;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.icon-btn {
  width: 80px; height: 80px;
  border: 2px solid rgba(237,234,224,0.25);
  background: #424E46;
  color: #B8B4AA;
  border-radius: 12px;
  font-size: 36px;
  cursor: pointer;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  -webkit-transition: all 0.18s;
  transition: all 0.18s;
}
.icon-btn:hover { background: #4E5C51; border-color: #7B3728; }
.icon-btn.spinning { -webkit-animation: spin 1s linear infinite; animation: spin 1s linear infinite; }
@-webkit-keyframes spin { to { -webkit-transform: rotate(360deg); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ══════════════════════════════════════════
   SIDEBAR OVERLAY
══════════════════════════════════════════ */
.sb-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 140;
  opacity: 0;
  pointer-events: none;
  -webkit-transition: opacity 0.25s;
  transition: opacity 0.25s;
}
body.sb-open .sb-overlay {
  opacity: 1;
  pointer-events: all;
}

/* ══════════════════════════════════════════
   SIDEBAR  540px wide (= 270px after zoom)
══════════════════════════════════════════ */
.sidebar {
  position: fixed;
  top: 112px;
  left: 0;
  width: 540px;
  bottom: 272px; /* above dock */
  background: #3A4A3F;
  border-right: 2px solid rgba(237,234,224,0.2);
  -webkit-transform: translateX(-100%);
  transform: translateX(-100%);
  -webkit-transition: -webkit-transform 0.28s cubic-bezier(0.4,0,0.2,1);
  transition: transform 0.28s cubic-bezier(0.4,0,0.2,1);
  z-index: 150;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-box-shadow: 8px 0 64px rgba(0,0,0,0.5);
  box-shadow: 8px 0 64px rgba(0,0,0,0.5);
}
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(237,234,224,0.2); border-radius: 3px; }

body.sb-open .sidebar {
  -webkit-transform: translateX(0);
  transform: translateX(0);
}

/* ── Panel headers ── */
.sb-panel { border-bottom: 1px solid rgba(237,234,224,0.1); }

.sb-hdr {
  width: 100%;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: space-between;
  justify-content: space-between;
  padding: 28px 32px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #EDEAE0;
  font-family: 'Nunito', Arial, sans-serif;
  font-size: 26px;
  font-weight: 700;
  text-align: left;
  -webkit-transition: background 0.15s;
  transition: background 0.15s;
}
.sb-hdr:hover { background: #4E5C51; }
.sb-hdr:active { background: #424E46; }

.sb-arrow {
  font-size: 20px;
  color: #7A7570;
  -webkit-transition: -webkit-transform 0.25s;
  transition: transform 0.25s;
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
}

/* collapsed state */
.sb-panel.collapsed .sb-arrow {
  -webkit-transform: rotate(-90deg);
  transform: rotate(-90deg);
}
.sb-panel.collapsed .sb-body {
  display: none;
}

.sb-body {
  padding: 8px 28px 24px;
}

/* ── Mini calendar ── */
.mini-cal-hdr {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: space-between;
  justify-content: space-between;
  margin-bottom: 16px;
}
.mini-cal-title { font-size: 24px; font-weight: 700; }
.mini-nav {
  background: none; border: none;
  color: #B8B4AA; font-size: 36px;
  cursor: pointer; padding: 4px 12px;
  border-radius: 8px; line-height: 1;
}
.mini-nav:hover { background: #4E5C51; }
.mini-grid {
  display: -webkit-flex;
  display: flex;
  -webkit-flex-wrap: wrap;
  flex-wrap: wrap;
}
.mini-grid > * { width: 14.2857%; }
.mini-dname {
  text-align: center; font-size: 18px;
  color: #7A7570; font-weight: 800;
  text-transform: uppercase; padding: 6px 0;
}
.mini-day {
  text-align: center; font-size: 20px;
  padding: 8px 2px; border-radius: 50%;
  cursor: pointer; color: #B8B4AA;
  -webkit-transition: background 0.12s;
  transition: background 0.12s;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  aspect-ratio: 1;
}
.mini-day:hover { background: #4E5C51; color: #EDEAE0; }
.mini-day.today { background: #7B3728; color: #EDEAE0; font-weight: 700; }
.mini-day.other { opacity: 0.35; }

/* ── Cal list ── */
.cal-list-lbl {
  font-size: 18px; text-transform: uppercase;
  letter-spacing: 2px; color: #7A7570;
  font-weight: 800; margin-bottom: 12px;
}
.cal-item {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  gap: 18px;
  padding: 14px 16px; border-radius: 10px;
  cursor: pointer;
  -webkit-transition: background 0.12s;
  transition: background 0.12s;
}
.cal-item:hover { background: #4E5C51; }
.cal-dot { width: 20px; height: 20px; border-radius: 5px; -webkit-flex-shrink: 0; flex-shrink: 0; }
.cal-name { -webkit-flex: 1; flex: 1; font-size: 22px; font-weight: 600; }
.cal-src { font-size: 16px; color: #7A7570; }
.cal-chk {
  width: 32px; height: 32px; border-radius: 6px;
  border: 3px solid rgba(237,234,224,0.25);
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  font-size: 16px;
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
}
.cal-chk.on { background: currentColor; border-color: currentColor; }
.cal-chk.on::after { content: '\2713'; color: #fff; font-weight: 900; font-size: 18px; }

/* ── Weather ── */
.wx-main { display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center; gap: 16px; margin-bottom: 8px; }
.wx-icon { font-size: 56px; }
.wx-temp { font-size: 56px; font-weight: 800; color: #EDEAE0; }
.wx-loc { font-size: 18px; text-transform: uppercase; letter-spacing: 2px; color: #7A7570; margin-bottom: 6px; }
.wx-desc { font-size: 20px; color: #B8B4AA; }

/* ── Upcoming ── */
.upc-item {
  padding: 14px 18px; border-radius: 8px;
  border-left: 6px solid #7B3728;
  background: #424E46; margin-bottom: 10px;
}
.upc-title { font-size: 22px; font-weight: 600; line-height: 1.3; }
.upc-time  { font-size: 18px; color: #B8B4AA; margin-top: 4px; }

/* ── Today meals ── */
.tm-row {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(237,234,224,0.1);
}
.tm-row:last-child { border-bottom: none; }
.tm-type { font-size: 20px; font-weight: 700; min-width: 140px; }
.tm-name { -webkit-flex: 1; flex: 1; font-size: 20px; color: #B8B4AA; }
.tm-add {
  width: 48px; height: 48px;
  background: #4E5C51; border: 2px solid rgba(237,234,224,0.2);
  border-radius: 10px; color: #B8B4AA;
  font-size: 28px; cursor: pointer;
  display: -webkit-flex; display: flex;
  -webkit-align-items: center; align-items: center;
  -webkit-justify-content: center; justify-content: center;
  -webkit-transition: all 0.12s; transition: all 0.12s;
}
.tm-add:hover { background: #6B8F71; color: #fff; border-color: #6B8F71; }

/* ══════════════════════════════════════════
   MAIN CONTENT
   Left=0 always (sidebar overlays, doesn't push)
   Top=112 topbar, Bottom=272 dock
══════════════════════════════════════════ */
.main-content {
  position: fixed;
  top: 112px;
  left: 0;
  right: 0;
  bottom: 272px;
  overflow: hidden;
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
  flex-direction: column;
  padding: 32px 40px 24px;
}

.cal-header {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  gap: 24px;
  margin-bottom: 24px;
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
}

.cal-title {
  font-family: 'Playfair Display', serif;
  font-size: 60px;
  color: #EDEAE0;
  -webkit-flex: 1;
  flex: 1;
  font-weight: 700;
}

.arrow-btn {
  width: 76px; height: 76px;
  background: #424E46;
  border: 2px solid rgba(237,234,224,0.2);
  color: #B8B4AA;
  font-size: 52px; border-radius: 16px;
  cursor: pointer;
  display: -webkit-flex; display: flex;
  -webkit-align-items: center; align-items: center;
  -webkit-justify-content: center; justify-content: center;
  -webkit-transition: all 0.15s; transition: all 0.15s;
  line-height: 1; -webkit-flex-shrink: 0; flex-shrink: 0;
}
.arrow-btn:hover { background: #7B3728; border-color: #7B3728; color: #EDEAE0; }

.today-btn {
  padding: 18px 40px;
  background: transparent;
  border: 2px solid #7B3728;
  color: #923F2E;
  font-family: 'Nunito', Arial, sans-serif;
  font-size: 26px; font-weight: 700;
  border-radius: 16px; cursor: pointer;
  -webkit-transition: all 0.15s; transition: all 0.15s;
  white-space: nowrap; -webkit-flex-shrink: 0; flex-shrink: 0;
}
.today-btn:hover { background: #7B3728; color: #EDEAE0; }

.calendar-body {
  -webkit-flex: 1;
  flex: 1;
  overflow: hidden;
  min-height: 0;
}

/* ══════════════════════════════════════════
   BOTTOM DOCK  136px tall (= 68px after zoom)
══════════════════════════════════════════ */
.dock {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 272px;
  background: #3A4A3F;
  border-top: 2px solid rgba(237,234,224,0.2);
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: space-around;
  justify-content: space-around;
  z-index: 200;
  padding: 0 32px;
  -webkit-box-shadow: 0 -4px 32px rgba(0,0,0,0.3);
  box-shadow: 0 -4px 32px rgba(0,0,0,0.3);
}

.dock-btn {
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
  flex-direction: column;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  gap: 6px;
  background: transparent; border: none;
  color: #7A7570;
  cursor: pointer; padding: 16px 40px;
  border-radius: 16px;
  -webkit-transition: all 0.18s; transition: all 0.18s;
  min-width: 160px;
  font-family: 'Nunito', Arial, sans-serif;
  position: relative;
}
.dock-btn:hover { color: #B8B4AA; background: #4E5C51; }
.dock-btn.active { color: #923F2E; }
.dock-btn.active::after {
  content: '';
  position: absolute;
  bottom: 8px; left: 50%;
  -webkit-transform: translateX(-50%);
  transform: translateX(-50%);
  width: 40px; height: 6px;
  background: #7B3728;
  border-radius: 3px;
}
.dock-icon { font-size: 40px; line-height: 1; }
.dock-lbl { font-size: 18px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }

/* FAB */
.dock-fab {
  width: 100px; height: 100px;
  background: #7B3728; border: none;
  border-radius: 50%;
  color: #EDEAE0;
  font-size: 56px; line-height: 1;
  cursor: pointer;
  display: -webkit-flex; display: flex;
  -webkit-align-items: center; align-items: center;
  -webkit-justify-content: center; justify-content: center;
  -webkit-box-shadow: 0 8px 32px rgba(123,55,40,0.55);
  box-shadow: 0 8px 32px rgba(123,55,40,0.55);
  -webkit-transition: all 0.18s; transition: all 0.18s;
  margin-bottom: 16px;
  -webkit-flex-shrink: 0; flex-shrink: 0;
}
.dock-fab:hover { background: #923F2E; -webkit-transform: scale(1.08); transform: scale(1.08); }
.dock-fab:active { -webkit-transform: scale(0.96); transform: scale(0.96); }

/* ══════════════════════════════════════════
   MONTH GRID
══════════════════════════════════════════ */
.month-grid {
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
  flex-direction: column;
  height: 100%;
  gap: 4px;
}
.month-row-names {
  display: -webkit-flex;
  display: flex;
  gap: 4px;
  height: 54px;
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
}
.month-row {
  display: -webkit-flex;
  display: flex;
  gap: 4px;
  -webkit-flex: 1;
  flex: 1;
  min-height: 0;
}
.month-day-name {
  -webkit-flex: 1; flex: 1;
  text-align: center;
  font-size: 20px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 2px;
  color: #7A7570;
  display: -webkit-flex; display: flex;
  -webkit-align-items: center; align-items: center;
  -webkit-justify-content: center; justify-content: center;
}
.month-cell {
  -webkit-flex: 1; flex: 1;
  background: #424E46;
  border-radius: 10px;
  border: 2px solid rgba(237,234,224,0.1);
  padding: 10px 12px;
  overflow: hidden; cursor: pointer;
  -webkit-transition: border-color 0.12s, background 0.12s;
  transition: border-color 0.12s, background 0.12s;
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
  flex-direction: column;
  min-height: 0;
}
.month-cell:hover { border-color: #7B3728; background: #4E5C51; }
.month-cell.today { background: rgba(123,55,40,0.2); border-color: #7B3728; border-width: 3px; }
.month-cell.other { opacity: 0.35; }
.month-cell.selected { border-color: #7B3728; background: rgba(123,55,40,0.16); }

.day-num {
  font-size: 24px; font-weight: 700;
  color: #B8B4AA; line-height: 1;
  margin-bottom: 6px; -webkit-flex-shrink: 0; flex-shrink: 0;
}
.month-cell.today .day-num {
  background: #7B3728; color: #EDEAE0;
  width: 42px; height: 42px; border-radius: 50%;
  display: -webkit-flex; display: flex;
  -webkit-align-items: center; align-items: center;
  -webkit-justify-content: center; justify-content: center;
  font-size: 22px;
}
.day-evts { -webkit-flex: 1; flex: 1; overflow: hidden; display: -webkit-flex; display: flex; -webkit-flex-direction: column; flex-direction: column; gap: 4px; }

.chip {
  font-size: 18px; padding: 3px 10px; border-radius: 5px;
  color: #fff; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
  cursor: pointer; font-weight: 600;
}
.chip.meal-chip {
  background: rgba(84,80,74,0.6) !important;
  border-left: 5px solid #6B8F71;
  color: #EDEAE0;
}
.chip:hover { opacity: 0.82; }
.more-chip {
  font-size: 18px; color: #7A7570; font-weight: 600;
  cursor: pointer; padding: 2px 10px;
}
.more-chip:hover { color: #923F2E; }

/* ══════════════════════════════════════════
   WEEK VIEW
══════════════════════════════════════════ */
.week-wrap {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
}
.week-wrap::-webkit-scrollbar { width: 6px; }
.week-wrap::-webkit-scrollbar-thumb { background: rgba(237,234,224,0.2); }

.week-grid {
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
  flex-direction: column;
  min-width: 0;
}
.week-header-row {
  display: -webkit-flex;
  display: flex;
  position: -webkit-sticky; position: sticky;
  top: 0; z-index: 5;
  background: #3A4A3F;
  border-bottom: 2px solid rgba(237,234,224,0.15);
  -webkit-flex-shrink: 0; flex-shrink: 0;
}
.week-timecol-hdr { width: 104px; -webkit-flex-shrink: 0; flex-shrink: 0; }
.week-day-hdr {
  -webkit-flex: 1; flex: 1;
  text-align: center; padding: 12px 4px;
  border-left: 2px solid rgba(237,234,224,0.1);
}
.week-day-hdr.today .week-day-num { color: #923F2E; }
.week-dname { font-size: 18px; font-weight: 800; text-transform: uppercase; color: #7A7570; }
.week-day-num { font-size: 40px; font-weight: 800; color: #B8B4AA; line-height: 1.2; }

.week-body-row {
  display: -webkit-flex;
  display: flex;
  height: 108px;
  -webkit-flex-shrink: 0; flex-shrink: 0;
}
.week-time-lbl {
  width: 104px; -webkit-flex-shrink: 0; flex-shrink: 0;
  font-size: 20px; color: #7A7570;
  padding: 8px 14px 0 0;
  text-align: right;
  border-top: 2px solid rgba(237,234,224,0.08);
}
.week-cell {
  -webkit-flex: 1; flex: 1;
  border-top: 2px solid rgba(237,234,224,0.08);
  border-left: 2px solid rgba(237,234,224,0.1);
  position: relative; cursor: pointer;
}
.week-cell:hover { background: rgba(123,55,40,0.1); }
.week-evt {
  position: absolute; left: 4px; right: 4px;
  border-radius: 6px; padding: 4px 8px;
  font-size: 18px; font-weight: 600; color: #fff;
  overflow: hidden; cursor: pointer; z-index: 1;
}

/* ══════════════════════════════════════════
   DAY VIEW
══════════════════════════════════════════ */
.day-wrap {
  display: -webkit-flex;
  display: flex;
  gap: 24px;
  height: 100%;
}
.day-timeline {
  -webkit-flex: 1; flex: 1;
  overflow-y: auto;
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
  flex-direction: column;
}
.day-timeline::-webkit-scrollbar { width: 6px; }
.day-timeline::-webkit-scrollbar-thumb { background: rgba(237,234,224,0.2); }
.day-hour-row {
  display: -webkit-flex; display: flex;
  min-height: 116px;
  border-top: 2px solid rgba(237,234,224,0.08);
}
.day-lbl {
  width: 116px; -webkit-flex-shrink: 0; flex-shrink: 0;
  font-size: 20px; color: #7A7570;
  padding: 8px 16px 0 0; text-align: right;
}
.day-cell { -webkit-flex: 1; flex: 1; position: relative; cursor: pointer; }
.day-cell:hover { background: rgba(123,55,40,0.1); }

.day-side {
  width: 460px; -webkit-flex-shrink: 0; flex-shrink: 0;
  display: -webkit-flex; display: flex;
  -webkit-flex-direction: column; flex-direction: column;
  gap: 20px; overflow-y: auto;
}
.day-side::-webkit-scrollbar { width: 6px; }
.day-side::-webkit-scrollbar-thumb { background: rgba(237,234,224,0.2); }
.day-card {
  background: #424E46; border-radius: 16px;
  padding: 24px; border: 2px solid rgba(237,234,224,0.1);
}
.day-card-title {
  font-size: 20px; text-transform: uppercase;
  letter-spacing: 2px; color: #7A7570;
  font-weight: 800; margin-bottom: 16px;
}
.meal-row {
  display: -webkit-flex; display: flex;
  -webkit-align-items: center; align-items: center;
  -webkit-justify-content: space-between; justify-content: space-between;
  padding: 16px 0;
  border-bottom: 2px solid rgba(237,234,224,0.08);
}
.meal-row:last-child { border-bottom: none; }
.meal-type { font-size: 22px; font-weight: 700; color: #EDEAE0; }
.meal-name { font-size: 22px; color: #B8B4AA; -webkit-flex: 1; flex: 1; padding: 0 16px; }
.meal-edit {
  width: 52px; height: 52px;
  background: #4E5C51; border: 2px solid rgba(237,234,224,0.2);
  border-radius: 10px; color: #B8B4AA; font-size: 28px;
  cursor: pointer; display: -webkit-flex; display: flex;
  -webkit-align-items: center; align-items: center;
  -webkit-justify-content: center; justify-content: center;
  -webkit-transition: all 0.12s; transition: all 0.12s;
}
.meal-edit:hover { background: #6B8F71; color: #fff; border-color: #6B8F71; }

/* ══════════════════════════════════════════
   MEAL WEEK VIEW
══════════════════════════════════════════ */
.meal-week {
  height: 100%;
  display: -webkit-flex;
  display: flex;
  gap: 8px;
}
.meal-day-col {
  -webkit-flex: 1; flex: 1;
  background: #424E46;
  border-radius: 16px;
  border: 2px solid rgba(237,234,224,0.1);
  padding: 16px 12px;
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
}
.meal-col-hdr { margin-bottom: 6px; }
.meal-col-dname { font-size: 18px; font-weight: 800; color: #7A7570; text-transform: uppercase; }
.meal-col-num { font-size: 44px; font-weight: 800; color: #923F2E; line-height: 1.1; }
.meal-entry {
  background: #3A4A3F; border-radius: 10px;
  padding: 10px 14px; cursor: pointer;
  border-left: 4px solid #7B3728;
  -webkit-transition: background 0.12s; transition: background 0.12s;
}
.meal-entry:hover { background: #4E5C51; }
.meal-entry-type { font-size: 16px; color: #7A7570; text-transform: uppercase; letter-spacing: 1px; }
.meal-entry-name { font-size: 20px; font-weight: 600; color: #EDEAE0; }
.meal-add-slot {
  background: transparent;
  border: 2px dashed rgba(237,234,224,0.2);
  border-radius: 10px; padding: 10px 14px;
  cursor: pointer; text-align: center;
  font-size: 20px; color: #7A7570;
  font-family: 'Nunito', Arial, sans-serif;
  -webkit-transition: all 0.12s; transition: all 0.12s;
}
.meal-add-slot:hover { border-color: #6B8F71; color: #6B8F71; }

/* ══════════════════════════════════════════
   MODALS
══════════════════════════════════════════ */
.modal-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(27,33,29,0.80);
  display: none;
  -webkit-align-items: center; align-items: center;
  -webkit-justify-content: center; justify-content: center;
  z-index: 500;
}
.modal-overlay.open {
  display: -webkit-flex;
  display: flex;
  -webkit-animation: fadeIn 0.18s ease;
  animation: fadeIn 0.18s ease;
}
@-webkit-keyframes fadeIn { from { opacity:0; } to { opacity:1; } }
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }

.modal {
  background: #323F37;
  border: 2px solid rgba(237,234,224,0.2);
  border-radius: 28px;
  width: 1040px; max-height: 1800px;
  display: -webkit-flex; display: flex;
  -webkit-flex-direction: column; flex-direction: column;
  -webkit-box-shadow: 0 48px 128px rgba(0,0,0,0.6);
  box-shadow: 0 48px 128px rgba(0,0,0,0.6);
  -webkit-animation: slideUp 0.18s ease;
  animation: slideUp 0.18s ease;
}
@-webkit-keyframes slideUp { from { -webkit-transform: translateY(32px); opacity:0; } to { -webkit-transform: translateY(0); opacity:1; } }
@keyframes slideUp { from { transform: translateY(32px); opacity:0; } to { transform: translateY(0); opacity:1; } }

.modal-wide { width: 1640px; }
.modal-sm   { width: 840px; }

.modal-hdr {
  display: -webkit-flex; display: flex;
  -webkit-align-items: center; align-items: center;
  -webkit-justify-content: space-between; justify-content: space-between;
  padding: 40px 52px 32px;
  border-bottom: 2px solid rgba(237,234,224,0.1);
  background: #3A4A3F;
  border-radius: 28px 28px 0 0;
  -webkit-flex-shrink: 0; flex-shrink: 0;
}
.modal-hdr h3 { font-size: 36px; font-weight: 700; color: #EDEAE0; }

.close-btn {
  width: 64px; height: 64px;
  background: #4E5C51; border: none;
  color: #B8B4AA; border-radius: 12px;
  font-size: 28px; cursor: pointer;
  display: -webkit-flex; display: flex;
  -webkit-align-items: center; align-items: center;
  -webkit-justify-content: center; justify-content: center;
  -webkit-transition: all 0.12s; transition: all 0.12s;
}
.close-btn:hover { background: #A0412E; color: #fff; }

.modal-body {
  padding: 40px 52px;
  overflow-y: auto; -webkit-flex: 1; flex: 1;
}
.modal-body::-webkit-scrollbar { width: 6px; }
.modal-body::-webkit-scrollbar-thumb { background: rgba(237,234,224,0.2); }

.modal-ftr {
  padding: 32px 52px;
  border-top: 2px solid rgba(237,234,224,0.1);
  display: -webkit-flex; display: flex;
  gap: 16px; -webkit-justify-content: flex-end; justify-content: flex-end;
  background: #3A4A3F;
  border-radius: 0 0 28px 28px;
  -webkit-flex-shrink: 0; flex-shrink: 0;
}

/* Forms */
.fg { margin-bottom: 28px; }
.fg label {
  display: block; font-size: 20px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 1.5px;
  color: #7A7570; margin-bottom: 10px;
}
.fi {
  width: 100%; padding: 18px 26px;
  background: #2B3730;
  border: 2px solid rgba(237,234,224,0.2);
  border-radius: 10px;
  color: #EDEAE0;
  font-family: 'Nunito', Arial, sans-serif;
  font-size: 26px;
  -webkit-transition: border-color 0.12s; transition: border-color 0.12s;
}
.fi:focus { outline: none; border-color: #7B3728; -webkit-box-shadow: 0 0 0 4px rgba(123,55,40,0.2); box-shadow: 0 0 0 4px rgba(123,55,40,0.2); }
.fi::placeholder { color: #7A7570; }
textarea.fi { resize: vertical; }
.fchk { width: 36px; height: 36px; cursor: pointer; accent-color: #7B3728; }
.frow { display: -webkit-flex; display: flex; gap: 24px; }
.frow .fg { -webkit-flex: 1; flex: 1; }
.frow-sm { display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center; gap: 24px; }
.frow-sm label { margin: 0; }
.hint { font-size: 22px; color: #7A7570; margin-bottom: 16px; line-height: 1.5; }

/* Buttons */
.btn-pri {
  padding: 18px 44px;
  background: #7B3728; border: none;
  color: #EDEAE0;
  font-family: 'Nunito', Arial, sans-serif;
  font-size: 26px; font-weight: 700;
  border-radius: 10px; cursor: pointer;
  -webkit-transition: background 0.15s; transition: background 0.15s;
}
.btn-pri:hover { background: #923F2E; }

.btn-sec {
  padding: 18px 44px;
  background: #4E5C51;
  border: 2px solid rgba(237,234,224,0.2);
  color: #EDEAE0;
  font-family: 'Nunito', Arial, sans-serif;
  font-size: 26px; font-weight: 700;
  border-radius: 10px; cursor: pointer;
  -webkit-transition: all 0.15s; transition: all 0.15s;
}
.btn-sec:hover { border-color: #7B3728; color: #923F2E; }

.btn-danger {
  padding: 18px 44px;
  background: transparent;
  border: 2px solid #A0412E; color: #A0412E;
  font-family: 'Nunito', Arial, sans-serif;
  font-size: 26px; font-weight: 700;
  border-radius: 10px; cursor: pointer;
  -webkit-transition: all 0.15s; transition: all 0.15s;
}
.btn-danger:hover { background: #A0412E; color: #fff; }

.btn-dashed {
  width: 100%; padding: 18px;
  background: transparent;
  border: 2px dashed rgba(237,234,224,0.2);
  color: #B8B4AA;
  font-family: 'Nunito', Arial, sans-serif;
  font-size: 24px; font-weight: 700;
  border-radius: 10px; cursor: pointer;
  margin-top: 16px;
  -webkit-transition: all 0.15s; transition: all 0.15s;
}
.btn-dashed:hover { border-color: #7B3728; color: #923F2E; }

/* Settings tabs */
.stabs {
  display: -webkit-flex; display: flex;
  gap: 4px; border-bottom: 2px solid rgba(237,234,224,0.15);
  margin-bottom: 36px;
}
.stab {
  padding: 18px 40px; background: none;
  border: none; border-bottom: 4px solid transparent;
  color: #B8B4AA;
  font-family: 'Nunito', Arial, sans-serif;
  font-size: 26px; font-weight: 700;
  cursor: pointer; margin-bottom: -2px;
  -webkit-transition: all 0.14s; transition: all 0.14s;
}
.stab:hover { color: #EDEAE0; }
.stab.active { color: #923F2E; border-bottom-color: #7B3728; }
.stab-body { display: none; }
.stab-body.active { display: block; }
.stab-body h4 { font-size: 28px; font-weight: 700; margin-bottom: 24px; color: #EDEAE0; }

/* Cal group */
.cal-grp-lbl {
  font-size: 18px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 2px; color: #6B6760;
  padding: 24px 0 10px;
  border-bottom: 2px solid rgba(237,234,224,0.1);
  margin-bottom: 10px;
}
.cal-settings-item {
  display: -webkit-flex; display: flex;
  -webkit-align-items: center; align-items: center;
  gap: 20px; padding: 20px 24px;
  background: #424E46; border-radius: 10px;
  margin-bottom: 8px;
  border: 2px solid rgba(237,234,224,0.1);
}
.csi-dot { width: 24px; height: 24px; border-radius: 6px; -webkit-flex-shrink: 0; flex-shrink: 0; }
.csi-name { -webkit-flex: 1; flex: 1; font-size: 26px; font-weight: 600; color: #EDEAE0; }
.csi-src { font-size: 18px; color: #7A7570; }
.csi-btns { display: -webkit-flex; display: flex; gap: 12px; }
.csi-btn {
  padding: 8px 20px;
  background: #4E5C51; border: 2px solid rgba(237,234,224,0.2);
  color: #B8B4AA; font-size: 20px; border-radius: 8px;
  cursor: pointer; font-family: 'Nunito', Arial, sans-serif;
  font-weight: 700; -webkit-transition: all 0.12s; transition: all 0.12s;
}
.csi-btn:hover { border-color: #7B3728; color: #923F2E; }
.csi-btn.del:hover { border-color: #A0412E; color: #A0412E; }

/* Providers */
.providers { display: -webkit-flex; display: flex; -webkit-flex-direction: column; flex-direction: column; gap: 16px; margin-bottom: 32px; }
.prov {
  display: -webkit-flex; display: flex;
  -webkit-align-items: center; align-items: center;
  gap: 24px; padding: 24px 28px;
  background: #424E46; border-radius: 16px;
  border: 2px solid rgba(237,234,224,0.1);
}
.prov-icon { font-size: 44px; }
.prov-info { -webkit-flex: 1; flex: 1; }
.prov-name { font-size: 28px; font-weight: 700; color: #EDEAE0; }
.prov-status { font-size: 20px; color: #7A7570; margin-top: 4px; }
.prov-status.on { color: #6B8F71; }
.btn-connect {
  padding: 14px 32px; background: #7B3728; border: none;
  color: #EDEAE0; font-family: 'Nunito', Arial, sans-serif;
  font-size: 22px; font-weight: 700;
  border-radius: 10px; cursor: pointer;
  -webkit-transition: background 0.14s; transition: background 0.14s;
}
.btn-connect:hover { background: #923F2E; }
.btn-connect.disc { background: transparent; border: 2px solid #A0412E; color: #A0412E; }
.btn-connect.disc:hover { background: #A0412E; color: #fff; }

.prov-form {
  background: #424E46; border: 2px solid rgba(237,234,224,0.2);
  border-radius: 16px; padding: 28px;
  margin-bottom: 28px; display: -webkit-flex; display: flex;
  -webkit-flex-direction: column; flex-direction: column; gap: 16px;
}

.sync-log {
  background: #2B3730; border-radius: 10px;
  padding: 18px 24px; font-size: 20px; color: #B8B4AA;
  min-height: 72px; margin-bottom: 24px;
  font-family: monospace; white-space: pre-wrap;
  border: 2px solid rgba(237,234,224,0.1);
}

/* Color/icon pickers */
.cpicker { display: -webkit-flex; display: flex; -webkit-flex-wrap: wrap; flex-wrap: wrap; gap: 12px; margin-bottom: 10px; }
.cswatch {
  width: 52px; height: 52px; border-radius: 10px;
  cursor: pointer; border: 3px solid transparent;
  -webkit-transition: -webkit-transform 0.12s; transition: transform 0.12s;
}
.cswatch:hover { -webkit-transform: scale(1.15); transform: scale(1.15); }
.cswatch.sel { border-color: #EDEAE0; -webkit-box-shadow: 0 0 0 4px #7B3728; box-shadow: 0 0 0 4px #7B3728; }

.ipicker { display: -webkit-flex; display: flex; -webkit-flex-wrap: wrap; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.iopt {
  width: 64px; height: 64px; background: #424E46;
  border: 2px solid rgba(237,234,224,0.2);
  border-radius: 10px; cursor: pointer;
  display: -webkit-flex; display: flex;
  -webkit-align-items: center; align-items: center;
  -webkit-justify-content: center; justify-content: center;
  font-size: 32px; -webkit-transition: all 0.12s; transition: all 0.12s;
}
.iopt:hover { border-color: #7B3728; background: #4E5C51; }
.iopt.sel { border-color: #7B3728; background: rgba(123,55,40,0.16); }

/* Event detail */
.edr { display: -webkit-flex; display: flex; gap: 20px; margin-bottom: 24px; -webkit-align-items: flex-start; align-items: flex-start; }
.edr-icon { font-size: 30px; width: 36px; -webkit-flex-shrink: 0; flex-shrink: 0; }
.edr-text { font-size: 26px; color: #B8B4AA; }
.edr-text strong { color: #EDEAE0; }

/* Meal cat settings */
.mcat-item {
  display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center;
  gap: 16px; padding: 18px 24px; background: #424E46;
  border-radius: 10px; margin-bottom: 10px;
  border: 2px solid rgba(237,234,224,0.1);
}

/* Toast */
.toast {
  position: fixed; bottom: 320px; right: 40px;
  background: #3A4A3F; border: 2px solid rgba(237,234,224,0.2);
  border-radius: 20px; padding: 22px 36px;
  font-size: 26px; font-weight: 600; z-index: 1000;
  -webkit-animation: toastIn 0.25s ease; animation: toastIn 0.25s ease;
  -webkit-box-shadow: 0 16px 48px rgba(0,0,0,0.45); box-shadow: 0 16px 48px rgba(0,0,0,0.45);
  display: -webkit-flex; display: flex;
  -webkit-align-items: center; align-items: center;
  gap: 16px; max-width: 760px; color: #EDEAE0;
}
.toast.success { border-color: #6B8F71; }
.toast.error   { border-color: #A0412E; }
@-webkit-keyframes toastIn { from { -webkit-transform: translateY(24px); opacity:0; } to { -webkit-transform: translateY(0); opacity:1; } }
@keyframes toastIn { from { transform: translateY(24px); opacity:0; } to { transform: translateY(0); opacity:1; } }

.hidden { display: none !important; }
