/* Dog Elimination Diet Tracker - Master CSS Stylesheet
   Mobile Responsive Drawer & Week/Day Selector Overflow Fix
   Exact A5 Specifications: 148mm width x 210mm height (1 Page Per Week)
*/

:root {
  --color-primary: #084C3E;
  --color-primary-light: #0C6754;
  --color-mint: #00B087;
  --color-mint-light: #E0F7F2;
  --color-bg: #F4F8F6;
  --color-card: #FFFFFF;
  --color-text: #1C2D27;
  --color-muted: #5C7069;
  --color-border: #D1E2DB;
  
  --color-normal: #10B981;
  --color-mild: #F59E0B;
  --color-moderate: #F97316;
  --color-severe: #EF4444;
  --color-distressed: #991B1B;

  --sidebar-width-collapsed: 64px;
  --sidebar-width-expanded: 240px;

  --font-main: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --shadow-sm: 0 2px 8px rgba(8, 76, 62, 0.06);
  --shadow-md: 0 4px 16px rgba(8, 76, 62, 0.1);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden !important;
}

body {
  font-family: var(--font-main);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
}

/* Master Layout Grid */
.app-layout {
  display: flex;
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

/* Left Collapsible Sidebar Drawer */
.app-sidebar {
  width: var(--sidebar-width-collapsed);
  background: linear-gradient(180deg, var(--color-primary) 0%, #05362C 100%);
  color: white;
  display: flex;
  flex-direction: column;
  transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1), transform 0.25s ease;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 250;
  box-shadow: 2px 0 12px rgba(0,0,0,0.15);
  overflow-x: hidden;
  white-space: nowrap;
}

.app-sidebar.expanded {
  width: var(--sidebar-width-expanded);
}

.sidebar-header {
  height: 56px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  gap: 12px;
  justify-content: space-between;
}

.sidebar-toggle-btn {
  background: transparent;
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  transition: background 0.15s ease;
}
.sidebar-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

.mobile-close-btn {
  display: none;
  background: transparent;
  border: none;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px 8px;
}

.sidebar-brand-name {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}
.app-sidebar.expanded .sidebar-brand-name {
  opacity: 1;
  pointer-events: auto;
}

.sidebar-menu {
  display: flex;
  flex-direction: column;
  padding: 10px 6px;
  gap: 4px;
  flex-grow: 1;
}

.menu-section-label {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 0.08em;
  padding: 10px 10px 4px 10px;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.app-sidebar.expanded .menu-section-label {
  opacity: 1;
}

.sidebar-item {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.75);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.15s ease;
  text-align: left;
  width: 100%;
}

.sidebar-item:hover {
  background: rgba(255, 255, 255, 0.12);
  color: white;
}

.sidebar-item.active {
  background: var(--color-mint);
  color: white;
  font-weight: 700;
}

.sidebar-icon {
  font-size: 1.1rem;
  min-width: 24px;
  text-align: center;
  display: inline-block;
}

.sidebar-label {
  opacity: 0;
  transition: opacity 0.2s ease;
  overflow: hidden;
  text-overflow: ellipsis;
}
.app-sidebar.expanded .sidebar-label {
  opacity: 1;
}

.menu-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
  margin: 8px 4px;
}

.action-item {
  color: #A7F3D0;
}
.action-item:hover {
  background: rgba(0, 176, 135, 0.25);
  color: white;
}

/* Sidebar Backdrop for Mobile */
.sidebar-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9990;
  display: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.sidebar-backdrop.show {
  display: block;
  opacity: 1;
}

