/* BringHR Super Admin Control Center & Settings Styles */

.superadmin-settings-container {
  display: flex;
  flex-direction: column;
  gap: 22px;
  max-width: 1360px;
  margin: 0 auto 40px;
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #1e293b;
}

/* Header Banner */
.settings-header-banner {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 60%, #1e3a8a 100%);
  border-radius: 18px;
  padding: 28px 32px;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.14);
  position: relative;
  overflow: hidden;
}

.settings-header-banner::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -40px;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.25) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.settings-header-copy h1 {
  font-family: 'Manrope', sans-serif;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.6px;
  margin: 0 0 6px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #ffffff !important;
}

.settings-header-copy p {
  color: rgba(226, 232, 240, 0.9) !important;
  font-size: 13.5px;
  margin: 0;
}

.settings-crown-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: rgba(251, 191, 36, 0.2);
  border: 1px solid rgba(251, 191, 36, 0.4);
  border-radius: 10px;
  font-size: 18px;
  color: #fbbf24;
}

.settings-header-copy p {
  color: #94a3b8;
  font-size: 13px;
  margin: 0;
  max-width: 640px;
  line-height: 1.5;
}

.settings-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  z-index: 2;
}

.settings-tenant-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 9999px;
  padding: 6px 14px;
  font-size: 11px;
  font-weight: 700;
  color: #e2e8f0;
  letter-spacing: 0.4px;
}

.settings-tenant-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25);
}

.btn-settings-save {
  background: #2563eb;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 8px 18px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
  transition: all 0.18s;
}

.btn-settings-save:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
}

.btn-settings-secondary {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.18s;
}

.btn-settings-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Navigation Tabs Bar */
.settings-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 8px 12px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.settings-tab-list {
  display: flex;
  align-items: center;
  gap: 6px;
}

.settings-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: #475569;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.16s ease;
}

.settings-tab-btn:hover {
  color: #0f172a;
  background: #f1f5f9;
}

.settings-tab-btn.is-active {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.08);
}

.settings-tab-icon {
  font-size: 15px;
}

/* Global Search & Filter Bar */
.settings-filter-bar {
  display: flex;
  align-items: center;
  gap: 14px;
}

.settings-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0 12px;
  height: 38px;
  width: 280px;
  transition: all 0.18s;
}

.settings-search-box:focus-within {
  background: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  width: 320px;
}

.settings-search-box input {
  border: none;
  background: transparent;
  outline: none;
  width: 100%;
  font-size: 12.5px;
  color: #0f172a;
}

.settings-search-box input::placeholder {
  color: #94a3b8;
}

/* Content Container Card */
.settings-content-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 28px 32px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.03);
}

/* Tab 1: RBAC Role & User Assignment */
.rbac-section-title {
  font-family: 'Manrope', sans-serif;
  font-size: 17px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 4px;
}

.rbac-section-sub {
  font-size: 12.5px;
  color: #64748b;
  margin: 0 0 18px;
}

.rbac-user-table-wrap {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 32px;
}

.rbac-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.rbac-table th {
  background: #f8fafc;
  padding: 12px 16px;
  font-size: 11px;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
}

.rbac-table td {
  padding: 13px 16px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.rbac-table tr:last-child td {
  border-bottom: none;
}

.rbac-table tr:hover td {
  background: #f8fafc;
}

.rbac-user-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rbac-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #eff6ff;
  color: #1d4ed8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
}

.rbac-user-copy strong {
  display: block;
  font-size: 13px;
  color: #0f172a;
}

.rbac-user-copy small {
  font-size: 11px;
  color: #64748b;
}

.role-select-input {
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 600;
  color: #1e293b;
  background: #ffffff;
  outline: none;
  cursor: pointer;
}

.role-select-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

/* Permissions Matrix */
.perm-matrix-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
}

.role-picker-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 10px;
}

.role-picker-btn {
  border: none;
  background: transparent;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s;
}

.role-picker-btn.is-active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.perm-quick-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.perm-action-pill {
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #475569;
  font-size: 11px;
  font-weight: 700;
  border-radius: 6px;
  padding: 4px 10px;
  cursor: pointer;
  transition: all 0.15s;
}

.perm-action-pill:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
}

/* Permissions Grid */
.perm-modules-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.perm-module-card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
}

