/* TalentWorks Pool Portal — Styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --green-dark:   #2D4A3E;
  --green-mid:    #4A7A66;
  --green-light:  #EAF2EE;
  --green-border: #CCDDCC;
  --gold:         #C09A3C;
  --gold-light:   #F5EDD6;
  --charcoal:     #333333;
  --muted:        #666666;
  --white:        #FFFFFF;
  --bg:           #F7FAF8;
  --danger:       #C0392B;
  --warning:      #E67E22;
  --success:      #27AE60;

  --radius:       8px;
  --shadow:       0 2px 12px rgba(45, 74, 62, 0.08);
  --shadow-hover: 0 4px 20px rgba(45, 74, 62, 0.14);
}

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

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--charcoal);
  line-height: 1.6;
  min-height: 100vh;
}

/* ── HEADER ── */
.header {
  background: var(--green-dark);
  color: var(--white);
  padding: 0 32px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-logo {
  font-size: 18px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.3px;
}

.header-logo span {
  color: var(--gold);
}

.header-sub {
  font-size: 12px;
  color: rgba(255,255,255,0.6);
  font-weight: 400;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.25);
  color: var(--white);
  padding: 6px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: all 0.15s;
}

.nav-btn:hover { background: rgba(255,255,255,0.1); }
.nav-btn.active { background: var(--gold); border-color: var(--gold); color: var(--green-dark); font-weight: 600; }

/* ── MAIN LAYOUT ── */
.main { max-width: 1200px; margin: 0 auto; padding: 32px 24px; }

/* ── CARDS ── */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  border: 1px solid var(--green-border);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--green-border);
}

.card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--green-dark);
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  font-family: 'Inter', sans-serif;
  transition: all 0.15s;
  text-decoration: none;
}

.btn-primary { background: var(--green-dark); color: var(--white); }
.btn-primary:hover { background: var(--green-mid); }
.btn-gold { background: var(--gold); color: var(--white); }
.btn-gold:hover { opacity: 0.9; }
.btn-outline { background: transparent; border: 1px solid var(--green-border); color: var(--charcoal); }
.btn-outline:hover { border-color: var(--green-dark); color: var(--green-dark); }
.btn-danger { background: var(--danger); color: var(--white); }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── BADGES / STATUS ── */
.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.badge-available  { background: #D5F5E3; color: #1E8449; }
.badge-shadowing  { background: #D6EAF8; color: #1A5276; }
.badge-placed     { background: var(--gold-light); color: #7D6608; }
.badge-transition { background: #FDEBD0; color: #784212; }
.badge-intake     { background: #E8DAEF; color: #6C3483; }
.badge-inactive   { background: #F2F3F4; color: #626567; }
.badge-exited     { background: #FADBD8; color: #922B21; }

/* ── READINESS FLAGS ── */
.readiness {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.readiness-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  title: attr(data-label);
}

.dot-ok      { background: var(--success); }
.dot-missing { background: #E0E0E0; }
.dot-warning { background: var(--warning); }

.readiness-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.ready-label { color: var(--success); font-weight: 600; }
.incomplete-label { color: var(--warning); font-weight: 600; }

/* ── POOL TABLE ── */
.pool-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.pool-table th {
  text-align: left;
  padding: 10px 12px;
  background: var(--green-light);
  color: var(--green-dark);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--green-border);
}

.pool-table td {
  padding: 12px 12px;
  border-bottom: 1px solid var(--green-border);
  vertical-align: middle;
}

.pool-table tr:hover td { background: var(--green-light); }

.esa-name { font-weight: 600; color: var(--green-dark); }
.esa-id   { font-size: 11px; color: var(--muted); }

/* ── FORMS ── */
.form-group { margin-bottom: 16px; }

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--charcoal);
  margin-bottom: 6px;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--green-border);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  color: var(--charcoal);
  background: var(--white);
  transition: border-color 0.15s;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--green-mid);
  box-shadow: 0 0 0 3px rgba(74,122,102,0.12);
}

.form-textarea { resize: vertical; min-height: 80px; }

/* ── FILE UPLOAD ── */
.upload-zone {
  border: 2px dashed var(--green-border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
}

.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--green-mid);
  background: var(--green-light);
}

.upload-zone input[type="file"] { display: none; }
.upload-icon { font-size: 28px; margin-bottom: 8px; }
.upload-label { font-size: 13px; color: var(--muted); }
.upload-label strong { color: var(--green-dark); }

.upload-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--green-light);
  border-radius: var(--radius);
  border: 1px solid var(--green-border);
  margin-top: 8px;
  font-size: 13px;
}

.upload-preview img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 4px;
}

/* ── MODAL ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 8px 40px rgba(0,0,0,0.2);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--green-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title { font-size: 16px; font-weight: 600; color: var(--green-dark); }
.modal-body  { padding: 20px 24px; }
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--green-border);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.modal-close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--muted);
  line-height: 1;
}

/* ── STATS ROW ── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--white);
  border: 1px solid var(--green-border);
  border-radius: var(--radius);
  padding: 16px 20px;
  box-shadow: var(--shadow);
}

.stat-number { font-size: 28px; font-weight: 700; color: var(--green-dark); }
.stat-label  { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ── ALERTS ── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  margin-bottom: 16px;
  border-left: 4px solid;
}
.alert-success { background: #D5F5E3; border-color: var(--success); color: #1E8449; }
.alert-error   { background: #FADBD8; border-color: var(--danger); color: #922B21; }
.alert-warning { background: #FDEBD0; border-color: var(--warning); color: #784212; }
.alert-info    { background: var(--green-light); border-color: var(--green-mid); color: var(--green-dark); }

/* ── SPINNER ── */
.spinner {
  display: inline-block;
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── UTILS ── */
.hidden    { display: none !important; }
.text-muted { color: var(--muted); font-size: 13px; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.flex  { display: flex; }
.gap-8 { gap: 8px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }

/* ── PROFILE PAGE (public ESA view) ── */
.profile-hero {
  background: var(--green-dark);
  padding: 48px 32px;
  text-align: center;
  color: var(--white);
}

.profile-photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--gold);
  margin-bottom: 16px;
}

.profile-name { font-size: 24px; font-weight: 700; }
.profile-track { color: var(--gold); font-size: 14px; margin-top: 4px; }

.profile-body { max-width: 720px; margin: 0 auto; padding: 32px 24px; }

.profile-section { margin-bottom: 32px; }
.profile-section-title {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--green-mid);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--green-border);
}

.profile-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--green-light);
  border: 1px solid var(--green-border);
  border-radius: var(--radius);
  color: var(--green-dark);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s;
  margin-right: 8px;
  margin-bottom: 8px;
}

.profile-link:hover { background: var(--green-dark); color: var(--white); }
