:root {
  --baps-midnight: #0B1C2D;
  --baps-system-blue: #1F6AE1;
  --baps-saffron: #F6A623;
  --baps-cool-grey: #9CA3AF;
  --bs-primary: var(--baps-system-blue);
}

body {
  background-color: var(--baps-midnight);
}

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -3rem;
  z-index: 1200;
  background: #ffffff;
  color: #111827;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  padding: 0.45rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 0.75rem;
}

.bg-soft {
  background: radial-gradient(1200px circle at top right, rgba(31, 106, 225, 0.18), transparent 60%), var(--baps-midnight) !important;
}


.sidebar .nav-link.active,
.sidebar .nav-link:hover {
  background-color: rgba(31, 106, 225, 0.16) !important;
}

.sidebar .sidebar-text,
.sidebar .nav-link,
.sidebar .nav-link .sidebar-text,
.sidebar .nav-link svg {
  color: #ffffff;
}

.roster-page-header {
  z-index: 1010;
}

.navbar-dashboard .dropdown-menu .dropdown-item,
.navbar-dashboard .dropdown-menu .dropdown-item .dropdown-icon {
  color: #212529;
}

.content {
  background-color: #f8fafc;
  min-height: 100vh;
}

#main-content:focus {
  outline: none;
}

.app-page-header__title {
  color: #1f2937;
  letter-spacing: -0.01em;
}

.app-page-header__subtitle {
  color: #475569 !important;
}

.page-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1rem 1rem 1.5rem;
}

@media (min-width: 992px) {
  .page-shell {
    padding: 1.25rem 1.5rem 2rem;
  }
}

/* Use full desktop width for operational pages (tables/calendars). */
@media (min-width: 1200px) {
  .page-shell {
    max-width: none;
  }

  .page-shell .container,
  .page-shell .container-sm,
  .page-shell .container-md,
  .page-shell .container-lg,
  .page-shell .container-xl,
  .page-shell .container-xxl {
    max-width: 100%;
  }
}

.btn-primary,
.bg-primary {
  background-color: var(--baps-system-blue) !important;
  border-color: var(--baps-system-blue) !important;
}

