/* Simple Payroll — global layout: sticky header/footer, responsive */

:root {
  /* Green / Blue / White modern palette */
  --bg: #f3fbf8;
  --surface: #ffffff;
  --surface-2: #f7fffc;
  --text: #0f172a;
  --muted: #475569;
  --primary: #0b3a66; /* deep blue */
  --primary-hover: #072f55;
  --accent: #0ea5e9; /* sky blue */
  --accent-2: #22c55e; /* green */
  --border: rgba(15, 23, 42, 0.10);
  --danger: #dc2626;
  --success: #16a34a;
  --header-h: 64px;
  --footer-h: 52px;
  --shadow: 0 10px 30px rgba(2, 6, 23, 0.08);
  --shadow-sm: 0 1px 2px rgba(2, 6, 23, 0.06);
  --ring: 0 0 0 4px rgba(14, 165, 233, 0.22);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  position: relative;
  isolation: isolate;
  background:
    radial-gradient(900px 500px at 10% -10%, rgba(34, 197, 94, 0.10), transparent 55%),
    radial-gradient(900px 500px at 90% -10%, rgba(14, 165, 233, 0.12), transparent 55%),
    var(--bg);
  line-height: 1.5;
  padding-top: var(--header-h);
  padding-bottom: var(--footer-h);
}

/* Global background photo (unique, consistent across pages) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image: url("../img/background.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.7;
  pointer-events: none;
}

/* Soft white veil to keep UI readable on top of the photo */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.82) 0%,
    rgba(255, 255, 255, 0.74) 55%,
    rgba(255, 255, 255, 0.86) 100%
  );
  pointer-events: none;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
  transition: box-shadow 0.2s ease, background 0.2s ease;
}

.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.site-header__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.brand img {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.brand__text {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 1rem;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
}

.nav-drop {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-drop__btn {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: color 0.15s ease;
}

.nav-drop__btn:hover,
.nav-drop__btn:focus-visible {
  color: var(--accent);
  outline: none;
}

.nav-drop__btn.is-active {
  color: var(--primary);
  border-bottom-color: var(--accent);
}

.nav-drop__chev {
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
  opacity: 0.9;
  transition: transform 0.15s ease;
}

.nav-drop[data-open="true"] .nav-drop__chev,
.nav-drop:focus-within .nav-drop__chev {
  transform: rotate(225deg) translateY(1px);
}

.nav-drop__menu {
  position: absolute;
  top: calc(100% + 10px);
  left: -0.5rem;
  min-width: 220px;
  padding: 0.5rem;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 20px 55px rgba(2, 6, 23, 0.14);
  backdrop-filter: blur(10px);
  display: grid;
  gap: 0.15rem;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
  z-index: 1200;
}

.nav-drop__menu a {
  padding: 0.55rem 0.65rem;
  border-radius: 12px;
  border-bottom: none;
  font-weight: 700;
  color: var(--muted);
  background: transparent;
  transition: background 0.15s ease, color 0.15s ease, transform 0.05s ease;
}

.nav-drop__menu a:hover,
.nav-drop__menu a:focus-visible {
  outline: none;
  color: var(--primary);
  background: rgba(14, 165, 233, 0.10);
}

.nav-drop__menu a.is-active {
  color: var(--primary);
  background: rgba(14, 165, 233, 0.14);
  border: 1px solid rgba(14, 165, 233, 0.20);
}

/* Desktop: show dropdown on hover/focus, plus JS-toggled */
@media (min-width: 760px) {
  .nav-drop:hover .nav-drop__menu,
  .nav-drop:focus-within .nav-drop__menu,
  .nav-drop[data-open="true"] .nav-drop__menu {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--accent);
}

.nav a.is-active {
  color: var(--primary);
  border-bottom-color: var(--accent);
}

.header-panel {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-toggle {
  display: none;
  appearance: none;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.75);
  border-radius: 12px;
  width: 44px;
  height: 40px;
  padding: 0;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.nav-toggle:hover,
.nav-toggle:focus-visible {
  box-shadow: var(--ring);
  outline: none;
}

.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  display: block;
  width: 18px;
  height: 2px;
  background: var(--primary);
  border-radius: 999px;
  margin: 0 auto;
  position: relative;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.nav-toggle__bars::before {
  position: absolute;
  top: -6px;
  left: 0;
  right: 0;
}

.nav-toggle__bars::after {
  position: absolute;
  top: 6px;
  left: 0;
  right: 0;
}

.site-header.nav-open .nav-toggle__bars {
  transform: rotate(45deg);
}

.site-header.nav-open .nav-toggle__bars::before {
  transform: rotate(90deg) translateX(0);
  top: 0;
}

.site-header.nav-open .nav-toggle__bars::after {
  opacity: 0;
}

.site-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  min-height: var(--footer-h);
  background: rgba(255, 255, 255, 0.92);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
}

.site-footer__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.65rem 1.25rem;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  font-size: 0.875rem;
  color: var(--muted);
}

.site-footer a {
  color: var(--accent);
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.main-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.75rem 1.25rem 2rem;
}

.page-title {
  margin: 0 0 0.35rem;
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--primary);
}

