/* BarSentry — Admin / Manager UI */
:root {
  --brand:       #1a1a2e;
  --brand-mid:   #16213e;
  --accent:      #f59e0b;
  --surface:     #f8fafc;
  --border:      #e5e7eb;
  --text:        #111827;
  --text-muted:  #6b7280;
  --radius:      12px;
}

body {
  background: var(--surface);
  color: var(--text);
  font-family: -apple-system, 'SF Pro Text', system-ui, sans-serif;
  font-size: 0.9rem;
}

/* ── Navbar ─────────────────────────────── */
.navbar { border-bottom: 1px solid rgba(255,255,255,.08); min-height: 50px; }
.navbar .nav-link.active { opacity: 1 !important; }
.navbar .nav-link:hover  { opacity: .9; }

/* ── Cards ──────────────────────────────── */
.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
  background: #fff;
}
.card-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  padding: 14px 20px;
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
  border-radius: var(--radius) var(--radius) 0 0 !important;
}

/* ── Buttons ────────────────────────────── */
.btn-brand {
  background: var(--brand);
  color: #fff;
  border: none;
}
.btn-brand:hover, .btn-brand:focus { background: #2d2d4e; color: #fff; }

/* ── Tables ─────────────────────────────── */
.table thead th {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
  padding: 10px 16px;
}
.table tbody td { padding: 12px 16px; vertical-align: middle; }
.table-hover tbody tr:hover { background: #f0f4ff; }

/* ── Stat cards ─────────────────────────── */
.stat-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.stat-label  { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); }
.stat-value  { font-size: 1.9rem; font-weight: 800; color: var(--text); line-height: 1.15; margin-top: 4px; }
.stat-sub    { font-size: .78rem; color: #9ca3af; margin-top: 2px; }

/* ── Page structure ─────────────────────── */
.page-title    { font-size: 1.4rem; font-weight: 800; color: var(--text); margin-bottom: 0; }
.section-header{ display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; flex-wrap: wrap; gap: 8px; }

/* ── Forms ──────────────────────────────── */
.form-control:focus, .form-select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(26,26,46,.1);
}
.form-label { font-size: .82rem; font-weight: 600; margin-bottom: 4px; }

/* ── Status badges ──────────────────────── */
.badge-open    { background: #dcfce7; color: #166534; font-weight: 700; }
.badge-closed  { background: #f3f4f6; color: #374151; font-weight: 700; }
.badge-voided  { background: #fee2e2; color: #991b1b; font-weight: 700; }
.badge-comp    { background: #fef3c7; color: #92400e; font-weight: 700; }
.badge-category{ font-size: .72rem; font-weight: 700; padding: 3px 8px; border-radius: 20px; }

/* ── Login page ─────────────────────────── */
.login-page    { background: var(--brand); min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.login-wrap    { background: #fff; border-radius: 16px; padding: 40px; width: 100%; max-width: 400px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.login-logo    { text-align: center; margin-bottom: 28px; }
.login-logo h1 { font-size: 1.8rem; font-weight: 900; color: var(--brand); margin: 0; }
.login-logo p  { color: var(--text-muted); font-size: .85rem; margin: 4px 0 0; }
.login-logo img{ max-height: 70px; object-fit: contain; }
.login-form    {}
.login-footer  { text-align: center; color: #9ca3af; font-size: .75rem; margin-top: 24px; }

/* ── Alert styles ───────────────────────── */
.alert { border-radius: var(--radius); border: none; }
.alert-success { background: #dcfce7; color: #166534; }
.alert-danger  { background: #fee2e2; color: #991b1b; }
.alert-warning { background: #fef9c3; color: #854d0e; }
.alert-info    { background: #dbeafe; color: #1e40af; }
.alert-secondary{ background: #f1f5f9; color: #475569; }

/* ── Progress ───────────────────────────── */
.progress      { background: #f1f5f9; border-radius: 99px; }

/* ── Sidebar nav (settings) ─────────────── */
.list-group-item-action.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.list-group-item { border-radius: 0 !important; font-size: .85rem; }

/* ── Utility ────────────────────────────── */
.text-decoration-line-through { text-decoration: line-through; }
.comp-price { color: #dc2626; font-size: .8rem; font-weight: 700; }
.hh-badge   { background: var(--accent); color: #fff; font-size: .7rem; font-weight: 700; padding: 2px 7px; border-radius: 20px; }

/* RetailSentry app shell normalization */
.app-shell {
  display: flex;
  min-height: calc(100vh - 57px);
  background: #f5f7fb;
}

.app-sidebar {
  width: 245px;
  flex: 0 0 245px;
  background: #111827;
  color: #e5e7eb;
  padding: 18px 12px;
}

.sidebar-section-title {
  color: #9ca3af;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin: 8px 12px 12px;
}

.app-sidebar .nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #d1d5db;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 4px;
  font-weight: 600;
}

.app-sidebar .nav-link:hover {
  background: rgba(255,255,255,.08);
  color: #fff;
}

.app-main {
  flex: 1;
  padding: 24px;
  min-width: 0;
}

.page-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.page-title-row h1 {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 800;
  color: #111827;
}

@media (max-width: 900px) {
  .app-shell {
    display: block;
  }

  .app-sidebar {
    width: 100%;
    flex: none;
  }

  .app-sidebar .nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .app-main {
    padding: 16px;
  }
}
