/* =====================================================================
   Ιερά Μονή Αγίας Θεοδώρας — Μενού
   Design tokens
   Παλέτα εμπνευσμένη από πέτρα, ξύλο και βυζαντινή ώχρα/κρασί.
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Noto+Serif:ital,wght@0,500;0,600;0,700;1,500&family=Inter:wght@400;500;600;700&display=swap');

:root{
  /* Χρώματα */
  --stone:      #F3EEE3;   /* φόντο, ωχρή πέτρα */
  --stone-dim:  #E8E0CE;   /* φόντο καρτών */
  --ink:        #2A241C;   /* κύριο κείμενο */
  --ink-soft:   #6B6152;   /* δευτερεύον κείμενο */
  --wine:       #7A2A2E;   /* κύρια ενέργεια / έμφαση */
  --wine-dark:  #5E1F23;
  --gold:       #A9812F;   /* accent, links, ενεργό tab */
  --gold-soft:  #E9DCB8;
  --olive:      #55613F;   /* επιτυχία / δεύτερη ενέργεια */
  --line:       #D9CDAF;   /* περιγράμματα */
  --white:      #FFFDF8;

  --font-display: 'Noto Serif', 'Times New Roman', serif;
  --font-body:    'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 2px 10px rgba(42,36,28,0.08);
  --shadow-lift: 0 6px 20px rgba(42,36,28,0.14);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body{
  margin: 0;
  background: var(--stone);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; margin: 0 0 .4em; color: var(--ink); }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p  { margin: 0 0 1em; }

a { color: var(--wine); text-decoration: none; }
a:hover { text-decoration: underline; }

/* --- Σφραγίδα / λογότυπο μοτίβο -------------------------------------- */
.seal{
  width: 46px; height: 46px; border-radius: 50%;
  border: 2px solid var(--gold);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  background: var(--stone-dim);
}
.seal::before{
  content: "☩";
  font-family: var(--font-display);
  color: var(--wine);
  font-size: 1.4rem;
  line-height: 1;
}

/* --- Header ----------------------------------------------------------- */
.topbar{
  display: flex; align-items: center; gap: .75rem;
  padding: 1rem 1.1rem;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.topbar .title{ display:flex; flex-direction:column; line-height:1.2; }
.topbar .title small{ color: var(--ink-soft); font-size:.78rem; letter-spacing:.02em; }
.topbar .spacer{ flex: 1; }
.topbar .logout{ font-size:.85rem; color: var(--ink-soft); }

/* --- Layout ------------------------------------------------------------ */
.wrap{
  max-width: 720px;
  margin: 0 auto;
  padding: 1.1rem 1.1rem 6rem;
}
.wrap.narrow{ max-width: 460px; }
.wrap.wide{ max-width: 1100px; }

.card{
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
}

/* --- Forms -------------------------------------------------------------- */
label{ display:block; font-weight:600; margin-bottom:.35rem; font-size:.92rem; }
input[type=text], input[type=password], input[type=date], textarea, select{
  width:100%;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: .75rem .85rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--line);
  background: var(--white);
  color: var(--ink);
}
input:focus, textarea:focus, select:focus, button:focus-visible, a:focus-visible{
  outline: 3px solid var(--gold-soft);
  outline-offset: 1px;
  border-color: var(--gold);
}
.field{ margin-bottom: 1rem; }
.hint{ color: var(--ink-soft); font-size: .82rem; margin-top: .3rem; }

button, .btn{
  display:inline-flex; align-items:center; justify-content:center; gap:.5rem;
  font-family: var(--font-body); font-weight: 600; font-size: .96rem;
  padding: .8rem 1.3rem;
  border-radius: 999px;
  border: none; cursor: pointer;
  background: var(--wine); color: var(--white);
  transition: transform .08s ease, background .15s ease;
  text-decoration: none;
}
button:hover, .btn:hover{ background: var(--wine-dark); text-decoration:none; }
button:active, .btn:active{ transform: scale(.97); }
.btn.secondary{ background: var(--stone-dim); color: var(--ink); }
.btn.secondary:hover{ background: var(--line); }
.btn.ghost{ background: transparent; color: var(--wine); border: 1.5px solid var(--wine); }
.btn.block{ width:100%; }
button:disabled{ opacity:.5; cursor:not-allowed; }

/* --- Day tabs (mobile-first horizontal scroll) --------------------------- */
.day-tabs{
  display:flex; gap:.5rem;
  overflow-x:auto; -webkit-overflow-scrolling:touch;
  padding: .2rem .1rem 1rem;
  scrollbar-width: none;
}
.day-tabs::-webkit-scrollbar{ display:none; }
.day-tab{
  flex: 0 0 auto;
  padding: .55rem 1rem;
  border-radius: 999px;
  background: var(--stone-dim);
  border: 1.5px solid var(--line);
  color: var(--ink-soft);
  font-weight: 600; font-size: .88rem;
  cursor: pointer;
  white-space: nowrap;
  position: relative;
}
.day-tab.active{ background: var(--wine); border-color: var(--wine); color: var(--white); }
.day-tab .dot{
  display:inline-block; width:6px; height:6px; border-radius:50%;
  background: var(--olive); margin-left:.4rem; vertical-align:middle;
}
.day-tab.active .dot{ background: var(--gold-soft); }

.day-panel{ display:none; }
.day-panel.active{ display:block; animation: fade .18s ease; }
@keyframes fade{ from{opacity:0; transform: translateY(4px);} to{opacity:1; transform:none;} }

