/* ── Tulasee Vanam Cloud Kitchen ── */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&family=Noto+Sans+Telugu:wght@400;600&display=swap');

:root {
  --saffron:   #E87722;
  --saffron2:  #F59A3A;
  --cream:     #FFF8EE;
  --leaf:      #3A7D44;
  --leaf2:     #5BA564;
  --gold:      #D4A017;
  --light:     #FEF3E2;
  --border:    #F0D5A8;
  --text:      #2C1810;
  --muted:     #8B6645;
  --white:     #FFFFFF;
  --red:       #C0392B;
  --blue:      #2563EB;
  --r:         14px;
  --shadow:    0 4px 20px rgba(0,0,0,0.10);
}

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

#tvk-app {
  font-family: 'Poppins', sans-serif;
  color: var(--text);
  background: var(--cream);
  min-height: 100vh;
  max-width: 680px;
  margin: 0 auto;
  position: relative;
}

/* ── HEADER ── */
.tvk-header {
  background: linear-gradient(135deg, var(--saffron) 0%, var(--gold) 100%);
  color: var(--white);
  padding: 18px 20px 14px;
  text-align: center;
  position: relative;
  border-radius: 0 0 24px 24px;
  box-shadow: var(--shadow);
}
.tvk-header h1 { font-size: 20px; font-weight: 700; letter-spacing: 0.5px; }
.tvk-header .sub { font-size: 12px; opacity: 0.9; margin-top: 3px; }
.tvk-header .chef { font-size: 11px; opacity: 0.85; margin-top: 2px; }
.tvk-admin-btn {
  position: absolute; top: 14px; right: 14px;
  background: rgba(255,255,255,0.25);
  border: 1px solid rgba(255,255,255,0.5);
  color: var(--white);
  font-size: 11px; font-weight: 600;
  padding: 5px 10px; border-radius: 20px;
  cursor: pointer; transition: background 0.2s;
}
.tvk-admin-btn:hover { background: rgba(255,255,255,0.4); }

/* ── SCREENS ── */
.tvk-screen { display: none; padding: 0; }
.tvk-screen.active { display: block; }

