:root {
  --ink: #1f2430;
  --muted: #697386;
  --line: #e6e9ef;
  --bg: #f6f8fb;
  --surface: #fff;
  --accent: #d52f83;
  --accent-dark: #af2167;
  --success: #11845b;
  --shadow: 0 12px 30px rgba(31, 36, 48, 0.07);
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
  background: linear-gradient(135deg, #fafbff, #f7f3f8);
  color: var(--ink);
  font-family:
    Inter,
    Segoe UI,
    Arial,
    sans-serif;
  line-height: 1.45;
}
.topbar {
  min-height: 68px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1rem, 4vw, 4rem);
  position: sticky;
  top: 0;
  z-index: 5;
}
.brand {
  font-size: 1.4rem;
  font-weight: 850;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.03em;
}
.brand:before {
  content: "✚";
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-right: 0.55rem;
  border-radius: 9px;
  background: linear-gradient(135deg, #ef5aa1, #b42472);
  color: #fff;
  font-size: 0.9rem;
}
.topbar nav {
  display: flex;
  gap: 1rem;
  align-items: center;
}
.sidebar-nav {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 248px;
  min-height: 100vh;
  display: block;
  overflow-y: auto;
  padding: 1.25rem 1rem;
  border-right: 1px solid var(--line);
  border-bottom: 0;
}
.sidebar-nav .brand { display: block; margin: 0 .6rem 1.4rem; }
.nav-toggle { display: none; }
.sidebar-nav nav { display: block; }
.sidebar-nav nav > a, .sidebar-nav nav > form, .sidebar-nav .nav-menu { display: block; margin: .2rem 0; }
.sidebar-nav nav > a, .sidebar-nav .link-button, .sidebar-nav .nav-menu summary { padding: .7rem .75rem; border-radius: 9px; }
.sidebar-nav .nav-menu summary::after { float: right; }
.sidebar-nav .nav-dropdown { position: static; min-width: 0; margin: .15rem 0 .35rem .6rem; padding: .25rem; box-shadow: none; background: #fafbfe; }
.sidebar-nav .nav-dropdown a, .sidebar-nav .nav-disabled { white-space: normal; }
body:has(.sidebar-nav) .page-shell { margin-left: 248px; }
.sidebar-nav nav > a:hover, .sidebar-nav .link-button:hover, .sidebar-nav .nav-menu summary:hover { background: #fff1f8; }
.topbar nav a,
.link-button {
  color: #505b6d;
  font-weight: 700;
  text-decoration: none;
  background: transparent;
  border: 0;
  font: inherit;
  cursor: pointer;
}
.topbar nav a:hover,
.link-button:hover {
  color: var(--accent);
}
.nav-menu {
  position: relative;
}
.nav-menu summary {
  list-style: none;
  cursor: pointer;
  color: #505b6d;
  font-weight: 700;
  padding: 0.55rem 0;
}
.nav-menu summary::-webkit-details-marker {
  display: none;
}
.nav-menu summary::after {
  content: "⌄";
  margin-left: 0.35rem;
  font-size: 0.8rem;
}
.nav-menu[open] summary,
.nav-menu summary:hover {
  color: var(--accent);
}
.nav-dropdown {
  position: absolute;
  top: calc(100% + 0.65rem);
  right: 0;
  min-width: 230px;
  padding: 0.45rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow);
  z-index: 10;
}
.nav-dropdown a,
.nav-disabled {
  display: block;
  padding: 0.62rem 0.72rem;
  border-radius: 8px;
  white-space: nowrap;
  font-size: 0.9rem;
}
.nav-dropdown a:hover {
  background: #fff1f8;
}
.nav-disabled {
  color: #9aa2b1;
  cursor: not-allowed;
}
.page-shell {
  max-width: 1320px;
  margin: auto;
  padding: clamp(1.25rem, 3vw, 2.5rem) clamp(1rem, 4vw, 4rem) 3rem;
}
.page-shell.narrow {
  max-width: 960px;
}
.hero {
  border: 1px solid #f0d4e2;
  border-radius: 22px;
  padding: clamp(1.5rem, 4vw, 2.8rem);
  background:
    radial-gradient(circle at 90% 10%, #fde8f4 0, transparent 34%), #fff;
  position: relative;
  box-shadow: var(--shadow);
}
.hero h1,
.page-title h1 {
  margin: 0.25rem 0 0.55rem;
  font-size: clamp(1.75rem, 3vw, 2.55rem);
  letter-spacing: -0.045em;
}
.hero p,
.page-title p {
  color: var(--muted);
  font-size: 1.02rem;
}
.eyebrow {
  font-size: 0.72rem !important;
  font-weight: 850;
  letter-spacing: 0.14em;
  color: #a02d69 !important;
}
.clock {
  position: absolute;
  right: 2rem;
  top: 2rem;
  text-align: right;
}
.clock strong {
  display: block;
  font-size: 2.4rem;
  color: var(--accent);
}
.clock span {
  color: var(--muted);
  font-size: 0.9rem;
}
.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 1.25rem;
}
.metric-card, .quick-actions {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 4px 16px rgba(31, 36, 48, 0.04);
}
.metric-card { padding: 1.15rem; }
.metric-card span { display: block; color: var(--muted); font-size: .9rem; }
.metric-card strong { display: block; margin: .3rem 0 .65rem; font-size: 2rem; }
.metric-card a { color: var(--accent-dark); font-weight: 750; text-decoration: none; font-size: .88rem; }
.metric-card.warning strong { color: #c77a13; }
.quick-actions { margin-top: 1rem; padding: 1.35rem; }
.quick-actions h2 { margin: .15rem 0 0; font-size: 1.25rem; }
.action-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .75rem; margin-top: 1rem; }
.action-button { display: flex; flex-direction: column; gap: .25rem; padding: 1rem; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); text-decoration: none; }
.action-button span { color: var(--muted); font-size: .86rem; }
.action-button:hover { border-color: #eb9bc5; background: #fff8fc; }
.action-button.primary { color: #fff; background: linear-gradient(135deg, #e34191, #c12373); border-color: transparent; }
.action-button.primary span { color: #ffe4f2; }
.module-card {
  display: block;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  padding: 1.4rem;
  text-decoration: none;
  color: var(--ink);
  min-height: 145px;
  box-shadow: 0 4px 16px rgba(31, 36, 48, 0.04);
  transition: 0.18s ease;
}
.module-card h2 {
  font-size: 1.08rem;
  margin: 0 0 0.55rem;
}
.module-card p {
  margin: 0;
  color: var(--muted);
}
.module-card:not(.muted):hover {
  transform: translateY(-3px);
  border-color: #eb9bc5;
  box-shadow: var(--shadow);
}
.muted {
  opacity: 0.58;
}
.page-title {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 1.35rem;
}
.page-title p {
  margin: 0;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: linear-gradient(135deg, #e34191, #c12373);
  color: #fff;
  text-decoration: none;
  border: 0;
  border-radius: 10px;
  padding: 0.72rem 1.05rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(213, 47, 131, 0.22);
  transition: 0.16s;
}
.button:hover {
  transform: translateY(-1px);
  background: var(--accent-dark);
}
.button.secondary {
  background: #fff;
  color: var(--ink);
  border: 1px solid #dce1e9;
  box-shadow: none;
}
.table-card,
.form-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: auto;
  box-shadow: 0 4px 16px rgba(31, 36, 48, 0.035);
}
.table-card input:not([type="hidden"]),
.table-card select {
  width: 100%;
  min-width: 150px;
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 1px solid #d8dee8;
  border-radius: 9px;
  padding: 0.68rem 0.75rem;
  outline: 0;
}
.table-card input:not([type="hidden"]):focus,
.table-card select:focus {
  border-color: #d94d94;
  box-shadow: 0 0 0 3px #fce4f0;
}
.form-card {
  padding: clamp(1rem, 2.5vw, 1.55rem);
}
.form-card h2 {
  margin-top: 0;
  font-size: 1.08rem;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.form-grid.single-column {
  grid-template-columns: 1fr;
}
.form-grid label {
  display: grid;
  gap: 0.38rem;
  font-weight: 750;
  font-size: 0.84rem;
  color: #465064;
}
.form-grid input,
.form-grid select {
  width: 100%;
  font: inherit;
  padding: 0.72rem 0.8rem;
  border: 1px solid #d8dee8;
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  outline: 0;
}
.form-grid input:focus,
.form-grid select:focus {
  border-color: #d94d94;
  box-shadow: 0 0 0 3px #fce4f0;
}
small {
  color: #bb3365;
}
.error {
  color: #b42350;
  background: #fff0f5;
  padding: 0.7rem 0.85rem;
  border-radius: 9px;
}
.sale-currency-help {
  margin: -0.35rem 0 1.1rem;
  padding: 0.7rem 0.85rem;
  color: #465064;
  background: #f3f6fb;
  border-left: 3px solid var(--accent);
  border-radius: 0 9px 9px 0;
  font-size: 0.9rem;
}
.sale-payment-card { display: grid; grid-template-columns: 1fr auto; gap: 1rem; align-items: center; margin: 0 0 1.25rem; padding: 1.1rem; border: 1px solid #efcade; border-radius: 14px; background: linear-gradient(135deg, #fff, #fff5fa); }
.sale-payment-card h2, .sale-payment-card .eyebrow { margin: 0; }
.sale-total, .change-display { display: grid; gap: .2rem; }
.sale-total { text-align: right; }
.sale-total span, .change-display span { color: var(--muted); font-size: .82rem; font-weight: 700; }
.sale-total strong { color: var(--accent-dark); font-size: 1.55rem; }
.cash-payment-fields { grid-column: 1 / -1; margin: 0; align-items: end; }
.cash-payment-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cash-payment-fields .change-display { padding: .78rem .9rem; border: 1px solid #e7d5df; border-radius: 9px; background: #fff; }
.change-display strong { font-size: 1.2rem; color: var(--success); }
.change-display small { color: var(--muted); }
#cash-payment-fields[hidden] + .change-display { display: none; }
.exact-payment-note { grid-column: 1 / -1; margin: 0; padding: .7rem .85rem; color: #465064; background: #f3f6fb; border-radius: 9px; font-size: .9rem; }
.sale-products-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin: 1.25rem 0 .7rem; }
.sale-products-heading h2 { margin: 0; }
.sale-products-heading p { margin: .2rem 0 0; color: var(--muted); font-size: .9rem; }
.sale-line { grid-template-columns: minmax(0, 1fr) 125px auto; align-items: end; margin-bottom: .7rem; padding: .85rem; border: 1px solid var(--line); border-radius: 12px; background: #fcfdff; }
.sale-list-section { margin: 1.25rem 0; }
.barcode-row { margin-bottom: .7rem; }
.barcode-row { grid-template-columns: minmax(260px, 1fr) minmax(220px, 1fr); align-items: end; }
.sale-list-card { overflow-x: auto; }
.sale-cart { min-width: 820px; }
.sale-cart .sale-line { display: table-row; margin: 0; padding: 0; border: 0; background: transparent; }
.sale-cart td { vertical-align: middle; }
.sale-cart select, .sale-cart input { width: 100%; min-width: 105px; padding: .62rem .7rem; border: 1px solid #d8dee8; border-radius: 8px; font: inherit; }
.sale-cart .line-code, .sale-cart .line-unit, .sale-cart .line-subtotal { white-space: nowrap; font-weight: 750; }
.sale-cart .line-subtotal { color: var(--accent-dark); }
.order-form-heading, .order-products-heading, .order-list-heading { display: flex; justify-content: space-between; gap: 1rem; align-items: end; }
.order-form-heading p, .order-products-heading p, .order-list-heading p { margin: .25rem 0 1rem; color: var(--muted); }
.order-products-heading { padding-top: .35rem; border-top: 1px solid var(--line); }
.order-line { display: grid; grid-template-columns: minmax(260px, 1fr) 150px auto; gap: 1rem; align-items: end; margin-bottom: 1rem; padding: .9rem; border: 1px solid var(--line); border-radius: 12px; background: #fcfdff; }
.order-line label { display: grid; gap: .38rem; font-weight: 750; font-size: .84rem; color: #465064; }
.order-line input, .order-line select, .order-filters input, .order-filters select { width: 100%; font: inherit; padding: .65rem .75rem; border: 1px solid #d8dee8; border-radius: 9px; background: #fff; color: var(--ink); }
.option-search { margin-bottom: .35rem; }.order-list-heading { margin-top: 1.6rem; }.order-list-heading h2 { margin: 0; }.order-filters { display: flex; gap: .55rem; min-width: min(100%, 470px); }.order-actions { display: flex; flex-wrap: wrap; gap: .45rem; min-width: 290px; }.order-actions form { display: flex; gap: .4rem; }.order-actions select { min-width: 135px; }
.success {
  color: #087a50;
  background: #e5f7ef;
  padding: 0.7rem 0.85rem;
  border-radius: 9px;
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
}
th,
td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid #edf0f4;
}
tbody tr:hover {
  background: #fcfbfd;
}
th {
  color: #778194;
  font-size: 0.73rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: #fafbfc;
}
.empty {
  text-align: center;
  color: var(--muted);
  padding: 2rem;
}
.inventory-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.inventory-summary .metric-card strong {
  color: var(--accent-dark);
}
.inventory-summary small,
.stock-caption {
  display: block;
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.78rem;
}
.stock-number {
  font-size: 1.15rem;
  color: var(--ink);
}
.status-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0.32rem 0.58rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  color: #9a5a08;
  background: #fff4dc;
}
.status-badge.success-badge {
  color: #087a50;
  background: #e5f7ef;
}
.cash-session-card {
  margin-bottom: 1.25rem;
  padding: clamp(1.15rem, 2.5vw, 1.6rem);
  border: 1px solid #efcade;
  border-radius: 18px;
  background: linear-gradient(135deg, #fff, #fff7fb);
  box-shadow: var(--shadow);
}
.cash-session-card.own-session {
  border-color: #dca4c2;
}
.cash-session-heading {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.cash-session-heading h2 {
  margin: 0;
  font-size: 1.25rem;
}
.cash-details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.15rem;
}
.cash-details span {
  display: grid;
  gap: 0.2rem;
  padding: 0.85rem;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 0.82rem;
}
.cash-details strong {
  color: var(--ink);
  font-size: 1.02rem;
}
.cash-details .cash-total strong {
  color: var(--accent-dark);
  font-size: 1.25rem;
}
.cash-close-form {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  gap: 0.75rem;
  align-items: end;
  padding-top: 1rem;
  border-top: 1px solid #f0dbe6;
}
.cash-close-form label {
  display: grid;
  gap: 0.38rem;
  color: #465064;
  font-size: 0.84rem;
  font-weight: 750;
}
.cash-close-form input {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 1px solid #d8dee8;
  border-radius: 9px;
  padding: 0.72rem 0.8rem;
  outline: 0;
}
.cash-close-form input:focus {
  border-color: #d94d94;
  box-shadow: 0 0 0 3px #fce4f0;
}
@media (max-width: 1440px) {
  .sidebar-nav { position: sticky; width: 100%; min-height: 68px; height: 68px; max-height: none; padding: .7rem 1rem; display: flex; align-items: center; overflow: visible; background: #211827; border-color: #463148; }
  .sidebar-nav .brand { margin: 0; color: #fff4fa; font-size: 1.08rem; }
  .sidebar-nav .brand:before { width: 24px; height: 24px; margin-right: .4rem; }
  .nav-toggle { display: inline-flex; align-items: center; gap: .4rem; margin-left: auto; padding: .55rem .75rem; border: 1px solid #76506f; border-radius: 9px; background: #38263b; color: #fff4fa; font: inherit; font-weight: 800; }
  .nav-toggle span { font-size: 1.2rem; line-height: 1; }
  .sidebar-nav #app-navigation { display: block; position: fixed; z-index: 20; top: 68px; bottom: 0; left: 0; width: min(88vw, 340px); max-height: none; overflow-y: auto; padding: 1rem .75rem; border: 0; border-right: 1px solid #553d56; border-radius: 0; background: #211827; box-shadow: 8px 0 28px rgba(0,0,0,.35); transform: translateX(-105%); transition: transform .22s ease; }
  .sidebar-nav.mobile-menu-open #app-navigation { transform: translateX(0); }
  body:has(.sidebar-nav.mobile-menu-open)::before { content: ""; position: fixed; z-index: 10; inset: 68px 0 0; background: rgba(15, 10, 18, .58); }
  .sidebar-nav #app-navigation nav { display: block; }
  .sidebar-nav #app-navigation nav > a, .sidebar-nav #app-navigation nav > form, .sidebar-nav #app-navigation .nav-menu { display: block; margin: .15rem 0; }
  .sidebar-nav #app-navigation nav > a, .sidebar-nav #app-navigation .link-button, .sidebar-nav #app-navigation .nav-menu summary { display: block; width: 100%; padding: .75rem; font-size: .95rem; text-align: left; }
  .sidebar-nav #app-navigation .nav-dropdown { position: static; min-width: 0; margin: .15rem 0 .35rem .5rem; border-color: #4c374d; box-shadow: none; background: #2d2031; }
  .sidebar-nav #app-navigation nav > a, .sidebar-nav #app-navigation .link-button, .sidebar-nav #app-navigation .nav-menu summary { color: #f8ddea; }
  .sidebar-nav #app-navigation .nav-menu[open] summary, .sidebar-nav #app-navigation .nav-menu summary:hover, .sidebar-nav #app-navigation nav > a:hover { color: #ff6eb7; background: #38263b; }
  .sidebar-nav #app-navigation .nav-dropdown a { color: #f5d8e9; }
  .sidebar-nav > nav { display: none; position: fixed; z-index: 20; top: 68px; bottom: 0; left: 0; width: min(88vw, 340px); overflow-y: auto; padding: 1rem .75rem; background: #211827; box-shadow: 8px 0 28px rgba(0,0,0,.35); }
  .sidebar-nav.mobile-menu-open > nav { display: block; }
  .sidebar-nav > nav > a, .sidebar-nav > nav > form, .sidebar-nav > nav > .nav-menu { display: block; margin: .15rem 0; }
  .sidebar-nav > nav > a, .sidebar-nav > nav .link-button, .sidebar-nav > nav .nav-menu summary { display: block; width: 100%; padding: .75rem; color: #f8ddea; text-align: left; }
  .sidebar-nav > nav .nav-dropdown { position: static; margin: .15rem 0 .35rem .5rem; background: #2d2031; box-shadow: none; }
  .sidebar-nav > nav .nav-dropdown a { color: #f5d8e9; }
  body:has(.sidebar-nav) .page-shell { margin-left: 0; }
  .topbar {
    padding: 0 1rem;
  }
  .topbar nav {
    gap: 0.7rem;
  }
  .page-shell {
    padding: 1.25rem 1rem 2rem;
  }
  .dashboard-grid { grid-template-columns: repeat(2, 1fr); }
  .action-grid { grid-template-columns: repeat(2, 1fr); }
  .hero {
    padding: 1.5rem;
  }
  .clock {
    position: static;
    text-align: left;
    margin-top: 1.5rem;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .sale-payment-card { grid-template-columns: 1fr; }
  .sale-total { text-align: left; }
  .sale-products-heading { align-items: stretch; flex-direction: column; }
  .sale-line { grid-template-columns: 1fr; }
  .barcode-row, .cash-payment-fields { grid-template-columns: 1fr; }
  .sale-list-card { margin-left: -1rem; margin-right: -1rem; border-radius: 0; }
  .sale-cart { min-width: 0; }
  .sale-cart, .sale-cart tbody, .sale-cart .sale-line, .sale-cart td { display: block; width: 100%; }
  .sale-cart thead { display: none; }
  .sale-cart .sale-line { margin: .65rem 0; padding: .8rem; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
  .sale-cart td { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .35rem 0; border: 0; text-align: right; }
  .sale-cart td::before { color: var(--muted); font-size: .75rem; font-weight: 850; letter-spacing: .05em; text-transform: uppercase; text-align: left; }
  .sale-cart td:nth-child(1)::before { content: "Codigo"; }
  .sale-cart td:nth-child(2)::before { content: "Cantidad"; }
  .sale-cart td:nth-child(3)::before { content: "Descripcion"; }
  .sale-cart td:nth-child(4)::before { content: "P. unitario"; }
  .sale-cart td:nth-child(5)::before { content: "Subtotal"; }
  .sale-cart td:nth-child(3) { display: grid; text-align: left; }
  .sale-cart td:nth-child(3) select { min-width: 0; }
  .sale-cart td:last-child { display: block; padding-top: .65rem; }
  .sale-cart td:last-child .button { width: 100%; }
  .order-form-heading, .order-products-heading, .order-list-heading, .order-filters, .order-actions, .order-actions form { align-items: stretch; flex-direction: column; }
  .order-line { grid-template-columns: 1fr; }
  .inventory-summary,
  .cash-details,
  .cash-close-form {
    grid-template-columns: 1fr;
  }
  .page-title {
    align-items: flex-start;
    flex-direction: column;
  }
  .table-card {
    border-radius: 12px;
  }
}
@media (max-width: 1440px) { .sidebar-nav { z-index: 21; } }
@media (max-width: 1440px) {
  .sidebar-nav:not(.mobile-menu-open) > nav { display: none !important; }
  .sidebar-nav.mobile-menu-open > nav {
    display: block !important;
    position: fixed !important;
    z-index: 30;
    top: 68px;
    bottom: 0;
    left: 0;
    width: min(88vw, 340px);
    margin: 0 !important;
    padding: 1rem .75rem !important;
    overflow-y: auto;
    background: #211827 !important;
    border-right: 1px solid #553d56;
    box-shadow: 8px 0 28px rgba(0,0,0,.35);
  }
  .sidebar-nav.mobile-menu-open > nav > a,
  .sidebar-nav.mobile-menu-open > nav > form,
  .sidebar-nav.mobile-menu-open > nav > .nav-menu { display: block !important; width: 100%; margin: .2rem 0 !important; }
  .sidebar-nav.mobile-menu-open > nav > a,
  .sidebar-nav.mobile-menu-open > nav .link-button,
  .sidebar-nav.mobile-menu-open > nav .nav-menu summary { display: block; width: 100%; padding: .8rem .75rem; color: #f8ddea; text-align: left; }
  .sidebar-nav.mobile-menu-open > nav .nav-dropdown { position: static !important; margin: .15rem 0 .4rem .45rem !important; background: #2d2031 !important; border-color: #4c374d; box-shadow: none !important; }
  .sidebar-nav.mobile-menu-open > nav .nav-dropdown a { display: block; color: #f5d8e9; white-space: normal; }
  .sidebar-nav.mobile-menu-open > nav > nav { display: block !important; margin: 0 !important; }
  .sidebar-nav.mobile-menu-open > nav > nav > a,
  .sidebar-nav.mobile-menu-open > nav > nav > form,
  .sidebar-nav.mobile-menu-open > nav > nav > .nav-menu { display: block !important; width: 100%; margin: .2rem 0 !important; }
  .sidebar-nav.mobile-menu-open > nav > nav > a,
  .sidebar-nav.mobile-menu-open > nav > nav .link-button,
  .sidebar-nav.mobile-menu-open > nav > nav .nav-menu summary { display: block; width: 100%; padding: .8rem .75rem; color: #f8ddea; text-align: left; }
  .sidebar-nav.mobile-menu-open > nav > nav .nav-dropdown { position: static !important; margin: .15rem 0 .4rem .45rem !important; background: #2d2031 !important; border-color: #4c374d; box-shadow: none !important; }
  .sidebar-nav.mobile-menu-open > nav > nav .nav-dropdown a { display: block; color: #f5d8e9; white-space: normal; }
}
@media (max-width: 430px) {
  .topbar nav > a {
    display: none;
  }
  .nav-menu summary {
    font-size: 0.85rem;
  }
  .brand {
    font-size: 1.2rem;
  }
  .dashboard-grid, .action-grid { grid-template-columns: 1fr; }
  .button {
    width: 100%;
  }
}
.app-header { position: fixed; z-index: 50; top: 0; left: 0; width: 248px; height: 72px; display: flex; align-items: center; padding: 0 1.2rem; background: #211827; border-right: 1px solid #49364b; }
.app-brand { display: flex; align-items: center; gap: .5rem; min-width: 0; max-width: 100%; color: #fff; font-size: 1.15rem; font-weight: 850; text-decoration: none; }
.app-brand-mark { display: grid; place-items: center; flex: 0 0 25px; width: 25px; height: 25px; border-radius: 8px; background: #dc3389; }
.app-brand-name { min-width: 0; overflow: hidden; line-height: 1.15; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.app-menu-button { display: none; margin-left: auto; padding: .58rem .78rem; border: 1px solid #76506f; border-radius: 9px; background: #38263b; color: #fff; font: inherit; font-weight: 800; cursor: pointer; }
.app-drawer { position: fixed; z-index: 40; top: 72px; bottom: 0; left: 0; width: 248px; overflow-y: auto; padding: .75rem; background: #211827; border-right: 1px solid #49364b; }
.app-menu, .app-menu details, .app-menu form { display: block; margin: 0; }
.app-menu > a, .app-menu summary, .app-logout { display: block; width: 100%; padding: .78rem .72rem; border: 0; border-radius: 9px; background: transparent; color: #f7ddec; font: inherit; font-weight: 750; text-align: left; text-decoration: none; cursor: pointer; }
.app-menu summary { list-style: none; }
.app-menu summary::-webkit-details-marker { display: none; }
.app-menu summary::after { content: "+"; float: right; }
.app-menu details[open] summary::after { content: "−"; }
.app-menu > a:hover, .app-menu summary:hover, .app-logout:hover { color: #ff6eb7; background: #38263b; }
.app-menu details > div { margin: 0 0 .35rem .5rem; padding: .3rem; border-radius: 9px; background: #2d2031; }
.app-menu details > div a { display: block; padding: .62rem .68rem; border-radius: 7px; color: #f5d8e9; text-decoration: none; }
.app-menu details > div a:hover { background: #432f46; }
.app-menu-backdrop { display: none; position: fixed; z-index: 35; inset: 68px 0 0; width: 100%; border: 0; background: rgba(15,10,18,.58); }
body:has(.app-drawer) .page-shell { margin-left: 248px; }
@media (max-width: 1440px) {
  .app-header { position: sticky; width: 100%; height: 68px; padding: 0 1rem; border-right: 0; }
  .app-brand-name { display: block; white-space: nowrap; text-overflow: ellipsis; }
  .app-menu-button { display: inline-flex; align-items: center; gap: .4rem; }
  .app-drawer { z-index: 60; top: 68px; width: min(86vw, 330px); transform: translateX(-105%); transition: transform .2s ease; box-shadow: 8px 0 28px rgba(0,0,0,.35); }
  .app-drawer.is-open { transform: translateX(0); }
  .app-menu-backdrop.is-open { display: block; }
  body:has(.app-drawer) .page-shell { margin-left: 0; }
}
.login-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 15%, #f9ddec 0, transparent 31%),
    linear-gradient(135deg, #f8fafe, #f0f3f9);
}
.login-layout {
  min-height: 100vh;
  max-width: 1120px;
  margin: auto;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 5rem;
  padding: 2rem;
}
.login-layout.simple {
  max-width: none;
  width: 100%;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  padding: 1.25rem;
}
.login-layout.simple .login-card {
  width: min(100%, 420px);
}
.login-brand {
  text-align: center;
  margin-bottom: 1.35rem;
}
.login-brand .brand {
  display: inline-block;
}
.login-brand p {
  margin: 0.6rem 0 0;
  color: var(--muted);
  font-size: 0.94rem;
}
.login-intro h1 {
  font-size: clamp(2.2rem, 5vw, 4.1rem);
  line-height: 1.05;
  letter-spacing: -0.06em;
  margin: 1rem 0;
}
.login-intro > p:not(.eyebrow) {
  max-width: 530px;
  color: var(--muted);
  font-size: 1.12rem;
}
.login-badges {
  display: flex;
  gap: 0.6rem;
  margin-top: 1.5rem;
}
.login-badges span {
  font-weight: 850;
  color: #a52367;
  background: #fff;
  border: 1px solid #edc8dc;
  border-radius: 999px;
  padding: 0.45rem 0.7rem;
}
.login-card {
  background: #fff;
  border: 1px solid #e6e9ef;
  border-radius: 24px;
  box-shadow: 0 22px 54px rgba(31, 36, 48, 0.12);
  padding: 2rem;
}
.login-card h2 {
  font-size: 1.7rem;
  margin: 0.3rem 0;
}
.login-card p {
  color: var(--muted);
}
.login-card form {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}
.login-card label {
  display: grid;
  gap: 0.4rem;
  font-size: 0.86rem;
  font-weight: 750;
  color: #465064;
}
.login-card input {
  font: inherit;
  padding: 0.78rem 0.85rem;
  border: 1px solid #d8dee8;
  border-radius: 10px;
  outline: 0;
}
.login-card input:focus {
  border-color: #d94d94;
  box-shadow: 0 0 0 3px #fce4f0;
}
.login-card .button {
  margin-top: 0.35rem;
}
@media (max-width: 760px) {
  .login-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 1.5rem;
  }
  .login-intro h1 {
    font-size: 2.35rem;
  }
  .login-card {
    padding: 1.4rem;
  }
}
