:root {
  --navy: #0c2238;
  --navy-2: #16324f;
  --navy-3: #2a4a68;
  --gold: #c9a227;
  --gold-2: #e0bc4a;
  --gold-soft: rgba(201, 162, 39, 0.14);
  --bg: #eef2f6;
  --panel: #ffffff;
  --text: #0c2238;
  --muted: #5b738b;
  --line: #d5dee8;
  --green: #1f9d55;
  --green-bg: #e6f7ee;
  --blue: #1f6feb;
  --blue-bg: #e8f0fe;
  --yellow: #e6b422;
  --yellow-bg: #fff7dd;
  --orange: #e67e22;
  --orange-bg: #fff0e4;
  --red: #d64545;
  --dark: #081722;
  --dark-panel: #122536;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 12px 32px rgba(12, 34, 56, 0.08);
  --shadow-lg: 0 24px 60px rgba(12, 34, 56, 0.14);
  --sidebar: 280px;
  --font: "Outfit", system-ui, sans-serif;
  --display: "Fraunces", Georgia, serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(900px 420px at 0% -5%, rgba(201, 162, 39, 0.16), transparent 55%),
    radial-gradient(700px 380px at 100% 0%, rgba(31, 111, 235, 0.08), transparent 50%),
    linear-gradient(180deg, #f7f9fc 0%, var(--bg) 100%);
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }
::selection { background: var(--gold-soft); color: var(--navy); }

/* ——— Login + perfiles por área ——— */
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 16px;
  background:
    linear-gradient(145deg, rgba(8, 23, 34, 0.94), rgba(12, 34, 56, 0.82)),
    radial-gradient(circle at 20% 20%, rgba(201,162,39,.25), transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(31,111,235,.2), transparent 45%);
  position: relative;
  overflow: hidden;
}
.login-page::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 40h80M40 0v80' stroke='%23c9a227' stroke-opacity='.06' stroke-width='1'/%3E%3C/svg%3E");
  pointer-events: none;
  animation: gridDrift 28s linear infinite;
}
@keyframes gridDrift {
  from { transform: translate3d(0,0,0); }
  to { transform: translate3d(-40px, -40px, 0); }
}

.login-wrap {
  width: min(980px, 100%);
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 20px;
  position: relative;
  z-index: 1;
  animation: rise .6s var(--ease) both;
}
.login-card, .profiles-card {
  background: rgba(255,255,255,.97);
  border-radius: 22px;
  padding: 28px 26px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255,255,255,.4);
  backdrop-filter: blur(10px);
}
.brand-mark {
  width: 56px; height: 56px; border-radius: 16px;
  display: grid; place-items: center;
  background: linear-gradient(145deg, var(--navy), var(--navy-2));
  color: var(--gold); font-family: var(--display); font-weight: 700; font-size: 22px;
  margin-bottom: 14px;
  box-shadow: 0 8px 20px rgba(12,34,56,.25);
}
.login-card h1, .profiles-card h2 {
  margin: 0 0 6px;
  font-family: var(--display);
  font-size: 1.65rem;
  letter-spacing: -0.02em;
}
.login-card p, .profiles-card > p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.45;
}
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-size: .82rem; color: var(--muted); font-weight: 650; letter-spacing: .02em; }
.field input, .field select, .field textarea {
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  background: #fff;
  transition: border-color .2s, box-shadow .2s, transform .15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 4px var(--gold-soft);
}