.perm-module-head {
  background: #f8fafc;
  padding: 10px 16px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.perm-module-title {
  font-size: 12.5px;
  font-weight: 700;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 8px;
}

.perm-items-list {
  padding: 12px 16px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.perm-item-checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid #f1f5f9;
  border-radius: 8px;
  transition: background 0.15s;
  cursor: pointer;
}

.perm-item-checkbox-row:hover {
  background: #f8fafc;
}

.perm-item-checkbox-row input[type='checkbox'] {
  width: 17px;
  height: 17px;
  border: 1.5px solid #cbd5e1;
  border-radius: 4px;
  accent-color: #2563eb;
  cursor: pointer;
  margin-top: 2px;
}

.perm-item-text strong {
  display: block;
  font-size: 12px;
  color: #0f172a;
  line-height: 1.3;
}

.perm-item-text span {
  font-size: 11px;
  color: #64748b;
  line-height: 1.3;
}

/* Tab 2: Dashboard & Card Setup (Tick / Untick & Filters) */
.card-filter-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 12px;
}

.card-category-pills {
  display: flex;
  align-items: center;
  gap: 6px;
}

.card-cat-pill {
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #64748b;
  font-size: 11.5px;
  font-weight: 700;
  border-radius: 20px;
  padding: 5px 13px;
  cursor: pointer;
  transition: all 0.15s;
}

.card-cat-pill:hover {
  color: #0f172a;
  border-color: #cbd5e1;
}

.card-cat-pill.is-active {
  background: #1e293b;
  color: #ffffff;
  border-color: #1e293b;
}

.cards-accordion-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.card-setup-item {
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  background: #ffffff;
  overflow: hidden;
  transition: border-color 0.18s, box-shadow 0.18s;
}

.card-setup-item:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}

.card-setup-item.is-disabled {
  opacity: 0.7;
  border-style: dashed;
}

.card-setup-header {
  padding: 14px 20px;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
}

.card-setup-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.card-master-switch {
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-master-checkbox {
  width: 19px;
  height: 19px;
  accent-color: #2563eb;
  cursor: pointer;
}

.card-setup-title-box strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

.card-setup-title-box span {
  font-size: 11.5px;
  color: #64748b;
}

.card-setup-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.card-category-tag {
  background: #e2e8f0;
  color: #334155;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 6px;
}

.card-details-count {
  font-size: 11.5px;
  font-weight: 600;
  color: #2563eb;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  border-radius: 20px;
  padding: 3px 10px;
}

.card-expand-icon {
  font-size: 12px;
  color: #64748b;
  transition: transform 0.2s;
}

.card-setup-item.is-open .card-expand-icon {
  transform: rotate(180deg);
}

/* Sub-details checklist container */
.card-details-body {
  padding: 18px 20px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: #ffffff;
}

.card-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 10px;
}

.subdetail-toggle-box {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #f8fafc;
  border: 1px solid #eef2f6;
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.15s;
}

.subdetail-toggle-box:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.subdetail-toggle-box input[type='checkbox'] {
  width: 17px;
  height: 17px;
  accent-color: #2563eb;
  cursor: pointer;
  margin-top: 1px;
}

.subdetail-copy strong {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.35;
}

.subdetail-copy span {
  font-size: 11px;
  color: #64748b;
  line-height: 1.3;
}

/* Tab 3: Enterprise & Statutory Policies */
.settings-form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.settings-policy-block {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 20px 22px;
  background: #ffffff;
}

.policy-block-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f1f5f9;
}

.policy-block-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #eff6ff;
  color: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.policy-block-head h3 {
  font-family: 'Manrope', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

.policy-fields-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.policy-field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-size: 12.5px;
}

.policy-field-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.policy-field-label strong {
  color: #1e293b;
  font-size: 12.5px;
}

.policy-field-label small {
  color: #64748b;
  font-size: 11px;
}

.policy-input-text,
.policy-input-select {
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12.5px;
  font-weight: 500;
  color: #0f172a;
  outline: none;
  background: #ffffff;
  min-width: 140px;
  text-align: right;
}

.policy-input-select {
  text-align: left;
}

.policy-input-text:focus,
.policy-input-select:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.policy-toggle-switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 24px;
}

.policy-toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.policy-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #cbd5e1;
  transition: 0.2s;
  border-radius: 24px;
}

.policy-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.2s;
  border-radius: 50%;
}

.policy-toggle-switch input:checked + .policy-slider {
  background-color: #2563eb;
}

.policy-toggle-switch input:checked + .policy-slider:before {
  transform: translateX(18px);
}

/* Tab 4: Dynamic Registry & Extensibility Engine */
.ext-engine-card {
  border: 1.5px dashed #bfdbfe;
  background: #f8faff;
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 24px;
}

.ext-engine-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.ext-engine-head h3 {
  font-family: 'Manrope', sans-serif;
  font-size: 16px;
  font-weight: 800;
  color: #1e3a8a;
  margin: 0;
}

.btn-add-custom-card {
  background: #2563eb;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s;
}

.btn-add-custom-card:hover {
  background: #1d4ed8;
}

