@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg: #f6f7fb;
  --card: #ffffff;
  --primary: #2b7de9;
  --primary-strong: #1f5fb5;
  --muted: #5f6b7a;
  --border: #e6e9f0;
  --shadow: 0 12px 30px rgba(17, 24, 39, 0.12);
  --radius: 14px;

  /* design tokens */
  --text-main: #111827;
  --text-muted: #6b7280;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --success: #16a34a;
  --success-soft: #e7f9ed;
  --warning: #b45309;
  --warning-soft: #fff4e5;
  --info: #0ea5e9;
  --info-soft: #e0f2fe;
  --surface: #eef2ff;
  --neutral: #f4f5f7;
}

* {
  box-sizing: border-box;
}

body.app-body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: radial-gradient(circle at 20% 20%, #e1ebff, transparent 35%),
              radial-gradient(circle at 80% 0%, #e0f7ff, transparent 30%),
              var(--bg);
  color: var(--text-main);
  min-height: 100vh;
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-main {
  flex: 1;
}

.app-footer {
  padding: 18px 24px 26px;
  text-align: center;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.75);
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 32px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.branding {
  display: flex;
  gap: 14px;
  align-items: center;
}

.logo-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary), #5fa0ff);
  color: white;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.7rem;
  color: var(--muted);
  font-weight: 700;
}

.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 16px 64px;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0 6px;
  flex-wrap: wrap;
}

.page-header .page-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.page-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
}

.hero h1 {
  margin: 6px 0;
  font-size: 1.8rem;
}