/* Global action consistency across Volt + Tabler screens. */
.btn {
  border-radius: 0.5rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.btn-sm {
  font-weight: 600;
}

.btn i,
.btn [class^="ti ti-"],
.btn [class*=" ti ti-"],
.btn [class^="fa"],
.btn [class*=" fa"],
.btn svg {
  width: 1rem;
  height: 1rem;
  line-height: 1;
  font-size: 1rem;
  flex: 0 0 auto;
}

.btn.btn-link {
  text-decoration: none;
}

.nav-link-icon i,
.sidebar-icon i {
  width: 1rem;
  text-align: center;
}

html[data-bs-theme="light"] .navbar-vertical .nav-link.active {
  background: rgba(31, 106, 225, 0.18);
  color: #ffffff;
}

html[data-bs-theme="light"] .navbar-vertical .nav-link:hover {
  background: rgba(31, 106, 225, 0.1);
}

.app-center-switch-menu {
  min-width: 260px;
}

.notification-custom-email-col {
  min-width: 220px;
}

.task-actions-column {
  min-width: 220px;
}

.text-primary {
  color: var(--baps-system-blue) !important;
}

.border-primary {
  border-color: var(--baps-system-blue) !important;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background:
    radial-gradient(circle at 15% 20%, rgba(246, 166, 35, 0.16), transparent 40%),
    radial-gradient(circle at 80% 10%, rgba(31, 106, 225, 0.2), transparent 35%),
    linear-gradient(135deg, #0b1c2d 0%, #102840 55%, #0f2a45 100%);
}

.login-grid {
  width: min(1020px, 100%);
  border-radius: 1rem;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  background: #ffffff;
  box-shadow: 0 32px 70px rgba(5, 13, 24, 0.28);
}

.login-brand-pane {
  position: relative;
  background:
    radial-gradient(circle at 10% 20%, rgba(255, 255, 255, 0.09), transparent 42%),
    radial-gradient(circle at 80% 70%, rgba(246, 166, 35, 0.24), transparent 42%),
    #0e2439;
  color: #f8fafc;
}

.login-brand-wrap {
  padding: 2.4rem;
}

.login-logo-wrap {
  display: inline-grid;
  grid-auto-flow: column;
  align-items: center;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.75rem;
  padding: 0.4rem 0.65rem;
  margin-bottom: 0.9rem;
}

.login-logo-mark {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  background: linear-gradient(135deg, #f6a623, #d97706);
  color: #0b1c2d;
  font-weight: 800;
  font-size: 0.76rem;
  letter-spacing: 0.04em;
}

.login-logo-text {
  color: #f8fafc;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.login-badge {
  display: inline-block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  margin-bottom: 1rem;
}

.login-title {
  margin: 0;
  font-size: clamp(1.55rem, 2vw, 2rem);
  line-height: 1.2;
  color: #ffffff;
  font-weight: 700;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.25);
}

.login-copy {
  margin-top: 0.9rem;
  color: #e6edf7;
  max-width: 34ch;
  font-size: 1rem;
}

.login-chip-row {
  margin-top: 1.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.login-chip {
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 0.3rem 0.65rem;
  color: #f8fafc;
}

.login-form-pane {
  background: #f8fafc;
  display: grid;
  place-items: center;
  padding: 1.3rem;
}

.login-card {
  width: 100%;
  max-width: 460px;
  border: 1px solid #e5e7eb;
  border-radius: 0.9rem;
  background: #fff;
  padding: 1.4rem;
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.1);
}

.pb-mobile-nav {
  padding-bottom: 6rem !important;
}

.roster-bottom-nav-fixed {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1030;
}

.task-detail-sheet-height {
  height: 85vh;
}

.outbox-preview-frame {
  width: 100%;
  min-height: 260px;
  border: 1px solid #dee2e6;
}

.pb-mobile-quick-bar {
  padding-bottom: 9rem !important;
}

.app-toast-stack {
  z-index: 1080;
  max-width: 440px;
}

.template-handle-col {
  width: 32px;
}

.tree-indent-1 { padding-left: 0; }
.tree-indent-2 { padding-left: 22px; }
.tree-indent-3 { padding-left: 44px; }
.tree-indent-4 { padding-left: 66px; }
.tree-indent-5 { padding-left: 88px; }
.tree-indent-6 { padding-left: 110px; }
.tree-indent-7 { padding-left: 132px; }
.tree-indent-8 { padding-left: 154px; }
.tree-indent-9 { padding-left: 176px; }
.tree-indent-10 { padding-left: 198px; }

@media (min-width: 992px) {
  .table-tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
  }

  .table-tools .table-tools-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
  }

  .table-scroll-lg {
    max-height: calc(100vh - 290px);
    overflow: auto;
  }

  .table.table-ops {
    font-size: 0.94rem;
  }

  .table.table-ops thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f8fafc;
    border-bottom: 1px solid #dbe3ee;
    white-space: nowrap;
  }

  .table.table-ops th,
  .table.table-ops td {
    padding: 0.55rem 0.75rem;
    vertical-align: middle;
  }

  .table.table-ops td .small {
    font-size: 0.77rem;
  }

  .table.table-ops.is-compact {
    font-size: 0.86rem;
  }

  .table.table-ops.is-compact th,
  .table.table-ops.is-compact td {
    padding: 0.4rem 0.55rem;
  }
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[role="button"]:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid rgba(31, 106, 225, 0.45);
  outline-offset: 2px;
}

