/* ==========================================================================
   Kukurico OMP — Django theme
   Red palette + Poppins. Built on top of Bootstrap 5.3 (loaded via CDN).
   ========================================================================== */

:root {
  --brand: #dc2626;
  --brand-600: #b91c1c;
  --brand-700: #991b1b;
  --brand-50: #fef2f2;
  --brand-100: #fee2e2;
  --brand-200: #fecaca;
  --accent: #f43f5e;

  --ink-900: #0f172a;
  --ink-700: #334155;
  --ink-500: #64748b;
  --ink-400: #94a3b8;
  --ink-300: #cbd5e1;
  --ink-200: #e2e8f0;
  --ink-100: #f1f5f9;
  --ink-50:  #f8fafc;

  --bg:       #f6f7fb;
  --card:     #ffffff;
  --shadow-sm: 0 1px 2px rgba(15,23,42,.06), 0 1px 3px rgba(15,23,42,.04);
  --shadow-md: 0 4px 12px rgba(15,23,42,.08);
  --shadow-lg: 0 12px 32px rgba(15,23,42,.12);

  --radius-sm: 8px;
  --radius:    14px;
  --radius-lg: 20px;

  --sidebar-w: 248px;
  --header-h: 64px;

  --sidebar-bg: linear-gradient(180deg, #1a0a0a 0%, #3a0d0d 60%, #5c1616 100%);
  --sidebar-ink: #fde2e2;
  --sidebar-ink-dim: #c9a6a6;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI',
               Roboto, 'Helvetica Neue', sans-serif;
  font-size: 14px;
  background: var(--bg);
  color: var(--ink-900);
  -webkit-font-smoothing: antialiased;
}

/* Global background image — must create a stacking context on body so the
   negative-z-index pseudo-elements below don't escape behind body's bg color. */
body { isolation: isolate; }
body::before {
  content: "";
  position: fixed; inset: 0;
  z-index: -1; pointer-events: none;
  background-image: url("../img/background.jpg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  opacity: 0.50;
  filter: saturate(0.8);
}
body::after {
  content: "";
  position: fixed; inset: 0;
  z-index: -1; pointer-events: none;
  background:
    radial-gradient(1100px 560px at 90% -10%, rgba(220, 38, 38, 0.09), transparent 60%),
    radial-gradient(900px 480px at -10% 110%, rgba(220, 38, 38, 0.06), transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.45) 0%, rgba(253, 251, 251, 0.55) 100%);
}

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-700); }

/* ==========================================================================
   Layout shell
   ========================================================================== */
.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}

.app-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.app-content {
  padding: 28px 32px 48px;
  flex: 1;
}

/* Mobile overrides live at the bottom of this file so source order wins
   over the base rules above. See the end of this file. */

/* ==========================================================================
   Sidebar
   ========================================================================== */
.app-sidebar {
  background: var(--sidebar-bg);
  color: var(--sidebar-ink);
  width: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 20px 0;
  box-shadow: var(--shadow-md);
  overflow-y: auto;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px 18px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  margin-bottom: 14px;
}
.brand-mark {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #ef4444, #be123c);
  display: grid; place-items: center;
  color: white;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(220,38,38,.35);
}
.brand-logo {
  width: 42px; height: 42px;
  border-radius: 10px;
  object-fit: contain;
  background: #fff;
  padding: 4px;
  box-shadow: 0 6px 16px rgba(220,38,38,.35);
}
.brand-name {
  font-weight: 700;
  font-size: 17px;
  letter-spacing: .2px;
  color: white;
}
.brand-sub { font-size: 11px; color: var(--sidebar-ink-dim); }

.nav-group { padding: 10px 16px; }
.nav-group-label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--sidebar-ink-dim);
  margin: 10px 8px 6px;
  font-weight: 600;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--sidebar-ink);
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 500;
  transition: background .15s ease, color .15s ease, transform .15s ease;
  margin-bottom: 2px;
}
.nav-link i { font-size: 16px; width: 18px; text-align: center; opacity: .85; }
.nav-link:hover {
  background: rgba(255,255,255,.08);
  color: white;
  transform: translateX(2px);
}
.nav-link.active {
  background: linear-gradient(90deg, rgba(239,68,68,.5), rgba(239,68,68,.15));
  color: white;
  box-shadow: inset 2px 0 0 #ef4444;
}
.nav-link.active i { opacity: 1; }

