/* ==========================================================================
   PylotOps Knowledge Base — design system
   Palette matches the login page (navy / accent blue) for brand continuity.
   ========================================================================== */

:root {
  --pk-primary: #303f5e;
  --pk-primary-dark: #232c42;
  --pk-primary-darker: #1a2032;
  --pk-accent: #4c95be;
  --pk-accent-dark: #3d7ea0;
  --pk-accent-light: #eaf4fa;
  --pk-bg: #f2f4f8;
  --pk-surface: #ffffff;
  --pk-border: #e4e8ef;
  --pk-text: #263042;
  --pk-muted: #6b7686;
  --pk-success: #1f9d55;
  --pk-success-bg: #e7f7ee;
  --pk-danger: #d6455a;
  --pk-danger-bg: #fceaec;
  --pk-warning: #c98a1b;
  --pk-warning-bg: #fdf3e0;
  --pk-radius: 12px;
  --pk-radius-sm: 8px;
  --pk-shadow: 0 2px 10px rgba(35, 44, 66, 0.06);
  --pk-shadow-md: 0 10px 30px rgba(35, 44, 66, 0.12);
  --pk-sidebar-width: 264px;
  --pk-topbar-height: 64px;
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--pk-bg);
  color: var(--pk-text);
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 0.95rem;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  color: var(--pk-primary);
}

a {
  color: var(--pk-accent-dark);
}

a:hover {
  color: var(--pk-primary);
}

/* ---------------------------------------------------------------------- */
/* App shell                                                               */
/* ---------------------------------------------------------------------- */

.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(20, 24, 36, 0.45);
  z-index: 1030;
}

body.sidebar-open .sidebar-overlay {
  display: block;
}

/* ---------------------------------------------------------------------- */
/* Sidebar                                                                 */
/* ---------------------------------------------------------------------- */

.sidebar {
  width: var(--pk-sidebar-width);
  flex-shrink: 0;
  background: linear-gradient(180deg, var(--pk-primary) 0%, var(--pk-primary-dark) 100%);
  color: #dfe6f2;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 1040;
  transition: transform 0.25s ease;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  min-height: var(--pk-topbar-height);
}

.sidebar-brand img {
  max-width: 100%;
  height: 28px;
  filter: brightness(0) invert(1);
}

.sidebar-nav {
  flex: 1 1 auto;
  padding: 1rem 0.75rem;
  overflow-y: auto;
}

.sidebar-section-label {
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: rgba(223, 230, 242, 0.5);
  padding: 0.5rem 0.75rem;
  margin-top: 0.5rem;
}

.sidebar-nav .nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--pk-radius-sm);
  color: rgba(223, 230, 242, 0.85);
  font-weight: 500;
  font-size: 0.9rem;
  margin-bottom: 0.15rem;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.sidebar-nav .nav-link i {
  width: 1.25rem;
  text-align: center;
  font-size: 0.95rem;
  color: rgba(223, 230, 242, 0.65);
}

.sidebar-nav .nav-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  text-decoration: none;
}

.sidebar-nav .nav-link:hover i {
  color: #ffffff;
}

.sidebar-nav .nav-link.active {
  background: var(--pk-accent);
  color: #ffffff;
  box-shadow: var(--pk-shadow);
}

.sidebar-nav .nav-link.active i {
  color: #ffffff;
}

.sidebar-footer {
  padding: 1rem 1.25rem 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-footer a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: rgba(223, 230, 242, 0.7);
  font-size: 0.82rem;
}

.sidebar-footer a:hover {
  color: #ffffff;
  text-decoration: none;
}

.sidebar .nav-link {
    display: flex;
    align-items: center;
}

    .sidebar .nav-link .fa-chevron-down {
        margin-left: auto;
    }
/* ---------------------------------------------------------------------- */
/* Main area / topbar                                                      */
/* ---------------------------------------------------------------------- */

.main-area {
  flex: 1 1 auto;
  margin-left: var(--pk-sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  height: var(--pk-topbar-height);
  background: var(--pk-surface);
  border-bottom: 1px solid var(--pk-border);
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 1020;
}

.sidebar-toggle {
  display: none;
  border: none;
  background: transparent;
  color: var(--pk-primary);
  font-size: 1.15rem;
  padding: 0.25rem 0.5rem;
}

.topbar-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--pk-primary);
  flex: 1 1 auto;
}

.topbar-actions {
  display: flex;
  align-items: center;
}

.topbar-actions .navbar-nav {
  flex-direction: row;
  align-items: center;
  gap: 0.25rem;
}

