/* === GLOBAL === */
:root {
  --bg: #050816;
  --bg-soft: rgba(15, 23, 42, 0.85);
  --bg-softer: rgba(15, 23, 42, 0.6);
  --accent: #f97316;
  --accent-soft: rgba(249, 115, 22, 0.1);
  --accent-strong: #fb923c;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --border-soft: rgba(148, 163, 184, 0.3);
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.85);
  --radius-lg: 20px;
  --radius-xl: 24px;
  --transition-fast: 0.18s ease-out;
  --transition-med: 0.25s ease-out;
}

:root.light {
  --bg: #f3f4f6;
  --bg-soft: rgba(255, 255, 255, 0.9);
  --bg-softer: rgba(255, 255, 255, 0.9);
  --text: #111827;
  --muted: #6b7280;
  --border-soft: rgba(209, 213, 219, 0.9);
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top left, #0f172a, #020617 40%, #111827 80%);
  min-height: 100vh;
}

/* === LOGIN PAGE === */
.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.25rem;
  overflow: hidden;
}

.login-wrapper {
  max-width: 1080px;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.9fr);
  gap: 2.5rem;
  align-items: center;
}

.login-graphic {
  position: relative;
  padding: 2.5rem;
  border-radius: 32px;
  background: radial-gradient(circle at top left, rgba(249, 115, 22, 0.08), transparent 55%),
              radial-gradient(circle at bottom right, rgba(56, 189, 248, 0.06), transparent 55%),
              linear-gradient(135deg, #020617, #020617);
  border: 1px solid rgba(148, 163, 184, 0.4);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.blur-circle {
  position: absolute;
  filter: blur(60px);
  opacity: 0.7;
}

.circle-1 {
  width: 220px;
  height: 220px;
  background: rgba(249, 115, 22, 0.5);
  top: -40px;
  right: -40px;
}

.circle-2 {
  width: 260px;
  height: 260px;
  background: rgba(59, 130, 246, 0.5);
  bottom: -60px;
  left: -40px;
}

.login-logo {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.6);
  margin-bottom: 1.5rem;
  z-index: 1;
}

.login-logo i {
  font-size: 1.4rem;
  color: var(--accent);
}

.login-logo span {
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #e5e7eb;
}

.login-graphic h1 {
  position: relative;
  font-size: 2.4rem;
  line-height: 1.15;
  margin: 0 0 0.75rem;
  z-index: 1;
}

.login-graphic h1 span {
  color: var(--accent-strong);
}

.login-graphic p {
  position: relative;
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 26rem;
  z-index: 1;
}

.login-highlights {
  position: relative;
  list-style: none;
  padding: 0;
  margin: 1.75rem 0 0;
  display: grid;
  gap: 0.75rem;
  z-index: 1;
}

.login-highlights li {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.9rem;
  color: #e5e7eb;
}

.login-highlights i {
  font-size: 1.1rem;
  color: var(--accent);
}

/* Login card */
.glass-panel {
  background: var(--bg-soft);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(26px);
}

.login-card {
  padding: 2.25rem 2.4rem;
}

.login-card h2 {
  margin: 0;
  font-size: 1.6rem;
}

.login-subtitle {
  margin-top: 0.35rem;
  margin-bottom: 1.75rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.input-group {
  margin-bottom: 1rem;
}

.input-group label {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 0.3rem;
}

.input-icon {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  background: rgba(15, 23, 42, 0.9);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  border: 1px solid rgba(148, 163, 184, 0.6);
}

.input-icon i {
  font-size: 1.1rem;
  color: var(--muted);
}

input,
select,
textarea {
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  width: 100%;
}

input::placeholder,
textarea::placeholder {
  color: rgba(148, 163, 184, 0.7);
}

.hint-text {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: var(--muted);
}

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.checkbox input {
  width: auto;
  accent-color: var(--accent);
}

.login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0.75rem 0 1.3rem;
}

/* Buttons */
.btn-primary,
.btn-primary-sm {
  border: none;
  cursor: pointer;
  font-weight: 500;
  background: linear-gradient(135deg, #f97316, #fb923c);
  color: #020617;
  padding: 0.75rem 1.35rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.9rem;
  box-shadow: 0 12px 30px rgba(248, 113, 22, 0.45);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), filter var(--transition-fast);
}

.btn-primary-sm {
  padding: 0.55rem 1.1rem;
  font-size: 0.82rem;
}

.btn-primary:hover {
  transform: translateY(-1px) translateZ(0);
  box-shadow: 0 18px 40px rgba(248, 113, 22, 0.55);
  filter: brightness(1.03);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 6px 18px rgba(248, 113, 22, 0.5);
}

.btn-full {
  width: 100%;
  justify-content: center;
}

.btn-ghost,
.btn-ghost-sm {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: rgba(15, 23, 42, 0.6);
  color: var(--text);
  padding: 0.55rem 1.1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  font-size: 0.82rem;
}

.btn-ghost-sm {
  padding: 0.45rem 0.9rem;
}

.btn-danger-sm {
  border-radius: 999px;
  border: 1px solid rgba(239, 68, 68, 0.7);
  background: rgba(127, 29, 29, 0.8);
  color: #fee2e2;
  padding: 0.45rem 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  font-size: 0.8rem;
}

.badge,
.badge-soft {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.badge {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.badge-soft {
  background: rgba(148, 163, 184, 0.12);
  color: var(--muted);
}

.alert {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.8rem;
  border-radius: 12px;
  font-size: 0.8rem;
}

.alert-error {
  background: rgba(248, 113, 22, 0.08);
  border: 1px solid rgba(248, 113, 22, 0.6);
  color: #fed7aa;
}

.login-footer {
  margin-top: 1.8rem;
  display: flex;
  justify-content: center;
}

.muted {
  color: var(--muted);
}

.badge-soft {
  border: 1px solid rgba(148, 163, 184, 0.4);
}

/* === APP LAYOUT === */
.app-body {
  min-height: 100vh;
}

.app-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
  gap: 1.5rem;
  padding: 1.5rem;
}

/* Sidebar */
.sidebar {
  display: flex;
  flex-direction: column;
  padding: 1.2rem 1rem;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.sidebar-logo i {
  font-size: 1.8rem;
  color: var(--accent);
}

.sidebar-logo h1 {
  font-size: 1.15rem;
  margin: 0;
}

.sidebar-nav {
  margin-top: 1.5rem;
  display: grid;
  gap: 0.3rem;
}

.nav-item {
  border-radius: 999px;
  border: none;
  padding: 0.55rem 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  background: transparent;
  color: var(--muted);
  font-size: 0.86rem;
  transition: background var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
}

.nav-item i {
  font-size: 1.2rem;
}

.nav-item.active {
  background: radial-gradient(circle at top left, var(--accent-soft), rgba(15, 23, 42, 0.9));
  color: var(--text);
  transform: translateY(-1px);
}

.sidebar-footer {
  margin-top: auto;
}

/* Main content */
.main {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 1.2rem;
  border-radius: var(--radius-lg);
  background: var(--bg-softer);
  border: 1px solid var(--border-soft);
  backdrop-filter: blur(20px);
}

.app-header h2 {
  margin: 0;
  font-size: 1.3rem;
}

.app-header p {
  margin: 0.2rem 0 0;
  font-size: 0.86rem;
  color: var(--muted);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.icon-btn,
.icon-btn-sm {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: rgba(15, 23, 42, 0.7);
  color: var(--text);
  padding: 0.4rem 0.55rem;
  display: inline-flex;
  cursor: pointer;
}

.icon-btn-sm {
  padding: 0.3rem 0.5rem;
}

.user-chip {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: rgba(15, 23, 42, 0.9);
  padding: 0.35rem 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
}

/* Sections */
.section {
  display: none;
  flex-direction: column;
  gap: 1rem;
}

.section.visible {
  display: flex;
}

/* Cards & grids */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.1fr);
  gap: 1rem;
}

.stat-card {
  padding: 1rem 1.1rem;
}

.stat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.86rem;
  color: var(--muted);
}

.stat-header i {
  font-size: 1.2rem;
  color: var(--accent-strong);
}

.stat-card h3 {
  margin: 0.4rem 0 0.15rem;
  font-size: 1.6rem;
}

/* Lists */
.list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.list-scroll {
  max-height: 320px;
  overflow: auto;
  padding-right: 0.25rem;
}

.list-scroll.small {
  max-height: 220px;
}

.list-item {
  padding: 0.55rem 0.7rem;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  font-size: 0.82rem;
}

.list-item-main {
  display: flex;
  flex-direction: column;
}

.list-item-title {
  font-size: 0.9rem;
}

.list-item-meta {
  font-size: 0.74rem;
  color: var(--muted);
}

/* Panel header */
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
}

