/* ===== Brew & Bloom Cafe — Shared Styles ===== */
:root {
  --brown-900: #2b1d14;
  --brown-700: #4a2f1f;
  --brown-500: #7b4b2a;
  --brown-300: #b9876a;
  --cream: #f7f1e8;
  --cream-dark: #ece1d2;
  --accent: #d98a3d;
  --accent-dark: #b86f29;
  --green: #4f8a5b;
  --red: #c0493d;
  --text: #2b1d14;
  --muted: #7a6a5e;
  --radius: 14px;
  --shadow: 0 8px 24px rgba(43, 29, 20, 0.10);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--cream);
  line-height: 1.6;
}
h1, h2, h3, h4 { font-family: 'Playfair Display', Georgia, serif; margin: 0 0 .5rem; line-height: 1.2; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 1rem; }

.container { width: min(1140px, 92%); margin: 0 auto; }
.section { padding: 4.5rem 0; }
.section-title { text-align: center; font-size: 2.2rem; color: var(--brown-700); }
.section-sub { text-align: center; color: var(--muted); max-width: 560px; margin: 0 auto 2.5rem; }
.hidden { display: none !important; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .75rem 1.5rem; border-radius: 999px; border: none;
  font-weight: 600; font-size: .95rem; transition: all .2s ease;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-1px); }
