/* ============================================
   ZENITH HR - Neumorphism Design System v1.0
   ============================================ */

:root {
  --neu-bg: #e0e5ec;
  --neu-dark: #b8bec7;
  --neu-light: #ffffff;
  --neu-primary: #4f46e5;
  --neu-primary-dark: #3730a3;
  --neu-success: #16a34a;
  --neu-warning: #d97706;
  --neu-danger: #dc2626;
  --neu-info: #0284c7;
  --neu-text: #1e293b;
  --neu-text-muted: #475569;
  --neu-radius: 18px;
  --neu-radius-sm: 12px;
  --neu-radius-xs: 8px;
  --shadow-raised: 8px 8px 16px #b8bec7, -8px -8px 16px #ffffff;
  --shadow-raised-sm: 4px 4px 10px #b8bec7, -4px -4px 10px #ffffff;
  --shadow-inset: inset 4px 4px 10px #b8bec7, inset -4px -4px 10px #ffffff;
  --shadow-inset-sm: inset 2px 2px 6px #b8bec7, inset -2px -2px 6px #ffffff;
}

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

body {
  background: var(--neu-bg);
  color: var(--neu-text);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
}

/* ── Sidebar ── */
.neu-sidebar {
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: 250px;
  background: var(--neu-bg);
  box-shadow: 4px 0 20px rgba(184,190,199,0.5);
  display: flex;
  flex-direction: column;
  padding: 0;
  z-index: 100;
  overflow-y: auto;
}

.neu-sidebar-brand {
  padding: 1.5rem 1.25rem 1rem;
  border-bottom: 1px solid rgba(184,190,199,0.4);
}

.neu-sidebar-brand h1 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--neu-primary);
  line-height: 1.3;
}

.neu-sidebar-brand small {
  color: var(--neu-text-muted);
  font-size: 0.72rem;
  display: block;
}

.neu-nav { padding: 0.75rem 0.75rem; flex: 1; }

.neu-nav-section {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--neu-text-muted);
  padding: 0.75rem 0.5rem 0.25rem;
}

.neu-nav-link {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.6rem 0.875rem;
  border-radius: var(--neu-radius-xs);
  color: var(--neu-text);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.18s ease;
  margin-bottom: 2px;
}

.neu-nav-link:hover {
  background: var(--neu-bg);
  box-shadow: var(--shadow-raised-sm);
  color: var(--neu-primary);
}

.neu-nav-link.active {
  box-shadow: var(--shadow-inset-sm);
  color: var(--neu-primary);
  font-weight: 600;
}

.neu-nav-link .nav-icon { font-size: 1rem; width: 1.25rem; text-align: center; }

/* ── Main Content ── */
.neu-main {
  margin-left: 250px;
  padding: 2rem 2.25rem;
  min-height: 100vh;
}

/* ── Cards ── */
.neu-card {
  background: var(--neu-bg);
  border-radius: var(--neu-radius);
  box-shadow: var(--shadow-raised);
  padding: 1.5rem;
  border: none;
}

.neu-card-sm {
  background: var(--neu-bg);
  border-radius: var(--neu-radius-sm);
  box-shadow: var(--shadow-raised-sm);
  padding: 1.125rem 1.25rem;
  border: none;
}

.neu-card-inset {
  background: var(--neu-bg);
  border-radius: var(--neu-radius-sm);
  box-shadow: var(--shadow-inset);
  padding: 1rem 1.25rem;
}

/* ── KPI Cards ── */
.neu-kpi {
  background: var(--neu-bg);
  border-radius: var(--neu-radius);
  box-shadow: var(--shadow-raised);
  padding: 1.25rem 1.5rem;
  text-align: center;
}

.neu-kpi-value {
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.2;
}

.neu-kpi-label {
  font-size: 0.8rem;
  color: var(--neu-text-muted);
  font-weight: 500;
  margin-top: 0.25rem;
}

.neu-kpi-sub {
  font-size: 0.75rem;
  color: var(--neu-text-muted);
  margin-top: 0.125rem;
}

/* ── Buttons ── */
.neu-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1.25rem;
  border-radius: var(--neu-radius-xs);
  border: none;
  background: var(--neu-bg);
  box-shadow: var(--shadow-raised-sm);
  color: var(--neu-text);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
}