.lede {
  margin: 0;
  color: var(--muted);
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.step {
  padding: 12px 14px;
  background: #eef2ff;
  border-radius: 12px;
  color: var(--muted);
  font-weight: 600;
  border: 1px solid #d8def3;
  text-align: center;
}

.step.is-active {
  background: linear-gradient(120deg, var(--primary), #5fa0ff);
  color: #fff;
  border-color: transparent;
  box-shadow: var(--shadow);
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 22px 24px 26px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  margin-top: 8px;
}

.card__header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.card__header h2 {
  margin: 6px 0 0;
}

.card__section {
  border-top: 1px dashed var(--border);
  padding-top: 14px;
  margin-top: 14px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.grid {
  display: grid;
  gap: 12px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f8fafc;
}

.toolbar-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #eef2ff;
  color: #1f2937;
  border: 1px solid #e0e7ff;
  font-weight: 600;
}

.pill--muted {
  background: #f8fafc;
  border-color: var(--border);
  color: var(--text-muted);
}

.pill--info {
  background: var(--info-soft);
  border-color: #bae6fd;
  color: #0369a1;
}

.two-col {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.three-col {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 600;
  color: #111827;
}

input, select, textarea, button {
  font-family: inherit;
}

input, select, textarea {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #f9fafb;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(43, 125, 233, 0.15);
}

textarea {
  resize: vertical;
}

.label-row{
  display: flex;
  align-items: center;
  justify-content: space-between; 
  gap: 12px;
}

.label-row label{
  margin: 0;
}

.word-counter {
  margin-top: 6px;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: right;
  white-space: nowrap;
  opacity: 0.75;
}

.word-counter.is-max {
  color: var(--danger);
  font-weight: 600;
}

.dynamic-list {
  display: grid;
  gap: 10px;
}

.dynamic-item {
  border: 1px solid var(--border);
  padding: 12px;
  border-radius: 12px;
  background: #f9fbff;
}

.sub-card {
  border: 1px dashed var(--border);
  padding: 12px;
  border-radius: 12px;
  background: #fff;
  margin-top: 8px;
}

button {
  border: none;
  cursor: pointer;
}

.primary-btn {
  background: linear-gradient(135deg, var(--primary), #5fa0ff);
  color: white;
  border-radius: 12px;
  padding: 12px 18px;
  font-weight: 700;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.primary-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.ghost-btn {
  border-radius: 12px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  background: #fff;
  color: #111827;
  font-weight: 600;
}

.text-btn {
  background: none;
  color: var(--primary);
  padding: 0;
  font-weight: 700;
}

.checkbox-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: #111827;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
}

.stacked-form {
  display: grid;
  gap: 12px;
}

.muted {
  color: var(--muted);
  margin: 0;
}

.alert {
  padding: 14px;
  border-radius: 12px;
  background: #fff4e5;
  color: #b45309;
  border: 1px solid #f3d8a6;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.stat-card {
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #f8fafc;
  display: grid;
  gap: 6px;
}

.stat-card__label {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.stat-card__value {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-main);
}

.success {
  padding: 12px;
  border-radius: 12px;
  background: #e7f9ed;
  color: #0f5132;
  border: 1px solid #a6e3b8;
}

.table-card {
  overflow: auto;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

table th, table td {
  padding: 10px;
  border: 1px solid var(--border);
  text-align: left;
}

table th {
  background: #f1f5f9;
  color: #0f172a;
  position: sticky;
  top: 0;
  z-index: 1;
}

.table-actions a {
  color: var(--primary);
  font-weight: 600;
}

@media (max-width: 640px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .toolbar {
    padding: 10px 12px;
  }

  .pill {
    width: 100%;
    justify-content: space-between;
  }

  .form-actions {
    justify-content: stretch;
  }

  .primary-btn, .ghost-btn {
    width: 100%;
    text-align: center;
  }
}

.branding {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-circle {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;

  /* remove any default background */
  background: none;          /* or background-color: transparent; */
}

.logo-circle .logo-img {
  width: 90%;
  height: 90%;
  object-fit: contain;      /* or "cover" if you want it to fill */
}

.essay-block {
  white-space: pre-wrap;   /* preserve line breaks AND wrap long lines */
  word-wrap: break-word;   /* break very long words/URLs if needed */
  font-family: inherit;    /* optional: match normal text font */
  font-size: 0.95rem;      /* optional: tweak size */
}

/* === Animations & Micro-interactions ========================== */

/* Smooth scrolling for any in-page links */
html {
  scroll-behavior: smooth;
}

/* Basic transition for interactive blocks */
.card,
.sub-card,
.hero,
.site-header {
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

/* Slight lift and shadow on cards */
.sub-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

/* Steps look clickable/active */
.steps .step {
  transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.steps .step.is-active {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

/* Buttons – small lift/press */
.primary-btn,
.ghost-btn,
.btn-action {
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.primary-btn:hover,
.ghost-btn:hover,
.btn-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.15);
}

.primary-btn:active,
.ghost-btn:active,
.btn-action:active {
  transform: translateY(0);
  box-shadow: none;
}

/* Logo subtle spin on hover */
.logo-circle {
  transition: transform 0.3s ease;
}

.logo-circle:hover {
  transform: rotate(-3deg) scale(1.03);
}

/* Fade-in / slide-up on page content */
@keyframes fadeInUpSoft {
  from {
      opacity: 0;
      transform: translateY(12px);
  }
  to {
      opacity: 1;
      transform: translateY(0);
  }
}

/* Apply staggered fade-in to top-level sections */
.page > .hero {
  animation: fadeInUpSoft 0.4s ease-out both;
}

.page > .card {
  animation: fadeInUpSoft 0.45s ease-out both;
}

/* If there are multiple cards, stagger them slightly */
.page > .card:nth-of-type(2) {
  animation-delay: 0.05s;
}
.page > .card:nth-of-type(3) {
  animation-delay: 0.08s;
}

/* Table rows subtle hover */
table tr {
  transition: background-color 0.15s ease;
}
table tbody tr:hover {
  background-color: rgba(0, 0, 0, 0.03);
}

.dept-card-grid .sub-card {
  cursor: pointer;
}

.dept-card-grid .sub-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.16);
}

/* === Department Cards (HR Dashboard) =========================== */

.dept-card-grid .sub-card {
  border-radius: 12px;
  padding: 1rem 1.25rem;
  border-left: 2px solid transparent;
  background: #f8fafc; /* base fallback */
}

/* 1: Sales */
.dept-card-grid .sub-card:nth-child(1) {
  background: #fff5f5;
  border-left-color: #f56565;
}

/* 2: Marketing */
.dept-card-grid .sub-card:nth-child(2) {
  background: #fffaf0;
  border-left-color: #ed8936;
}

/* 3: Credit & Collection */
.dept-card-grid .sub-card:nth-child(3) {
  background: #f7fafc;
  border-left-color: #4299e1;
}

/* 4: Loan Operations */
.dept-card-grid .sub-card:nth-child(4) {
  background: #f0fff4;
  border-left-color: #48bb78;
}

/* 5: Audit & Compliance */
.dept-card-grid .sub-card:nth-child(5) {
  background: #f5f3ff;
  border-left-color: #805ad5;
}

/* 6: HR and Admin */
.dept-card-grid .sub-card:nth-child(6) {
  background: #fdf2f8;
  border-left-color: #d53f8c;
}

/* 7: Finance */
.dept-card-grid .sub-card:nth-child(7) {
  background: #f0fdf4;
  border-left-color: #38a169;
}

/* 8: Executive */
.dept-card-grid .sub-card:nth-child(8) {
  background: #f0f9ff;
  border-left-color: #3182ce;
}

/* 9: Data Center */
.dept-card-grid .sub-card:nth-child(9) {
  background: #edf2ff;
  border-left-color: #4c51bf;
}

/* === Table action buttons (chips) ============================= */

.table-actions {
  white-space: nowrap;
}

.action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.btn-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
  font-size: 0.78rem;
  line-height: 1.2;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease,
              color 0.18s ease, transform 0.12s ease;
}

.btn-chip .btn-icon {
  font-size: 0.9rem;
}

.btn-chip .btn-label {
  white-space: nowrap;
}

/* View = primary */
.btn-view {
  border-color: #1d4ed8;
  color: #fff;
}
.btn-view:hover {
  transform: translateY(-1px);
}

/* Edit = secondary */
.btn-edit {
  border-color: #38bdf8;
  color: #0369a1;
}
.btn-edit:hover {
  background: #bae6fd;
  transform: translateY(-1px);
}

/* Excel = neutral accent */
.btn-download {
  border-color: #4ade80;
  color: #166534;
}
.btn-download:hover {
  background: #dcfce7;
  transform: translateY(-1px);
}

/* Archive / Unarchive = warning-ish */
.btn-archive {
  border-color: #fbbf24;
  color: #92400e;
}
.btn-archive:hover {
  background: #fde68a;
  transform: translateY(-1px);
}

/* Delete = danger */
.btn-delete {
  border-color: var(--danger);
  color: #7f1d1d;
}
.btn-delete:hover {
  background: var(--danger-soft);
  transform: translateY(-1px);
}

.checkbox-label {
  display: inline-flex;
  flex-direction: row;      /* put checkbox and text side by side */
  align-items: center;
  gap: 8px;
}

.checkbox-label input[type="checkbox"] {
  padding: 0;               /* remove big padding from global input rule */
  width: auto;
  border-radius: 4px;
}

/* ================================================================== */
/* === NEW: Layout, Components & Utilities for Unified UI (v2) ====== */
/* ================================================================== */

/* App shell layout (header + main + footer) */
.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-main {
  flex: 1 1 auto;
}

.app-footer {
  padding: 16px 24px;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
}

/* Content layout: sidebar + main area */
.layout {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.layout-sidebar {
  width: 260px;
  max-width: 100%;
}

.layout-content {
  flex: 1 1 auto;
}

/* Page header (title, subtitle, actions) */
.page-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
}

.page-title {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 700;
}

.page-subtitle {
  margin: 4px 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Breadcrumbs */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.breadcrumbs a {
  color: inherit;
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--primary);
  text-decoration: underline;
}

/* Navigation bar links (for top nav or sidebar) */
.app-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.app-nav-list {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  gap: 0.25rem;
  padding: 0;
  margin: 0;
}

.app-nav-link {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: background-color 0.16s ease, color 0.16s ease;
}

.app-nav-link:hover {
  background: #e5edff;
  color: var(--primary);
}

.app-nav-link--active {
  background: var(--primary);
  color: #fff;
}

/* Card refinements / aliases for consistency */
.card-header,
.card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.card-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.card-subtitle {
  margin: 2px 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.card-body {
  margin-top: 0.75rem;
}

.card-footer {
  padding-top: 1rem;
  border-top: 1px dashed var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

/* Sections inside cards / forms */
.form-section,
.card-section,
.card__section {
  border-top: 1px dashed var(--border);
  padding-top: 14px;
  margin-top: 14px;
}

.form-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 0.75rem;
}

.form-section-title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
}

/* Generic grids for forms/content */
.form-grid {
  display: grid;
  gap: 12px;
}

.form-grid--2 {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.form-grid--3 {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-weight: 600;
  color: var(--text-main);
}

/* Form help & validation text */
.form-help {
  margin: 2px 0 0;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.form-error {
  margin: 2px 0 0;
  font-size: 0.78rem;
  color: var(--danger);
}

.form-success {
  margin: 2px 0 0;
  font-size: 0.78rem;
  color: var(--success);
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.75rem;
}

.accordion {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  background: #f9fafb;
}

.accordion__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px dashed var(--border);
  padding-bottom: 8px;
  margin-bottom: 8px;
}

.accordion summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  list-style: none;
}

.accordion summary::-webkit-details-marker {
  display: none;
}

.accordion[open] summary {
  border-bottom: 1px dashed var(--border);
  padding-bottom: 8px;
  margin-bottom: 8px;
}

.accordion__title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.accordion__title {
  font-weight: 700;
}

.accordion--static summary {
  cursor: default;
  pointer-events: none;
}

.accordion--static summary:focus {
  outline: none;
}

.accordion--static .accordion__title {
  margin: 0;
}

.accordion__body {
  display: grid;
  gap: 10px;
}

@media (max-width: 720px) {
  .accordion {
    padding: 10px 12px;
  }

  .accordion__header {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Explicit form control class (optional, on top of base input styles) */
.form-control {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #f9fafb;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(43, 125, 233, 0.15);
}

/* Validation states */
input.is-invalid,
select.is-invalid,
textarea.is-invalid,
.form-control.is-invalid {
  border-color: var(--danger);
  background: var(--danger-soft);
}

input.is-valid,
select.is-valid,
textarea.is-valid,
.form-control.is-valid {
  border-color: var(--success);
}

/* Buttons: new unified system (does NOT break existing .primary-btn, .ghost-btn) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.95rem;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.16s ease, color 0.16s ease,
              box-shadow 0.16s ease, transform 0.12s ease,
              border-color 0.16s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
}

.btn:active {
  transform: translateY(0);
  box-shadow: none;
}

.btn:disabled,
.btn.is-disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.btn.is-loading {
  gap: 8px;
  pointer-events: none;
}

.btn-spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  animation: spin 0.75s linear infinite;
  display: inline-block;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Primary, Secondary, Ghost, Danger variants */
.btn-primary {
  background: linear-gradient(135deg, var(--primary), #5fa0ff);
  color: #fff;
}

.btn-secondary {
  background: #ffffff;
  border-color: var(--border);
  color: var(--text-main);
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--primary);
}

.btn-danger {
  background: #fee2e2;
  border-color: #fecaca;
  color: #b91c1c;
}

/* Button sizes */
.btn-sm {
  padding: 0.3rem 0.7rem;
  font-size: 0.78rem;
}

.btn-lg {
  padding: 0.7rem 1.3rem;
  font-size: 0.95rem;
}

/* Align actions consistently at the bottom-right of forms/cards */
.card-footer--actions,
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 18px;
}

/* Alerts: unified variants (aliases keep .alert and .success working) */
.alert-info {
  padding: 14px;
  border-radius: 12px;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.alert-warning,
.alert {
  padding: 14px;
  border-radius: 12px;
  background: var(--warning-soft);
  color: var(--warning);
  border: 1px solid #f3d8a6;
}

.alert-success,
.success {
  padding: 12px;
  border-radius: 12px;
  background: var(--success-soft);
  color: #0f5132;
  border: 1px solid #a6e3b8;
}

.alert-error {
  padding: 14px;
  border-radius: 12px;
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

/* Text utilities */
.text-muted {
  color: var(--text-muted);
}

.text-danger {
  color: var(--danger);
}

.text-success {
  color: var(--success);
}

/* Badges / status pills */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 500;
  background: #e5e7eb;
  color: #374151;
}

.badge-primary {
  background: #dbeafe;
  color: #1d4ed8;
}

.badge-success {
  background: #dcfce7;
  color: #166534;
}

.badge-warning {
  background: #fef3c7;
  color: #92400e;
}

.badge-danger {
  background: #fee2e2;
  color: #b91c1c;
}

.status-dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.status-dot::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--primary);
  display: inline-block;
  box-shadow: 0 0 0 4px rgba(43, 125, 233, 0.15);
}

.status-dot.is-archived::before {
  background: var(--muted);
  box-shadow: 0 0 0 3px rgba(99, 115, 129, 0.15);
}

/* Table helper classes */
.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 10px;
  border: 1px solid var(--border);
  text-align: left;
}

.table thead th {
  background: #f1f5f9;
  color: #0f172a;
}

.table-sm th,
.table-sm td {
  padding: 6px 8px;
  font-size: 0.78rem;
}

/* Responsive helpers */
.hide-on-mobile {
  display: inline-block;
}

.hide-on-desktop {
  display: none;
}

@media (max-width: 768px) {
  .layout {
    flex-direction: column;
  }

  .layout-sidebar {
    width: 100%;
  }

  .page-header {
    align-items: flex-start;
  }

  .hide-on-mobile {
    display: none;
  }

  .hide-on-desktop {
    display: inline-block;
  }

  .card {
    padding: 18px 16px 20px;
  }
}

/* Auth card layout – used on HR Login */
.card-auth {
  max-width: 520px;
  margin: 20px auto;
}