/* ── WELCOME ── */
.tvk-welcome {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; min-height: 70vh;
  padding: 40px 24px; text-align: center;
}
.tvk-logo-circle {
  width: 110px; height: 110px; border-radius: 50%;
  background: linear-gradient(135deg, var(--saffron) 0%, var(--gold) 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 48px; margin-bottom: 24px;
  box-shadow: 0 8px 28px rgba(232,119,34,0.35);
  animation: pulse 2.5s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { transform: scale(1); }
  50%      { transform: scale(1.05); }
}
.tvk-welcome h2 { font-size: 22px; font-weight: 700; color: var(--saffron); margin-bottom: 6px; }
.tvk-welcome p  { font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.tvk-welcome .tagline { font-size: 13px; color: var(--leaf); font-weight: 600; margin-bottom: 30px; }

/* ── BUTTONS ── */
.btn-primary {
  background: linear-gradient(135deg, var(--saffron) 0%, var(--saffron2) 100%);
  color: var(--white); border: none;
  padding: 14px 36px; border-radius: 50px;
  font-size: 16px; font-weight: 700;
  cursor: pointer; transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 4px 16px rgba(232,119,34,0.4);
  letter-spacing: 0.5px;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(232,119,34,0.5); }
.btn-primary:active { transform: translateY(0); }

.btn-green {
  background: linear-gradient(135deg, var(--leaf) 0%, var(--leaf2) 100%);
  color: var(--white); border: none;
  padding: 12px 28px; border-radius: 50px;
  font-size: 14px; font-weight: 600;
  cursor: pointer; transition: transform 0.15s;
  box-shadow: 0 4px 14px rgba(58,125,68,0.35);
}
.btn-green:hover { transform: translateY(-1px); }

.btn-outline {
  background: var(--white); color: var(--saffron);
  border: 2px solid var(--saffron);
  padding: 10px 22px; border-radius: 50px;
  font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all 0.15s;
}
.btn-outline:hover { background: var(--saffron); color: var(--white); }

/* ── STEP CARD ── */
.tvk-card {
  background: var(--white);
  border-radius: var(--r);
  padding: 20px;
  margin: 16px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.tvk-card h3 {
  font-size: 15px; font-weight: 700; color: var(--saffron);
  margin-bottom: 14px; display: flex; align-items: center; gap: 8px;
}
.tvk-card h3 .step-num {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--saffron); color: var(--white);
  font-size: 12px; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* ── PROGRESS BAR ── */
.tvk-progress {
  display: flex; align-items: center; justify-content: center;
  gap: 6px; padding: 14px 20px 0;
}
.tvk-progress .dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--border); transition: background 0.3s;
}
.tvk-progress .dot.active { background: var(--saffron); }
.tvk-progress .dot.done   { background: var(--leaf); }
.tvk-progress .line {
  flex: 1; max-width: 40px; height: 2px;
  background: var(--border); transition: background 0.3s;
}
.tvk-progress .line.done { background: var(--leaf); }

/* ── TOGGLE BUTTONS (Meal Type) ── */
.tvk-toggle { display: flex; gap: 10px; }
.tvk-toggle label {
  flex: 1; text-align: center; cursor: pointer;
}
.tvk-toggle input[type=radio] { display: none; }
.tvk-toggle .tog-btn {
  display: block; padding: 10px 0;
  border: 2px solid var(--border);
  border-radius: 10px; font-size: 14px;
  font-weight: 600; color: var(--muted);
  transition: all 0.2s; background: var(--light);
}
.tvk-toggle input:checked + .tog-btn {
  border-color: var(--saffron);
  background: var(--saffron);
  color: var(--white);
}

/* ── MEMBER TYPE BUTTONS ── */
.tvk-member-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.tvk-member-btn {
  padding: 12px 8px; border-radius: 10px;
  border: 2px solid var(--border);
  background: var(--light); cursor: pointer;
  font-size: 12px; font-weight: 600;
  color: var(--muted); text-align: center;
  transition: all 0.2s; line-height: 1.3;
}
.tvk-member-btn:hover { border-color: var(--saffron2); color: var(--saffron); }
.tvk-member-btn.selected { border-color: var(--leaf); background: var(--leaf); color: var(--white); }

/* ── MENU SECTION ── */
.tvk-menu-section { margin-bottom: 14px; }
.tvk-menu-section .section-title {
  font-size: 11px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: 1px;
  margin-bottom: 8px; padding-bottom: 4px;
  border-bottom: 1px solid var(--border);
}
.tvk-menu-grid {
  display: flex; flex-wrap: wrap; gap: 7px;
}
.tvk-menu-btn {
  padding: 7px 12px; border-radius: 20px;
  border: 1.5px solid var(--border);
  background: var(--light); cursor: pointer;
  font-size: 12px; font-weight: 600; color: var(--text);
  transition: all 0.15s; user-select: none;
}
.tvk-menu-btn:hover { border-color: var(--saffron2); }
.tvk-menu-btn.selected {
  background: var(--saffron); border-color: var(--saffron);
  color: var(--white);
}
.tvk-menu-btn.default-selected {
  background: var(--leaf); border-color: var(--leaf);
  color: var(--white);
}

/* Full menu toggle */
.btn-full-menu {
  background: linear-gradient(135deg, #7C3AED 0%, #A855F7 100%);
  color: var(--white); border: none;
  padding: 8px 16px; border-radius: 20px;
  font-size: 12px; font-weight: 600;
  cursor: pointer; transition: opacity 0.2s;
}
.btn-full-menu:hover { opacity: 0.85; }

/* ── TEXT INPUT STYLE ── */
.tvk-input, .tvk-select {
  width: 100%; padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px; font-size: 14px;
  background: var(--light); color: var(--text);
  font-family: 'Poppins', sans-serif;
  transition: border-color 0.2s;
}
.tvk-input:focus, .tvk-select:focus {
  outline: none; border-color: var(--saffron);
  background: var(--white);
}
.tvk-label { font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 5px; display: block; }

/* time row */
.tvk-time-row { display: flex; gap: 10px; align-items: flex-end; }
.tvk-time-row .tvk-input { width: 80px; text-align: center; }
.tvk-time-row .tvk-select { width: 80px; }

/* ── BOTTOM NAVBAR ── */
.tvk-navbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px; gap: 8px;
  background: var(--white); border-top: 1px solid var(--border);
  position: sticky; bottom: 0;
}
.tvk-navbar .nav-btn {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: none; border: none; cursor: pointer;
  font-size: 10px; font-weight: 600; color: var(--muted);
  padding: 4px 8px; border-radius: 8px; transition: all 0.15s;
}
.tvk-navbar .nav-btn .icon { font-size: 18px; }
.tvk-navbar .nav-btn:hover { color: var(--saffron); }
.tvk-navbar .nav-btn.nav-next {
  background: var(--saffron); color: var(--white);
  padding: 10px 20px; border-radius: 50px;
  font-size: 13px; flex-direction: row; gap: 6px;
  font-weight: 700;
}

/* ── ORDER SUMMARY ── */
.tvk-summary-box {
  background: linear-gradient(135deg, #FEF9F0 0%, #FFF3DC 100%);
  border: 1.5px solid var(--gold);
  border-radius: 12px; padding: 16px; margin-bottom: 12px;
}
.tvk-summary-row { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 6px; }
.tvk-summary-row .key { font-size: 11px; color: var(--muted); font-weight: 600; }
.tvk-summary-row .val { font-size: 13px; color: var(--text); font-weight: 600; text-align: right; max-width: 65%; }
.tvk-order-badge {
  display: inline-block;
  background: var(--saffron); color: var(--white);
  font-size: 18px; font-weight: 700; padding: 6px 20px;
  border-radius: 8px; margin-bottom: 12px;
}

/* ── POPUP OVERLAY ── */
.tvk-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.tvk-overlay.hidden { display: none; }
.tvk-popup {
  background: var(--white); border-radius: 18px;
  padding: 24px; max-width: 400px; width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  animation: popIn 0.2s ease;
}
@keyframes popIn {
  from { transform: scale(0.92); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}
.tvk-popup h3 { font-size: 17px; font-weight: 700; color: var(--saffron); margin-bottom: 14px; text-align: center; }
.tvk-popup-btns { display: flex; gap: 10px; margin-top: 18px; }
.tvk-popup-btns button { flex: 1; }

/* ── ADMIN PANEL ── */
.tvk-admin-wrap { padding: 14px; }
.tvk-stat-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.tvk-stat {
  flex: 1; min-width: 70px; text-align: center;
  background: var(--white); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 6px;
}
.tvk-stat .num { font-size: 22px; font-weight: 700; color: var(--saffron); }
.tvk-stat .lbl { font-size: 10px; color: var(--muted); font-weight: 600; text-transform: uppercase; }

.tvk-filter-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; align-items: center; }
.tvk-filter-btn {
  padding: 5px 12px; border-radius: 20px;
  border: 1.5px solid var(--border); background: var(--light);
  font-size: 11px; font-weight: 600; cursor: pointer; color: var(--muted);
  transition: all 0.15s;
}
.tvk-filter-btn.active { background: var(--saffron); border-color: var(--saffron); color: var(--white); }
.tvk-filter-btn:hover { border-color: var(--saffron2); }
.tvk-search { flex: 1; min-width: 120px; }

/* ── ORDER TABLE ── */
.tvk-order-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.tvk-order-table th {
  background: linear-gradient(135deg, var(--saffron) 0%, var(--saffron2) 100%);
  color: var(--white); padding: 9px 8px; text-align: left;
  font-size: 11px; font-weight: 600;
}
.tvk-order-table td { padding: 9px 8px; border-bottom: 1px solid var(--border); vertical-align: top; word-break: break-word; }
.tvk-order-table tr:hover td { background: #FFFAF3; }

.badge {
  display: inline-block; padding: 2px 8px; border-radius: 12px;
  font-size: 10px; font-weight: 700;
}
.badge-pending  { background: #FEF3C7; color: #92400E; }
.badge-done     { background: #D1FAE5; color: #065F46; }
.badge-lunch    { background: #FFF7E6; color: #B45309; }
.badge-dinner   { background: #EDE9FE; color: #5B21B6; }

.row-actions { display: flex; gap: 4px; flex-wrap: wrap; }
.row-actions button {
  padding: 4px 9px; border-radius: 6px; border: none;
  font-size: 10px; font-weight: 700; cursor: pointer; transition: opacity 0.15s;
}
.row-actions button:hover { opacity: 0.8; }
.btn-edit    { background: #F97316; color: var(--white); }
.btn-del     { background: var(--red); color: var(--white); }
.btn-done    { background: var(--leaf); color: var(--white); }
.btn-share   { background: #25D366; color: var(--white); }

/* inline edit row */
.tvk-inline-edit {
  background: #FFFDF5; border: 1px solid var(--gold);
  border-radius: 8px; padding: 10px; margin-top: 6px;
  display: none;
}
.tvk-inline-edit.open { display: block; }
.tvk-inline-edit textarea {
  width: 100%; min-height: 60px; resize: vertical;
  padding: 8px; border-radius: 6px; border: 1px solid var(--border);
  font-size: 12px; font-family: 'Poppins', sans-serif;
  margin-bottom: 6px; background: var(--white);
}
.tvk-inline-edit .ei-row { display: flex; gap: 6px; margin-bottom: 6px; }
.tvk-inline-edit .ei-row input, .tvk-inline-edit .ei-row select {
  flex: 1; padding: 7px; border: 1px solid var(--border); border-radius: 6px;
  font-size: 12px; background: var(--white);
}
.btn-save-edit { background: var(--leaf); color: var(--white); padding: 6px 16px; border: none; border-radius: 6px; font-size: 12px; font-weight: 700; cursor: pointer; }
.btn-cancel-edit { background: var(--border); color: var(--text); padding: 6px 14px; border: none; border-radius: 6px; font-size: 12px; cursor: pointer; }

/* ── SUCCESS SCREEN ── */
.tvk-success { padding: 40px 24px; text-align: center; }
.tvk-success .big-check {
  font-size: 70px; display: block; margin-bottom: 14px;
  animation: bounce 0.5s ease;
}
@keyframes bounce {
  0%   { transform: scale(0); }
  60%  { transform: scale(1.2); }
  100% { transform: scale(1); }
}
.tvk-success h2 { font-size: 20px; font-weight: 700; color: var(--leaf); margin-bottom: 8px; }
.tvk-success p  { font-size: 14px; color: var(--muted); margin-bottom: 20px; }

/* ── UTILITY ── */
.hidden { display: none !important; }
.mt10 { margin-top: 10px; }
.mt14 { margin-top: 14px; }
.gap8 { gap: 8px; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; gap: 10px; }

/* WhatsApp float */
.tvk-wa-float {
  position: fixed; bottom: 80px; right: 16px; z-index: 500;
  width: 48px; height: 48px; border-radius: 50%;
  background: #25D366; border: none; cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,0.2);
  font-size: 24px; display: flex; align-items: center; justify-content: center;
  text-decoration: none;
}

/* Admin PIN overlay */
.tvk-pin-overlay {
  position: fixed; inset: 0; z-index: 9998;
  background: rgba(44,24,16,0.7);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.tvk-pin-overlay.hidden { display: none; }
.tvk-pin-box {
  background: var(--white); border-radius: 18px; padding: 28px;
  max-width: 320px; width: 100%; text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.tvk-pin-box h3 { color: var(--saffron); font-size: 16px; margin-bottom: 6px; }
.tvk-pin-box p  { font-size: 12px; color: var(--muted); margin-bottom: 16px; }
.tvk-pin-input {
  width: 100%; text-align: center; font-size: 24px; letter-spacing: 8px;
  font-weight: 700; padding: 12px; border: 2px solid var(--border);
  border-radius: 10px; margin-bottom: 14px; background: var(--light);
}
.tvk-pin-input:focus { outline: none; border-color: var(--saffron); }

@media (max-width: 480px) {
  .tvk-member-grid { grid-template-columns: 1fr 1fr; }
  .tvk-header h1 { font-size: 17px; }
}

/* ── CATERER BUTTONS ── */
.tvk-caterer-btn {
  padding: 10px 16px; border-radius: 10px;
  border: 2px solid var(--border);
  background: var(--light); cursor: pointer;
  font-size: 13px; font-weight: 600;
  color: var(--muted); transition: all 0.2s;
}
.tvk-caterer-btn:hover { border-color: var(--leaf2); color: var(--leaf); }
.tvk-caterer-btn.selected { border-color: var(--leaf); background: var(--leaf); color: var(--white); }