@media (max-width: 767.98px) {
  .app-page-header__title {
    font-size: 1.7rem;
    font-weight: 700;
  }

  .app-page-header__subtitle {
    font-size: 0.98rem !important;
    line-height: 1.45;
  }

  .app-page-header__actions .btn {
    width: 100%;
  }

  .login-grid {
    grid-template-columns: 1fr;
  }

  .login-brand-wrap {
    padding: 1.5rem;
  }

  .login-form-pane {
    padding: 1rem;
  }

  .btn,
  .form-control,
  .form-select {
    min-height: 42px;
  }

  .table[data-mobile-table="true"] thead {
    display: none;
  }

  .table[data-mobile-table="true"],
  .table[data-mobile-table="true"] tbody,
  .table[data-mobile-table="true"] tr,
  .table[data-mobile-table="true"] td {
    display: block;
    width: 100%;
  }

  .table[data-mobile-table="true"] tr {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
    background: #fff;
    overflow: hidden;
  }

  .table[data-mobile-table="true"] td {
    border: 0;
    border-bottom: 1px solid #f1f5f9;
    padding: 0.55rem 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 0.75rem;
    text-align: left !important;
  }

  .table[data-mobile-table="true"] td:last-child {
    border-bottom: 0;
  }

  .table[data-mobile-table="true"] td::before {
    content: attr(data-label);
    color: #475569;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    flex: 0 0 42%;
  }

  .table[data-mobile-table="true"] td > .btn,
  .table[data-mobile-table="true"] td > form,
  .table[data-mobile-table="true"] td > .d-inline,
  .table[data-mobile-table="true"] td > .d-flex {
    max-width: 58%;
  }

  /* Keep mobile sidebar above sticky in-page headers. */
  .sidebar {
    z-index: 1100;
  }

  .roster-page-header {
    z-index: 100;
  }

  .mobile-quick-bar {
    position: fixed;
    left: 0.75rem;
    right: 0.75rem;
    bottom: calc(4.1rem + env(safe-area-inset-bottom));
    z-index: 1020;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.4rem;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid #dbe3ee;
    border-radius: 0.75rem;
    padding: 0.45rem;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.18);
    backdrop-filter: blur(6px);
  }

  .mobile-quick-bar .btn {
    min-height: 2.35rem;
    font-size: 0.8rem;
    padding: 0.3rem 0.45rem;
  }

}

/* Sticky bulk-action bars — works on all screen sizes */
.bulk-actions-sticky {
  position: sticky;
  top: 56px; /* below the navbar */
  z-index: 1010;
  background: #fff;
  padding-bottom: 0.5rem;
}

/* ============================
   Print / Export Stylesheet
   ============================ */
@media print {
  /* Hide non-essential UI */
  .navbar,
  .sidebar,
  .mobile-bottom-nav,
  .mobile-quick-bar,
  .bulk-actions-sticky,
  .skip-link,
  #commandPalette,
  .btn,
  button,
  form:not(.print-keep),
  .pagination,
  .d-print-none,
  [data-filter-presets],
  .toast-container,
  .app-toast,
  .alert-dismissible .btn-close {
    display: none !important;
  }

  /* Reset layout for full-width printing */
  body,
  .content-page,
  .main-content {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
  }

  .container,
  .container-fluid {
    max-width: 100% !important;
    padding: 0 !important;
  }

  /* Cards print flat */
  .card {
    border: 1px solid #ccc !important;
    box-shadow: none !important;
    break-inside: avoid;
    margin-bottom: 12px !important;
  }

  /* Tables: full width, visible borders */
  .table {
    width: 100% !important;
    border-collapse: collapse !important;
  }

  .table th,
  .table td {
    border: 1px solid #999 !important;
    padding: 6px 8px !important;
    font-size: 11px !important;
  }

  .table thead th {
    background-color: #f0f0f0 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* Badges keep background colors */
  .badge {
    border: 1px solid #999 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* Roster-specific: cards in grid print stacked */
  .row.g-3 > [class*="col-"] {
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }

  /* Page breaks */
  h1, h2, h3, h4, h5, h6 {
    break-after: avoid;
  }

  tr {
    break-inside: avoid;
  }

  /* Print header */
  .print-header {
    display: block !important;
    text-align: center;
    margin-bottom: 16px;
    font-size: 18px;
    font-weight: bold;
  }

  /* Links show URL */
  a[href]:after {
    content: none !important;
  }

  /* Ensure scrollable tables show all content */
  .table-responsive,
  .table-scroll-lg {
    overflow: visible !important;
    max-height: none !important;
  }

  /* Collapse open for print */
  .collapse:not(.show) {
    display: block !important;
    height: auto !important;
  }
}