.btn {
  border: 0; border-radius: 12px; padding: 12px 16px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform .18s var(--ease), box-shadow .18s, background .18s, opacity .18s;
  position: relative;
  overflow: hidden;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn:disabled { opacity: .65; cursor: wait; }
.btn-primary {
  background: linear-gradient(135deg, var(--blue), #1554c0);
  color: #fff;
  width: 100%;
  box-shadow: 0 10px 24px rgba(31,111,235,.28);
}
.btn-navy { background: var(--navy); color: #fff; }
.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  color: var(--navy);
}
.btn-ghost {
  background: transparent;
  border: 1.5px solid var(--line);
  color: var(--text);
}
.btn-sm { padding: 8px 12px; font-size: .85rem; border-radius: 9px; }
.btn.loading::after {
  content: "";
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.error-box {
  background: #fdecea; color: var(--red); padding: 10px 12px; border-radius: 10px;
  margin-bottom: 12px; font-size: .9rem;
  animation: shake .4s var(--ease);
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.profile-chip {
  text-align: left;
  border: 1.5px solid var(--line);
  background: #fff;
  border-radius: 14px;
  padding: 12px;
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 10px;
  align-items: center;
  transition: border-color .2s, transform .2s var(--ease), box-shadow .2s;
}
.profile-chip:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.profile-chip .av {
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center;
  font-weight: 800; font-size: .85rem; color: #fff;
}
.profile-chip strong { display: block; font-size: .86rem; }
.profile-chip span { font-size: .72rem; color: var(--muted); }

.av-admin { background: linear-gradient(135deg, #0c2238, #2a4a68); }
.av-recepcion { background: linear-gradient(135deg, #1f6feb, #4c8df5); }
.av-aseo { background: linear-gradient(135deg, #1f9d55, #3ecf7a); }
.av-mantenimiento { background: linear-gradient(135deg, #e67e22, #f0a35a); }
.av-gerencia { background: linear-gradient(135deg, #c9a227, #e0bc4a); color: #0c2238 !important; }
.av-cocina { background: linear-gradient(135deg, #d64545, #e87474); }

/* ——— Shell ——— */
.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar {
  background:
    linear-gradient(175deg, #0c2238 0%, #0a1b2d 55%, #081722 100%);
  color: #fff;
  padding: 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid rgba(201,162,39,.12);
}
.sidebar .logo {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px 16px;
  border-bottom: 1px solid rgba(255,255,255,.08); margin-bottom: 10px;
}
.brand-logo, .login-logo {
  width: 48px; height: 48px; border-radius: 14px; object-fit: cover;
  box-shadow: 0 8px 20px rgba(0,0,0,.25);
  background: #fff;
}
.login-logo {
  width: 88px; height: 88px; border-radius: 22px; margin-bottom: 14px;
  animation: rise .55s var(--ease) both;
}
.nav-scroll {
  display: flex; flex-direction: column; gap: 4px;
  overflow-y: auto; flex: 1; padding-right: 2px;
}
.sidebar-foot {
  margin-top: auto; padding: 14px 10px 6px;
  border-top: 1px solid rgba(255,255,255,.08);
  color: var(--gold); font-family: var(--display); font-size: .95rem;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.sidebar-foot img { border-radius: 6px; background: #fff; }
.btn-help {
  margin-left: auto;
  border: 1px solid rgba(201,162,39,.35);
  background: rgba(201,162,39,.12);
  color: var(--gold-2);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: .72rem;
  font-family: var(--font);
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  transition: background .2s, transform .2s var(--ease);
}
.btn-help:hover { background: rgba(201,162,39,.22); transform: translateY(-1px); }

.pos-layout { display: grid; grid-template-columns: 1.35fr .9fr; gap: 16px; }
.pos-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px;
}
.pos-product {
  text-align: left; border: 1.5px solid var(--line); background: #fff;
  border-radius: 14px; padding: 12px; display: grid; gap: 4px;
  transition: transform .18s var(--ease), border-color .18s, box-shadow .18s;
}
.pos-product:hover {
  transform: translateY(-2px); border-color: var(--gold); box-shadow: var(--shadow);
}
.pos-product.low { border-color: var(--orange); background: var(--orange-bg); }
.pos-meta { color: var(--muted); font-size: .75rem; }
.pos-price { font-weight: 800; color: var(--navy); margin-top: 4px; }
.pos-ticket { position: sticky; top: 16px; }
.pos-cart { max-height: 260px; overflow: auto; margin: 10px 0; }
.pos-cart-row {
  display: flex; justify-content: space-between; gap: 10px; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--line);
}
.inv-form { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line); }
.inv-form h4 { margin: 0 0 10px; }
.inv-form-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
}
.inv-form-grid input, .inv-form-grid select {
  border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 12px;
}

@media (max-width: 1100px) {
  .pos-layout, .inv-form-grid { grid-template-columns: 1fr; }
}
.sidebar .logo strong { display: block; font-size: .95rem; }
.sidebar .logo span { color: var(--gold); font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; }
.nav-scroll { gap: 6px; }
.nav-item {
  display: flex; align-items: flex-start; gap: 12px; padding: 11px 12px; border-radius: 14px;
  color: rgba(255,255,255,.78); font-weight: 550; font-size: .9rem;
  border: 1px solid transparent;
  transition: background .22s, color .22s, transform .22s var(--ease), border-color .22s, box-shadow .22s;
}
.nav-item:hover {
  background: rgba(255,255,255,.07); color: #fff; transform: translateX(3px);
  border-color: rgba(201,162,39,.18);
}
.nav-item.active {
  background: linear-gradient(105deg, rgba(201,162,39,.28), rgba(201,162,39,.05));
  color: #fff;
  border-color: rgba(201,162,39,.28);
  box-shadow: inset 3px 0 0 var(--gold), 0 8px 22px rgba(0,0,0,.18);
}
.nav-item.tour-focus {
  background: rgba(201,162,39,.3) !important;
  color: #fff !important;
  border-color: var(--gold) !important;
  box-shadow: 0 0 0 2px rgba(201,162,39,.45), 0 12px 28px rgba(0,0,0,.35);
  transform: translateX(4px) scale(1.02);
  z-index: 40; position: relative;
  animation: tourPulse 1.2s var(--ease) infinite;
}
@keyframes tourPulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(201,162,39,.45), 0 12px 28px rgba(0,0,0,.35); }
  50% { box-shadow: 0 0 0 4px rgba(201,162,39,.25), 0 14px 32px rgba(0,0,0,.4); }
}
.nav-ico {
  flex: 0 0 auto;
  width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center;
  background: linear-gradient(145deg, rgba(255,255,255,.1), rgba(255,255,255,.04));
  border: 1px solid rgba(255,255,255,.08);
  color: var(--gold-2);
}
.nav-item.active .nav-ico,
.nav-item:hover .nav-ico {
  background: linear-gradient(145deg, rgba(201,162,39,.28), rgba(201,162,39,.1));
  color: #fff;
}
.nav-svg { width: 18px; height: 18px; display: block; }
.nav-copy { display: grid; gap: 2px; min-width: 0; padding-top: 1px; }
.nav-label { font-weight: 650; line-height: 1.2; }
.nav-hint {
  font-size: .68rem; line-height: 1.35; color: rgba(255,255,255,.45);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.nav-item.active .nav-hint,
.nav-item:hover .nav-hint { color: rgba(255,255,255,.62); }

/* Tutorial primera visita */
.tutorial-overlay {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(8, 23, 34, .62);
  backdrop-filter: blur(3px);
  display: grid; place-items: end center;
  padding: 24px 16px 28px;
  animation: fadeIn .28s var(--ease);
}
.tutorial-card {
  width: min(420px, 100%);
  background: #fff;
  border-radius: 22px;
  padding: 22px 22px 18px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(201,162,39,.25);
  animation: rise .4s var(--ease) both;
  text-align: left;
}
.tutorial-progress {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 14px; color: var(--muted); font-size: .75rem; font-weight: 600;
}
.tutorial-bar {
  flex: 1; height: 5px; border-radius: 999px; background: var(--line); overflow: hidden;
}
.tutorial-bar i {
  display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-2));
  border-radius: inherit; transition: width .3s var(--ease);
}
.tutorial-icon {
  width: 52px; height: 52px; border-radius: 16px;
  display: grid; place-items: center; margin-bottom: 12px;
  background: linear-gradient(145deg, var(--navy), var(--navy-3));
  color: var(--gold-2);
  box-shadow: 0 10px 24px rgba(12,34,56,.2);
}
.tutorial-icon .nav-svg { width: 24px; height: 24px; }
.tutorial-icon img { border-radius: 10px; background: #fff; }
.tutorial-card h3 {
  margin: 0 0 8px; font-family: var(--display); font-size: 1.25rem; letter-spacing: -.02em;
}
.tutorial-card p { margin: 0 0 18px; color: var(--muted); line-height: 1.5; font-size: .95rem; }
.tutorial-actions { display: flex; justify-content: space-between; gap: 10px; align-items: center; }

@media (min-width: 901px) {
  .tutorial-overlay { place-items: center; padding: 24px; }
  .tutorial-card { margin-left: calc(var(--sidebar) * .35); }
}
.main { min-width: 0; }
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 18px 24px 10px;
}
.topbar h2 {
  margin: 0;
  font-size: 1.4rem;
  font-family: var(--display);
  letter-spacing: -0.02em;
}
.user-chip {
  display: flex; align-items: center; gap: 10px; background: #fff;
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px 6px 6px;
  box-shadow: var(--shadow);
}
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--navy), var(--navy-3));
  color: var(--gold); display: grid; place-items: center; font-weight: 700;
}
.content { padding: 8px 24px 32px; }

.kpi-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px;
}
.kpi {
  background: var(--panel);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 14px;
  border: 1px solid rgba(213,222,232,.7);
  animation: rise .5s var(--ease) both;
}
.kpi:nth-child(2) { animation-delay: .05s; }
.kpi:nth-child(3) { animation-delay: .1s; }
.kpi:nth-child(4) { animation-delay: .15s; }
.ring {
  --p: 70; width: 58px; height: 58px; border-radius: 50%;
  background: conic-gradient(var(--blue) calc(var(--p) * 1%), #e3eaf2 0);
  display: grid; place-items: center; flex-shrink: 0;
  transition: background .8s var(--ease);
}
.ring::before {
  content: ""; width: 42px; height: 42px; border-radius: 50%; background: #fff;
}
.kpi-ico {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 1.2rem;
}
.kpi h3 { margin: 0; font-size: .78rem; color: var(--muted); font-weight: 650; text-transform: uppercase; letter-spacing: .04em; }
.kpi strong { font-size: 1.25rem; font-variant-numeric: tabular-nums; }

.panel {
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  margin-bottom: 16px;
  border: 1px solid rgba(213,222,232,.65);
  animation: rise .45s var(--ease) both;
}
.panel h3 { margin: 0 0 12px; font-size: 1rem; }
.panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px;
}

.floor-block { margin-bottom: 18px; }
.floor-title {
  display: flex; align-items: center; justify-content: space-between;
  margin: 0 0 10px;
  font-size: .92rem;
  color: var(--muted);
  font-weight: 700;
}
.floor-title b { color: var(--navy); font-family: var(--display); font-size: 1.05rem; }

.room-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 10px;
}
.room-card {
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: #fff;
  position: relative;
  overflow: hidden;
  transition: transform .22s var(--ease), box-shadow .22s, border-color .22s;
  animation: rise .4s var(--ease) both;
}
.room-card:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: var(--shadow);
  border-color: color-mix(in srgb, var(--status) 45%, var(--line));
}
.room-card::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--status, var(--muted));
}
.room-card .num { font-weight: 800; font-size: 1.02rem; font-variant-numeric: tabular-nums; }
.room-card .meta { color: var(--muted); font-size: .76rem; margin-top: 6px; line-height: 1.4; }

.badge {
  display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 999px;
  font-size: .7rem; font-weight: 750; text-transform: capitalize;
}
.badge.libre { background: var(--green-bg); color: var(--green); }
.badge.ocupada { background: var(--blue-bg); color: var(--blue); }
.badge.limpieza { background: var(--yellow-bg); color: #9a7b10; }
.badge.proximo_checkout { background: var(--orange-bg); color: var(--orange); }
.badge.mantenimiento { background: #eee; color: #666; }
.badge.pendiente { background: var(--orange-bg); color: var(--orange); }
.badge.en_curso, .badge.en_preparacion { background: var(--blue-bg); color: var(--blue); }
.badge.hecha, .badge.entregado, .badge.confirmado { background: var(--green-bg); color: var(--green); }
.badge.nuevo { background: var(--blue-bg); color: var(--blue); }

.legend {
  display: flex; flex-wrap: wrap; gap: 12px 18px; margin-top: 14px; font-size: .82rem; color: var(--muted);
}
.legend i {
  width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-right: 6px;
}

.split { display: grid; grid-template-columns: 1.1fr .9fr; gap: 16px; }
.tabs { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.tab {
  border: 0; background: #eef2f6; color: var(--muted); padding: 8px 14px; border-radius: 999px; font-weight: 700;
  transition: background .2s, color .2s, transform .15s;
}
.tab:hover { transform: translateY(-1px); }
.tab.active { background: var(--navy); color: #fff; }
.table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.table th, .table td { text-align: left; padding: 11px 8px; border-bottom: 1px solid var(--line); }
.table th { color: var(--muted); font-weight: 650; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; }
.table tr { transition: background .15s; }
.table tbody tr:hover { background: #f7fafc; }
.total-line {
  display: flex; justify-content: space-between; align-items: center; margin: 14px 0 10px;
  font-size: 1.15rem; font-weight: 800;
}

.hk-dark {
  background: linear-gradient(165deg, #0a1826, #13283c 50%, #0e2030);
  color: #e8eef5; border-radius: 20px; padding: 20px; box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255,255,255,.06);
}
.hk-dark .hk-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.kanban { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.kanban-col {
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px; padding: 12px; min-height: 280px;
}
.kanban-col h4 { margin: 0 0 10px; font-size: .9rem; color: #9fb3c8; }
.hk-card {
  background: #1a2d42; border-radius: 12px; padding: 12px; margin-bottom: 10px;
  border: 1px solid rgba(255,255,255,.06);
  transition: transform .2s var(--ease), box-shadow .2s;
  animation: rise .4s var(--ease) both;
}
.hk-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0,0,0,.25); }
.hk-card strong { display: block; margin-bottom: 4px; }
.hk-card .sub { color: #9fb3c8; font-size: .8rem; }
.progress {
  height: 6px; background: rgba(255,255,255,.1); border-radius: 999px; margin-top: 8px; overflow: hidden;
}
.progress > span {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-2));
  width: 55%;
  animation: progressPulse 1.8s ease-in-out infinite;
}
@keyframes progressPulse {
  0%, 100% { width: 45%; }
  50% { width: 72%; }
}
.hk-stats {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: 14px;
}
.hk-stat {
  text-align: center; background: rgba(255,255,255,.04); border-radius: 12px; padding: 12px 8px;
}
.hk-stat b { display: block; font-size: 1.2rem; color: var(--gold); }

.menu-layout { display: grid; grid-template-columns: 1.2fr 1fr; gap: 16px; }
.menu-item {
  display: grid; grid-template-columns: 72px 1fr auto; gap: 12px; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--line);
  transition: background .15s;
}
.menu-item:hover { background: #f8fafc; }
.menu-thumb {
  width: 72px; height: 72px; border-radius: 14px;
  background: linear-gradient(135deg, #dbe4ee, #f0e6d0); display: grid; place-items: center;
  font-size: 1.4rem;
}
.cart-bar {
  position: sticky; bottom: 12px; background: var(--navy); color: #fff;
  border-radius: 14px; padding: 12px 16px; display: flex; justify-content: space-between; align-items: center;
  animation: slideUp .35s var(--ease);
  box-shadow: 0 12px 30px rgba(12,34,56,.35);
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.chip {
  border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 12px;
  font-weight: 650; font-size: .85rem; color: var(--muted);
  transition: all .2s var(--ease);
}
.chip:hover { border-color: var(--gold); color: var(--navy); }
.chip.active {
  background: linear-gradient(135deg, #0f9f8a, #14b8a6);
  border-color: transparent; color: #fff;
  box-shadow: 0 6px 16px rgba(20,184,166,.3);
}

.chart {
  display: flex; align-items: flex-end; gap: 6px; height: 140px; padding-top: 10px;
}
.chart .bar {
  flex: 1; background: linear-gradient(180deg, #2dd4bf, #0f766e); border-radius: 6px 6px 2px 2px;
  min-height: 8px; position: relative;
  transform-origin: bottom;
  animation: barGrow .7s var(--ease) both;
}
@keyframes barGrow {
  from { transform: scaleY(0.15); opacity: .4; }
  to { transform: none; opacity: 1; }
}
.chart .bar span {
  position: absolute; bottom: -18px; left: 50%; transform: translateX(-50%);
  font-size: .65rem; color: var(--muted); white-space: nowrap;
}
.metric-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.metric {
  background: #152536; color: #fff; border-radius: 14px; padding: 14px;
  animation: rise .5s var(--ease) both;
}
.metric small { color: #9fb3c8; }
.metric .up { color: #34d399; font-size: .8rem; font-weight: 700; }

.menu-toggle {
  display: none; border: 0; background: var(--navy); color: #fff;
  width: 40px; height: 40px; border-radius: 10px;
}
.backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.42); z-index: 30;
  animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Process animations */
@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
.page-enter { animation: rise .45s var(--ease) both; }

.success-overlay {
  position: fixed; inset: 0; z-index: 120;
  display: grid; place-items: center;
  background: rgba(8, 23, 34, 0.55);
  backdrop-filter: blur(4px);
  animation: fadeIn .25s ease;
}
.success-card {
  background: #fff;
  border-radius: 22px;
  padding: 28px 32px;
  text-align: center;
  width: min(360px, 90vw);
  box-shadow: var(--shadow-lg);
  animation: popIn .45s var(--ease);
}
@keyframes popIn {
  from { opacity: 0; transform: scale(.86); }
  to { opacity: 1; transform: none; }
}
.success-check {
  width: 72px; height: 72px; margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--green-bg);
  display: grid; place-items: center;
  position: relative;
}
.success-check svg {
  width: 36px; height: 36px;
  stroke: var(--green);
  stroke-width: 3;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: drawCheck .55s .15s forwards var(--ease);
}
@keyframes drawCheck { to { stroke-dashoffset: 0; } }
.success-check::after {
  content: "";
  position: absolute; inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(31,157,85,.35);
  animation: ping 1s ease-out;
}
@keyframes ping {
  from { transform: scale(.85); opacity: 1; }
  to { transform: scale(1.35); opacity: 0; }
}

.toast {
  position: fixed; bottom: 22px; right: 22px; z-index: 99;
  padding: 12px 16px; border-radius: 12px; color: #fff; font-weight: 650;
  box-shadow: 0 12px 30px rgba(0,0,0,.22);
  transform: translateY(20px); opacity: 0;
  transition: transform .3s var(--ease), opacity .3s;
  max-width: min(360px, 90vw);
}
.toast.show { transform: none; opacity: 1; }
.toast.ok { background: linear-gradient(135deg, #0c2238, #1a3a58); }
.toast.err { background: linear-gradient(135deg, #d64545, #b83232); }

.skeleton {
  background: linear-gradient(90deg, #eef2f6 25%, #f7f9fc 50%, #eef2f6 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
  border-radius: 12px;
  height: 80px;
}
@keyframes shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

.pulse-once { animation: pulseOnce .6s var(--ease); }
@keyframes pulseOnce {
  0% { transform: scale(1); }
  40% { transform: scale(1.03); }
  100% { transform: scale(1); }
}

@media (max-width: 1100px) {
  .kpi-row, .hk-stats, .metric-cards { grid-template-columns: repeat(2, 1fr); }
  .split, .menu-layout, .kanban, .login-wrap { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; inset: 0 auto 0 0; width: min(280px, 86vw); z-index: 40;
    transform: translateX(-105%); transition: transform .28s var(--ease);
  }
  .sidebar.open { transform: none; }
  .menu-toggle { display: grid; place-items: center; }
  .kpi-row { grid-template-columns: 1fr 1fr; }
  .content, .topbar { padding-left: 16px; padding-right: 16px; }
  .hk-stats { grid-template-columns: repeat(2, 1fr); }
  .profile-grid { grid-template-columns: 1fr; }
  .room-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
