/* UzaPOS Design System – Light blue & white */
:root {
  --primary: #1765A8;
  --primary-dark: #0f4c7a;
  --primary-light: #EAF4FF;
  --text: #172B4D;
  --text-muted: #5E6C84;
  --white: #FFFFFF;
  --success: #00875A;
  --warning: #FF991F;
  --danger: #DE350B;
  --border: #DFE1E6;
  --bg: #F4F5F7;
  --sidebar-width: 260px;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,.08);
  --font: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Typography */
h1,h2,h3,h4 { font-weight: 600; color: var(--text); }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.375rem; }
h3 { font-size: 1.125rem; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .625rem 1.25rem;
  font-size: .9375rem;
  font-weight: 500;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
  text-decoration: none;
  line-height: 1.25;
}
.btn:hover { text-decoration: none; }
.btn-primary {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: var(--white); }
.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline:hover { background: var(--primary-light); }
.btn-secondary {
  background: var(--white);
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover { background: var(--bg); }
.btn-block { width: 100%; }
.btn-sm { padding: .375rem .75rem; font-size: .8125rem; }
.btn-lg { padding: .75rem 1.5rem; font-size: 1rem; }

/* Forms */
.form-group { margin-bottom: 1.25rem; }
.form-label {
  display: block;
  font-size: .875rem;
  font-weight: 500;
  margin-bottom: .375rem;
  color: var(--text);
}
.form-control {
  width: 100%;
  padding: .625rem .875rem;
  font-size: .9375rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(23,101,168,.15);
}
.form-hint { font-size: .8125rem; color: var(--text-muted); margin-top: .25rem; }

/* Cards */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.card-body { padding: 1.5rem; }
.card-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
}

/* Alerts */
.alert {
  padding: .875rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
  font-size: .9375rem;
}
.alert-success { background: #E3FCEF; color: #006644; border: 1px solid #ABF5D1; }
.alert-error { background: #FFEBE6; color: #BF2600; border: 1px solid #FFBDAD; }
.alert-warning { background: #FFFAE6; color: #FF8B00; border: 1px solid #FFE380; }
.alert-info { background: var(--primary-light); color: var(--primary-dark); border: 1px solid #B3D4FF; }

/* Public landing */
.landing {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(160deg, #EAF4FF 0%, #FFFFFF 45%, #F4F5F7 100%);
}
.landing-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}
.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.02em;
}
.logo span { color: var(--text); }
.landing-hero {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  gap: 3rem;
}
.landing-content { flex: 1; max-width: 520px; }
.landing-content h1 {
  font-size: 2.5rem;
  line-height: 1.2;
  margin-bottom: 1rem;
  letter-spacing: -0.03em;
}
.landing-content p.lead {
  font-size: 1.125rem;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
}
.landing-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.landing-image {
  flex: 1;
  max-width: 480px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(23,101,168,.15);
}
.landing-image img { width: 100%; height: auto; display: block; object-fit: cover; }
.landing-footer {
  text-align: center;
  padding: 1.5rem;
  font-size: .875rem;
  color: var(--text-muted);
}
.landing-footer a { color: var(--text-muted); margin: 0 .5rem; }
.trial-badge {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  font-size: .8125rem;
  font-weight: 600;
  padding: .35rem .75rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

/* Auth pages */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #EAF4FF 0%, #FFFFFF 50%);
  padding: 2rem;
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0,0,0,.08);
  padding: 2rem;
}
.auth-card .logo { text-align: center; margin-bottom: 1.5rem; display: block; }
.auth-card h1 { text-align: center; font-size: 1.5rem; margin-bottom: .5rem; }
.auth-card .subtitle { text-align: center; color: var(--text-muted); margin-bottom: 1.75rem; font-size: .9375rem; }
.auth-footer { text-align: center; margin-top: 1.5rem; font-size: .875rem; color: var(--text-muted); }

/* App layout */
.app-layout { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-width);
  background: var(--white);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: transform .2s;
}
.sidebar-brand {
  padding: 1.25rem 1.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  border-bottom: 1px solid var(--border);
}
.sidebar-nav { flex: 1; padding: 1rem 0; overflow-y: auto; }
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .625rem 1.5rem;
  color: var(--text-muted);
  font-size: .9375rem;
  font-weight: 500;
  transition: background .15s, color .15s;
}
.sidebar-nav a:hover, .sidebar-nav a.active {
  background: var(--primary-light);
  color: var(--primary);
  text-decoration: none;
}
.sidebar-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  font-size: .8125rem;
  color: var(--text-muted);
}
.main {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.topbar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: .75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar-left { display: flex; align-items: center; gap: 1rem; }
.topbar-right { display: flex; align-items: center; gap: 1rem; }
.page-content { padding: 1.5rem; flex: 1; }
.page-title { margin-bottom: 1.5rem; }

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}
.stat-card .label { font-size: .8125rem; color: var(--text-muted); margin-bottom: .25rem; }
.stat-card .value { font-size: 1.5rem; font-weight: 600; color: var(--text); }

/* Tables */
.table-wrap { overflow-x: auto; }
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
}
table.data th, table.data td {
  padding: .75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
table.data th {
  background: var(--bg);
  font-weight: 600;
  color: var(--text-muted);
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .03em;
}
table.data tr:hover td { background: #FAFBFC; }

/* Badge */
.badge {
  display: inline-block;
  padding: .2rem .5rem;
  font-size: .75rem;
  font-weight: 600;
  border-radius: 4px;
}
.badge-success { background: #E3FCEF; color: #006644; }
.badge-warning { background: #FFFAE6; color: #FF8B00; }
.badge-danger { background: #FFEBE6; color: #BF2600; }
.badge-info { background: var(--primary-light); color: var(--primary); }

/* Utility */
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mb-2 { margin-bottom: 1rem; }
.d-flex { display: flex; }
.gap-1 { gap: .5rem; }
.gap-2 { gap: 1rem; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }

/* Responsive */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  .landing-hero { flex-direction: column; text-align: center; }
  .landing-actions { justify-content: center; }
  .landing-content h1 { font-size: 1.875rem; }
  .landing-image { max-width: 100%; }
}

/* Super Admin accent */
.sa-sidebar .sidebar-brand { background: #0f4c7a; color: #fff; }
.sa-sidebar .sidebar-nav a.active { background: #0f4c7a; color: #fff; }