/* Forms shared */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem 0.9rem;
  margin-bottom: 0.6rem;
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
}

/* Orders layout */
.order-layout {
  margin-top: 0.8rem;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 0.9rem;
}

.menu-scroll {
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  padding: 0.8rem;
  background: rgba(15, 23, 42, 0.8);
  max-height: 360px;
  display: flex;
  flex-direction: column;
}

.subheading {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
  margin: 0 0 0.5rem;
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  overflow-y: auto;
}

.menu-pill {
  border-radius: 999px;
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: rgba(15, 23, 42, 0.9);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.menu-pill span.price {
  color: var(--accent-strong);
}

/* Cart */
.cart-panel {
  padding: 0.7rem;
}

.glass-panel-inner {
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px dashed rgba(148, 163, 184, 0.5);
}

.cart-summary {
  margin-top: 0.65rem;
  padding-top: 0.5rem;
  border-top: 1px dashed rgba(148, 163, 184, 0.6);
  font-size: 0.82rem;
}

.cart-summary .row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.15rem;
}

.row-total span:last-child {
  font-weight: 600;
  font-size: 0.92rem;
}

.cart-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.6rem;
}

/* Tables grid */
.tables-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.7rem;
}

.table-card {
  padding: 0.7rem;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: rgba(15, 23, 42, 0.9);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.table-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Reports */
.report-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0.8rem;
  padding-top: 0.3rem;
}

