/* ==========================================================
   Arias Latte — panel.css
   Estilos del panel de empleados y administrador
   ========================================================== */

/* ── Panel layout ─────────────────────────────────────────── */
.panel-body {
  background: hsl(220,15%,10%);
  color: hsl(220,10%,90%);
  font-family: var(--font-sans, 'Outfit', sans-serif);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.panel-wrapper {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ─────────────────────────────────────────────── */
.panel-sidebar {
  width: 240px;
  flex-shrink: 0;
  background: hsl(220,15%,8%);
  border-right: 1px solid rgba(255,255,255,.07);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  overflow-y: auto;
  transition: transform .3s;
}
.sidebar-header {
  padding: 1.5rem 1.25rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.sidebar-brand {
  font-family: var(--font-display,'DM Serif Display',serif);
  font-size: 1.1rem;
  color: var(--panel-accent, hsl(40,62%,56%));
}
.sidebar-brand small {
  display: block;
  font-family: var(--font-sans,'Outfit',sans-serif);
  font-size: .6rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(255,255,255,.3);
  margin-top: .1rem;
}

.sidebar-nav { padding: 1rem 0; flex: 1; }
.sidebar-section {
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(255,255,255,.25);
  padding: .75rem 1.25rem .35rem;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .65rem 1.25rem;
  font-size: .825rem;
  font-weight: 500;
  color: rgba(255,255,255,.5);
  transition: color .2s, background .2s;
  border-left: 2px solid transparent;
  text-decoration: none;
}
.sidebar-link i { font-size: 1.05rem; flex-shrink: 0; }
.sidebar-link:hover { color: rgba(255,255,255,.85); background: rgba(255,255,255,.04); }
.sidebar-link.active {
  color: var(--panel-accent, hsl(40,62%,56%));
  background: rgba(200,149,42,.08);
  border-left-color: var(--panel-accent, hsl(40,62%,56%));
}

.sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(255,255,255,.06);
  font-size: .8rem;
  color: rgba(255,255,255,.3);
}

/* ── Main content ─────────────────────────────────────────── */
.panel-main {
  margin-left: 240px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.panel-topbar {
  background: hsl(220,15%,9%);
  border-bottom: 1px solid rgba(255,255,255,.07);
  padding: 0 1.5rem;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar-title {
  font-size: .9375rem;
  font-weight: 700;
  color: rgba(255,255,255,.85);
}
.topbar-actions { display: flex; align-items: center; gap: .75rem; }
.panel-content { padding: 1.75rem 1.5rem; flex: 1; }

/* ── Stats cards ─────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.75rem;
}
.stat-card {
  background: hsl(220,15%,12%);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: .75rem;
  padding: 1.25rem;
  transition: border-color .2s;
}
.stat-card:hover { border-color: rgba(200,149,42,.25); }
.stat-card-label {
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(255,255,255,.35);
  margin-bottom: .5rem;
}
.stat-card-val {
  font-family: var(--font-display,'DM Serif Display',serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--panel-accent, hsl(40,62%,56%));
  line-height: 1;
}
.stat-card-sub { font-size: .75rem; color: rgba(255,255,255,.3); margin-top: .35rem; }

/* ── Tables ─────────────────────────────────────────────── */
.panel-table-wrap {
  background: hsl(220,15%,12%);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: .75rem;
  overflow: hidden;
}
.panel-table {
  width: 100%;
  border-collapse: collapse;
}
.panel-table th {
  font-size: .625rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(255,255,255,.3);
  padding: .75rem 1.1rem;
  text-align: left;
  border-bottom: 1px solid rgba(255,255,255,.06);
  background: hsl(220,15%,10%);
  white-space: nowrap;
}
.panel-table td {
  padding: .875rem 1.1rem;
  font-size: .875rem;
  border-bottom: 1px solid rgba(255,255,255,.04);
  color: rgba(255,255,255,.7);
}
.panel-table tr:last-child td { border-bottom: none; }
.panel-table tr:hover td { background: rgba(255,255,255,.02); }

/* ── Status badges ───────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .25rem .75rem;
  border-radius: 999px;
}
.badge-pending    { background: rgba(251,191,36,.12); color: #fbbf24; border: 1px solid rgba(251,191,36,.22); }
.badge-confirmed  { background: rgba(74,222,128,.1); color: #4ade80; border: 1px solid rgba(74,222,128,.2); }
.badge-preparing  { background: rgba(96,165,250,.1); color: #60a5fa; border: 1px solid rgba(96,165,250,.2); }
.badge-ready      { background: rgba(167,139,250,.1); color: #a78bfa; border: 1px solid rgba(167,139,250,.2); }
.badge-delivered  { background: rgba(74,222,128,.1); color: #4ade80; border: 1px solid rgba(74,222,128,.2); }
.badge-cancelled  { background: rgba(248,113,113,.1); color: #f87171; border: 1px solid rgba(248,113,113,.2); }
.badge-completed  { background: rgba(74,222,128,.1); color: #4ade80; border: 1px solid rgba(74,222,128,.2); }

/* ── Panel buttons ───────────────────────────────────────── */
.btn-panel {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .75rem;
  font-weight: 600;
  padding: .5rem 1rem;
  border-radius: .5rem;
  border: none;
  cursor: pointer;
  transition: opacity .2s, transform .15s;
  letter-spacing: .04em;
  text-decoration: none;
  white-space: nowrap;
}
.btn-panel:hover { opacity: .88; transform: translateY(-1px); }
.btn-panel-gold { background: var(--panel-accent, hsl(40,62%,56%)); color: #0a0700; }
.btn-panel-ghost { background: rgba(255,255,255,.07); color: rgba(255,255,255,.7); border: 1px solid rgba(255,255,255,.1); }
.btn-panel-danger { background: rgba(248,113,113,.15); color: #f87171; border: 1px solid rgba(248,113,113,.2); }
.btn-panel-success { background: rgba(74,222,128,.12); color: #4ade80; border: 1px solid rgba(74,222,128,.2); }
.btn-panel-sm { font-size: .65rem; padding: .35rem .7rem; }

/* ── Panel forms ─────────────────────────────────────────── */
.panel-form-group { display: flex; flex-direction: column; gap: .375rem; margin-bottom: .875rem; }
.panel-form-group label {
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255,255,255,.35);
}
.panel-input {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: .5rem;
  color: rgba(255,255,255,.85);
  font-family: var(--font-sans,'Outfit',sans-serif);
  font-size: .875rem;
  padding: .65rem .9rem;
  outline: none;
  width: 100%;
  transition: border-color .2s;
}
.panel-input:focus { border-color: var(--panel-accent, hsl(40,62%,56%)); }
.panel-input option { background: hsl(220,15%,10%); }
textarea.panel-input { resize: vertical; min-height: 80px; }

/* ── KDS cards ───────────────────────────────────────────── */
.kds-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}
.kds-card {
  background: hsl(220,15%,12%);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: .75rem;
  overflow: hidden;
  transition: border-color .25s;
}
.kds-card.urgent { border-color: rgba(248,113,113,.35); }
.kds-card-header {
  padding: .875rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}
.kds-order-id { font-size: .8125rem; font-weight: 700; color: rgba(255,255,255,.9); }
.kds-timer {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .06em;
  color: rgba(255,255,255,.4);
  font-variant-numeric: tabular-nums;
}
.kds-timer.warn { color: #fbbf24; }
.kds-timer.urgent { color: #f87171; }
.kds-card-items { padding: .875rem 1rem; }
.kds-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .3rem 0;
  font-size: .825rem;
  border-bottom: 1px solid rgba(255,255,255,.04);
  gap: .5rem;
}
.kds-item:last-child { border-bottom: none; }
.kds-item-qty {
  font-weight: 700;
  color: var(--panel-accent, hsl(40,62%,56%));
  flex-shrink: 0;
  width: 1.5rem;
}
.kds-item-name { flex: 1; color: rgba(255,255,255,.75); }
.kds-card-footer {
  padding: .75rem 1rem;
  border-top: 1px solid rgba(255,255,255,.06);
  display: flex;
  gap: .5rem;
}

/* ── Login page ─────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: hsl(220,15%,8%);
}
.login-card {
  background: hsl(220,15%,11%);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 1rem;
  padding: 2.5rem;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 32px 64px rgba(0,0,0,.5);
}
.login-logo {
  text-align: center;
  margin-bottom: 2rem;
}
.login-logo-icon {
  width: 56px; height: 56px;
  border-radius: .875rem;
  background: rgba(200,149,42,.12);
  border: 1px solid rgba(200,149,42,.22);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin: 0 auto .75rem;
}
.login-title { font-family: var(--font-display,'DM Serif Display',serif); font-size: 1.4rem; color: rgba(255,255,255,.9); }
.login-sub   { font-size: .8rem; color: rgba(255,255,255,.35); margin-top: .25rem; letter-spacing: .04em; }

/* ── Responsive sidebar ─────────────────────────────────── */
@media (max-width: 900px) {
  .panel-sidebar {
    transform: translateX(-100%);
  }
  .panel-sidebar.open { transform: none; }
  .panel-main { margin-left: 0; }
}

/* ── Misc ────────────────────────────────────────────────── */
.text-gold { color: var(--panel-accent, hsl(40,62%,56%)); }
.text-muted { color: rgba(255,255,255,.35); }
.panel-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: rgba(255,255,255,.25);
  font-size: .9rem;
}
.panel-empty i { font-size: 2.5rem; display: block; margin-bottom: .75rem; opacity: .4; }

.divider-panel { height: 1px; background: rgba(255,255,255,.06); margin: 1.25rem 0; }
