/* ============================================================
   HR KD Live – Shared Styles
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --primary:      #4F46E5;
  --primary-dk:   #4338CA;
  --primary-lt:   #EEF2FF;
  --success:      #059669;
  --danger:       #DC2626;
  --warning:      #D97706;
  --bg:           #F1F5F9;
  --border:       #E2E8F0;
  --text:         #0F172A;
  --muted:        #64748B;
  --radius:       14px;
  --radius-sm:    8px;
  --shadow:       0 1px 3px rgba(0,0,0,.06), 0 8px 24px rgba(0,0,0,.06);
  --shadow-md:    0 4px 6px rgba(0,0,0,.05), 0 10px 30px rgba(0,0,0,.08);
}

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 0.925rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* =====================================================
   AUTH PAGES (Login)
   ===================================================== */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 40%, #dbeafe 100%);
  padding: 1rem;
}
.auth-admin {
  background: linear-gradient(160deg, #0f0c29, #302b63, #24243e);
}
.auth-wrapper {
  width: 100%;
  max-width: 460px;
}

/* Brand header strip */
.auth-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  margin-bottom: 1.5rem;
}
.auth-brand-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(79,70,229,.35);
}
.auth-brand-icon svg { width: 26px; height: 26px; }
.auth-brand-name {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -.02em;
}
.auth-admin .auth-brand-name { color: #fff; }

.auth-card {
  background: #fff;
  border-radius: var(--radius) !important;
  box-shadow: var(--shadow-md) !important;
  border: 1px solid rgba(0,0,0,.04) !important;
  overflow: hidden;
}
.auth-card-header {
  background: linear-gradient(135deg, var(--primary), #6366F1);
  padding: 1.5rem 2rem;
  color: white;
}
.auth-admin .auth-card-header {
  background: linear-gradient(135deg, #1e1b4b, #312e81);
}
.auth-card-header h2 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
}
.auth-card-header p {
  font-size: .82rem;
  opacity: .8;
  margin: .25rem 0 0;
}
.auth-card-body { padding: 2rem; }

/* =====================================================
   FORM – Employee Form
   ===================================================== */
.portal-header {
  background: linear-gradient(135deg, #4F46E5 0%, #6366F1 50%, #818CF8 100%);
  padding: 1.25rem 0;
  margin-bottom: 0;
}
.portal-header .navbar-brand { font-size: 1.1rem; font-weight: 800; }

.form-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  margin-bottom: 1.5rem;
  overflow: hidden;
}
.form-card-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: .75rem;
  background: #FAFBFF;
}
.form-card-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.form-card-icon svg { width: 18px; height: 18px; }
.icon-purple { background: #EDE9FE; color: #7C3AED; }
.icon-blue   { background: #DBEAFE; color: #2563EB; }
.icon-green  { background: #D1FAE5; color: #059669; }
.icon-orange { background: #FEF3C7; color: #D97706; }

.form-card-title { font-size: .95rem; font-weight: 700; color: var(--text); margin: 0; }
.form-card-subtitle { font-size: .78rem; color: var(--muted); margin: 0; }
.form-card-body { padding: 1.5rem; }

/* Upload area */
.upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  background: #FAFBFF;
  transition: border-color .2s, background .2s;
  position: relative;
}
.upload-area:hover { border-color: var(--primary); background: var(--primary-lt); }
.upload-area input[type="file"] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%;
}
.upload-area-content {
  display: flex; align-items: center; gap: .75rem; pointer-events: none;
}
.upload-icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--primary-lt); color: var(--primary);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.upload-icon svg { width: 20px; height: 20px; }
.upload-label { font-size: .85rem; font-weight: 600; color: var(--text); }
.upload-hint  { font-size: .76rem; color: var(--muted); }
.upload-done  { font-size: .76rem; color: var(--success); font-weight: 500; }

/* Form controls */
.form-control, .form-select {
  border-radius: var(--radius-sm);
  border-color: var(--border);
  padding: .6rem .85rem;
  font-size: .9rem;
  transition: border-color .2s, box-shadow .2s;
}
.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79,70,229,.12);
}
.form-label { font-weight: 600; font-size: .85rem; color: #374151; margin-bottom: .35rem; }

/* Employee selector */
.emp-select-card {
  background: linear-gradient(135deg, #4F46E5, #6366F1);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  color: white;
}
.emp-select-card .form-label { color: rgba(255,255,255,.85); }
.emp-select-card .form-select {
  font-size: 1rem; font-weight: 600;
  background-color: rgba(255,255,255,.95);
  border: none;
  padding: .8rem 1rem;
  border-radius: 10px;
}
.emp-select-card .form-select:focus {
  box-shadow: 0 0 0 3px rgba(255,255,255,.3);
}

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, var(--primary), #6366F1);
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  letter-spacing: .01em;
  transition: opacity .2s, transform .1s;
}
.btn-primary:hover { opacity: .92; transform: translateY(-1px); background: linear-gradient(135deg, var(--primary), #6366F1); border: none; }

/* Responsive */
@media (max-width: 576px) {
  .form-card-body { padding: 1.1rem; }
  .auth-card-body { padding: 1.25rem; }
}