.topbar-actions .nav-link {
  color: var(--pk-text) !important;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.topbar-actions .nav-link:hover {
  color: var(--pk-accent-dark) !important;
}

.content {
  flex: 1 1 auto;
  padding: 1.75rem;
}

.app-footer {
  padding: 1rem 1.75rem;
  color: var(--pk-muted);
  font-size: 0.82rem;
  border-top: 1px solid var(--pk-border);
}

/* ---------------------------------------------------------------------- */
/* Page header                                                            */
/* ---------------------------------------------------------------------- */

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.page-header h1 {
  font-size: 1.4rem;
  margin: 0;
}

.page-header .page-subtitle {
  color: var(--pk-muted);
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

/* ---------------------------------------------------------------------- */
/* Cards                                                                   */
/* ---------------------------------------------------------------------- */

.card {
  border: 1px solid var(--pk-border);
  border-radius: var(--pk-radius);
  box-shadow: var(--pk-shadow);
  min-height: 50vh;
}

.card-header {
  background: var(--pk-surface);
  border-bottom: 1px solid var(--pk-border);
  font-weight: 600;
  color: var(--pk-primary);
  border-top-left-radius: var(--pk-radius) !important;
  border-top-right-radius: var(--pk-radius) !important;
}

.card-footer {
  background: #fafbfd;
  border-top: 1px solid var(--pk-border);
  border-bottom-left-radius: var(--pk-radius) !important;
  border-bottom-right-radius: var(--pk-radius) !important;
  padding: 1rem 1.25rem;
}

/* ---------------------------------------------------------------------- */
/* Buttons                                                                 */
/* ---------------------------------------------------------------------- */

.btn {
  border-radius: var(--pk-radius-sm);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-primary {
  background-color: var(--pk-accent);
  border-color: var(--pk-accent);
}

.btn-primary:hover, .btn-primary:focus {
  background-color: var(--pk-accent-dark);
  border-color: var(--pk-accent-dark);
}

.btn-outline-secondary {
    color: var(--pk-primary);
    border-color: transparent;
    background-color: transparent;
}

    .btn-outline-secondary:hover,
    .btn-outline-secondary:focus {
        color: var(--pk-primary);
        background-color: transparent;
        border-color: transparent;
        box-shadow: none;
    }
    
    .btn-outline-secondary{
        
        border-color: transparent;
       
    }
.btn-outline-danger {
    color: var(--pk-danger);
    border-color: transparent;
    background-color: transparent;
}

    .btn-outline-danger:hover,
    .btn-outline-danger:focus {
        color: var(--pk-danger);
        background-color: transparent;
        border-color: transparent;
        box-shadow: none;
    }

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus, .custom-select:focus {
    box-shadow: 0 0 0 0.2rem rgba(76, 149, 190, 0.25);
}

/* ---------------------------------------------------------------------- */
/* Forms                                                                   */
/* ---------------------------------------------------------------------- */

.form-control, .custom-select {
  border-radius: var(--pk-radius-sm);
  border-color: var(--pk-border);
}

.form-control:focus, .custom-select:focus {
  border-color: var(--pk-accent);
}

.control-label, label {
  font-weight: 500;
  color: var(--pk-text);
  font-size: 0.85rem;
}

.form-text.text-muted, small.form-text {
  font-size: 0.78rem;
}

/* ---------------------------------------------------------------------- */
/* Password field: show/hide toggle + live requirements checklist         */
/* ---------------------------------------------------------------------- */

.password-field-wrap {
  position: relative;
}

.password-toggle-btn {
  border-color: var(--pk-border);
  color: var(--pk-muted);
  background: var(--pk-surface);
}

.password-toggle-btn:hover, .password-toggle-btn:focus {
  color: var(--pk-text);
  background: var(--pk-surface);
}

.password-requirements-hint {
  font-size: 0.78rem;
  color: var(--pk-success);
  margin-top: 0.35rem;
  display: block;
}

.password-requirements-popover {
  display: none;
  position: absolute;
  top: 0;
  left: calc(100% + 12px);
  width: 260px;
  z-index: 20;
  background: var(--pk-surface);
  border: 1px solid var(--pk-border);
  border-radius: var(--pk-radius-sm);
  box-shadow: var(--pk-shadow-md);
  padding: 0.85rem 1rem;
}

.password-requirements-popover.show {
  display: block;
}

.password-requirements-title {
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--pk-text);
  margin-bottom: 0.5rem;
}

.password-requirements-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.password-requirements-list li {
  font-size: 0.8rem;
  color: var(--pk-danger);
  margin-bottom: 0.4rem;
}

.password-requirements-list li:last-child {
  margin-bottom: 0;
}

.password-requirements-list li.is-met {
  color: var(--pk-success);
}

@media (max-width: 991.98px) {
  .password-requirements-popover {
    left: 0;
    top: calc(100% + 6px);
    width: 100%;
  }
}

/* ---------------------------------------------------------------------- */
/* Section tabs (e.g. Engineering Standards Index)                        */
/* ---------------------------------------------------------------------- */

.section-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.section-tabs .nav-link {
  padding: 0.45rem 1.1rem;
  color: var(--pk-muted);
  font-weight: 500;
  background-color: var(--pk-surface);
  border: 1px solid var(--pk-border);
  border-radius: 999px;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.section-tabs .nav-link:hover {
  color: var(--pk-primary);
  background-color: var(--pk-accent-light);
  border-color: var(--pk-accent-light);
}

.section-tabs .nav-link.active {
  color: #fff;
  background-color: var(--pk-accent-dark);
  border-color: var(--pk-accent-dark);
  font-weight: 600;
}

/* ---------------------------------------------------------------------- */
/* Tables                                                                  */
/* ---------------------------------------------------------------------- */

.table {
    margin-bottom: 0;
    table-layout: fixed;
    width: 100%;
}



.table thead th {
  text-transform: none;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: var(--pk-muted);
  border-top: none;
  border-bottom: 1px solid var(--pk-border);
  background: #fafbfd;
  font-weight: 600;
}

.table td {
  vertical-align: middle;
  border-color: var(--pk-border);
}

.table-hover tbody tr:hover {
  background-color: var(--pk-accent-light);
}

.table-actions {
    white-space: nowrap;
    justify-content: center;
    align-items: center;
    gap: 1px;
}

    .table-actions .btn {
        width: 26px;
        height: 26px;
        min-width: 26px;
        padding: 0.3rem 0.1rem;
        margin: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 0.8rem;
    }

.fw-medium {
    font-weight: 500;
}

/* Bootstrap 4 has no gap utilities (added in v5) — used for flex button groups. */
.gap-2 {
    gap: 0.5rem;
}

.hidden-col {
    display: none;
}
.version-edit-btn {
    width: auto !important;
    height: auto !important;
    border-radius: .375rem !important;
    padding: .25rem .5rem !important;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}
/* ---------------------------------------------------------------------- */
/* Badges / status pills                                                  */
/* ---------------------------------------------------------------------- */

.badge {
  font-weight: 500;
  padding: 0.35em 0.7em;
  border-radius: 999px;
  font-size: 0.75rem;
}

.badge-status-active {
  background: var(--pk-success-bg);
  color: var(--pk-success);
}

.badge-status-inactive {
  background: #eef0f4;
  color: var(--pk-muted);
}

.badge-status-review {
  background: var(--pk-warning-bg);
  color: var(--pk-warning);
}

.badge-status-active::before, .badge-status-inactive::before, .badge-status-review::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  margin-right: 0.4em;
}

/* ---------------------------------------------------------------------- */
/* Avatars                                                                 */
/* ---------------------------------------------------------------------- */

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--pk-accent-light);
  color: var(--pk-primary);
  overflow: hidden;
  flex-shrink: 0;
}

