/* ── Reset & Base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg:        #1a1a2e;
  --bg2:       #16213e;
  --bg3:       #0f3460;
  --card:      #1e1e3a;
  --border:    #2a2a4a;
  --yellow:    #f5c518;
  --amber:     #f0a500;
  --crimson:   #dc143c;
  --red-dark:  #8b0000;
  --green:     #2ecc71;
  --text:      #e8e8f0;
  --muted:     #8888aa;
  --white:     #ffffff;
  --radius:    10px;
  --shadow:    0 4px 24px rgba(0,0,0,0.4);
}
html, body { height: 100%; font-family: 'Segoe UI', system-ui, sans-serif; background: var(--bg); color: var(--text); }
a { color: var(--yellow); text-decoration: none; }
a:hover { color: var(--amber); }
button, .btn { cursor: pointer; border: none; border-radius: var(--radius); font-size: 1rem; padding: 0.6rem 1.4rem; transition: all 0.2s; }
input, select, textarea { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); padding: 0.6rem 0.9rem; font-size: 1rem; width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--yellow); }
h1,h2,h3,h4 { color: var(--white); }

/* ── Navbar ──────────────────────────────────────────────────────────────── */
.navbar {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg2); padding: 0.8rem 2rem; border-bottom: 2px solid var(--yellow);
  position: sticky; top: 0; z-index: 100;
}
.navbar .brand { font-size: 1.4rem; font-weight: 800; color: var(--yellow); letter-spacing: 1px; }
.navbar .brand span { color: var(--crimson); }
.navbar nav a { margin-left: 1.5rem; color: var(--text); font-weight: 500; }
.navbar nav a:hover, .navbar nav a.active { color: var(--yellow); }
.navbar .nav-actions { display: flex; gap: 0.6rem; align-items: center; }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn-yellow  { background: var(--yellow); color: #111; font-weight: 700; }
.btn-yellow:hover { background: var(--amber); }
.btn-crimson { background: var(--crimson); color: #fff; font-weight: 700; }
.btn-crimson:hover { background: #a80028; }
.btn-outline { background: transparent; border: 2px solid var(--yellow); color: var(--yellow); }
.btn-outline:hover { background: var(--yellow); color: #111; }
.btn-ghost   { background: transparent; border: 1px solid var(--border); color: var(--muted); }
.btn-ghost:hover { border-color: var(--yellow); color: var(--yellow); }
.btn-green   { background: var(--green); color: #111; font-weight: 700; }
.btn-green:hover { background: #27ae60; }
.btn-red     { background: var(--crimson); color: #fff; font-weight: 700; }
.btn-red:hover { background: var(--red-dark); }
.btn-sm { padding: 0.35rem 0.8rem; font-size: 0.85rem; }
.btn-lg { padding: 0.9rem 2rem; font-size: 1.1rem; }
.btn-full { width: 100%; display: block; text-align: center; }

/* ── Cards ───────────────────────────────────────────────────────────────── */
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow);
}
.movie-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; cursor: pointer; transition: transform 0.2s, border-color 0.2s;
}
.movie-card:hover { transform: translateY(-4px); border-color: var(--yellow); }
.movie-card img { width: 100%; height: 200px; object-fit: cover; }
.movie-card .mc-body { padding: 1rem; }
.movie-card .mc-title { font-size: 1.1rem; font-weight: 700; color: var(--white); margin-bottom: 0.3rem; }
.movie-card .mc-meta { color: var(--muted); font-size: 0.85rem; }
.movie-card .mc-desc { color: var(--text); font-size: 0.9rem; margin-top: 0.5rem; line-height: 1.5; }

/* ── Grid ────────────────────────────────────────────────────────────────── */
.grid-3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 1.5rem; }

/* ── Page Layout ─────────────────────────────────────────────────────────── */
.page { max-width: 1100px; margin: 0 auto; padding: 2rem 1.5rem; }
.page-wide { max-width: 1400px; margin: 0 auto; padding: 2rem 1.5rem; }
.page-narrow { max-width: 560px; margin: 0 auto; padding: 2rem 1.5rem; }

/* ── Auth Forms ──────────────────────────────────────────────────────────── */
.auth-box { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 2.5rem; box-shadow: var(--shadow); }
.auth-box h2 { text-align: center; margin-bottom: 1.8rem; }
.form-group { margin-bottom: 1.2rem; }
.form-group label { display: block; margin-bottom: 0.4rem; color: var(--muted); font-size: 0.9rem; }
.error-msg { background: rgba(220,20,60,0.15); border: 1px solid var(--crimson); color: #ff7a9a; padding: 0.7rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; font-size: 0.9rem; }

/* ── Hero ────────────────────────────────────────────────────────────────── */
.hero { text-align: center; padding: 4rem 1rem 3rem; }
.hero h1 { font-size: 2.8rem; font-weight: 900; margin-bottom: 0.5rem; }
.hero h1 span { color: var(--yellow); }
.hero p { color: var(--muted); font-size: 1.1rem; margin-bottom: 2rem; }

/* ── Booking/Ticket counter ──────────────────────────────────────────────── */
.counter-row { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.counter-row .label { flex: 1; font-size: 1rem; }
.counter-row .price { color: var(--yellow); font-weight: 600; min-width: 60px; }
.counter-btn { width: 40px; height: 40px; border-radius: 50%; background: var(--bg3); color: var(--yellow); font-size: 1.4rem; border: 2px solid var(--yellow); display: flex; align-items: center; justify-content: center; }
.counter-btn:hover { background: var(--yellow); color: #111; }
.counter-val { font-size: 1.3rem; font-weight: 700; min-width: 30px; text-align: center; }

/* ── Seat Map ────────────────────────────────────────────────────────────── */
#seat-canvas { position: relative; background: var(--bg2); border: 2px solid var(--border); border-radius: var(--radius); min-height: 500px; overflow: hidden; }
.seat-icon { position: absolute; width: 38px; height: 38px; background: var(--bg3); border: 2px solid var(--border); border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 0.65rem; color: var(--muted); cursor: pointer; user-select: none; transition: background 0.15s, border-color 0.15s; }
.seat-icon:hover { border-color: var(--yellow); }
.seat-icon.available { background: var(--bg3); border-color: #3a3a6a; color: var(--text); }
.seat-icon.selected { background: var(--yellow); border-color: var(--amber); color: #111; font-weight: 700; }
.seat-icon.taken    { background: var(--crimson); border-color: var(--red-dark); color: #fff; cursor: not-allowed; }
.seat-icon.held     { background: #5a4000; border-color: var(--amber); color: var(--amber); cursor: not-allowed; }
.screen-bar { position: absolute; background: rgba(245,197,24,0.15); border: 2px solid var(--yellow); border-radius: 4px; display: flex; align-items: center; justify-content: center; font-size: 0.85rem; color: var(--yellow); font-weight: 600; }
.seat-arrows { position: absolute; display: none; z-index: 10; }
.seat-arrows button { background: var(--bg3); color: var(--yellow); border: 1px solid var(--yellow); padding: 2px 5px; border-radius: 4px; }

/* ── Timer ───────────────────────────────────────────────────────────────── */
.timer-banner { background: rgba(220,20,60,0.15); border: 1px solid var(--crimson); color: #ff7a9a; padding: 0.8rem 1.2rem; border-radius: var(--radius); text-align: center; font-size: 1rem; margin-bottom: 1rem; }
.timer-banner strong { font-size: 1.3rem; }

/* ── Ticket display ──────────────────────────────────────────────────────── */
.ticket-box { background: linear-gradient(135deg, var(--bg2), var(--bg3)); border: 2px solid var(--yellow); border-radius: 14px; padding: 1.8rem; position: relative; overflow: hidden; }
.ticket-box::before { content: ""; position: absolute; top: -40px; right: -40px; width: 120px; height: 120px; background: rgba(245,197,24,0.07); border-radius: 50%; }
.ticket-box .tb-movie { font-size: 1.4rem; font-weight: 800; color: var(--yellow); margin-bottom: 0.3rem; }
.ticket-box .tb-meta { color: var(--muted); font-size: 0.9rem; margin-bottom: 1rem; }
.ticket-box .tb-seats { color: var(--white); font-size: 1rem; margin-bottom: 1rem; }
.barcode { font-family: 'Courier New', monospace; font-size: 0.5rem; letter-spacing: -1px; line-height: 1; background: #fff; color: #000; padding: 0.5rem; border-radius: 4px; overflow: hidden; }

/* ── Food Menu ───────────────────────────────────────────────────────────── */
.food-item-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: border-color 0.2s; }
.food-item-card:hover { border-color: var(--yellow); }
.food-item-card img { width: 100%; height: 160px; object-fit: cover; }
.food-item-card .fi-body { padding: 1rem; }
.food-item-card .fi-name { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.2rem; }
.food-item-card .fi-desc { color: var(--muted); font-size: 0.85rem; margin-bottom: 0.5rem; }
.food-item-card .fi-price { color: var(--yellow); font-weight: 700; font-size: 1.1rem; }

/* ── Cart ────────────────────────────────────────────────────────────────── */
.cart-sidebar { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; position: sticky; top: 80px; }
.cart-item { display: flex; justify-content: space-between; align-items: flex-start; padding: 0.7rem 0; border-bottom: 1px solid var(--border); }
.cart-item:last-child { border-bottom: none; }
.cart-item .ci-name { font-weight: 600; }
.cart-item .ci-mods { color: var(--muted); font-size: 0.8rem; margin-top: 0.2rem; }
.cart-total { display: flex; justify-content: space-between; padding-top: 1rem; font-weight: 700; font-size: 1.1rem; border-top: 2px solid var(--border); margin-top: 0.5rem; }

/* ── Kitchen / Counter Screens ───────────────────────────────────────────── */
.screen-body { background: #0d0d0d; min-height: 100vh; padding: 1rem; }
.screen-header { background: #1a0000; border-bottom: 3px solid var(--crimson); padding: 0.8rem 1.5rem; display: flex; align-items: center; gap: 1rem; }
.screen-header h1 { color: var(--crimson); font-size: 1.4rem; }
.orders-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; padding: 1rem; }

.order-card { border-radius: var(--radius); padding: 1.2rem; cursor: pointer; transition: transform 0.15s; position: relative; }
.order-card:hover { transform: scale(1.02); }
.order-card.cooking  { background: #2d0000; border: 2px solid var(--crimson); }
.order-card.packing  { background: #2d2200; border: 2px solid var(--yellow); }
.order-card.ready    { background: #2d1500; border: 2px solid #ff8800; }
.order-card .oc-num  { font-size: 0.8rem; color: var(--muted); margin-bottom: 0.3rem; }
.order-card .oc-name { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.5rem; }
.order-card .oc-item { padding: 0.25rem 0; }
.order-card .oc-mod  { padding-left: 1.2rem; color: var(--muted); font-size: 0.85rem; }
.order-card .oc-fulfil { font-size: 0.85rem; font-weight: 700; margin-top: 0.6rem; padding: 0.3rem 0.6rem; border-radius: 4px; display: inline-block; }
.oc-fulfil.delivery { background: rgba(245,197,24,0.15); color: var(--yellow); }
.oc-fulfil.pickup   { background: rgba(46,204,113,0.15); color: var(--green); }
.stopwatch { font-size: 0.8rem; color: var(--muted); margin-top: 0.5rem; font-family: monospace; }

/* ── Tabs ────────────────────────────────────────────────────────────────── */
.tabs { display: flex; gap: 0; border-bottom: 2px solid var(--border); margin-bottom: 1.5rem; }
.tab-btn { padding: 0.7rem 1.5rem; background: transparent; border: none; border-bottom: 3px solid transparent; color: var(--muted); cursor: pointer; font-size: 1rem; margin-bottom: -2px; }
.tab-btn.active { border-bottom-color: var(--yellow); color: var(--yellow); font-weight: 700; }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ── Modal ───────────────────────────────────────────────────────────────── */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.7); display: flex; align-items: center; justify-content: center; z-index: 1000; display: none; }
.modal-overlay.open { display: flex; }
.modal-box { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem; max-width: 480px; width: 90%; box-shadow: var(--shadow); }
.modal-box h3 { margin-bottom: 1rem; }
.modal-actions { display: flex; gap: 0.8rem; margin-top: 1.5rem; justify-content: flex-end; }

/* ── Badge ───────────────────────────────────────────────────────────────── */
.badge { display: inline-block; padding: 0.2rem 0.6rem; border-radius: 20px; font-size: 0.75rem; font-weight: 700; }
.badge-yellow { background: rgba(245,197,24,0.2); color: var(--yellow); }
.badge-crimson { background: rgba(220,20,60,0.2); color: #ff7a9a; }
.badge-green { background: rgba(46,204,113,0.2); color: var(--green); }

/* ── Recall bar ──────────────────────────────────────────────────────────── */
.recall-btn-fixed { position: fixed; bottom: 1.5rem; left: 1.5rem; z-index: 50; }

/* ── Misc ────────────────────────────────────────────────────────────────── */
.divider { border: none; border-top: 1px solid var(--border); margin: 1.5rem 0; }
.text-yellow { color: var(--yellow); }
.text-crimson { color: var(--crimson); }
.text-muted { color: var(--muted); }
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.w-full { width: 100%; }
.food-promo-banner { background: linear-gradient(90deg, #1a1000, #2d1a00); border: 1px solid var(--amber); border-radius: var(--radius); padding: 1rem 1.5rem; display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; }
.food-promo-banner p { color: var(--amber); font-weight: 600; }

/* ── Admin ───────────────────────────────────────────────────────────────── */
.admin-sidebar { background: var(--bg2); min-height: 100vh; width: 220px; padding: 1.5rem 1rem; border-right: 1px solid var(--border); position: fixed; top: 0; left: 0; }
.admin-sidebar .brand { font-size: 1.1rem; font-weight: 800; color: var(--yellow); margin-bottom: 2rem; display: block; }
.admin-sidebar a { display: block; padding: 0.6rem 0.8rem; color: var(--muted); border-radius: 6px; margin-bottom: 0.3rem; }
.admin-sidebar a:hover, .admin-sidebar a.active { background: var(--bg3); color: var(--yellow); }
.admin-content { margin-left: 220px; padding: 2rem; min-height: 100vh; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td { padding: 0.7rem 1rem; text-align: left; border-bottom: 1px solid var(--border); }
.admin-table th { color: var(--muted); font-size: 0.85rem; text-transform: uppercase; }
.admin-table tr:hover td { background: rgba(255,255,255,0.03); }
