/* Ekdant Technologies CRM
   Palette: Ledger navy #1B2A41, brass #C9962C, paper #F7F5F0,
            slate #5B6472, placed-green #3E7C59, alert-coral #C1443C
   Type: Fraunces (display) / Inter (body) / IBM Plex Mono (data & IDs)
*/

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700&family=Inter:wght@400;500;600;700&family=IBM+Plex+Mono:wght@500;600&display=swap');

:root {
  --navy: #E2321A;
  --navy-light: #E2321A;
  --brass: #1e1e1e;
  --brass-light: #1e1e1e;
  --paper: #F7F5F0;
  --paper-dim: #EFEBE2;
  --slate: #5B6472;
  --ink: #1C1F26;
  --success: #3E7C59;
  --danger: #C1443C;
  --warning: #B9812F;
  --border: #DEDACE;
  --radius: 6px;
  --shadow: 0 1px 2px rgba(27,42,65,0.06), 0 4px 12px rgba(27,42,65,0.05);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background: var(--paper);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
}

h1, h2, h3, h4 {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  color: var(--navy);
  margin: 0 0 0.4em;
  letter-spacing: -0.01em;
}

.mono { font-family: 'IBM Plex Mono', monospace; }

a { color: var(--navy); }

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

.sidebar {
  width: 248px;
  flex-shrink: 0;
  background: var(--brass);
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 24px 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-brand {
  padding: 0 24px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 16px;
}

.sidebar-logo{
    width:190px;      /* Adjust as needed */
    max-width:100%;
    height:auto;
}

.sidebar-brand .name {
  font-family: 'Fraunces', serif;
  font-size: 19px;
  font-weight: 600;
  color: #fff;
  line-height: 1.2;
}
.sidebar-brand .tag {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #E2321A;
  margin-top: 4px;
  display: block;
}

.sidebar-role {
  padding: 0 24px 16px;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #E2321A;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 24px;
  color: rgba(233,237,243,0.78);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: background 0.15s, color 0.15s;
}
.nav-link:hover { background: rgba(255,255,255,0.05); color: #fff; }
.nav-link.active {
  background: #822a1e;
  color: #fff;
  border-left-color: var(--brass);
}
.nav-link .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.5; }

.sidebar-footer {
  margin-top: auto;
  padding: 16px 24px 0;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.sidebar-footer form { margin: 0; }
.logout-btn {
  background: none;
  border: none;
  color: rgba(233,237,243,0.6);
  font-size: 13px;
  cursor: pointer;
  padding: 8px 0;
}
.logout-btn:hover { color: #fff; }

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

.topbar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.topbar h1 { font-size: 20px; margin: 0; }
.topbar .subtitle { color: var(--slate); font-size: 13px; margin-top: 2px; }
.topbar-user { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--slate); }
.topbar-user .avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--brass); color: #fff; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Fraunces', serif; font-size: 14px;
}

.content { padding: 28px 32px; flex: 1; }

/* ---------- Cards & grid ---------- */
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.card + .card { margin-top: 20px; }
.card-title {
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--slate); font-weight: 600; margin-bottom: 14px;
}

.grid { display: grid; gap: 20px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.stat-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 20px; box-shadow: var(--shadow);
}
.stat-card .num { font-family: 'IBM Plex Mono', monospace; font-size: 28px; font-weight: 600; color: var(--navy); }
.stat-card .label { font-size: 12px; color: var(--slate); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.06em; }
.stat-card.accent .num { color: var(--brass); }
.stat-card.good .num { color: var(--success); }
.stat-card.bad .num { color: var(--danger); }