/* Main Content Area */
.app-main-content {
  flex-grow: 1;
  margin-left: var(--sidebar-width-collapsed);
  transition: margin-left 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  min-width: 0; /* Prevents flex children horizontal overflow */
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.app-sidebar.expanded + .app-main-content {
  margin-left: var(--sidebar-width-expanded);
}

/* STICKY FROZEN TOP BAR */
.app-top-bar {
  background: white;
  border-bottom: 1px solid var(--color-border);
  padding: 8px 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 150;
  box-shadow: 0 2px 10px rgba(8, 76, 62, 0.08);
  width: 100%;
  max-width: 100%;
}

.mobile-menu-trigger {
  display: none;
  background: var(--color-mint-light);
  border: 1.5px solid var(--color-mint);
  color: var(--color-primary);
  font-size: 1.25rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  position: absolute;
  left: 12px;
  z-index: 160;
  touch-action: manipulation;
}

.top-bar-title {
  position: absolute;
  left: 16px;
  font-weight: 800;
  color: var(--color-primary);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pet-summary-badge {
  background: var(--color-mint-light);
  padding: 5px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 0.82rem;
  color: var(--color-primary);
  margin: 0 auto;
  flex-wrap: wrap;
}

.pet-summary-badge strong {
  color: var(--color-primary);
  font-weight: 800;
}

/* FLOATING COMPACT SAVE BUTTON & TOAST NOTIFICATION */
.floating-save-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 999;
  background: var(--color-primary);
  color: white;
  border: 1.5px solid var(--color-mint);
  border-radius: 20px;
  padding: 8px 18px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 18px rgba(8, 76, 62, 0.35);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.floating-save-btn:hover {
  background: var(--color-mint);
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 6px 20px rgba(0, 176, 135, 0.4);
}

.floating-save-btn:active {
  transform: translateY(0) scale(0.98);
}

.toast-msg {
  position: fixed;
  bottom: 68px;
  right: 20px;
  z-index: 1000;
  background: #059669;
  color: white;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
  pointer-events: none;
}

.toast-msg.show {
  opacity: 1;
  transform: translateY(0);
}

/* Container & Sections */
.main-container {
  max-width: 1100px;
  margin: 16px auto;
  padding: 0 12px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
}

.tab-content {
  display: none;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.tab-content.active {
  display: block;
}

/* Section Cards */
.card {
  background: var(--color-card);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  margin-bottom: 16px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
}

.card-title {
  font-size: 1.15rem;
  color: var(--color-primary);
  font-weight: 700;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

/* WEEK & DAY SELECTOR BAR - GUARANTEED HORIZONTAL TOUCH SCROLL */
.week-selector-bar {
  background: var(--color-card);
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  margin-bottom: 16px;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

.selector-rows-wrapper {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.selector-line {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  min-width: 0; /* REQUIRED FOR FLEX HORIZONTAL SCROLL */
  box-sizing: border-box;
}

.selector-label {
  font-weight: 800;
  font-size: 0.82rem;
  color: var(--color-primary);
  min-width: 44px;
  flex-shrink: 0;
}

.week-pills {
  display: flex;
  gap: 6px;
  flex: 1 1 0%; /* FORCES SHRINK FIT INSIDE MOBILE SCREEN */
  min-width: 0;   /* CRITICAL: PREVENTS OVERFLOWING RIGHT EDGE */
  max-width: 100%;
  overflow-x: auto !important;
  overflow-y: hidden;
  white-space: nowrap;
  padding: 4px 2px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  touch-action: pan-x;
}

.btn-today-inline {
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 14px;
  flex-shrink: 0;
}

.week-pill {
  padding: 6px 14px;
  border-radius: 20px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--color-muted);
  white-space: nowrap;
  touch-action: manipulation;
  flex-shrink: 0 !important; /* PREVENTS INDIVIDUAL BUTTONS FROM SQUISHING */
}

.week-pill.active {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

/* VERTICAL TIME SLOTS STACK LAYOUT */
.time-slots-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.time-slot-card {
  background: #FAFDFC;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  box-shadow: 0 2px 10px rgba(8, 76, 62, 0.04);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.time-slot-card.active-current-slot {
  border: 2px solid var(--color-mint);
  box-shadow: 0 4px 20px rgba(0, 176, 135, 0.25);
}

.slot-header {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--color-mint-light);
}

.slot-header-hint {
  font-size: 0.78rem;
  color: var(--color-muted);
  font-weight: 600;
  background: var(--color-bg);
  padding: 2px 8px;
  border-radius: 12px;
}

.slot-content-rows {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* STRUCTURED PANEL CARDS INSIDE TIME SLOT */
.slot-section-panel {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.slot-section-title {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--color-primary);
  letter-spacing: 0.04em;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.slot-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  align-items: flex-start;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-group label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-muted);
  letter-spacing: 0.03em;
}

.input-text, .select-input {
  font-family: inherit;
  font-size: 0.85rem;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: white;
  width: 100%;
}

.input-text:focus, .select-input:focus {
  outline: none;
  border-color: var(--color-mint);
  box-shadow: 0 0 0 3px var(--color-mint-light);
}

/* Score Selector Buttons */
.score-selector {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.score-btn {
  min-width: 32px;
  height: 32px;
  padding: 0 6px;
  border-radius: 16px;
  border: 1px solid var(--color-border);
  background: white;
  color: var(--color-muted);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  touch-action: manipulation;
}

.score-btn:hover {
  background: var(--color-mint-light);
  border-color: var(--color-mint);
}

.score-btn.selected {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
  transform: scale(1.1);
  box-shadow: 0 2px 6px rgba(8, 76, 62, 0.3);
}

/* Yes / No Toggle Pill Buttons */
.yn-selector {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.yn-btn {
  padding: 6px 14px;
  border-radius: 16px;
  border: 1px solid var(--color-border);
  background: white;
  color: var(--color-muted);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  touch-action: manipulation;
}

.yn-btn:hover {
  background: var(--color-mint-light);
}

.yn-btn.yes.selected {
  background: #EF4444;
  color: white;
  border-color: #DC2626;
}

.yn-btn.no.selected {
  background: #10B981;
  color: white;
  border-color: #059669;
}

/* Buttons */
.btn {
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  touch-action: manipulation;
}

.btn-primary {
  background: var(--color-primary);
  color: white;
}
.btn-primary:hover {
  background: var(--color-primary-light);
}

.btn-outline {
  background: white;
  border-color: var(--color-border);
  color: var(--color-text);
}
.btn-outline:hover {
  background: var(--color-mint-light);
  border-color: var(--color-mint);
  color: var(--color-primary);
}

/* ==========================================================================
   MOBILE & TABLET RESPONSIVE MEDIA QUERIES (<768px)
   ========================================================================== */

@media (max-width: 768px) {
  .app-sidebar {
    position: fixed !important;
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 260px !important;
    max-width: 80vw !important;
    z-index: 9999 !important;
    transform: translateX(-100%) !important;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 4px 0 24px rgba(0,0,0,0.3) !important;
  }

  .app-sidebar.expanded {
    transform: translateX(0) !important;
    width: 260px !important;
  }

  .app-sidebar.expanded .sidebar-brand-name,
  .app-sidebar.expanded .sidebar-label,
  .app-sidebar.expanded .menu-section-label {
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  .mobile-close-btn {
    display: block !important;
  }

  .app-main-content {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .mobile-menu-trigger {
    display: flex !important;
  }

  .top-bar-title {
    display: none !important;
  }

  .pet-summary-badge {
    font-size: 0.74rem;
    padding: 4px 10px;
    gap: 6px;
    justify-content: space-around;
    width: auto;
    margin-left: 54px; /* Space for mobile hamburger button */
  }

  .week-selector-bar {
    padding: 8px;
  }

  .card {
    padding: 10px;
    border-radius: var(--radius-md);
  }

  .card-title {
    font-size: 0.95rem;
    flex-direction: column;
    align-items: flex-start;
  }

  .slot-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .floating-save-btn {
    bottom: 16px;
    right: 16px;
    padding: 8px 16px;
    font-size: 0.8rem;
  }

  .toast-msg {
    bottom: 64px;
    right: 16px;
    font-size: 0.78rem;
  }
}

/* ==========================================================================
   LYKA VISUAL REFERENCE SCALES (TAB 4)
   ========================================================================== */

/* LYKA REFERENCE SCALES STYLING (EXACT 1-TO-1 MATCH) */
.lyka-reference-grid {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 16px;
  width: 100%;
}
@media (max-width: 900px) {
  .lyka-reference-grid {
    grid-template-columns: 1fr;
  }
}

.lyka-card-box {
  background: white;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

.lyka-card-title {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 16px;
}

/* ITCHINESS SCALE RESPONSIVE CARDS & TRACKER */
.lyka-itch-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.itch-bar-track-wrapper {
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  width: 100%;
  padding: 0 4px;
}

.lyka-gradient-pill-bar {
  height: 22px;
  border-radius: 12px;
  background: linear-gradient(to right, #00B087 0%, #0C6754 20%, #EAB308 40%, #F97316 60%, #EF4444 80%, #991B1B 100%);
  width: 100%;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.15);
}

.bar-tick-marks {
  display: flex;
  justify-content: space-between;
  padding: 0 6px;
  position: relative;
}

.bar-tick {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--color-primary);
}

.itch-scores-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  width: 100%;
}

@media (max-width: 600px) {
  .itch-scores-cards {
    grid-template-columns: 1fr;
  }
}

.itch-score-item {
  background: #F8FAF9;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.score-pill-badge {
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--color-primary);
}

.itch-score-item p {
  font-size: 0.72rem;
  line-height: 1.25;
  color: var(--color-muted);
}

/* STOOL QUALITY & FREQUENCY LAYOUT */
.stool-layout-box {
  display: grid;
  grid-template-columns: 1fr 160px;
  gap: 16px;
}

@media (max-width: 650px) {
  .stool-layout-box {
    grid-template-columns: 1fr;
  }
  .stool-freq-side {
    border-left: none !important;
    border-top: 1.5px solid var(--color-border);
    padding-left: 0 !important;
    padding-top: 14px;
  }
}

.lyka-stool-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px 10px;
}
@media (max-width: 650px) {
  .lyka-stool-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.stool-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.stool-shape-img {
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.stool-shape-img img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
}

.stool-item span {
  font-size: 0.72rem;
  line-height: 1.25;
  color: var(--color-primary);
}

.stool-item strong {
  color: var(--color-primary);
  font-weight: 800;
}

.stool-freq-side {
  border-left: 1.5px solid var(--color-border);
  padding-left: 16px;
  display: flex;
  flex-direction: column;
}

.lyka-freq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 4px;
}

.freq-item {
  display: flex;
  flex-direction: column;
  font-size: 0.76rem;
  line-height: 1.2;
}

.freq-item strong {
  font-weight: 800;
  color: var(--color-primary);
}

.freq-item span {
  color: var(--color-muted);
  font-size: 0.72rem;
}

.stool-svg-card strong {
  color: var(--color-primary);
  font-weight: 800;
}

.freq-side-panel {
  background: #F4F8F6;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 12px;
}

/* ==========================================================================
   A5 PRINTABLE PLANNER SHEET STYLES (1 Page per Week Layout)
   ========================================================================== */

.a5-print-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: center;
}

.a5-page {
  width: 148mm;
  height: 209mm;
  background: white;
  border-radius: 0;
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
  padding: 4.5mm 5.5mm;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-size: 7.5pt;
  line-height: 1.2;
  color: #111;
  position: relative;
  page-break-after: always;
  break-after: page;
  page-break-inside: avoid;
}

.a5-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-bottom: 2px solid var(--color-primary);
  padding-bottom: 3px;
  margin-bottom: 4px;
}

.a5-header-left h2 {
  font-size: 12pt;
  font-weight: 800;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1;
}

.a5-header-left p {
  font-size: 6.5pt;
  color: var(--color-muted);
  margin-top: 2px;
}

.a5-week-badge {
  background: var(--color-primary);
  color: white;
  font-size: 9.5pt;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 3px;
  display: inline-block;
}

.a5-meta-line {
  font-size: 7pt;
  color: #444;
  margin-top: 2px;
  text-align: right;
}

.a5-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 4px;
  font-size: 6pt;
}

.a5-table th {
  background: var(--color-primary);
  color: white;
  padding: 3px 3px;
  text-align: left;
  font-weight: 700;
  font-size: 5.8pt;
  text-transform: uppercase;
  border: 1px solid var(--color-primary);
}

.a5-table td {
  border: 1px solid #D1E2DB;
  padding: 2px 3px;
  vertical-align: middle;
}

.a5-day-cell {
  font-weight: 800;
  color: var(--color-primary);
  background: #F4F8F6;
  text-align: center;
  font-size: 6.2pt;
  width: 12%;
}

.a5-slot-cell {
  font-weight: 700;
  color: var(--color-muted);
  width: 10%;
  font-size: 5.5pt;
  text-transform: uppercase;
}

.a5-food-cell {
  width: 28%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.a5-score-cell {
  width: 8%;
  text-align: center;
  font-weight: 700;
  font-size: 6.2pt;
}

.a5-yn-cell {
  width: 8%;
  text-align: center;
  font-weight: 700;
  font-size: 6pt;
}

.a5-notes-cell {
  width: 26%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.a5-summary-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin-bottom: 4px;
}

.a5-summary-box {
  background: var(--color-mint-light);
  border: 1px solid var(--color-border);
  border-radius: 3px;
  padding: 2px 4px;
  text-align: center;
}

.a5-summary-box span {
  display: block;
  font-size: 5.5pt;
  text-transform: uppercase;
  color: var(--color-muted);
  font-weight: 700;
}

.a5-summary-box strong {
  font-size: 8.5pt;
  color: var(--color-primary);
  font-weight: 800;
}

.a5-scales-footer {
  display: grid;
  grid-template-columns: 1.1fr 1.1fr 0.8fr;
  gap: 4px;
  background: #F4F8F6;
  border: 1px solid #D1E2DB;
  border-radius: 3px;
  padding: 3px 5px;
  margin-bottom: 4px;
  font-size: 5.5pt;
  line-height: 1.1;
}

.a5-scale-col h4 {
  font-size: 6pt;
  color: var(--color-primary);
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 1px;
  border-bottom: 1px solid #C4D4CE;
  padding-bottom: 1px;
}

.a5-scale-line {
  margin-bottom: 0.5px;
}

.a5-vet-notes {
  border: 1px solid #C4D4CE;
  border-radius: 3px;
  padding: 3px 6px;
  flex-grow: 1;
  min-height: 16mm;
  display: flex;
  flex-direction: column;
}

.a5-vet-notes h4 {
  font-size: 6.5pt;
  color: var(--color-primary);
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 2px;
  display: flex;
  justify-content: space-between;
}

.a5-notes-lines {
  border-top: 1px dashed #D1E2DB;
  margin-top: 2px;
  padding-top: 2px;
  font-size: 6.5pt;
  color: #333;
  flex-grow: 1;
}

.a5-footer-disclaimer {
  font-size: 5pt;
  color: #777;
  text-align: center;
  margin-top: 2px;
}

@media print {
  @page {
    size: A5 portrait;
    margin: 3mm;
  }

  body {
    background: white !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .app-sidebar,
  .app-top-bar,
  .week-selector-bar,
  .no-print,
  .btn,
  .card-title,
  .floating-save-btn,
  .toast-msg,
  .tab-content:not(#printable-planner-view) {
    display: none !important;
  }

  #printable-planner-view {
    display: block !important;
  }

  .app-main-content {
    margin-left: 0 !important;
  }

  .main-container {
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .a5-print-container {
    gap: 0 !important;
  }

  .a5-page {
    box-shadow: none !important;
    border: none !important;
    margin: 0 !important;
    width: 100% !important;
    height: 100vh !important;
    padding: 3mm 4mm !important;
    page-break-after: always !important;
    break-after: page !important;
  }
}