img.avatar {
  object-fit: cover;
}

.avatar-sm {
  width: 34px;
  height: 34px;
  font-size: 0.8rem;
}

.avatar-lg {
  width: 96px;
  height: 96px;
  font-size: 2.2rem;
  border: 3px solid var(--pk-surface);
  box-shadow: var(--pk-shadow);
}

/* ---------------------------------------------------------------------- */
/* Photo upload control                                                    */
/* ---------------------------------------------------------------------- */

.photo-upload {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1rem;
}

.photo-upload-fields {
  flex: 1 1 auto;
}

/* ---------------------------------------------------------------------- */
/* Alerts                                                                  */
/* ---------------------------------------------------------------------- */

.alert {
  border: none;
  border-left: 4px solid transparent;
  border-radius: var(--pk-radius-sm);
}

.alert-success {
  background: var(--pk-success-bg);
  color: #146c3a;
  border-left-color: var(--pk-success);
}

.alert-danger {
  background: var(--pk-danger-bg);
  color: #9c2a3a;
  border-left-color: var(--pk-danger);
}

.alert-warning {
  background: var(--pk-warning-bg);
  color: #8a600f;
  border-left-color: var(--pk-warning);
}

/* ---------------------------------------------------------------------- */
/* Detail / definition list panels                                        */
/* ---------------------------------------------------------------------- */

.detail-grid {
  display: grid;
  grid-template-columns: minmax(160px, 220px) 1fr;
  row-gap: 0.9rem;
  column-gap: 1rem;
  margin: 0;
}