.sidebar-foot {
  margin-top: auto;
  padding: 14px 20px;
  border-top: 1px solid rgba(255,255,255,.08);
  font-size: 11.5px;
  color: var(--sidebar-ink-dim);
}

/* Sidebar new-order indicator dot */
.nav-new-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: #22c55e;
  margin-left: auto; flex-shrink: 0;
  box-shadow: 0 0 0 0 rgba(34,197,94,.6);
  animation: navDotPulse 1.6s infinite;
}
@keyframes navDotPulse {
  0%   { box-shadow: 0 0 0 0 rgba(34,197,94,.55); }
  70%  { box-shadow: 0 0 0 7px rgba(34,197,94,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}

/* ==========================================================================
   Top bar
   ========================================================================== */
.app-header {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  background: var(--card);
  border-bottom: 1px solid var(--ink-200);
  position: sticky;
  top: 0;
  z-index: 100;
}
.page-title {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: var(--ink-900);
}
.page-subtitle {
  margin: 2px 0 0;
  font-size: 12.5px;
  color: var(--ink-500);
}
.header-actions { display: flex; align-items: center; gap: 12px; }

.icon-btn {
  width: 38px; height: 38px;
  border-radius: 10px;
  border: 1px solid var(--ink-200);
  background: var(--card);
  color: var(--ink-700);
  display: grid; place-items: center;
  cursor: pointer;
  transition: all .15s ease;
}
.icon-btn:hover { background: var(--brand-50); color: var(--brand); border-color: var(--brand-200); }

.user-chip {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 6px 4px 4px;
  border-radius: 40px;
  background: var(--ink-100);
}
.user-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-700));
  color: white; font-weight: 600; font-size: 12px;
  display: grid; place-items: center;
}
.user-chip-name { font-size: 12.5px; font-weight: 500; color: var(--ink-700); padding-right: 8px; }

.hamburger { display: none; }
@media (max-width: 991px) { .hamburger { display: grid; } }

/* ==========================================================================
   Cards / sections
   ========================================================================== */
.card-x {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--ink-200);
  padding: 22px;
}
.card-x + .card-x { margin-top: 18px; }

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.card-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-900);
}
.card-subtitle { margin: 2px 0 0; font-size: 12px; color: var(--ink-500); }

/* ==========================================================================
   Metric cards
   ========================================================================== */
.metrics-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 22px;
}
@media (max-width: 1200px) { .metrics-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px)  { .metrics-grid { grid-template-columns: 1fr; } }

.metric {
  background: var(--card);
  border: 1px solid var(--ink-200);
  border-radius: var(--radius);
  padding: 18px 20px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease;
}
.metric:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.metric-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
}
.metric-label {
  font-size: 12px;
  color: var(--ink-500);
  text-transform: uppercase;
  letter-spacing: .6px;
  font-weight: 600;
}
.metric-icon {
  width: 34px; height: 34px;
  border-radius: 10px;
  display: grid; place-items: center;
  background: var(--brand-50);
  color: var(--brand);
  font-size: 16px;
}
.metric-value {
  font-size: 26px;
  font-weight: 700;
  color: var(--ink-900);
  line-height: 1.1;
}
.metric-foot { font-size: 11.5px; color: var(--ink-500); margin-top: 4px; }

.metric--accent::before {
  content: "";
  position: absolute; inset: 0 0 auto auto;
  width: 100px; height: 100px;
  background: radial-gradient(circle, rgba(220,38,38,.12), transparent 70%);
  border-radius: 50%;
  transform: translate(30px, -30px);
}

/* ==========================================================================
   Tables
   ========================================================================== */
.table-x {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}
.table-x th {
  text-align: left;
  padding: 10px 14px;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--ink-500);
  font-weight: 600;
  background: var(--ink-50);
  border-bottom: 1px solid var(--ink-200);
}
.table-x td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--ink-100);
  vertical-align: middle;
}
.table-x tbody tr:hover { background: var(--ink-50); }
.table-x tbody tr:last-child td { border-bottom: none; }

.table-x td .muted { color: var(--ink-500); font-size: 12px; }

.table-wrap {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--ink-200);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