.schema-inspector-box {
  background: #0f172a;
  border-radius: 10px;
  padding: 16px;
  color: #93c5fd;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11.5px;
  max-height: 280px;
  overflow: auto;
}

/* Modal Dialog for Registering Custom Card */
.custom-card-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.custom-card-modal {
  width: 100%;
  max-width: 520px;
  background: #ffffff;
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.25);
}

.custom-card-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e2e8f0;
}

.custom-card-modal-header h3 {
  font-family: 'Manrope', sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

.modal-close-btn {
  background: transparent;
  border: none;
  font-size: 20px;
  color: #64748b;
  cursor: pointer;
}

/* Responsiveness */
@media (max-width: 1024px) {
  .settings-form-grid {
    grid-template-columns: 1fr;
  }
  .settings-header-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
}

@media (max-width: 768px) {
  .settings-nav-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .settings-tab-list {
    flex-wrap: wrap;
  }
  .settings-search-box {
    width: 100%;
  }
  .card-details-grid {
    grid-template-columns: 1fr;
  }
}


/* Sub-route Target Highlight Pulse */
.card-setup-item.is-targeted {
  border-color: #6366f1 !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25) !important;
  animation: targetPulse 1.8s ease-in-out;
}

@keyframes targetPulse {
  0% { transform: scale(0.99); }
  50% { transform: scale(1.01); }
  100% { transform: scale(1); }
}

/* Navigation & Tab Access RBAC Styles */
.nav-rbac-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.nav-rbac-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.nav-discovery-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1px;
}

.nav-discovery-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
  animation: pulseGreen 2s infinite;
}

@keyframes pulseGreen {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.nav-role-banner {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px 18px;
  margin-top: 8px;
}

.nav-workspaces-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.nav-workspace-card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
  padding: 16px 20px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  transition: all 0.2s ease;
}

.nav-workspace-card.is-disabled {
  opacity: 0.65;
  background: #fafafa;
}

.nav-workspace-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

.nav-workspace-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding-bottom: 14px;
  border-bottom: 1px solid #f1f5f9;
}

.nav-ws-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-ws-badge {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #f1f5f9;
  color: #0f172a;
  font-weight: 800;
  font-size: 16px;
}

.nav-ws-title {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
}

.nav-ws-sub {
  color: #64748b;
  font-size: 12px;
}

.nav-stat-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
}

.nav-stat-pill.is-active {
  background: #e0e7ff;
  color: #4338ca;
}

.nav-ws-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-mini-btn {
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #475569;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.nav-mini-btn:hover {
  background: #f8fafc;
  color: #0f172a;
  border-color: #cbd5e1;
}

.nav-master-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  background: #f8fafc;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  transition: background 0.15s;
}

.nav-master-switch:hover {
  background: #f1f5f9;
}

.nav-master-switch input {
  accent-color: #6366f1;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.nav-master-label {
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
}

.nav-subtabs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.nav-subtab-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #f1f5f9;
  background: #f8fafc;
  cursor: pointer;
  transition: all 0.15s ease;
}

.nav-subtab-item:hover {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}

.nav-subtab-item.is-checked {
  background: #ffffff;
  border-color: #e2e8f0;
}

.nav-subtab-item input {
  accent-color: #6366f1;
  width: 15px;
  height: 15px;
  margin-top: 2px;
  cursor: pointer;
}

.nav-subtab-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.nav-subtab-copy strong {
  font-size: 12.5px;
  color: #1e293b;
  line-height: 1.3;
}

.nav-group-tag {
  font-size: 10px;
  font-weight: 600;
  color: #64748b;
}

/* Manager Toggle & Custom Access Buttons */
.btn-manager-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 11.5px;
  font-weight: 700;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-manager-toggle:hover {
  border-color: #94a3b8;
  background: #f1f5f9;
}

.btn-manager-toggle.is-active {
  background: #eff6ff;
  border-color: #3b82f6;
  color: #1d4ed8;
  box-shadow: 0 1px 3px rgba(59, 130, 246, 0.15);
}

.btn-custom-access {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 700;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.btn-custom-access:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
}

.btn-custom-access.has-overrides {
  background: #fdf4ff;
  border-color: #d946ef;
  color: #86198f;
}

.access-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 9999px;
  background: #a855f7;
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
}

/* Custom Access Modal */
.custom-access-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.custom-access-modal {
  background: #ffffff;
  border-radius: 16px;
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  animation: modalPop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.custom-access-modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fafafa;
}

.custom-access-modal-header h3 {
  font-family: 'Manrope', sans-serif;
  font-size: 17px;
  font-weight: 800;
  margin: 0;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
}

.custom-access-modal-header small {
  display: block;
  font-size: 12px;
  color: #64748b;
  margin-top: 3px;
}