.day-heading{
  display:flex; align-items:baseline; gap:.5rem; margin-bottom:.9rem;
}
.day-heading .date{ color: var(--ink-soft); font-size:.85rem; }

/* --- Επιλογές πιάτων ------------------------------------------------------ */
fieldset{ border:none; padding:0; margin:0 0 1.2rem; }
legend{ font-family: var(--font-display); font-weight:600; font-size:1rem; margin-bottom:.5rem; padding:0; }
legend.type-salad{ color: var(--olive); }
legend.type-main{ color: var(--wine); }

.choice{
  display:flex; align-items:center; gap:.7rem;
  padding: .8rem .9rem;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  margin-bottom: .55rem;
  cursor:pointer;
  background: var(--white);
}
.choice:has(input:checked){
  border-color: var(--gold);
  background: var(--gold-soft);
}
.choice input{ width:20px; height:20px; accent-color: var(--wine); flex-shrink:0; }
.choice span{ font-size: .97rem; }

.choice-skip{
  border-style: dashed;
  background: transparent;
}
.choice-skip span{ color: var(--ink-soft); font-style: italic; }
.choice-skip:has(input:checked){
  border-style: solid;
}

/* --- Πίνακες (μαγειρείο) --------------------------------------------------- */
table{ width:100%; border-collapse: collapse; font-size:.92rem; }
th, td{ text-align:left; padding:.6rem .5rem; border-bottom:1px solid var(--line); }
th{ color: var(--ink-soft); font-weight:600; font-size:.8rem; text-transform:uppercase; letter-spacing:.03em; }
tr:last-child td{ border-bottom:none; }
.count-pill{
  display:inline-block; min-width:1.6em; text-align:center;
  background: var(--wine); color:var(--white);
  border-radius:999px; padding:.15rem .5rem; font-weight:700; font-size:.85rem;
}

/* --- Λίστες εβδομάδων / πιάτων στο admin ----------------------------------- */
.list-row{
  display:flex; align-items:center; gap:.75rem;
  padding: .85rem 0;
  border-bottom: 1px solid var(--line);
}
.list-row:last-child{ border-bottom:none; }
.list-row .grow{ flex:1; min-width:0; }
.list-row .meta{ color: var(--ink-soft); font-size:.82rem; }

.badge{
  display:inline-block; font-size:.72rem; font-weight:700;
  padding:.2rem .55rem; border-radius:999px;
  background: var(--stone-dim); color: var(--ink-soft);
  text-transform:uppercase; letter-spacing:.03em;
}
.badge.salad{ background:#E7EDDD; color: var(--olive); }
.badge.main{ background:#F3DEDD; color: var(--wine); }

/* --- Sticky action bar ------------------------------------------------------ */
.action-bar{
  position: fixed; left:0; right:0; bottom:0;
  background: var(--white);
  border-top: 1px solid var(--line);
  padding: .8rem 1.1rem calc(.8rem + env(safe-area-inset-bottom));
  display:flex; gap:.7rem;
  box-shadow: 0 -6px 16px rgba(42,36,28,.06);
  z-index: 30;
}

/* --- Alerts / flash ----------------------------------------------------------- */
.alert{
  padding: .8rem 1rem; border-radius: var(--radius-sm);
  margin-bottom: 1rem; font-size:.92rem;
}
.alert.success{ background:#E7EDDD; color: var(--olive); border:1px solid #C9D6B4; }
.alert.error{ background:#F3DEDD; color: var(--wine-dark); border:1px solid #E3BDBC; }

/* --- Empty state -------------------------------------------------------------- */
.empty{
  text-align:center; padding: 2.5rem 1rem; color: var(--ink-soft);
}
.empty .seal{ margin: 0 auto 1rem; }

/* --- Utility -------------------------------------------------------------------- */
.row{ display:flex; gap:.75rem; }
.row > *{ flex:1; }
.center{ text-align:center; }
.mt-0{ margin-top:0 !important; }
.mb-0{ margin-bottom:0 !important; }
.small{ font-size:.85rem; color: var(--ink-soft); }
.share-box{
  display:flex; gap:.5rem; align-items:center;
  background: var(--stone-dim); border:1px dashed var(--gold);
  border-radius: var(--radius-sm); padding:.7rem .8rem;
  font-size:.85rem; word-break: break-all;
}

/* --- Πίνακας εβδομάδας (excel-style) ------------------------------------------------ */
.week-print-table{ border:1px solid var(--line); }
.week-print-table th, .week-print-table td{
  border:1px solid var(--line);
  vertical-align: top;
  white-space: normal;
}
.week-print-table th{ background: var(--stone-dim); }
.week-print-table td:first-child, .week-print-table th:first-child{ font-weight:600; white-space:nowrap; }

/* --- Print (κουζίνα) --------------------------------------------------------------- */
@media print{
  .topbar, .no-print{ display:none !important; }
  body{ background:#fff; }
  .wrap{ max-width:100%; padding:0; }
  .card{ box-shadow:none; border:none; padding:0; }
  .week-print-table, .week-print-table th, .week-print-table td{ border-color:#999; }
  @page{ size: landscape; margin: 12mm; }
}

/* --- Responsive: desktop widens gracefully ------------------------------------------ */
@media (min-width: 760px){
  .wrap{ padding-top: 2rem; }
  .card{ padding: 1.75rem; }
}
