/* ==========================================================
   BIZPRO CRM — DESIGN SYSTEM
   Palette: deep regulatory navy + certification-seal gold
   Type: Space Grotesk (display/structure) + Inter (body/data)
   Signature: circular "seal" stage markers, echoing a
   certification stamp — this is a compliance business.
   ========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --navy-900: #0F1B33;
  --navy-800: #1B2A4A;
  --navy-700: #26365C;
  --gold-500: #C9A24B;
  --gold-600: #B08A38;
  --success: #2F7D5D;
  --warning: #C98A2B;
  --danger: #B33A3A;
  --info: #2563A6;
  --purple: #7C4DBB;

  --bg: #F5F6F8;
  --surface: #FFFFFF;
  --border: #E3E6EC;
  --text: #1B2333;
  --text-muted: #667085;

  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(15, 27, 51, 0.06), 0 1px 8px rgba(15, 27, 51, 0.04);
  --shadow-md: 0 4px 16px rgba(15, 27, 51, 0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14.5px;
  line-height: 1.5;
}

h1, h2, h3, h4 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  margin: 0 0 4px;
  color: var(--navy-900);
  letter-spacing: -0.01em;
}

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

/* ---------- Layout ---------- */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 232px;
  background: var(--navy-900);
  color: #DCE1EC;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar-brand {
  padding: 22px 20px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar-brand .seal {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 2px solid var(--gold-500);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  color: var(--gold-500);
  font-size: 13px;
  margin-bottom: 10px;
}
.sidebar-brand .name {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 15px;
  color: #fff;
  line-height: 1.25;
}
.sidebar-brand .sub {
  font-size: 11.5px;
  color: #8996B3;
  margin-top: 2px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.nav-group { padding: 14px 12px; }
.nav-label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6B7899;
  padding: 10px 10px 6px;
}
.nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: #C3CAE0;
  font-size: 13.5px;
  font-weight: 500;
  margin-bottom: 2px;
}
.nav-link:hover { background: rgba(255,255,255,0.06); text-decoration: none; color: #fff; }
.nav-link.active { background: var(--gold-500); color: var(--navy-900); font-weight: 600; }
.nav-link .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.5; flex-shrink: 0; }

.sidebar-footer {
  margin-top: auto;
  padding: 14px 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 12.5px;
  color: #8996B3;
}
.sidebar-footer a { color: #C3CAE0; }

.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: 60px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky; top: 0; z-index: 10;
}
.topbar h1 { font-size: 17px; }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--navy-800); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 12.5px; font-weight: 600; font-family: 'Space Grotesk', sans-serif;
}

.content { padding: 24px; max-width: 1280px; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 18px;
}
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.card-header h3 { font-size: 15px; }