.detail-grid dt {
  color: var(--pk-muted);
  font-weight: 500;
  font-size: 0.82rem;
}

.detail-grid dd {
  margin: 0;
  color: var(--pk-text);
}

/* ---------------------------------------------------------------------- */
/* Dashboard                                                               */
/* ---------------------------------------------------------------------- */

.hero-banner {
  background: linear-gradient(135deg, var(--pk-primary) 0%, var(--pk-accent-dark) 100%);
  color: #fff;
  border-radius: var(--pk-radius);
  padding: 2rem;
  margin-bottom: 1.75rem;
  position: relative;
  overflow: hidden;
}

.hero-banner::after {
  content: "";
  position: absolute;
  top: -60px;
  right: -60px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
}

.hero-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0.5rem;
}

.hero-banner h1 {
  color: #fff;
  margin-bottom: 0.4rem;
  text-transform: capitalize;
}

.hero-banner p {
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 0;
  position: relative;
}

.dashboard-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.dashboard-stat-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--pk-surface);
  border: 1px solid var(--pk-border);
  border-radius: var(--pk-radius);
  box-shadow: var(--pk-shadow);
  color: var(--pk-text);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  opacity: 0;
  animation: dashboard-card-in 0.4s ease forwards;
}

.dashboard-stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--pk-shadow-md);
  text-decoration: none;
  color: var(--pk-text);
  border-color: var(--pk-accent);
}

.dashboard-stat-card:hover .dashboard-stat-arrow {
  opacity: 1;
  transform: translateX(0);
}

.dashboard-stat-card:hover .dashboard-stat-icon {
  transform: scale(1.08);
}

.dashboard-stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--pk-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.dashboard-stat-icon--0 { background: var(--pk-accent-light); color: var(--pk-accent-dark); }
.dashboard-stat-icon--1 { background: var(--pk-success-bg); color: var(--pk-success); }
.dashboard-stat-icon--2 { background: var(--pk-warning-bg); color: var(--pk-warning); }
.dashboard-stat-icon--3 { background: var(--pk-danger-bg); color: var(--pk-danger); }

.dashboard-stat-body {
  flex: 1 1 auto;
  min-width: 0;
}

.dashboard-stat-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--pk-primary);
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.dashboard-stat-label {
  color: var(--pk-muted);
  font-size: 0.82rem;
}

.dashboard-stat-arrow {
  color: var(--pk-accent);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  flex-shrink: 0;
}

@keyframes dashboard-card-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dashboard-progress-track {
  display: flex;
  width: 100%;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: #eef0f4;
  margin-bottom: 1rem;
}

.dashboard-progress-segment {
  height: 100%;
  transition: width 0.6s ease;
  min-width: 0;
}

.dashboard-progress-segment--draft { background: var(--pk-muted); }
.dashboard-progress-segment--review { background: var(--pk-warning); }
.dashboard-progress-segment--published { background: var(--pk-success); }

.dashboard-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.dashboard-status-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.dashboard-status-count {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--pk-primary);
}

.dashboard-status-pct {
  font-size: 0.78rem;
  color: var(--pk-muted);
}

/* ---------------------------------------------------------------------- */
/* Permission matrix (Permissions screen)                                 */
/* ---------------------------------------------------------------------- */

.custom-control-input:checked ~ .custom-control-label::before {
  background-color: var(--pk-accent);
  border-color: var(--pk-accent);
}

.permission-toolbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.permission-role-select {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0;
}

.permission-role-select select {
  width: auto;
  min-width: 220px;
}

.permission-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.permission-stat-card {
  border-radius: var(--pk-radius);
  padding: 1.1rem 1.35rem;
  background: linear-gradient(135deg, var(--pk-primary-dark), var(--pk-accent));
  color: #fff;
  box-shadow: var(--pk-shadow-md);
}

.permission-stat-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 0.4rem;
}

.permission-stat-value {
  font-size: 1.6rem;
  font-weight: 700;
}

.permission-quick-apply {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.permission-quick-apply-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--pk-muted);
  margin-right: 0.25rem;
}

.permission-pill {
  border: 1px solid var(--pk-border);
  background: var(--pk-surface);
  color: var(--pk-text);
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.permission-pill:hover {
  color: #fff;
  background: var(--pk-accent);
  border-color: var(--pk-accent);
}

.permission-module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

.permission-module-card {
  border-radius: var(--pk-radius);
  background: var(--pk-surface);
  box-shadow: var(--pk-shadow);
  overflow: hidden;
  align-self: start;
}

.permission-module-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1rem;
  background: linear-gradient(180deg, var(--pk-primary) 0%, var(--pk-primary-dark) 100%);
  color: #fff;
  font-weight: 600;
  font-size: 0.92rem;
}