.neu-btn:hover { box-shadow: 5px 5px 12px #b8bec7, -5px -5px 12px #ffffff; color: var(--neu-primary); }
.neu-btn:active { box-shadow: var(--shadow-inset-sm); transform: scale(0.98); }

.neu-btn-primary {
  background: linear-gradient(145deg, #5b51f8, #4540db);
  color: white;
  box-shadow: 4px 4px 10px rgba(79,70,229,0.35), -2px -2px 6px #ffffff;
}
.neu-btn-primary:hover { color: white; box-shadow: 5px 5px 14px rgba(79,70,229,0.45), -2px -2px 8px #ffffff; }

.neu-btn-danger {
  background: linear-gradient(145deg, #f05252, #dc2626);
  color: white;
  box-shadow: 4px 4px 10px rgba(220,38,38,0.3), -2px -2px 6px #ffffff;
}
.neu-btn-danger:hover { color: white; }

.neu-btn-success {
  background: linear-gradient(145deg, #22c55e, #16a34a);
  color: white;
  box-shadow: 4px 4px 10px rgba(22,163,74,0.3), -2px -2px 6px #ffffff;
}
.neu-btn-success:hover { color: white; }

.neu-btn-sm { padding: 0.3rem 0.75rem; font-size: 0.78rem; }

/* ── Badges / Status Pills ── */
.neu-badge {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.neu-badge-success { background: #dcfce7; color: #15803d; }
.neu-badge-warning { background: #fef3c7; color: #b45309; }
.neu-badge-danger  { background: #fee2e2; color: #b91c1c; }
.neu-badge-info    { background: #dbeafe; color: #1d4ed8; }
.neu-badge-neutral { background: #f1f5f9; color: #64748b; }
.neu-badge-orange  { background: #ffedd5; color: #c2410c; }

/* ── RAG Indicators ── */
.rag-ok       { background: #dcfce7; color: #15803d; border-radius: 6px; padding: 0.15rem 0.5rem; font-size: 0.75rem; font-weight: 600; }
.rag-60d      { background: #dbeafe; color: #1d4ed8; border-radius: 6px; padding: 0.15rem 0.5rem; font-size: 0.75rem; font-weight: 600; }
.rag-30d      { background: #fef3c7; color: #b45309; border-radius: 6px; padding: 0.15rem 0.5rem; font-size: 0.75rem; font-weight: 600; }
.rag-expired  { background: #fee2e2; color: #b91c1c; border-radius: 6px; padding: 0.15rem 0.5rem; font-size: 0.75rem; font-weight: 600; }
.rag-nodate   { background: #f1f5f9; color: #64748b; border-radius: 6px; padding: 0.15rem 0.5rem; font-size: 0.75rem; font-weight: 600; }

/* ── Tables ── */
.neu-table-wrap {
  background: var(--neu-bg);
  border-radius: var(--neu-radius);
  box-shadow: var(--shadow-raised);
  overflow: hidden;
}

.neu-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.neu-table thead th {
  background: var(--neu-bg);
  box-shadow: var(--shadow-inset-sm);
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--neu-text-muted);
}

.neu-table tbody td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid rgba(184,190,199,0.25);
  vertical-align: middle;
}

.neu-table tbody tr:hover { background: rgba(255,255,255,0.35); }
.neu-table tbody tr:last-child td { border-bottom: none; }

/* ── Forms ── */
.neu-input {
  width: 100%;
  background: var(--neu-bg);
  border: none;
  border-radius: var(--neu-radius-xs);
  box-shadow: var(--shadow-inset-sm);
  padding: 0.55rem 0.875rem;
  font-size: 0.875rem;
  color: var(--neu-text);
  outline: none;
  transition: box-shadow 0.2s;
}

.neu-input:focus {
  box-shadow: inset 3px 3px 8px #b8bec7, inset -3px -3px 8px #ffffff, 0 0 0 2px rgba(79,70,229,0.25);
}

.neu-select {
  width: 100%;
  background: var(--neu-bg);
  border: none;
  border-radius: var(--neu-radius-xs);
  box-shadow: var(--shadow-inset-sm);
  padding: 0.55rem 0.875rem;
  font-size: 0.875rem;
  color: var(--neu-text);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2rem;
}

.neu-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--neu-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.375rem;
}

.neu-form-group { margin-bottom: 1.125rem; }

/* ── Page Header ── */
.neu-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.neu-page-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--neu-text);
  line-height: 1.2;
}

.neu-page-title small {
  display: block;
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--neu-text-muted);
  margin-top: 0.2rem;
}

/* ── Grid ── */
.neu-grid { display: grid; gap: 1.25rem; }
.neu-grid-2 { grid-template-columns: repeat(2, 1fr); }
.neu-grid-3 { grid-template-columns: repeat(3, 1fr); }
.neu-grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ── Mobile Responsive ── */
@media (max-width: 900px) {
  .neu-sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 200;
  }
  .neu-sidebar.open {
    transform: translateX(0);
    box-shadow: 8px 0 30px rgba(0,0,0,0.2);
  }
  .neu-main {
    margin-left: 0 !important;
    padding: 1rem;
    padding-top: 68px;
  }
  .neu-grid-2, .neu-grid-3, .neu-grid-4 {
    grid-template-columns: 1fr;
  }
  .neu-mobile-bar {
    display: flex !important;
  }
  .worker-layout {
    grid-template-columns: 1fr !important;
  }
}

/* Mobile top bar (hidden on desktop) */
.neu-mobile-bar {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 52px;
  background: var(--neu-bg);
  box-shadow: 0 2px 8px rgba(184,190,199,0.5);
  align-items: center;
  padding: 0 1rem;
  gap: 1rem;
  z-index: 150;
}

.neu-hamburger {
  background: var(--neu-bg);
  border: none;
  border-radius: 8px;
  box-shadow: var(--shadow-raised-sm);
  width: 38px; height: 38px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 5px; cursor: pointer;
}

.neu-hamburger span {
  display: block; width: 20px; height: 2px;
  background: var(--neu-text); border-radius: 2px;
  transition: all 0.2s;
}

.neu-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.3);
  z-index: 190;
}
.neu-overlay.active { display: block; }

/* ── Alert / Info boxes ── */
.neu-alert {
  border-radius: var(--neu-radius-sm);
  padding: 1rem 1.25rem;
  font-size: 0.875rem;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.neu-alert-info    { background: #dbeafe; color: #1e40af; box-shadow: var(--shadow-raised-sm); }
.neu-alert-warning { background: #fef3c7; color: #92400e; box-shadow: var(--shadow-raised-sm); }
.neu-alert-danger  { background: #fee2e2; color: #991b1b; box-shadow: var(--shadow-raised-sm); }
.neu-alert-success { background: #dcfce7; color: #14532d; box-shadow: var(--shadow-raised-sm); }

/* ── Progress bar ── */
.neu-progress-wrap {
  background: var(--neu-bg);
  border-radius: 20px;
  box-shadow: var(--shadow-inset-sm);
  height: 10px;
  overflow: hidden;
}

.neu-progress-bar {
  height: 100%;
  border-radius: 20px;
  background: linear-gradient(90deg, #4f46e5, #7c3aed);
  transition: width 0.5s ease;
}

/* ── Toggle switch ── */
.neu-toggle { position: relative; display: inline-block; width: 44px; height: 24px; }
.neu-toggle input { opacity: 0; width: 0; height: 0; }
.neu-toggle-slider {
  position: absolute; inset: 0;
  background: var(--neu-bg);
  box-shadow: var(--shadow-inset-sm);
  border-radius: 24px;
  cursor: pointer;
  transition: 0.3s;
}
.neu-toggle-slider:before {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  left: 3px; top: 3px;
  background: var(--neu-bg);
  box-shadow: var(--shadow-raised-sm);
  border-radius: 50%;
  transition: 0.3s;
}
.neu-toggle input:checked + .neu-toggle-slider { background: linear-gradient(145deg, #5b51f8, #4540db); }
.neu-toggle input:checked + .neu-toggle-slider:before { transform: translateX(20px); background: white; box-shadow: none; }

/* ── Drag & Drop Zone ── */
.neu-dropzone {
  border: 2px dashed rgba(79,70,229,0.35);
  border-radius: var(--neu-radius);
  background: var(--neu-bg);
  box-shadow: var(--shadow-inset);
  padding: 3rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}
.neu-dropzone:hover, .neu-dropzone.drag-over {
  border-color: var(--neu-primary);
  box-shadow: inset 6px 6px 14px #b0b8c4, inset -6px -6px 14px #eef3ff;
}
.neu-dropzone-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }

/* ── Utilities ── */
.text-primary { color: var(--neu-primary) !important; }
.text-muted   { color: var(--neu-text-muted) !important; }
.text-danger  { color: var(--neu-danger) !important; }
.text-success { color: var(--neu-success) !important; }
.text-warning { color: var(--neu-warning) !important; }
.fw-bold { font-weight: 700 !important; }
.fw-600  { font-weight: 600 !important; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.p-3 { padding: 1rem; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 1rem; }
.flex-wrap { flex-wrap: wrap; }
.w-100 { width: 100%; }
.small { font-size: 0.8rem; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--neu-bg); }
::-webkit-scrollbar-thumb { background: var(--neu-dark); border-radius: 3px; }