/* Badges */
.badge-x {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  text-transform: capitalize;
}
.badge-x.warning  { background: #fef3c7; color: #92400e; }
.badge-x.info     { background: #dbeafe; color: #1e40af; }
.badge-x.primary  { background: #e0e7ff; color: #3730a3; }
.badge-x.success  { background: #d1fae5; color: #065f46; }
.badge-x.danger   { background: #fee2e2; color: #991b1b; }
.badge-x.secondary{ background: var(--ink-200); color: var(--ink-700); }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn-x {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: var(--ink-100);
  color: var(--ink-700);
  font-weight: 500;
  font-size: 13px;
  cursor: pointer;
  transition: all .15s ease;
}
.btn-x:hover { background: var(--ink-200); }
.btn-x.primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-700));
  color: white;
  box-shadow: 0 4px 12px rgba(220,38,38,.25);
}
.btn-x.primary:hover {
  background: linear-gradient(135deg, var(--brand-600), var(--brand-700));
  color: white;
  transform: translateY(-1px);
}
.btn-x.ghost {
  background: transparent;
  border: 1px solid var(--ink-200);
}
.btn-x.ghost:hover { background: var(--ink-50); border-color: var(--brand-200); color: var(--brand); }
.btn-x.danger { background: var(--brand-50); color: var(--brand-700); }
.btn-x.danger:hover { background: var(--brand-100); }
.btn-x.sm { padding: 5px 10px; font-size: 12px; }

/* Icon-only action buttons inside tables */
.action-btn {
  width: 30px; height: 30px;
  border-radius: 8px;
  border: 1px solid var(--ink-200);
  background: white;
  color: var(--ink-700);
  cursor: pointer;
  display: inline-grid; place-items: center;
  transition: all .15s ease;
}
.action-btn:hover { background: var(--brand-50); color: var(--brand); border-color: var(--brand-200); }
.action-btn.danger:hover { background: var(--brand-50); color: var(--brand-700); }

/* ==========================================================================
   Forms
   ========================================================================== */
.form-x label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-700);
  margin-bottom: 6px;
}
.form-x input[type="text"],
.form-x input[type="email"],
.form-x input[type="password"],
.form-x input[type="tel"],
.form-x input[type="number"],
.form-x input[type="date"],
.form-x input[type="file"],
.form-x textarea,
.form-x select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--ink-200);
  background: white;
  font-size: 13.5px;
  font-family: inherit;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.form-x textarea { min-height: 90px; resize: vertical; }
.form-x input:focus, .form-x textarea:focus, .form-x select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(220,38,38,.14);
}

.form-row { display: grid; gap: 14px; grid-template-columns: repeat(2, 1fr); margin-bottom: 14px; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }

.form-check {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px;
  color: var(--ink-700);
}
.form-check input { accent-color: var(--brand); }

/* ==========================================================================
   Modals (Bootstrap 5 override)
   ========================================================================== */
.modal-content { border: none; border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.modal-header { border-bottom: 1px solid var(--ink-200); padding: 18px 22px; }
.modal-title { font-weight: 600; font-size: 15px; }
.modal-body { padding: 22px; }
.modal-footer { border-top: 1px solid var(--ink-200); padding: 14px 22px; gap: 8px; }

/* ==========================================================================
   Auth page
   ========================================================================== */
.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--bg);
}
@media (max-width: 900px) { .auth-page { grid-template-columns: 1fr; } }

.auth-hero {
  position: relative;
  color: white;
  padding: 64px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  isolation: isolate;
}
@media (max-width: 900px) { .auth-hero { display: none; } }

/* Background image layer (set inline via --hero-img in the template) */
.auth-hero::after {
  content: "";
  position: absolute; inset: 0; z-index: -2;
  background-image: var(--hero-img, none);
  background-size: cover;
  background-position: center;
  filter: saturate(1.05) contrast(1.02);
}
/* Red gradient overlay on top of the image */
.auth-hero::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(circle at 78% 18%, rgba(254, 202, 202, .12), transparent 45%),
    radial-gradient(circle at 18% 82%, rgba(244, 63, 94, .22), transparent 55%),
    linear-gradient(135deg, rgba(59, 10, 10, 0.92) 0%, rgba(127, 29, 29, 0.85) 45%, rgba(185, 28, 28, 0.78) 100%);
}
.auth-hero > * { position: relative; z-index: 1; }
.auth-hero .brand-logo {
  width: 44px; height: 44px; border-radius: 10px; object-fit: contain;
  background: rgba(255, 255, 255, 0.15); padding: 4px;
}