.permission-module-body {
  padding: 0.6rem 1rem;
}

.permission-resource-row {
  padding: 0.5rem 0;
}

.permission-resource-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.permission-resource-main .custom-control {
  min-height: unset;
}

.permission-resource-main .custom-control-label {
  font-size: 0.88rem;
  color: var(--pk-text);
  cursor: pointer;
}

.permission-access-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.permission-action-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.65rem;
  padding-top: 0.6rem;
  border-top: 1px dashed var(--pk-border);
}

.permission-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.7rem;
  border-radius: var(--pk-radius-sm);
  border: 1px solid var(--pk-border);
  background: var(--pk-surface);
  color: var(--pk-muted);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  margin: 0;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.permission-chip input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.permission-chip i {
  font-size: 0.72rem;
}

.permission-chip.is-checked {
  background: var(--pk-accent-light);
  border-color: var(--pk-accent);
  color: var(--pk-accent-dark);
}

.permission-chip-create.is-checked {
  background: var(--pk-success-bg);
  border-color: var(--pk-success);
  color: var(--pk-success);
}

.permission-chip-edit.is-checked {
  background: var(--pk-warning-bg);
  border-color: var(--pk-warning);
  color: var(--pk-warning);
}

.permission-chip-delete.is-checked {
  background: var(--pk-danger-bg);
  border-color: var(--pk-danger);
  color: var(--pk-danger);
}

.section-tabs i {
    margin-right: 6px !important;
}
/* ---------------------------------------------------------------------- */
/* Empty state                                                            */
/* ---------------------------------------------------------------------- */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--pk-muted);
}

.empty-state i {
  font-size: 2.5rem;
  color: var(--pk-border);
  margin-bottom: 0.75rem;
}

/* ---------------------------------------------------------------------- */
/* Responsive                                                              */
/* ---------------------------------------------------------------------- */

@media (max-width: 991.98px) {
  .sidebar {
    transform: translateX(-100%);
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
    box-shadow: var(--pk-shadow-md);
  }

  .main-area {
    margin-left: 0;
  }

  .sidebar-toggle {
    display: inline-flex;
  }
}

@media (max-width: 575.98px) {
  .content {
    padding: 1.1rem;
  }

  .detail-grid {
    grid-template-columns: 1fr;
    row-gap: 0.3rem;
  }

  .detail-grid dd {
    margin-bottom: 0.6rem;
  }
}
//chevron//
.custom-select-wrapper {
    position: relative;
    display: inline-block;
}

    .custom-select-wrapper .custom-select {
        appearance: none !important;
        -webkit-appearance: none !important;
        -moz-appearance: none !important;
        background-image: none !important;
        padding-right: 35px;
        cursor: pointer;
    }

    .custom-select-wrapper .select-chevron {
        position: absolute;
        right: 14px;
        top: 50%;
        transform: translateY(-50%);
        pointer-events: none;
        font-size: 11px;
        color: #777;
    }
/* ----------------------------------------------------- */
/* Pagination                                             */
/* ----------------------------------------------------- */

.pagination {
    gap: 0.35rem;
}

    .pagination .page-link {
        color: var(--pk-primary);
        background: #fff;
        border: 1px solid var(--pk-border);
        border-radius: var(--pk-radius-sm);
        min-width: 38px;
        height: 38px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 500;
        transition: all .2s ease;
    }

        .pagination .page-link:hover {
            background: var(--pk-primary);
            color: #fff;
            border-color: var(--pk-primary);
        }

    .pagination .page-item.active .page-link {
        background: var(--pk-primary);
        border-color: var(--pk-primary);
        color: #fff;
        box-shadow: 0 4px 12px rgba(48, 63, 94, 0.25);
    }

    .pagination .page-item.disabled .page-link {
        color: #9aa4b2;
        background: #f3f5f8;
        border-color: var(--pk-border);
    }

    .pagination .page-link:focus {
        box-shadow: none;
    }
    .pagination .page-item.disabled .page-link {
        color: #adb5bd;
        background-color: #f8f9fa;
        border-color: #dee2e6;
        cursor: not-allowed;
        pointer-events: none;
        opacity: 0.7;
    }

        .pagination .page-item.disabled .page-link:hover {
            color: #adb5bd;
            background-color: #f8f9fa;
            border-color: #dee2e6;
        }


.custom-select {
    background-image: none !important;
    appearance: auto !important;
    -webkit-appearance: auto !important;
    -moz-appearance: auto !important;
}