/* ── Alma Mater colour palette (derived from ІФНТУНГ logo #304090) ── */
:root {
  /* Primary – royal blue from the logo */
  --am-900: #1a2350;
  --am-800: #1e2a60;
  --am-700: #253472;
  --am-600: #2b3d84;
  --am-500: #304090;   /* ← logo colour, brand primary */
  --am-400: #4a5aaa;
  --am-300: #6472bc;
  --am-200: #9ea8d8;
  --am-100: #d0d5ef;
  --am-50:  #eceef8;

  /* Accent – gold, classic university pairing with royal blue */
  --am-accent:       #c9a227;
  --am-accent-light: #f0d070;

  /* Override Bootstrap 5 primary to match the logo */
  --bs-primary:         #304090;
  --bs-primary-rgb:     48, 64, 144;
  --bs-link-color:      #304090;
  --bs-link-hover-color:#1e2a60;
  --bs-link-color-rgb:  48, 64, 144;
}

/* ── Bootstrap component overrides ───────────────────────────── */
/* Buttons need explicit vars because Bootstrap derives them from a separate
   $primary Sass variable, not --bs-primary-rgb, in the prebuilt CDN bundle. */
.btn-primary         { --bs-btn-bg: #304090; --bs-btn-border-color: #304090;
                       --bs-btn-hover-bg: #253472; --bs-btn-hover-border-color: #253472;
                       --bs-btn-active-bg: #1e2a60; }
.btn-outline-primary { --bs-btn-color: #304090; --bs-btn-border-color: #304090;
                       --bs-btn-hover-bg: #304090; --bs-btn-hover-border-color: #304090; }

/* ── Typography ──────────────────────────────────────────────── */
body { font-family: 'Segoe UI', system-ui, sans-serif; }

/* ── Sidebar nav ──────────────────────────────────────────────── */
.app-nav        { color: #495057; transition: background .15s, color .15s; }
.app-nav:hover  { background: var(--am-50);  color: var(--am-500); }
.app-nav.active { background: var(--am-100); color: var(--am-500); font-weight: 500; }

/* ── Page header ──────────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: .5rem;
}
.page-title { font-size: 1.25rem; font-weight: 700; margin: 0; }

/* ── Sticky table header ──────────────────────────────────────── */
.table-sticky thead th {
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 2;
  box-shadow: 0 1px 0 #dee2e6;
}

/* ── Sub-resource tab tables ──────────────────────────────────── */
.sub-table-wrap { max-height: 380px; overflow-y: auto; }

/* ── Employee status badge ────────────────────────────────────── */
.badge-active { --bs-badge-padding-x: .55em; }

/* ── Audit log action badges ──────────────────────────────────── */
.action-create { background: #d1fae5; color: #065f46; }
.action-update { background: var(--am-50);  color: var(--am-700); }
.action-delete { background: #fee2e2; color: #991b1b; }

/* ── Seniority cards ──────────────────────────────────────────── */
.seniority-card {
  background: var(--am-50);
  border-radius: .75rem;
  padding: 1rem 1.25rem;
}
.seniority-num { font-size: 2rem; font-weight: 700; color: var(--am-500); }

/* ── Loading placeholder ──────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: .35rem;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ── Department tree ──────────────────────────────────────────── */
.dept-tree .accordion-button { font-size: .9rem; padding: .5rem .75rem; }
.dept-tree .dept-item {
  padding: .3rem .75rem .3rem 2rem;
  font-size: .875rem;
  border-bottom: 1px solid #f0f0f0;
}
.dept-item:last-child  { border-bottom: none; }
.dept-type-badge       { font-size: .65rem; }

/* ── Misc ─────────────────────────────────────────────────────── */
.cursor-pointer { cursor: pointer; }
.text-truncate-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