.auth-hero .brand-mark { width: 48px; height: 48px; font-size: 20px; }
.auth-hero-text h1 {
  font-size: 40px; font-weight: 700; line-height: 1.1;
  margin: 0 0 16px;
  max-width: 440px;
}
.auth-hero-text p {
  font-size: 15px; line-height: 1.6; opacity: .85;
  max-width: 420px;
}

.auth-form-wrap {
  display: grid;
  place-items: center;
  padding: 32px;
}
.auth-form {
  width: 100%;
  max-width: 420px;
}
.auth-form h2 { font-size: 26px; font-weight: 700; margin: 0 0 6px; }
.auth-form p.subtitle { color: var(--ink-500); margin: 0 0 26px; }

/* ==========================================================================
   Misc
   ========================================================================== */
.flash-area { margin-bottom: 18px; }
.flash {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13px;
  border: 1px solid;
  margin-bottom: 8px;
}
.flash-success { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.flash-error   { background: var(--brand-50); border-color: var(--brand-200); color: var(--brand-700); }
.flash-info    { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }

.avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-200), var(--brand));
  color: white;
  display: grid; place-items: center;
  font-weight: 600; font-size: 13px;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--ink-500);
}
.empty-state i { font-size: 44px; color: var(--ink-300); margin-bottom: 10px; display: block; }
.empty-state h4 { margin: 0 0 4px; font-weight: 600; color: var(--ink-700); }
.empty-state p { margin: 0; font-size: 13px; }

.page-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 22px;
  flex-wrap: wrap;
  gap: 14px;
}
.page-head h2 { margin: 0; font-size: 22px; font-weight: 700; }
.page-head p { margin: 2px 0 0; color: var(--ink-500); font-size: 13px; }

/* Two-column layout for dashboard */
.grid-two {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 18px;
}
@media (max-width: 991px) { .grid-two { grid-template-columns: 1fr; } }

/* Activity list */
.activity-list { list-style: none; padding: 0; margin: 0; }
.activity-item {
  display: flex; gap: 12px; padding: 10px 0;
  border-bottom: 1px solid var(--ink-100);
}
.activity-item:last-child { border-bottom: none; }
.activity-icon {
  width: 34px; height: 34px;
  border-radius: 10px;
  display: grid; place-items: center;
  flex-shrink: 0;
  font-size: 14px;
}
.activity-icon.primary { background: #dbeafe; color: #1e40af; }
.activity-icon.success { background: #d1fae5; color: #065f46; }
.activity-icon.warning { background: #fef3c7; color: #92400e; }

.activity-body .activity-title { font-size: 13px; color: var(--ink-900); }
.activity-body .activity-ts   { font-size: 11.5px; color: var(--ink-500); }

/* Chart canvas */
.chart-box { height: 280px; position: relative; }

/* Searchable table controls */
.table-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 14px; flex-wrap: wrap;
}
.search-box {
  position: relative;
  flex: 0 0 280px;
}
.search-box input {
  width: 100%;
  padding: 8px 12px 8px 36px;
  border-radius: 10px;
  border: 1px solid var(--ink-200);
  font-size: 13px;
  font-family: inherit;
}
.search-box i {
  position: absolute; top: 50%; left: 12px;
  transform: translateY(-50%);
  color: var(--ink-400);
  font-size: 14px;
}

/* Stats pill row (for reports) */
.stats-row {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-bottom: 18px;
}
.stat-pill {
  background: var(--card); border: 1px solid var(--ink-200);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
}
.stat-pill .label { font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--ink-500); font-weight: 600; }
.stat-pill .value { font-size: 20px; font-weight: 700; color: var(--ink-900); margin-top: 4px; }

/* Category product grid (menu page) */
.product-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.product-card {
  background: var(--card);
  border: 1px solid var(--ink-200);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all .15s ease;
}
.product-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.product-card-img {
  height: 140px; background: var(--ink-100);
  display: grid; place-items: center;
  background-size: cover; background-position: center;
}
.product-card-img.placeholder i { font-size: 32px; color: var(--ink-300); }
.product-card-body { padding: 12px 14px; }
.product-card-name { font-weight: 600; font-size: 13.5px; margin: 0 0 4px; }
.product-card-meta { font-size: 12px; color: var(--ink-500); }
.product-card-price { font-weight: 700; color: var(--brand); margin-top: 6px; }

.tag {
  display: inline-block;
  padding: 2px 8px;
  font-size: 11px;
  background: var(--ink-100);
  color: var(--ink-700);
  border-radius: 6px;
}

/* ==========================================================================
   Orders table — compact action grid (2 cols of circular icon buttons)
   ========================================================================== */
.orders-table td { vertical-align: top; }
.action-grid {
  display: grid;
  grid-template-columns: repeat(2, 28px);
  gap: 6px;
  justify-content: center;
}
.action-grid .action-btn {
  width: 28px; height: 28px;
  border-radius: 50%;
  font-size: 12px;
}
.action-grid form { display: inline; }

/* ==========================================================================
   Pagination
   ========================================================================== */
.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-top: 1px solid var(--ink-100);
  flex-wrap: wrap;
  gap: 10px;
}
.pagination {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}
.page-link {
  min-width: 32px; height: 32px;
  padding: 0 10px;
  display: inline-grid; place-items: center;
  border-radius: 8px;
  border: 1px solid var(--ink-200);
  background: white;
  color: var(--ink-700);
  font-size: 12.5px;
  font-weight: 500;
  text-decoration: none;
  transition: all .15s ease;
}
.page-link:hover { background: var(--brand-50); color: var(--brand); border-color: var(--brand-200); }
.page-link.active {
  background: linear-gradient(135deg, var(--brand), var(--brand-700));
  color: white;
  border-color: transparent;
  box-shadow: 0 3px 10px rgba(220,38,38,.25);
}
.page-link.disabled {
  opacity: .4;
  pointer-events: none;
  background: var(--ink-50);
}

