:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --danger: #dc2626;
  --success: #16a34a;
  --warning: #d97706;
  --info: #0891b2;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-500: #6b7280;
  --gray-700: #374151;
  --gray-900: #111827;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,.12);
  --shadow-md: 0 4px 12px rgba(0,0,0,.1);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; font-size: 14px; color: var(--gray-900); background: var(--gray-50); }

/* Navbar */
.navbar { background: var(--primary); padding: 0 24px; height: 52px; display: flex; align-items: center; justify-content: space-between; box-shadow: var(--shadow); }
.navbar .brand { color: #fff; font-size: 18px; font-weight: 700; text-decoration: none; }
.nav-links { display: flex; align-items: center; gap: 16px; }
.nav-links a { color: rgba(255,255,255,.88); text-decoration: none; font-size: 14px; transition: color .15s; }
.nav-links a:hover { color: #fff; }
.nav-links .sep { color: rgba(255,255,255,.3); }
.user-badge { color: rgba(255,255,255,.7); font-size: 13px; }
.btn-logout { background: rgba(255,255,255,.15); padding: 4px 12px; border-radius: 20px; }

/* Container */
.container { max-width: 1100px; margin: 28px auto; padding: 0 16px; }

/* Alert */
.alert { padding: 10px 16px; border-radius: var(--radius); margin-bottom: 20px; font-size: 14px; }
.alert-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.alert-info { background: #e0f2fe; color: #075985; border: 1px solid #bae6fd; }

/* Card */
.card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; margin-bottom: 24px; }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.card-title { font-size: 17px; font-weight: 600; color: var(--gray-900); }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 5px; padding: 7px 16px; border-radius: var(--radius); font-size: 13px; font-weight: 500; text-decoration: none; border: none; cursor: pointer; transition: background .15s; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: var(--gray-100); color: var(--gray-700); border: 1px solid var(--gray-200); }
.btn-secondary:hover { background: var(--gray-200); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-icon { padding: 5px 8px; }

/* Forms */
.form-group { margin-bottom: 16px; }
label { display: block; font-size: 13px; font-weight: 500; color: var(--gray-700); margin-bottom: 5px; }
input[type=text], input[type=email], input[type=tel], input[type=datetime-local],
input[type=password], select, textarea {
  width: 100%; padding: 8px 12px; border: 1px solid var(--gray-300); border-radius: var(--radius);
  font-size: 14px; color: var(--gray-900); background: #fff; transition: border .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
textarea { resize: vertical; min-height: 80px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-actions { display: flex; gap: 10px; padding-top: 8px; }

/* Table */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead th { background: var(--gray-50); padding: 10px 12px; text-align: left; font-size: 12px; font-weight: 600; color: var(--gray-500); text-transform: uppercase; letter-spacing: .5px; border-bottom: 1px solid var(--gray-200); }
tbody td { padding: 11px 12px; border-bottom: 1px solid var(--gray-100); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--gray-50); }

/* Status badges */
.badge { display: inline-block; padding: 3px 9px; border-radius: 20px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; }
.badge-applied { background: #dbeafe; color: #1e40af; }
.badge-in_process { background: #fef9c3; color: #854d0e; }
.badge-called_for_interview { background: #d1fae5; color: #065f46; }
.badge-waiting { background: #e0e7ff; color: #3730a3; }
.badge-failed { background: #fee2e2; color: #991b1b; }

/* Dashboard stats */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; text-align: center; }
.stat-card .num { font-size: 32px; font-weight: 700; color: var(--primary); }
.stat-card .lbl { font-size: 12px; color: var(--gray-500); margin-top: 4px; text-transform: uppercase; letter-spacing: .5px; }

/* History timeline */
.history-list { list-style: none; padding: 0; }
.history-list li { padding: 8px 0; border-bottom: 1px solid var(--gray-100); font-size: 13px; color: var(--gray-700); display: flex; gap: 10px; }
.history-list li:last-child { border-bottom: none; }
.history-time { color: var(--gray-500); font-size: 12px; white-space: nowrap; }

/* Search bar */
.search-bar { display: flex; gap: 8px; margin-bottom: 16px; align-items: center; }
.search-bar input { max-width: 280px; }
.search-bar select { max-width: 160px; width: auto; }

/* Reminder sent */
.sent-badge { color: var(--success); font-size: 12px; }
.pending-badge { color: var(--warning); font-size: 12px; }

/* Login page */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--gray-100); }
.login-box { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-md); padding: 40px; width: 100%; max-width: 380px; }
.login-box h1 { text-align: center; font-size: 22px; margin-bottom: 28px; color: var(--primary); }

/* Misc */
.text-muted { color: var(--gray-500); }
.text-sm { font-size: 12px; }
.mt-2 { margin-top: 8px; }
.actions { display: flex; gap: 6px; align-items: center; }
.page-title { font-size: 20px; font-weight: 700; margin-bottom: 20px; color: var(--gray-900); }
.empty-state { text-align: center; padding: 40px; color: var(--gray-500); }
.detail-grid { display: grid; grid-template-columns: 140px 1fr; gap: 8px 16px; }
.detail-grid dt { font-weight: 600; font-size: 13px; color: var(--gray-500); }
.detail-grid dd { font-size: 14px; }
.section-title { font-size: 14px; font-weight: 600; color: var(--gray-700); margin: 20px 0 10px; border-bottom: 1px solid var(--gray-200); padding-bottom: 6px; }
.site-footer { text-align: center; padding: 20px; color: var(--gray-500); font-size: 12px; }