/* ---------- Stat cards ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow);
}
.stat-card .label { font-size: 12px; color: var(--text-muted); font-weight: 500; text-transform: uppercase; letter-spacing: 0.04em; }
.stat-card .value { font-family: 'Space Grotesk', sans-serif; font-size: 26px; font-weight: 700; color: var(--navy-900); margin-top: 4px; }
.stat-card .value.gold { color: var(--gold-600); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font-size: 13.5px; font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: filter 0.12s ease;
}
.btn:hover { text-decoration: none; filter: brightness(1.06); }
.btn-primary { background: var(--navy-900); color: #fff; }
.btn-gold { background: var(--gold-500); color: var(--navy-900); }
.btn-outline { background: transparent; border-color: var(--border); color: var(--text); }
.btn-danger { background: #FCEDED; color: var(--danger); }
.btn-sm { padding: 6px 12px; font-size: 12.5px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------- Forms ---------- */
label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text); margin-bottom: 5px; }
input, select, textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-family: 'Inter', sans-serif;
  background: #fff;
  color: var(--text);
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--navy-700);
  box-shadow: 0 0 0 3px rgba(27,42,74,0.1);
}
.form-row { margin-bottom: 14px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ---------- Tables ---------- */
table { width: 100%; border-collapse: collapse; }
th {
  text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--text-muted); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--border);
}
td { padding: 12px; border-bottom: 1px solid var(--border); font-size: 13.5px; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #FAFBFC; }

/* ---------- Badges / pills ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 100px;
  font-size: 11.5px; font-weight: 600;
}
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ---------- Seal / stage marker (signature element) ---------- */
.pipeline { display: flex; align-items: center; gap: 2px; margin: 6px 0; }
.seal-step {
  width: 30px; height: 30px; border-radius: 50%;
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; font-family: 'Space Grotesk', sans-serif;
  color: var(--text-muted);
  background: #fff;
  flex-shrink: 0;
}
.seal-step.done { border-color: var(--navy-800); background: var(--navy-800); color: #fff; }
.seal-step.current { border-color: var(--gold-500); background: var(--gold-500); color: var(--navy-900); box-shadow: 0 0 0 4px rgba(201,162,75,0.18); }
.seal-line { flex: 1; height: 2px; background: var(--border); min-width: 14px; }
.seal-line.done { background: var(--navy-800); }

/* ---------- Kanban ---------- */
.kanban { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; align-items: start; overflow-x: auto; }
.kanban-col { background: #EEF0F4; border-radius: var(--radius); padding: 12px; min-height: 100px; }
.kanban-col-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; padding: 0 4px; }
.kanban-col-head h4 { font-size: 12.5px; }
.kanban-count { font-size: 11px; background: #fff; border-radius: 100px; padding: 1px 8px; color: var(--text-muted); font-weight: 600; }
.kanban-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px 12px; margin-bottom: 8px; box-shadow: var(--shadow);
}
.kanban-card .company { font-weight: 600; font-size: 13px; color: var(--navy-900); }
.kanban-card .service { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.kanban-card .meta { font-size: 11px; color: var(--text-muted); margin-top: 6px; display: flex; justify-content: space-between; }

/* ---------- Login page ---------- */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: var(--navy-900);
  background-image: radial-gradient(circle at 20% 20%, rgba(201,162,75,0.08), transparent 45%);
}
.login-card {
  width: 380px; background: #fff; border-radius: 14px; padding: 34px 32px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
}
.login-seal {
  width: 52px; height: 52px; border-radius: 50%; border: 3px solid var(--gold-500);
  display: flex; align-items: center; justify-content: center; margin: 0 auto 14px;
  font-family: 'Space Grotesk', sans-serif; font-weight: 700; color: var(--gold-500); font-size: 18px;
}
.login-card h1 { text-align: center; font-size: 18px; }
.login-card .tag { text-align: center; color: var(--text-muted); font-size: 12.5px; margin-bottom: 22px; }

/* ---------- Attendance clock ---------- */
.clock-wrap { text-align: center; padding: 20px 0; }
.clock-time { font-family: 'Space Grotesk', sans-serif; font-size: 42px; font-weight: 700; color: var(--navy-900); }
.clock-date { color: var(--text-muted); font-size: 13.5px; margin-top: 2px; }
.clock-btn {
  margin-top: 22px; width: 150px; height: 150px; border-radius: 50%;
  border: none; cursor: pointer;
  font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  transition: transform 0.1s ease;
}
.clock-btn:active { transform: scale(0.97); }
.clock-btn.in { background: var(--success); color: #fff; }
.clock-btn.out { background: var(--danger); color: #fff; }
.clock-status { margin-top: 16px; font-size: 12.5px; color: var(--text-muted); }
.geo-note { font-size: 11.5px; color: var(--text-muted); margin-top: 10px; }

/* ---------- Alerts ---------- */
.alert { padding: 11px 16px; border-radius: var(--radius-sm); font-size: 13px; margin-bottom: 16px; font-weight: 500; }
.alert-success { background: #E9F6EF; color: var(--success); }
.alert-danger { background: #FCEDED; color: var(--danger); }
.alert-info { background: #EAF1F8; color: var(--info); }

.empty-state { text-align: center; padding: 40px 20px; color: var(--text-muted); }
.empty-state h3 { color: var(--text); font-size: 14.5px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .sidebar { position: fixed; left: -232px; z-index: 100; transition: left 0.2s ease; }
  .sidebar.open { left: 0; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: 1fr; }
  .kanban { grid-template-columns: 1fr; }
  .content { padding: 16px; }
}

.mobile-toggle { display: none; background: none; border: none; font-size: 20px; cursor: pointer; }
@media (max-width: 900px) { .mobile-toggle { display: block; } }