/* ---------- Signature element: candidate journey rail ---------- */
.rail { display: flex; align-items: center; padding: 8px 4px; overflow-x: auto; }
.rail-stage { display: flex; flex-direction: column; align-items: center; min-width: 108px; position: relative; }
.rail-stage .dot {
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--paper-dim); border: 2px solid var(--border); z-index: 1;
}
.rail-stage.done .dot { background: var(--navy); border-color: var(--navy); }
.rail-stage.current .dot { background: var(--brass); border-color: var(--brass); box-shadow: 0 0 0 4px rgba(201,150,44,0.2); }
.rail-line { flex: 1; height: 2px; background: var(--border); margin: 0 -8px; position: relative; top: -18px; }
.rail-line.done { background: var(--navy); }
.rail-stage .label { font-size: 11px; color: var(--slate); margin-top: 8px; text-align: center; font-weight: 500; }
.rail-stage.current .label { color: var(--navy); font-weight: 700; }

/* ---------- Tables ---------- */
table { width: 100%; border-collapse: collapse; }
th {
  text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--slate); font-weight: 600; padding: 10px 12px; border-bottom: 2px solid var(--border);
}
td { padding: 12px; border-bottom: 1px solid var(--border); font-size: 14px; vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--paper); }

/* ---------- Badges ---------- */
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em;
}
.badge-success { background: #E4F0E9; color: var(--success); }
.badge-danger { background: #F7E5E3; color: var(--danger); }
.badge-warning { background: #F6EAD4; color: var(--warning); }
.badge-info { background: #E4EAF2; color: var(--navy); }
.badge-neutral { background: #ECEAE3; color: var(--slate); }
.badge-gold { background: #F5E7C6; color: #8A6412; }

/* ---------- Forms ---------- */
label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--navy); }
input, select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius);
  font-family: 'Inter', sans-serif; font-size: 14px; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--brass); box-shadow: 0 0 0 3px rgba(201,150,44,0.15);
}
.field { margin-bottom: 16px; }
textarea { resize: vertical; min-height: 80px; }

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--navy); color: #fff; border: none; border-radius: var(--radius);
  padding: 10px 18px; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none;
}
.btn:hover { background: var(--navy-light); }
.btn-brass { background: var(--brass); color: #fff; }
.btn-brass:hover { background: var(--brass-light); }
.btn-outline { background: none; border: 1px solid var(--border); color: var(--navy); }
.btn-outline:hover { background: var(--paper-dim); }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #A83831; }
.btn-sm { padding: 6px 12px; font-size: 13px; }

/* ---------- Alerts ---------- */
.alert { padding: 12px 16px; border-radius: var(--radius); font-size: 14px; margin-bottom: 20px; }
.alert-success { background: #E4F0E9; color: var(--success); border: 1px solid #C6E1D1; }
.alert-danger { background: #F7E5E3; color: var(--danger); border: 1px solid #EBC4BF; }

/* ---------- Login ---------- */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: var(--navy);
  background-image: radial-gradient(circle at 15% 20%, rgba(201,150,44,0.12), transparent 40%),
                     radial-gradient(circle at 85% 80%, rgba(201,150,44,0.08), transparent 40%);
  padding: 20px;
}
.login-card {
  background: var(--paper); border-radius: 10px; padding: 40px 36px; width: 100%; max-width: 380px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
}
.login-brand { text-align: center; margin-bottom: 28px; }
.login-brand .name { font-family: 'Fraunces', serif; font-size: 24px; color: var(--navy); font-weight: 700; }
.login-brand .tag { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brass); margin-top: 4px; }
.login-hint { font-size: 12px; color: var(--slate); margin-top: 18px; text-align: center; line-height: 1.6; }

.empty-state {
  text-align: center; padding: 48px 20px; color: var(--slate);
}
.empty-state .title { font-family: 'Fraunces', serif; color: var(--navy); font-size: 17px; margin-bottom: 6px; }

.doc-icon {
  width: 36px; height: 36px; border-radius: 6px; background: var(--paper-dim);
  display: flex; align-items: center; justify-content: center; font-size: 15px; color: var(--navy); flex-shrink: 0;
}

.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.text-slate { color: var(--slate); }
.small { font-size: 12px; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