.custom-access-modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.omni-access-banner {
  background: linear-gradient(135deg, #fef3c7 0%, #fae8ff 100%);
  border: 1.5px solid #f59e0b;
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.omni-banner-copy strong {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  color: #78350f;
  font-weight: 800;
}

.omni-banner-copy p {
  font-size: 11.5px;
  color: #92400e;
  margin: 3px 0 0;
  line-height: 1.4;
}

.custom-access-section-title {
  font-size: 12px;
  font-weight: 800;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.custom-access-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.custom-access-chip {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  background: #f8fafc;
  transition: all 0.15s;
}

.custom-access-chip:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.custom-access-chip.is-checked {
  background: #eff6ff;
  border-color: #3b82f6;
}

.custom-access-chip input {
  margin-top: 2px;
  cursor: pointer;
}

.custom-access-chip-text strong {
  display: block;
  font-size: 12px;
  color: #0f172a;
}

.custom-access-chip-text span {
  display: block;
  font-size: 10.5px;
  color: #64748b;
  line-height: 1.3;
}

.custom-access-modal-footer {
  padding: 14px 24px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fafafa;
}

/* Super Admin God Mode Banner */
.superadmin-godmode-banner {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 1.5px solid #fbbf24;
  border-radius: 12px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  color: #92400e;
}

.superadmin-godmode-banner strong {
  font-size: 13.5px;
  color: #78350f;
  display: block;
}

.superadmin-godmode-banner p {
  margin: 2px 0 0;
  font-size: 12px;
  color: #92400e;
}

/* =====================================================================
 * HRMS MASTER SETUP ("SETUP ANYTHING") STYLES
 * ===================================================================== */
.master-setup-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.master-subnav {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 10px;
  border-bottom: 1px solid #e2e8f0;
}

.master-nav-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.16s ease;
}

.master-nav-pill:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #0f172a;
}

.master-nav-pill.is-active {
  background: #eff6ff;
  border-color: #3b82f6;
  color: #1d4ed8;
  box-shadow: 0 2px 6px rgba(59, 130, 246, 0.12);
}

.master-nav-emoji {
  font-size: 14px;
}

.master-section-intro {
  margin-bottom: 16px;
}

.master-section-intro h3 {
  font-size: 17px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.master-section-intro p {
  font-size: 12.5px;
  color: #64748b;
  margin: 0;
  line-height: 1.5;
}

.master-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 20px 22px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
}

.master-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f1f5f9;
}

.master-card-head h4 {
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.master-card-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  background: #f1f5f9;
  color: #475569;
  border-radius: 6px;
}

.master-form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.master-form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.master-form-field label {
  font-size: 12px;
  font-weight: 700;
  color: #334155;
}

.master-field-full {
  grid-column: 1 / -1;
}

.master-field-toggle {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}

.master-field-toggle strong {
  display: block;
  font-size: 12.5px;
  color: #0f172a;
}

.master-field-toggle small {
  display: block;
  font-size: 11px;
  color: #64748b;
  margin-top: 2px;
}

.master-input,
.master-select {
  height: 38px;
  padding: 0 12px;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  font-size: 13px;
  color: #0f172a;
  background: #ffffff;
  outline: none;
  transition: all 0.16s ease;
}

.master-input:focus,
.master-select:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.master-color-picker {
  width: 42px;
  height: 38px;
  padding: 2px;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  cursor: pointer;
  background: #ffffff;
}

.master-table-responsive {
  overflow-x: auto;
}

.master-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.master-table th {
  background: #f8fafc;
  padding: 10px 14px;
  text-align: left;
  font-weight: 700;
  color: #475569;
  border-bottom: 1px solid #e2e8f0;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.master-table td {
  padding: 11px 14px;
  border-bottom: 1px solid #f1f5f9;
  color: #1e293b;
}

.master-table tr:last-child td {
  border-bottom: none;
}

.master-badge {
  display: inline-block;
  padding: 2px 8px;
  background: #f1f5f9;
  color: #475569;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
}

.master-badge-blue {
  background: #eff6ff;
  color: #1d4ed8;
}

.master-badge-purple {
  background: #f3e8ff;
  color: #7e22ce;
}

.master-badge-green {
  background: #dcfce7;
  color: #15803d;
}

.master-badge-orange {
  background: #ffedd5;
  color: #c2410c;
}

.btn-master-add {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #2563eb;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.16s ease;
}

.btn-master-add:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
}

.btn-master-del {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.14s ease;
}

.btn-master-del:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  transform: scale(1.05);
}

.master-setup-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  margin-top: 10px;
}

.master-footer-note {
  font-size: 12px;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 6px;
}