/* ==========================================================================
   New-order bell, toasts, and modal (loaded on every page via base.html)
   ========================================================================== */
.has-bell { position: relative; }
.bell-badge {
  position: absolute; top: -4px; right: -4px;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  font-size: 10px; font-weight: 700;
  display: grid; place-items: center;
  box-shadow: 0 3px 8px rgba(220,38,38,.45);
  border: 2px solid #fff;
}
.icon-btn.ringing { animation: bellRing 1.2s ease-in-out infinite; color: var(--brand); border-color: var(--brand-200); }
@keyframes bellRing {
  0%, 100% { transform: rotate(0); }
  10%, 30% { transform: rotate(-12deg); }
  20%, 40% { transform: rotate(12deg); }
  50% { transform: rotate(0); }
}

.bell-menu {
  width: 360px; padding: 0; border-radius: 14px; overflow: hidden;
  border: 1px solid var(--ink-200);
}
.bell-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 14px; background: var(--brand-50);
  border-bottom: 1px solid var(--brand-100); color: var(--brand-700);
}
.bell-head strong { font-size: 13px; }
.bell-clear {
  border: none; background: transparent; color: var(--brand-600);
  font-size: 11.5px; font-weight: 600; cursor: pointer; padding: 4px 8px; border-radius: 6px;
}
.bell-clear:hover { background: var(--brand-100); }
.bell-list { max-height: 380px; overflow-y: auto; }
.bell-empty {
  padding: 28px 14px; text-align: center; color: var(--ink-500); font-size: 13px;
}
.bell-empty i { font-size: 28px; color: var(--ink-300); display: block; margin-bottom: 6px; }
.bell-item {
  display: block; padding: 10px 14px; border-bottom: 1px solid var(--ink-100);
  text-decoration: none; color: var(--ink-900); transition: background .15s ease;
}
.bell-item:hover { background: var(--brand-50); color: var(--ink-900); }
.bell-item-head {
  display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 2px;
}
.bell-item-amount { color: var(--brand-700); font-weight: 700; }
.bell-item-sub { font-size: 11.5px; color: var(--ink-700); }
.bell-item-meta { font-size: 11px; color: var(--ink-500); margin-top: 2px; }