.page-sub {
  margin: 0 0 1.5rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.alert {
  padding: 0.85rem 1rem;
  border-radius: 8px;
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
}

.alert--success {
  background: #e8f6ec;
  color: #145a32;
  border: 1px solid #a9dfbf;
}

.alert--error {
  background: #fdecea;
  color: #78281f;
  border: 1px solid #f5b7b1;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.35rem 1.5rem;
  box-shadow: var(--shadow-sm);
}

.form-grid {
  display: grid;
  gap: 1rem 1.25rem;
}

@media (min-width: 640px) {
  .form-grid.cols-2 {
    grid-template-columns: 1fr 1fr;
  }
}

label {
  display: block;
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 0.35rem;
  color: var(--text);
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="search"],
input[type="password"],
select,
textarea {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  font: inherit;
  background: linear-gradient(180deg, #ffffff, #fbfffe);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  box-shadow: var(--ring);
  border-color: rgba(14, 165, 233, 0.55);
}

textarea {
  min-height: 80px;
  resize: vertical;
}

.field-hint {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.15rem;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.25;
  transition: transform 0.05s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn--primary {
  background: linear-gradient(135deg, var(--primary), #0b5aa7);
  color: #fff;
  box-shadow: 0 10px 20px rgba(11, 58, 102, 0.18);
}

.btn--primary:hover {
  background: linear-gradient(135deg, var(--primary-hover), #094e93);
}

.btn:active {
  transform: translateY(1px);
}

.btn--secondary {
  background: linear-gradient(180deg, #ffffff, #f1fff8);
  border: 1px solid var(--border);
  color: var(--text);
}

.btn--secondary:hover {
  border-color: rgba(34, 197, 94, 0.35);
  box-shadow: 0 10px 20px rgba(34, 197, 94, 0.10);
}

.btn--danger {
  background: linear-gradient(135deg, var(--danger), #b91c1c);
  color: #fff;
}

.btn--danger:hover {
  filter: brightness(0.95);
}

.btn--edit {
  background: linear-gradient(135deg, var(--primary), #0b5aa7);
  color: #fff;
  box-shadow: 0 10px 20px rgba(11, 58, 102, 0.16);
}

.btn--edit:hover {
  filter: brightness(0.97);
}

.btn--small {
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
}

.btn-group {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.btn-group .btn {
  min-width: 74px;
}

.table-wrap {
  overflow-x: auto;
  margin-top: 1rem;
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.data-table th,
.data-table td {
  padding: 0.65rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.data-table th {
  font-weight: 600;
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.data-table tbody tr:hover {
  background: var(--surface-2);
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}

.badge--active {
  background: rgba(34, 197, 94, 0.14);
  color: var(--success);
}

.badge--inactive {
  background: #f4f4f4;
  color: var(--muted);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.search-form {
  display: flex;
  gap: 0.5rem;
  flex: 1;
  min-width: 200px;
  max-width: 360px;
}

.search-form input {
  flex: 1;
}

.stats {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  margin-bottom: 1.75rem;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.15rem 1.25rem;
  box-shadow: var(--shadow-sm);
}

.stat-card__label {
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.35rem;
}

.stat-card__value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

.payslip {
  max-width: 560px;
}

.payslip__header {
  border-bottom: 2px solid rgba(14, 165, 233, 0.55);
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}

.payslip__row {
  display: flex;
  justify-content: space-between;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--border);
}

.payslip__row--total {
  font-weight: 700;
  font-size: 1.1rem;
  border-bottom: none;
  margin-top: 0.5rem;
  padding-top: 0.75rem;
  border-top: 2px solid var(--border);
}

.muted {
  color: var(--muted);
  font-size: 0.9rem;
}

.link-btn {
  appearance: none;
  border: none;
  background: transparent;
  padding: 0;
  font: inherit;
  font-weight: 700;
  color: var(--accent);
  cursor: pointer;
}

.link-btn[disabled],
.link-btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
}

.link-btn:hover,
.link-btn:focus-visible {
  text-decoration: underline;
  outline: none;
}

/* Modal (dialog) */
.modal {
  width: min(720px, calc(100vw - 2rem));
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 16px;
  padding: 0;
  box-shadow: 0 25px 90px rgba(2, 6, 23, 0.25);
  background: rgba(255, 255, 255, 0.98);
  overflow: hidden;
}

.modal::backdrop {
  background: rgba(2, 6, 23, 0.45);
  backdrop-filter: blur(3px);
}

.modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 255, 252, 0.98));
}

.modal__body {
  padding: 1rem;
}

@media (max-width: 520px) {
  .brand__text {
    font-size: 0.95rem;
  }

  .nav {
    justify-content: flex-end;
  }
}

/* Hamburger / mobile header */
@media (max-width: 759px) {
  .site-header__inner {
    gap: 0.75rem;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
  }

  .header-panel {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    padding: 0.75rem 1rem 1rem;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
    display: grid;
    gap: 0.75rem;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
  }

  .site-header.nav-open .header-panel {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav {
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
  }

  .nav a {
    padding: 0.6rem 0.75rem;
    border-radius: 12px;
    border-bottom: none;
    background: transparent;
  }

  .nav a.is-active {
    background: rgba(14, 165, 233, 0.12);
    border: 1px solid rgba(14, 165, 233, 0.20);
  }

  .nav-drop {
    width: 100%;
    display: grid;
    gap: 0.25rem;
  }

  .nav-drop__btn {
    width: 100%;
    justify-content: space-between;
    padding: 0.6rem 0.75rem;
    border-radius: 12px;
    border-bottom: none;
    background: transparent;
  }

  .nav-drop__btn.is-active {
    background: rgba(14, 165, 233, 0.10);
    border: 1px solid rgba(14, 165, 233, 0.18);
  }

  .nav-drop__menu {
    position: static;
    min-width: 0;
    padding: 0.25rem;
    border-radius: 14px;
    box-shadow: none;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(15, 23, 42, 0.10);
    opacity: 1;
    transform: none;
    pointer-events: auto;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.2s ease;
  }

  .nav-drop[data-open="true"] .nav-drop__menu {
    max-height: 240px;
  }

  .nav-drop__menu a {
    padding: 0.55rem 0.65rem;
  }

  .userbar {
    justify-content: space-between;
  }
}

/* -----------------------------
   Auth (login) screen + userbar
   ----------------------------- */

.userbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.userchip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.75);
  box-shadow: var(--shadow-sm);
  max-width: 260px;
}

.userchip__name {
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.userchip__role {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.14);
  color: var(--primary);
  text-transform: uppercase;
}

.header-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.header-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, #ffffff, #fbfffe);
  color: var(--primary);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: transform 0.08s ease, box-shadow 0.15s ease, border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.header-icon-btn:hover,
.header-icon-btn:focus-visible {
  outline: none;
  border-color: rgba(14, 165, 233, 0.45);
  box-shadow: var(--ring);
  color: #0b5aa7;
}

.header-icon-btn:active {
  transform: translateY(1px);
}

.header-icon-btn.is-active {
  border-color: rgba(14, 165, 233, 0.55);
  background: rgba(14, 165, 233, 0.12);
  color: #072f55;
  box-shadow: 0 0 0 1px rgba(14, 165, 233, 0.18) inset;
}

/* Logout: distinct accent (still matches theme) */
.header-icon-btn--logout {
  color: #0a4a7a;
  border-color: rgba(11, 58, 102, 0.22);
}

.header-icon-btn--logout:hover,
.header-icon-btn--logout:focus-visible {
  border-color: rgba(11, 58, 102, 0.35);
  color: #072f55;
  background: rgba(11, 58, 102, 0.06);
}

.header-icon-btn__icon {
  display: block;
  width: 22px;
  height: 22px;
}

.auth-body {
  padding-top: 0;
  padding-bottom: 0;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem 1.25rem;
  gap: 1.25rem;
}

.auth-card {
  width: min(520px, 100%);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 18px;
  box-shadow: 0 20px 70px rgba(2, 6, 23, 0.16);
  padding: 1.5rem 1.5rem 1.25rem;
  backdrop-filter: blur(10px);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.auth-brand img {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  box-shadow: 0 12px 25px rgba(2, 6, 23, 0.12);
}

.auth-brand__title {
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--primary);
  font-size: 1.15rem;
}

.auth-brand__sub {
  color: var(--muted);
  font-size: 0.92rem;
  margin-top: 0.05rem;
}

.auth-form {
  margin-top: 1.1rem;
  display: grid;
  gap: 0.9rem;
}

.auth-field label {
  margin-bottom: 0.35rem;
}

.auth-submit {
  width: 100%;
  padding: 0.65rem 1.15rem;
  border-radius: 14px;
}

.auth-hint {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  text-align: center;
}

.auth-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.auth-dot {
  opacity: 0.6;
  padding: 0 0.25rem;
}

/* -----------------------------
   Print button + report UI
   ----------------------------- */

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.95rem;
  border-radius: 14px;
  border: 1px solid rgba(14, 165, 233, 0.25);
  background: rgba(255, 255, 255, 0.78);
  color: var(--primary);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}

.icon-btn:hover,
.icon-btn:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

.icon-btn .icon {
  width: 18px;
  height: 18px;
}

.tab-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tab-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow-sm);
  font-weight: 800;
  font-size: 0.92rem;
}

.tab-pill:hover,
.tab-pill:focus-visible {
  outline: none;
  box-shadow: var(--ring);
  color: var(--primary);
}

.tab-pill.is-active {
  color: #fff;
  border-color: rgba(14, 165, 233, 0.35);
  background: linear-gradient(135deg, var(--primary), #0b5aa7);
}

.date-range {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

@media (max-width: 640px) {
  .date-range {
    grid-template-columns: 1fr;
  }
}

.print-head {
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--border);
  display: grid;
  gap: 0.75rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 255, 252, 0.98));
}

@media (min-width: 820px) {
  .print-head {
    grid-template-columns: 1.5fr 1fr;
    align-items: center;
  }
}

.print-title {
  font-weight: 900;
  color: var(--primary);
  font-size: 1.05rem;
}

.print-sub {
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.dot {
  opacity: 0.6;
  padding: 0 0.35rem;
}

.kpis {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.kpi {
  border: 1px solid rgba(15, 23, 42, 0.10);
  border-radius: 14px;
  padding: 0.65rem 0.75rem;
  background: rgba(255, 255, 255, 0.75);
}

.kpi__label {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 900;
}

.kpi__value {
  margin-top: 0.15rem;
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--primary);
}

@media print {
  body {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    background: #fff !important;
  }

  body::before,
  body::after,
  .site-header,
  .site-footer,
  .no-print {
    display: none !important;
  }

  .main-wrap {
    max-width: 100% !important;
    padding: 0 !important;
  }

  .card {
    box-shadow: none !important;
    border: none !important;
    border-radius: 0 !important;
  }

  table.data-table {
    font-size: 12px !important;
  }

  .data-table th,
  .data-table td {
    padding: 0.35rem 0.45rem !important;
  }
}