.report-card {
  padding: 0.85rem 1rem;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.4);
}

.report-card .label {
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--muted);
}

/* Settings */
.settings-block {
  margin-top: 0.85rem;
}

/* Misc */
.small {
  font-size: 0.76rem;
}

.center {
  text-align: center;
}

/* Print Bill */
.print-area {
  display: none;
}

@media print {
  body * {
    visibility: hidden;
  }
  .print-area, .print-area * {
    visibility: visible;
  }
  .print-area {
    position: absolute;
    inset: 0;
    margin: 0;
    padding: 0;
  }
}

.bill {
  max-width: 360px;
  margin: 0 auto;
  font-size: 0.8rem;
}

.bill h2 {
  text-align: center;
  margin: 0 0 0.1rem;
}

.bill-meta {
  font-size: 0.75rem;
  margin-bottom: 0.35rem;
}

.bill-meta p {
  margin: 0.1rem 0;
}

#billTable {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 0.3rem;
}

#billTable th,
#billTable td {
  border-bottom: 1px dashed rgba(148, 163, 184, 0.6);
  padding: 0.18rem 0;
}

.bill-totals {
  margin-bottom: 0.3rem;
  text-align: right;
}

/* Scrollbars */
.list-scroll::-webkit-scrollbar,
.menu-scroll::-webkit-scrollbar {
  width: 6px;
}
.list-scroll::-webkit-scrollbar-thumb,
.menu-scroll::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.8);
}

/* Responsive */
@media (max-width: 960px) {
  .app-layout {
    grid-template-columns: 72px minmax(0, 1fr);
  }
  .sidebar-logo div span {
    display: none;
  }
  .sidebar-logo h1 {
    display: none;
  }
  .nav-item span {
    display: none;
  }
}

@media (max-width: 768px) {
  .login-wrapper {
    grid-template-columns: minmax(0, 1fr);
  }
  .login-graphic {
    display: none;
  }
  .app-layout {
    grid-template-columns: 1fr;
  }
  .sidebar {
    flex-direction: row;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.8rem;
  }
  .sidebar-nav {
    margin-top: 0;
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
  }
  .sidebar-footer {
    margin-top: 0;
    margin-left: auto;
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }
  .order-layout {
    grid-template-columns: 1fr;
  }
}
