@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --bg-main: #f1f5f9;
  --bg-card: #ffffff;
  --bg-sidebar: #070d1d;
  --bg-sidebar-hover: rgba(255, 255, 255, 0.07);
  --primary: #1d4ed8;
  --primary-hover: #1e40af;
  --primary-soft: #eff6ff;
  --accent-sky: #38bdf8;
  --accent-indigo: #4f46e5;
  --accent-red: #e11d48;
  --emerald: #059669;
  --emerald-soft: #ecfdf5;
  --amber: #d97706;
  --amber-soft: #fffbeb;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 12px 28px -6px rgba(15, 23, 42, 0.08);
  --radius: 14px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
  background: radial-gradient(circle at 85% 0%, #e0f2fe 0%, #f1f5f9 42%, #f8fafc 100%);
  color: var(--text-main);
  font-size: 13.5px;
  line-height: 1.5;
  min-height: 100vh;
}

/* Executive Login Screen */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 20% 15%, #1e3a8a 0%, #070d1d 55%, #020617 100%);
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 480px;
  background: rgba(255, 255, 255, 0.98);
  border-radius: 22px;
  padding: 38px 36px;
  box-shadow: 0 28px 65px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.m-stripe {
  display: inline-flex;
  gap: 5px;
  margin-bottom: 14px;
}
.m-stripe span {
  display: block;
  width: 24px;
  height: 5px;
  border-radius: 99px;
  transform: skewX(-18deg);
}

.quick-accounts {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.quick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.quick-chip {
  font-size: 11.5px;
  padding: 9px 11px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #f8fafc;
  cursor: pointer;
  text-align: left;
  transition: all 0.16s;
}
.quick-chip:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
  transform: translateY(-1px);
}

/* Main App Shell */
.app-layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 272px;
  background: linear-gradient(180deg, #070d1d 0%, #0f172a 100%);
  color: #e2e8f0;
  display: flex;
  flex-direction: column;
  padding: 22px 15px;
  flex-shrink: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.brand-box {
  padding: 8px 12px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 16px;
}

.brand-name {
  font-size: 17px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.brand-caption {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 3px;
  font-weight: 500;
}

.nav-section-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #64748b;
  padding: 12px 12px 6px;
  font-weight: 800;
}

.nav-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10.5px 13px;
  margin-bottom: 4px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: all 0.16s;
}

.nav-btn:hover {
  background: var(--bg-sidebar-hover);
  color: #ffffff;
}

.nav-btn.active {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
  border-color: rgba(147, 197, 253, 0.25);
}

.sidebar-footer {
  margin-top: auto;
  padding: 14px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

/* Workspace Header & Content */
.main-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 20;
}

.cockpit-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.llc-cockpit-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  padding: 6px 12px;
  border-radius: 11px;
  box-shadow: var(--shadow-sm);
}

.llc-cockpit-selector label {
  font-size: 11.5px;
  font-weight: 800;
  color: #334155;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.llc-cockpit-selector select {
  border: none;
  background: transparent;
  font-weight: 700;
  color: var(--primary);
  font-size: 13px;
  outline: none;
  cursor: pointer;
  max-width: 240px;
}

.content-wrap {
  padding: 24px 28px 48px;
  max-width: 1640px;
}

/* Executive KPI Cards */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(195px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: transform 0.16s, box-shadow 0.16s;
}
.kpi-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #38bdf8, #1d4ed8, #4f46e5);
}
.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.kpi-label {
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.kpi-value {
  font-size: 27px;
  font-weight: 800;
  margin-top: 6px;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.kpi-sub {
  font-size: 11.5px;
  color: var(--emerald);
  margin-top: 4px;
  font-weight: 600;
}

/* Panel Cards & Tables */
.panel-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 22px;
  overflow: hidden;
}

.panel-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  background: linear-gradient(180deg, #ffffff 0%, #fcfdff 100%);
}

.panel-title {
  font-size: 15.5px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.panel-subtitle {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

.table-scroll {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  background: #f8fafc;
  color: #475569;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table td {
  padding: 13px 15px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.data-table tr:hover td {
  background: #f8fbff;
}

/* Stage Action Pill Group inside Candidate Pipeline */
.stage-stack {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.stage-row {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8.5px 14px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s;
  white-space: nowrap;
  text-decoration: none;
}

.btn-sm {
  padding: 5.5px 10px;
  font-size: 11.5px;
  border-radius: 8px;
}

.btn-xs {
  padding: 4px 8px;
  font-size: 11px;
  border-radius: 7px;
}

.btn-primary {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(29, 78, 216, 0.22);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
  transform: translateY(-1px);
}

.btn-indigo {
  background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
  color: #fff;
  box-shadow: 0 3px 10px rgba(79, 70, 229, 0.2);
}
.btn-indigo:hover {
  opacity: 0.94;
  transform: translateY(-1px);
}

.btn-soft {
  background: #f8fafc;
  color: #1e293b;
  border-color: #cbd5e1;
}
.btn-soft:hover {
  background: #eff6ff;
  border-color: #93c5fd;
  color: var(--primary);
}

.btn-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
}
.btn-success:hover {
  opacity: 0.93;
}

.btn-danger {
  background: #fff1f2;
  color: #be123c;
  border-color: #fecdd3;
}
.btn-danger:hover {
  background: #ffe4e6;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3.5px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}
.badge-green { background: #dcfce7; color: #15803d; }
.badge-yellow { background: #fef3c7; color: #b45309; }
.badge-red { background: #ffe4e6; color: #be123c; }
.badge-blue { background: #dbeafe; color: #1d4ed8; }
.badge-purple { background: #ede9fe; color: #6d28d9; }
.badge-gray { background: #f1f5f9; color: #475569; }

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(7, 13, 29, 0.62);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
}
.modal-backdrop.open {
  display: flex;
}

.modal-box {
  background: #fff;
  border-radius: 18px;
  width: 100%;
  max-width: 720px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 28px 65px rgba(15, 23, 42, 0.35);
  overflow: hidden;
  border: 1px solid var(--border);
}

.modal-box.studio-xl {
  max-width: 1380px;
  height: 90vh;
}

.modal-head {
  padding: 17px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fcfdff;
}

.modal-body {
  padding: 20px 22px;
  overflow-y: auto;
  flex: 1;
}

.modal-foot {
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: #f8fafc;
}

/* Forms */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}
.form-grid .full { grid-column: 1 / -1; }

.field-group label {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 5px;
}

.input, .textarea, .select {
  width: 100%;
  padding: 9.5px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-size: 13px;
  color: var(--text-main);
  background: #fff;
}
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.12);
}

/* Document Studio Split View */
.studio-split {
  display: grid;
  grid-template-columns: 450px 1fr;
  height: 100%;
  overflow: hidden;
}
.studio-left {
  border-right: 1px solid var(--border);
  padding: 18px;
  overflow-y: auto;
  background: #fcfdff;
}
.studio-right {
  background: #334155;
  display: flex;
  flex-direction: column;
}
.studio-right iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.trait-bar-wrap {
  margin-bottom: 10px;
}
.trait-bar-bg {
  height: 8px;
  background: #e2e8f0;
  border-radius: 99px;
  overflow: hidden;
  margin-top: 4px;
}
.trait-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #38bdf8, #1d4ed8);
  border-radius: 99px;
}
