/* public/assets/css/app.css */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:      #f5f5f0;
  --surface: #ffffff;
  --border:  #e2e1db;
  --text:    #1a1a18;
  --muted:   #6b6a65;
  --hint:    #a09f9a;
  --blue:    #185FA5;
  --blue-lt: #E6F1FB;
  --teal:    #0F6E56;
  --teal-lt: #E1F5EE;
  --amber:   #854F0B;
  --amber-lt:#FAEEDA;
  --red:     #A32D2D;
  --red-lt:  #FCEBEB;
  --green:   #3B6D11;
  --green-lt:#EAF3DE;
  --radius:  8px;
  --radius-lg: 12px;
  --shadow:  0 1px 3px rgba(0,0,0,.08);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

/* ── Layout ── */
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 220px; flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
}
.sidebar-logo {
  padding: 20px 16px 16px;
  border-bottom: 1px solid var(--border);
}
.sidebar-logo h1 { font-size: 18px; font-weight: 600; color: var(--text); }
.sidebar-logo small { font-size: 11px; color: var(--muted); }
.nav-section {
  padding: 12px 16px 4px;
  font-size: 10px; font-weight: 600;
  color: var(--hint); text-transform: uppercase; letter-spacing: .06em;
}
.nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 16px;
  font-size: 13px; color: var(--muted);
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: all .12s;
}
.nav-link:hover { background: var(--bg); color: var(--text); }
.nav-link.active { color: var(--blue); background: var(--blue-lt); border-left-color: var(--blue); font-weight: 500; }
.sidebar-footer { margin-top: auto; padding: 12px 16px; border-top: 1px solid var(--border); font-size: 12px; }
.main-content { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.topbar {
  height: 54px; background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 24px; gap: 16px;
  flex-shrink: 0;
}
.topbar h2 { font-size: 15px; font-weight: 500; flex: 1; }
.page-body { flex: 1; overflow-y: auto; padding: 24px; }

/* ── Cards ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 16px;
}
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.card-title { font-size: 14px; font-weight: 500; }

/* ── Grid ── */
.grid-2 { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }

/* ── Metrics ── */
.metric { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; }
.metric-label { font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.metric-value { font-size: 26px; font-weight: 500; }
.metric-note  { font-size: 11px; color: var(--hint); margin-top: 2px; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: var(--radius);
  font-size: 13px; font-weight: 500; cursor: pointer;
  border: 1px solid var(--border);
  background: var(--surface); color: var(--text);
  text-decoration: none; transition: all .12s;
}
.btn:hover { background: var(--bg); }
.btn-primary { background: var(--blue); color: #fff; border-color: var(--blue); }
.btn-primary:hover { background: #0C447C; }
.btn-success { background: var(--teal); color: #fff; border-color: var(--teal); }
.btn-success:hover { background: #085041; }
.btn-danger  { background: var(--red);  color: #fff; border-color: var(--red); }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-block { width: 100%; justify-content: center; }

/* ── Forms ── */
.form-group { margin-bottom: 14px; }
.form-label { display: block; font-size: 12px; font-weight: 500; color: var(--muted); margin-bottom: 5px; }
.form-control {
  width: 100%; padding: 9px 12px;
  border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 13px; background: var(--surface); color: var(--text);
  transition: border .12s;
}
.form-control:focus { outline: none; border-color: var(--blue); }
select.form-control { cursor: pointer; }

/* ── Tables ── */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th {
  text-align: left; padding: 9px 12px;
  font-size: 11px; font-weight: 600; color: var(--muted);
  border-bottom: 1px solid var(--border);
}
.table td { padding: 10px 12px; border-bottom: 1px solid var(--border); }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: var(--bg); }

/* ── Badges ── */
.badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 500; }
.badge-blue   { background: var(--blue-lt); color: var(--blue); }
.badge-teal   { background: var(--teal-lt); color: var(--teal); }
.badge-amber  { background: var(--amber-lt); color: var(--amber); }
.badge-red    { background: var(--red-lt);  color: var(--red); }
.badge-green  { background: var(--green-lt); color: var(--green); }

/* ── Alerts ── */
.alert { padding: 10px 14px; border-radius: var(--radius); font-size: 13px; margin-bottom: 12px; }
.alert-error   { background: var(--red-lt);   color: var(--red); }
.alert-success { background: var(--green-lt); color: var(--green); }
.alert-info    { background: var(--blue-lt);  color: var(--blue); }

/* ── Auth pages ── */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--bg); }
.auth-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 36px; width: 100%; max-width: 400px; }
.auth-logo { text-align: center; margin-bottom: 28px; }
.auth-logo h1 { font-size: 22px; font-weight: 600; }
.auth-logo p  { font-size: 13px; color: var(--muted); margin-top: 4px; }

/* ── POS specific ── */
.pos-layout { display: grid; grid-template-columns: 1fr 300px; gap: 16px; height: calc(100vh - 54px); overflow: hidden; }
.pos-left  { overflow-y: auto; padding: 16px; }
.pos-right { background: var(--surface); border-left: 1px solid var(--border); display: flex; flex-direction: column; padding: 16px; overflow-y: auto; }
.table-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.table-tile {
  aspect-ratio: 1; border-radius: var(--radius); border: 1.5px solid;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  cursor: pointer; font-size: 12px; font-weight: 500; transition: transform .1s;
}
.table-tile:hover { transform: scale(1.03); }
.table-tile.free     { background: var(--blue-lt); border-color: #85B7EB; color: #0C447C; }
.table-tile.occupied { background: var(--green-lt); border-color: #97C459; color: #27500A; }
.table-tile.pending  { background: var(--amber-lt); border-color: #FAC775; color: #412402; }
.table-tile.selected { outline: 3px solid var(--blue); }
.order-item-row { display: flex; align-items: center; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.mode-toggle { display: flex; background: var(--bg); border-radius: 6px; padding: 3px; }
.mode-btn { padding: 5px 14px; border-radius: 5px; font-size: 12px; font-weight: 500; cursor: pointer; border: none; background: transparent; color: var(--muted); transition: all .12s; }
.mode-btn.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

/* ── Responsive hints ── */
@media (max-width: 900px) {
  .sidebar { display: none; }
  .grid-4  { grid-template-columns: repeat(2,1fr); }
}