/* Toast stack — top-right */
.new-order-toasts {
  position: fixed; top: 76px; right: 24px; z-index: 1080;
  display: flex; flex-direction: column; gap: 10px; pointer-events: none;
  width: min(360px, calc(100vw - 40px));
}
.no-toast {
  background: #fff; border: 1px solid var(--ink-200);
  border-left: 4px solid var(--brand);
  border-radius: 12px; box-shadow: 0 14px 32px rgba(15,23,42,.18);
  padding: 12px 14px; pointer-events: auto;
  animation: noSlideIn .3s ease-out;
}
.no-toast.out { animation: noSlideOut .3s ease-in forwards; }
@keyframes noSlideIn  { from { transform: translateX(120%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes noSlideOut { to { transform: translateX(120%); opacity: 0; } }
.no-toast-head {
  display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 13px;
}
.no-toast-close {
  margin-left: auto; border: none; background: transparent; color: var(--ink-500);
  font-size: 18px; cursor: pointer; line-height: 1;
}
.no-toast-close:hover { color: var(--brand); }
.no-toast-body { font-size: 12px; color: var(--ink-700); display: grid; gap: 3px; }
.no-toast-body i { color: var(--brand-600); margin-right: 4px; }
.no-toast-actions { display: flex; gap: 6px; margin-top: 8px; justify-content: flex-end; }

.pulse-dot {
  display: inline-block; width: 10px; height: 10px; border-radius: 50%;
  background: var(--brand); box-shadow: 0 0 0 0 rgba(220,38,38,.6);
  animation: pulseDot 1.4s infinite;
}
@keyframes pulseDot {
  0%   { box-shadow: 0 0 0 0 rgba(220,38,38,.55); }
  70%  { box-shadow: 0 0 0 10px rgba(220,38,38,0); }
  100% { box-shadow: 0 0 0 0 rgba(220,38,38,0); }
}

/* New-order modal */
.new-order-modal { border-radius: 18px; border: none; overflow: hidden; }
.new-order-modal .modal-header {
  background: linear-gradient(135deg, var(--brand-50), #fff);
  border-bottom: 1px solid var(--brand-100);
}
.new-order-modal .modal-title { color: var(--brand-700); }
.no-modal-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px;
}
@media (max-width: 640px) { .no-modal-grid { grid-template-columns: 1fr; } }
.no-card {
  padding: 10px 12px; background: var(--ink-50); border: 1px solid var(--ink-200); border-radius: 10px;
}
.no-card-label { font-size: 10.5px; text-transform: uppercase; color: var(--ink-500); letter-spacing: .5px; }
.no-card-value { font-weight: 700; color: var(--ink-900); font-size: 16px; margin-top: 2px; }
.no-card .muted { font-size: 11.5px; }
.no-block {
  background: #fff; border: 1px solid var(--ink-200); border-radius: 12px;
  padding: 12px 14px; margin-bottom: 10px;
}
.no-block-title { font-weight: 700; color: var(--brand-700); margin-bottom: 6px; font-size: 13px; }
.no-items th { font-size: 11px; color: var(--ink-500); text-transform: uppercase; }
.no-items td, .no-items th { padding: 6px 8px; }

/* ==========================================================================
   Mobile overrides — MUST stay at the bottom of the file so that source
   order beats the base rules above (they share specificity).
   ========================================================================== */
@media (max-width: 991px) {
  .app-shell { display: block; }

  .app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    transform: translateX(-100%);
    transition: transform .2s ease;
    z-index: 1030;
  }
  .app-sidebar.open { transform: translateX(0); }

  /* Floating header — doesn't take any flow space, so content below it
     is the very first thing at the top of the viewport. */
  .app-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: auto; min-height: 0;
    padding: 8px 10px;
    background: transparent;
    border-bottom: 0;
    z-index: 150;
    pointer-events: none;
  }
  .app-header > * { pointer-events: auto; }

  .page-title, .page-subtitle { display: none; }
  .header-actions { gap: 6px; flex-shrink: 0; }
  .user-chip-name { display: none; }

  /* Translucent pill buttons that float over the content */
  .icon-btn, .hamburger, .user-chip {
    background: rgba(255, 255, 255, 0.92);
    -webkit-backdrop-filter: saturate(180%) blur(10px);
    backdrop-filter: saturate(180%) blur(10px);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
    border-color: rgba(255, 255, 255, 0.9);
  }
  .icon-btn, .hamburger { width: 36px; height: 36px; }
  .user-chip { padding: 4px; }

  /* Page content — pad top enough to clear the 52 px floating navbar */
  .app-main { min-height: 0; }
  .app-content { padding: 52px 12px 24px; }
}