.btn-outline { background: transparent; border: 2px solid var(--brown-700); color: var(--brown-700); }
.btn-outline:hover { background: var(--brown-700); color: #fff; }
.btn-light { background: #fff; color: var(--brown-700); }
.btn-light:hover { background: var(--cream-dark); }
.btn-danger { background: var(--red); color: #fff; }
.btn-sm { padding: .45rem .9rem; font-size: .85rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* Navbar */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(247, 241, 232, .92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--cream-dark);
}
.navbar .container { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.brand { font-family: 'Playfair Display', serif; font-size: 1.5rem; font-weight: 700; color: var(--brown-700); display: flex; align-items: center; gap: .5rem; }
.brand i { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 1.75rem; list-style: none; margin: 0; padding: 0; }
.nav-links a { font-weight: 500; color: var(--brown-700); transition: color .2s; }
.nav-links a:hover { color: var(--accent); }
.nav-toggle { display: none; background: none; border: none; font-size: 1.5rem; color: var(--brown-700); }
.cart-btn { position: relative; }
.cart-count {
  position: absolute; top: -6px; right: -6px; background: var(--red); color: #fff;
  font-size: .7rem; font-weight: 700; width: 20px; height: 20px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

/* Hero */
.hero {
  min-height: 620px; height: 88vh; max-height: 820px; display: flex; align-items: center; color: #fff; text-align: center;
  background: linear-gradient(rgba(43,29,20,.55), rgba(43,29,20,.7)),
    url('https://images.unsplash.com/photo-1554118811-1e0d58224f24?w=1600&q=80') center/cover no-repeat;
}
.hero h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); margin-bottom: 1rem; }
.hero p { font-size: 1.2rem; max-width: 600px; margin: 0 auto 2rem; opacity: .95; }
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.hero-badge { display: inline-block; background: var(--accent); padding: .35rem 1rem; border-radius: 999px; font-size: .85rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; margin-bottom: 1.25rem; }

/* About */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.about-grid img { border-radius: var(--radius); box-shadow: var(--shadow); height: 420px; width: 100%; object-fit: cover; }
.about-grid h2 { font-size: 2.2rem; color: var(--brown-700); }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 2rem; }
.feature { text-align: center; }
.feature i { font-size: 1.75rem; color: var(--accent); margin-bottom: .5rem; }
.feature strong { display: block; }

/* Menu */
.menu-filters { display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; margin-bottom: 2.5rem; }
.filter-btn { padding: .5rem 1.2rem; border-radius: 999px; border: 2px solid var(--cream-dark); background: #fff; font-weight: 500; transition: all .2s; }
.filter-btn.active, .filter-btn:hover { background: var(--brown-700); border-color: var(--brown-700); color: #fff; }
.menu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.75rem; }
.menu-card { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .2s; }
.menu-card:hover { transform: translateY(-4px); }
.menu-card img { height: 190px; width: 100%; object-fit: cover; }
.menu-card-body { padding: 1.25rem; display: flex; flex-direction: column; flex: 1; }
.menu-card-cat { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); font-weight: 700; }
.menu-card h3 { font-size: 1.2rem; margin: .25rem 0; }
.menu-card p { color: var(--muted); font-size: .9rem; margin: 0 0 1rem; flex: 1; }
.menu-card-footer { display: flex; justify-content: space-between; align-items: center; }
.price { font-weight: 700; font-size: 1.15rem; color: var(--brown-700); }
.empty-state { text-align: center; color: var(--muted); padding: 3rem; grid-column: 1 / -1; }

/* Forms */
.form-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 2.5rem; max-width: 640px; margin: 0 auto; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1rem; }
.form-group label { font-weight: 600; font-size: .9rem; }
.form-group input, .form-group select, .form-group textarea {
  padding: .7rem .9rem; border: 1.5px solid var(--cream-dark); border-radius: 10px; background: var(--cream); transition: border .2s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: var(--accent); background: #fff; }
.form-group.full { grid-column: 1 / -1; }
.form-msg { padding: .8rem 1rem; border-radius: 10px; margin-top: 1rem; font-weight: 500; }
.form-msg.success { background: #e5f3e8; color: var(--green); }
.form-msg.error { background: #fbe6e4; color: var(--red); }

/* Contact / Hours */
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.info-card { background: #fff; border-radius: var(--radius); padding: 2rem; text-align: center; box-shadow: var(--shadow); }
.info-card i { font-size: 2rem; color: var(--accent); margin-bottom: .75rem; }
.info-card h3 { font-size: 1.2rem; }
.info-card p { color: var(--muted); margin: 0; }

/* Footer */
footer { background: var(--brown-900); color: var(--cream-dark); padding: 3rem 0 1.5rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; margin-bottom: 2rem; }
footer h4 { color: #fff; font-size: 1.1rem; }
footer ul { list-style: none; padding: 0; margin: 0; }
footer li { margin-bottom: .5rem; }
footer a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 1.5rem; text-align: center; font-size: .85rem; opacity: .7; }
.social { display: flex; gap: 1rem; margin-top: 1rem; }
.social a { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.1); display: flex; align-items: center; justify-content: center; transition: background .2s; }
.social a:hover { background: var(--accent); }

/* Cart Drawer */
.drawer-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 200; opacity: 0; pointer-events: none; transition: opacity .3s; }
.drawer-overlay.open { opacity: 1; pointer-events: all; }
.drawer { position: fixed; top: 0; right: 0; height: 100%; width: min(420px, 100%); background: #fff; z-index: 201; transform: translateX(100%); transition: transform .3s ease; display: flex; flex-direction: column; box-shadow: -8px 0 30px rgba(0,0,0,.15); }
.drawer.open { transform: translateX(0); }
.drawer-header { display: flex; justify-content: space-between; align-items: center; padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--cream-dark); }
.drawer-header h3 { margin: 0; }
.drawer-close { background: none; border: none; font-size: 1.4rem; color: var(--muted); }
.drawer-body { flex: 1; overflow-y: auto; padding: 1.25rem 1.5rem; }
.drawer-footer { padding: 1.25rem 1.5rem; border-top: 1px solid var(--cream-dark); background: var(--cream); }
.cart-item { display: flex; gap: 1rem; align-items: center; margin-bottom: 1rem; }
.cart-item img { width: 60px; height: 60px; border-radius: 10px; object-fit: cover; }
.cart-item-info { flex: 1; }
.cart-item-info strong { display: block; font-size: .95rem; }
.cart-item-info span { color: var(--muted); font-size: .85rem; }
.qty-ctrl { display: flex; align-items: center; gap: .5rem; }
.qty-ctrl button { width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--cream-dark); background: #fff; font-weight: 700; }
.qty-ctrl button:hover { background: var(--brown-700); color: #fff; border-color: var(--brown-700); }
.cart-total { display: flex; justify-content: space-between; font-size: 1.15rem; font-weight: 700; margin-bottom: 1rem; }
.drawer textarea { width: 100%; padding: .7rem; border: 1.5px solid var(--cream-dark); border-radius: 10px; margin-bottom: .75rem; resize: vertical; }

/* Toast */
.toast { position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--brown-900); color: #fff; padding: .85rem 1.5rem; border-radius: 999px; font-weight: 500; z-index: 300; opacity: 0; transition: all .3s; pointer-events: none; display: flex; gap: .5rem; align-items: center; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error { background: var(--red); }

/* Badges */
.badge { display: inline-block; padding: .25rem .7rem; border-radius: 999px; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.badge-Pending { background: #fff3cd; color: #8a6d1f; }
.badge-Preparing { background: #dbeafe; color: #1e4fa8; }
.badge-Ready { background: #e0f2fe; color: #0c5a7a; }
.badge-Completed, .badge-Confirmed { background: #e5f3e8; color: var(--green); }
.badge-Cancelled { background: #fbe6e4; color: var(--red); }
.badge-admin { background: var(--brown-700); color: #fff; }
.badge-customer { background: var(--cream-dark); color: var(--brown-700); }

/* ===== Auth page ===== */
.auth-page { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-side { background: linear-gradient(rgba(43,29,20,.5), rgba(43,29,20,.75)), url('https://images.unsplash.com/photo-1501339847302-ac426a4a7cbb?w=1200&q=80') center/cover; color: #fff; display: flex; flex-direction: column; justify-content: flex-end; padding: 3rem; }
.auth-side h2 { font-size: 2.5rem; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 2rem; }
.auth-box { width: 100%; max-width: 420px; }
.auth-box .brand { font-size: 1.8rem; margin-bottom: 1.5rem; }
.auth-tabs { display: flex; background: var(--cream-dark); border-radius: 999px; padding: 4px; margin-bottom: 1.5rem; }
.auth-tabs button { flex: 1; border: none; background: transparent; padding: .6rem; border-radius: 999px; font-weight: 600; color: var(--muted); transition: all .2s; }
.auth-tabs button.active { background: #fff; color: var(--brown-700); box-shadow: 0 2px 6px rgba(0,0,0,.08); }
.auth-box .btn { width: 100%; justify-content: center; }
.demo-creds { margin-top: 1.5rem; background: #fff; border: 1px dashed var(--brown-300); border-radius: 10px; padding: 1rem; font-size: .85rem; }
.demo-creds strong { display: block; margin-bottom: .4rem; }
.demo-creds code { background: var(--cream); padding: .1rem .4rem; border-radius: 4px; }
.demo-creds button { background: none; border: none; color: var(--accent); font-weight: 600; padding: 0; text-decoration: underline; }

/* ===== Account / Dashboard pages ===== */
.page-header { background: var(--brown-700); color: #fff; padding: 2.5rem 0; }
.page-header h1 { font-size: 2rem; margin: 0; }
.page-header p { margin: .25rem 0 0; opacity: .85; }
.card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.5rem; }
.card h3 { font-size: 1.2rem; margin-bottom: 1rem; display: flex; align-items: center; gap: .5rem; }
.card h3 i { color: var(--accent); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: .8rem .75rem; border-bottom: 1px solid var(--cream-dark); vertical-align: middle; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
tr:last-child td { border-bottom: none; }
td select { padding: .35rem .5rem; border-radius: 8px; border: 1.5px solid var(--cream-dark); }
.actions { display: flex; gap: .4rem; }
.icon-btn { width: 32px; height: 32px; border-radius: 8px; border: 1.5px solid var(--cream-dark); background: #fff; color: var(--brown-700); display: inline-flex; align-items: center; justify-content: center; transition: all .2s; }
.icon-btn:hover { background: var(--brown-700); color: #fff; border-color: var(--brown-700); }
.icon-btn.danger:hover { background: var(--red); border-color: var(--red); }

/* Admin layout */
.admin-layout { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.sidebar { background: var(--brown-900); color: var(--cream-dark); padding: 1.5rem 1rem; display: flex; flex-direction: column; }
.sidebar .brand { color: #fff; padding: 0 .5rem 1.5rem; }
.sidebar nav { display: flex; flex-direction: column; gap: .25rem; flex: 1; }
.sidebar nav button { display: flex; align-items: center; gap: .75rem; padding: .75rem 1rem; border-radius: 10px; border: none; background: transparent; color: var(--cream-dark); font-weight: 500; text-align: left; font-size: .95rem; transition: all .2s; }
.sidebar nav button:hover { background: rgba(255,255,255,.07); }
.sidebar nav button.active { background: var(--accent); color: #fff; }
.sidebar nav button i { width: 20px; text-align: center; }
.sidebar-user { border-top: 1px solid rgba(255,255,255,.1); padding-top: 1rem; font-size: .85rem; }
.sidebar-user strong { display: block; color: #fff; }
.sidebar-user a, .sidebar-user button { color: var(--accent); background: none; border: none; padding: 0; font-weight: 600; font-size: .85rem; }
.admin-main { padding: 2rem; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.admin-topbar h1 { font-size: 1.8rem; margin: 0; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; margin-bottom: 1.5rem; }
.stat { background: #fff; border-radius: var(--radius); padding: 1.25rem 1.5rem; box-shadow: var(--shadow); display: flex; align-items: center; gap: 1rem; }
.stat-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; color: #fff; }
.stat-icon.orange { background: var(--accent); }
.stat-icon.brown { background: var(--brown-500); }
.stat-icon.green { background: var(--green); }
.stat-icon.blue { background: #3b82c4; }
.stat-value { font-size: 1.6rem; font-weight: 700; line-height: 1; }
.stat-label { font-size: .8rem; color: var(--muted); }
.admin-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.thumb { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; }

/* Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 400; display: flex; align-items: center; justify-content: center; padding: 1rem; opacity: 0; pointer-events: none; transition: opacity .25s; }
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal { background: #fff; border-radius: var(--radius); width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto; padding: 2rem; transform: translateY(20px); transition: transform .25s; }
.modal-overlay.open .modal { transform: translateY(0); }
.modal h3 { font-size: 1.4rem; margin-bottom: 1.25rem; }
.modal-actions { display: flex; gap: .75rem; justify-content: flex-end; margin-top: 1rem; }
.checkbox-row { display: flex; align-items: center; gap: .5rem; }
.checkbox-row input { width: 18px; height: 18px; }

/* Responsive */
@media (max-width: 900px) {
  .about-grid, .admin-grid-2, .auth-page { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .info-grid, .features { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .admin-layout { grid-template-columns: 1fr; }
  .sidebar { flex-direction: row; flex-wrap: wrap; align-items: center; gap: .5rem; padding: 1rem; }
  .sidebar .brand { padding: 0; font-size: 1.2rem; flex: 1 1 100%; }
  .sidebar nav { flex-direction: row; flex-wrap: wrap; flex: 1 1 100%; }
  .sidebar nav button { padding: .5rem .75rem; font-size: .85rem; }
  .sidebar-user { border: none; padding: 0; flex: 1 1 100%; display: flex; justify-content: space-between; align-items: center; }
  .admin-main { padding: 1.25rem; }
}
@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .nav-links { position: absolute; top: 70px; left: 0; right: 0; background: var(--cream); flex-direction: column; padding: 1.25rem; gap: 1rem; border-bottom: 1px solid var(--cream-dark); display: none; }
  .nav-links.open { display: flex; }
  .form-grid { grid-template-columns: 1fr; }
  .form-card { padding: 1.5rem; }
  .section { padding: 3rem 0; }
  .stats { grid-template-columns: 1fr; }
}
