@import url("https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "DM Sans", sans-serif;
  background: linear-gradient(
    135deg,
    var(--accent) 0%,
    var(--accent-light) 100%
  );
  min-height: 100vh;
  overflow: hidden;
}

/* =============================================
   OUTER LAYOUT (matches dashboard exactly)
   ============================================= */
.dashboard-container {
  display: flex;
  height: 100vh;
  padding: 20px;
  gap: 0;
}

/* =============================================
   LEFT SIDEBAR (identical to dashboard)
   ============================================= */
.sidebar {
  width: 260px;
  min-width: 260px;
  background: linear-gradient(
    180deg,
    var(--sidebar-bg-start) 0%,
    var(--sidebar-bg-end) 100%
  );
  border-radius: 20px 0 0 20px;
  border: 3px solid var(--accent-dark);
  border-right: none;
  display: flex;
  flex-direction: column;
  transition:
    width 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    min-width 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    border-radius 0.35s;
  overflow: hidden;
  position: relative;
  z-index: 10;
}
.sidebar.collapsed {
  width: 0;
  min-width: 0;
  border-width: 0;
}

.sidebar-header {
  padding: 28px 25px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  white-space: nowrap;
}
.sidebar-logo {
  width: 34px;
  height: 34px;
  object-fit: contain;
  flex: 0 0 34px;
}
.sidebar-header h2 {
  color: white;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 8px 0;
  overflow: hidden;
}

.nav-item {
  padding: 12px 25px;
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition:
    background-color 0.2s,
    color 0.2s,
    padding-left 0.2s;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-item:hover {
  background-color: white;
  color: var(--sidebar-bg-start);
  padding-left: 32px;
}
.nav-item.active {
  background-color: white;
  color: var(--sidebar-bg-start);
  font-weight: 700;
}
.nav-item.nav-locked {
  opacity: 0.55;
  cursor: not-allowed;
}
.nav-item.nav-locked:hover {
  background-color: rgba(244, 67, 54, 0.08);
  color: rgba(255, 255, 255, 0.88);
  padding-left: 25px;
}
.nav-icon {
  font-size: 18px;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}

.sidebar-footer {
  padding: 18px 25px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
  white-space: nowrap;
}

/* =============================================
   MAIN CONTENT
   ============================================= */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  background-color: white;
  border-radius: 0 20px 20px 0;
  overflow: hidden;
  border: 3px solid var(--accent-dark);
  border-left: none;
  transition: border-radius 0.35s;
  min-width: 0;
}
.main-content.full-radius {
  border-radius: 20px;
  border-left: 3px solid var(--accent-dark);
}

/* =============================================
   HEADER (matches dashboard)
   ============================================= */
.dashboard-header {
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  padding: 20px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 3px solid var(--accent-dark);
  flex-shrink: 0;
  gap: 16px;
}

.sidebar-toggle {
  background: rgba(255, 255, 255, 0.18);
  border: none;
  border-radius: 10px;
  width: 42px;
  height: 42px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: background 0.2s;
  flex-shrink: 0;
}
.sidebar-toggle:hover {
  background: rgba(255, 255, 255, 0.3);
}
.toggle-bar {
  width: 20px;
  height: 2px;
  background: white;
  border-radius: 2px;
  transition: all 0.3s;
  transform-origin: center;
}
.sidebar-toggle.open .toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.sidebar-toggle.open .toggle-bar:nth-child(2) {
  opacity: 0;
}
.sidebar-toggle.open .toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.header-title {
  flex: 1;
}
.dashboard-header h1 {
  color: white;
  font-size: 24px;
  font-weight: 700;
}
.dashboard-header .subtitle {
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  margin-top: 2px;
}

.user-menu {
  position: relative;
}
.user-badge {
  background-color: var(--text-muted);
  padding: 10px 20px;
  border-radius: 25px;
  color: var(--text);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
  white-space: nowrap;
}
.user-badge:hover {
  background-color: var(--text-muted);
}
.dropdown-arrow {
  font-size: 11px;
  transition: transform 0.3s;
}
.user-badge.active .dropdown-arrow {
  transform: rotate(180deg);
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
  min-width: 180px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s;
  z-index: 1000;
  overflow: hidden;
  border: 1.5px solid var(--surface-alt);
}
.user-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dropdown-item {
  display: block;
  padding: 13px 20px;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  border-bottom: 1px solid var(--surface-alt);
  transition: all 0.2s;
}
.dropdown-item:last-child {
  border-bottom: none;
}
.dropdown-item:hover {
  background-color: var(--accent);
  color: white;
}

/* =============================================
   SETTINGS LAYOUT (two-column inside main)
   ============================================= */
.settings-layout {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* =============================================
   SETTINGS LEFT NAV
   ============================================= */
.settings-sidebar {
  width: 260px;
  min-width: 260px;
  background: var(--surface-alt);
  border-right: 2px solid var(--surface-alt);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) var(--surface-alt);
}

.settings-search {
  padding: 16px;
  position: relative;
  border-bottom: 1px solid var(--surface-alt);
  flex-shrink: 0;
}
.settings-search i {
  position: absolute;
  left: 28px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 13px;
}
.settings-search input {
  width: 100%;
  padding: 9px 12px 9px 34px;
  border: 1.5px solid var(--surface-alt);
  border-radius: 20px;
  font-size: 13px;
  background: white;
  font-family: inherit;
}
.settings-search input:focus {
  outline: none;
  border-color: var(--accent);
}

.settings-nav {
  padding: 8px 0;
}

.settings-nav-group {
  margin-bottom: 4px;
}

.nav-group-label {
  display: block;
  padding: 10px 18px 4px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.settings-nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 18px;
  background: none;
  border: none;
  text-align: left;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.18s;
  font-family: inherit;
  border-radius: 0;
  position: relative;
}
.settings-nav-item i {
  width: 16px;
  text-align: center;
  color: var(--text-muted);
  flex-shrink: 0;
}
.settings-nav-item:hover {
  background: var(--surface-alt);
  color: var(--sidebar-bg-start);
}
.settings-nav-item:hover i {
  color: var(--accent);
}
.settings-nav-item.active {
  background: var(--sidebar-bg-start);
  color: white;
  font-weight: 600;
}
.settings-nav-item.active i {
  color: rgba(255, 255, 255, 0.8);
}
.settings-nav-item.locked {
  opacity: 0.45;
  cursor: not-allowed;
}
.settings-nav-item.locked:hover {
  background: rgba(244, 67, 54, 0.06);
  color: var(--text-muted);
}

.perm-badge {
  margin-left: auto;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--surface-alt);
  color: var(--text-muted);
  padding: 2px 6px;
  border-radius: 10px;
  flex-shrink: 0;
}
.settings-nav-item.active .perm-badge {
  background: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.7);
}
.danger-badge {
  background: var(--danger);
  color: var(--danger);
}
.settings-nav-item.active .danger-badge {
  background: rgba(244, 67, 54, 0.25);
  color: var(--border);
}

/* =============================================
   SETTINGS CONTENT PANEL
   ============================================= */
.settings-content {
  flex: 1;
  overflow-y: auto;
  padding: 28px 32px;
  background: linear-gradient(
    160deg,
    var(--surface-alt) 0%,
    var(--surface-alt) 100%
  );
  scrollbar-width: thin;
  scrollbar-color: var(--accent) var(--surface-alt);
}
.settings-content::-webkit-scrollbar {
  width: 6px;
}
.settings-content::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 3px;
}

/* =============================================
   SECTIONS
   ============================================= */
.settings-section {
  display: none;
}
.settings-section.active {
  display: block;
  animation: sectionFadeIn 0.25s ease;
}

@keyframes sectionFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Section Header */
.section-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}
.section-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--sidebar-bg-end));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  flex-shrink: 0;
}
.danger-icon {
  background: linear-gradient(135deg, var(--danger), var(--danger));
}
.section-header h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--accent-dark);
  margin-bottom: 3px;
}
.section-header p {
  font-size: 13px;
  color: var(--text-muted);
}
.section-perm-badge {
  margin-left: auto;
  background: var(--surface-alt);
  border: 1.5px solid var(--warning);
  color: var(--warning);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.superuser-badge {
  background: var(--surface-alt);
  border-color: var(--warning);
  color: var(--warning);
}

/* =============================================
   SETTINGS CARDS
   ============================================= */
.settings-card {
  background: white;
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
  border: 1.5px solid var(--surface-alt);
  padding: 24px;
  margin-bottom: 20px;
}
.card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent-dark);
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1.5px solid var(--surface-alt);
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-title::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 16px;
  background: linear-gradient(180deg, var(--accent), var(--sidebar-bg-end));
  border-radius: 2px;
}

.card-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--surface-alt);
}

/* =============================================
   FORM ELEMENTS
   ============================================= */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.form-group.span-2 {
  grid-column: 1 / -1;
}

.form-group label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.required {
  color: var(--danger);
}
.hint {
  color: var(--text-muted);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}

.form-input {
  padding: 10px 13px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: var(--surface-alt);
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
  width: 100%;
}
.form-input:focus {
  outline: none;
  border-color: var(--accent);
  background: white;
  box-shadow: 0 0 0 3px rgba(107, 124, 80, 0.12);
}
.form-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

textarea.form-input {
  resize: vertical;
  min-height: 80px;
}
select.form-input {
  cursor: pointer;
}

.form-hint {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* =============================================
   TOGGLE SWITCH
   ============================================= */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}
.toggle-switch input {
  display: none;
}
.slider {
  position: absolute;
  inset: 0;
  background: var(--border);
  border-radius: 24px;
  cursor: pointer;
  transition: background 0.25s;
}
.slider::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: transform 0.25s;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}
.toggle-switch input:checked + .slider {
  background: var(--accent);
}
.toggle-switch input:checked + .slider::before {
  transform: translateX(20px);
}

/* Toggle rows */
.toggle-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.toggle-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--surface-alt);
}
.toggle-row:last-child {
  border-bottom: none;
}
.toggle-info {
  flex: 1;
}
.toggle-info strong {
  font-size: 14px;
  color: var(--text);
  display: block;
  margin-bottom: 3px;
}
.toggle-info p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
  margin: 0;
}

/* =============================================
   OPERATING HOURS
   ============================================= */
.hours-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.hours-row {
  display: grid;
  grid-template-columns: 120px 60px 1fr 1fr;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--surface-alt);
}
.hours-row:last-child {
  border-bottom: none;
}
.header-row {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  padding-bottom: 8px;
}
.day-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.time-input {
  padding: 7px 10px;
  font-size: 13px;
}

/* =============================================
   THEME SELECTOR
   ============================================= */
.theme-options {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 4px;
}
.theme-option {
  cursor: pointer;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  transition: all 0.2s;
  position: relative;
  background: #ffffff;
}
.theme-option input {
  display: none;
}
.theme-option:hover {
  border-color: #0ea5e9;
}
.theme-option.selected {
  border-color: #0ea5e9;
  background: #f8fafc;
  color: #0f4c81;
}
.theme-preview {
  width: 100%;
  height: 50px;
  border-radius: 8px;
}
/* Blue Theme Preview (default :root) */
.blue-theme {
  background: linear-gradient(135deg, #0284c7, #0ea5e9) !important;
}
/* Green Theme Preview (healing-green) */
.green-theme {
  background: linear-gradient(135deg, #14532d, #16a34a) !important;
}
/* Blue Teal Theme Preview (blue-teal) */
.teal-theme {
  background: linear-gradient(135deg, #0f766e, #14b8a6) !important;
}
/* Black & White Theme Preview (black-white) */
.black-white-theme {
  background: linear-gradient(135deg, #111827, #374151) !important;
}
/* Dark Theme Preview (dark-mode) */
.dark-theme {
  background: linear-gradient(135deg, #0f172a, #3b82f6) !important;
}
.theme-check {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 20px;
  height: 20px;
  background: #0ea5e9;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 10px;
  opacity: 0;
  transition: opacity 0.2s;
}
.theme-option.selected .theme-check {
  opacity: 1;
}

/* =============================================
   PAYMENT METHODS
   ============================================= */
.payment-methods-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.payment-method-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--surface-alt);
}
.payment-method-row:last-child {
  border-bottom: none;
}
.payment-icon {
  font-size: 22px;
  width: 32px;
  text-align: center;
  flex-shrink: 0;
}
.payment-icon.cash {
  color: var(--success);
}
.payment-icon.mobile {
  color: var(--warning);
}
.payment-icon.card {
  color: var(--primary);
}
.payment-icon.insurance {
  color: var(--primary);
}
.payment-icon.credit {
  color: var(--danger);
}
.payment-info {
  flex: 1;
}
.payment-info strong {
  font-size: 14px;
  color: var(--text);
  display: block;
  margin-bottom: 2px;
}
.payment-info p {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
}

/* =============================================
   AUDIT LOG TABLE
   ============================================= */
.audit-filter-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}
.audit-filter {
  max-width: 220px;
}
.audit-log-table {
  border: 1.5px solid var(--surface-alt);
  border-radius: 10px;
  overflow: hidden;
}
.audit-log-header {
  display: grid;
  grid-template-columns: 140px 120px 110px 1fr 110px;
  background: var(--surface-alt);
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  gap: 8px;
}
.audit-log-row {
  display: grid;
  grid-template-columns: 140px 120px 110px 1fr 110px;
  padding: 12px 14px;
  font-size: 12.5px;
  border-top: 1px solid var(--surface-alt);
  gap: 8px;
  align-items: center;
  transition: background 0.15s;
}
.audit-log-row:hover {
  background: var(--surface-alt);
}
.warning-row {
  background: var(--surface-alt);
}
.warning-row:hover {
  background: var(--surface-alt);
}
.audit-time {
  color: var(--text-muted);
  font-size: 12px;
}
.audit-user {
  font-weight: 600;
  color: var(--text);
}
.audit-detail {
  color: var(--text-muted);
}
.audit-ip {
  color: var(--text-muted);
  font-size: 11px;
  font-family: monospace;
}

.tag {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: inline-block;
}
.tag-sale {
  background: var(--surface-alt);
  color: var(--success);
}
.tag-login {
  background: var(--surface-alt);
  color: var(--primary-dark);
}
.tag-stock {
  background: var(--surface-alt);
  color: var(--warning);
}
.tag-perm {
  background: var(--surface-alt);
  color: var(--primary);
}
.tag-fail {
  background: var(--danger);
  color: var(--danger);
}

/* =============================================
   SESSIONS
   ============================================= */
.sessions-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.session-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--surface-alt);
}
.session-row:last-child {
  border-bottom: none;
}
.current-session {
  background: var(--surface-alt);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 4px;
}
.session-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--surface-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 18px;
  flex-shrink: 0;
}
.session-info {
  flex: 1;
}
.session-info strong {
  font-size: 14px;
  color: var(--text);
  display: block;
  margin-bottom: 3px;
}
.session-info p {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0 0 2px;
}
.session-time {
  color: var(--accent) !important;
  font-weight: 600 !important;
}
.current-tag {
  background: var(--accent);
  color: white;
  font-size: 10px;
  padding: 1px 7px;
  border-radius: 10px;
  font-weight: 600;
  margin-left: 6px;
}

/* =============================================
   BACKUP / RESTORE
   ============================================= */
.restore-upload-zone {
  border: 2px dashed var(--surface-alt);
  border-radius: 12px;
  padding: 40px 24px;
  text-align: center;
  color: var(--text-muted);
  transition: all 0.2s;
  cursor: pointer;
}
.restore-upload-zone:hover {
  border-color: var(--accent);
  background: var(--surface-alt);
  color: var(--accent);
}
.restore-upload-zone i {
  font-size: 40px;
  margin-bottom: 12px;
  display: block;
}
.restore-upload-zone p {
  font-size: 14px;
  margin-bottom: 6px;
}
.upload-hint {
  font-size: 12px;
  color: var(--text-muted);
}
.link-btn {
  background: none;
  border: none;
  color: var(--accent);
  font-weight: 700;
  cursor: pointer;
  font-size: inherit;
  text-decoration: underline;
  padding: 0;
}

/* =============================================
   API KEY
   ============================================= */
.api-key-row {
  display: flex;
  align-items: flex-end;
  gap: 12px;
}
.api-key-field {
  display: flex;
  gap: 8px;
}
.api-key-field .form-input {
  font-family: monospace;
  font-size: 13px;
}
.btn-icon {
  padding: 10px 13px;
}

/* =============================================
   INTEGRATIONS
   ============================================= */
.integration-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.integration-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--surface-alt);
}
.integration-row:last-child {
  border-bottom: none;
}
.integration-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  color: white;
}
.integration-icon.rssb {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}
.integration-icon.mtn {
  background: linear-gradient(135deg, var(--warning), var(--warning));
}
.integration-icon.sms {
  background: linear-gradient(135deg, var(--success), var(--success));
}
.integration-icon.accounting {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}
.integration-info {
  flex: 1;
}
.integration-info strong {
  font-size: 14px;
  color: var(--text);
  display: block;
  margin-bottom: 2px;
}
.integration-info p {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
}
.integration-status {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  flex-shrink: 0;
}
.connected {
  background: var(--surface-alt);
  color: var(--success);
}
.disconnected {
  background: var(--danger);
  color: var(--danger);
}

/* =============================================
   DANGER ZONE
   ============================================= */
.danger-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.danger-action-card {
  background: white;
  border: 1.5px solid var(--surface-alt);
  border-radius: 12px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  transition: border-color 0.2s;
}
.danger-action-card:hover {
  border-color: var(--border);
}
.danger-critical {
  border-color: var(--border);
  background: var(--surface-alt);
}
.danger-action-info {
  flex: 1;
}
.danger-action-info h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.danger-action-info h4 i {
  color: var(--danger);
}
.danger-action-info p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0;
}

/* =============================================
   WARNING / INFO BANNERS
   ============================================= */
.warning-banner {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--surface-alt);
  border: 1.5px solid var(--warning);
  border-left: 6px solid var(--warning);
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 20px;
  color: var(--warning);
}
.warning-banner i {
  font-size: 20px;
  flex-shrink: 0;
  margin-top: 2px;
}
.warning-banner strong {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
}
.warning-banner p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
}
.warning-orange {
  background: var(--surface-alt);
  border-color: var(--warning);
  color: var(--warning);
}
.warning-orange i,
.warning-orange strong {
  color: var(--warning);
}

.danger-banner {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--danger);
  border: 1.5px solid var(--danger);
  border-left: 6px solid var(--danger);
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 20px;
  color: var(--danger);
}
.danger-banner i {
  font-size: 22px;
  flex-shrink: 0;
  margin-top: 2px;
}
.danger-banner strong {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
}
.danger-banner p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
}

/* Access Denied Overlay (inside content) */
.access-denied-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 30px;
  color: var(--text-muted);
}
.access-denied-section i {
  font-size: 64px;
  color: var(--surface-alt);
  margin-bottom: 20px;
}
.access-denied-section h3 {
  font-size: 20px;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.access-denied-section p {
  font-size: 14px;
  max-width: 360px;
  line-height: 1.6;
}

/* =============================================
   MODAL
   ============================================= */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(3px);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}
.modal-overlay.active {
  display: flex;
}
.modal-content {
  background: white;
  border-radius: 16px;
  width: 90%;
  max-width: 480px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  animation: modalIn 0.28s ease;
  overflow: hidden;
}
@keyframes modalIn {
  from {
    transform: translateY(24px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--surface-alt);
  display: flex;
  align-items: center;
  gap: 10px;
}
.modal-header h2 {
  font-size: 17px;
  color: var(--text);
}
.danger-header {
  background: var(--danger);
}
.danger-header h2 {
  color: var(--danger);
}
.modal-body {
  padding: 24px;
}
.modal-body p {
  margin-bottom: 16px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
}
.modal-footer {
  padding: 18px 24px;
  border-top: 1px solid var(--surface-alt);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.confirm-input-group {
  margin-top: 16px;
}
.confirm-input-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

/* =============================================
   BUTTONS
   ============================================= */
.btn {
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: all 0.2s;
  font-family: inherit;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: white;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(107, 124, 80, 0.3);
}
.btn-secondary {
  background: var(--surface-alt);
  color: var(--text-muted);
}
.btn-secondary:hover {
  background: var(--surface-alt);
}
.btn-danger {
  background: var(--danger);
  color: white;
}
.btn-danger:hover {
  background: var(--danger);
  transform: translateY(-1px);
}
.btn-warning {
  background: var(--warning);
  color: white;
}
.btn-warning:hover {
  background: var(--warning);
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}
.btn-sm {
  padding: 7px 14px;
  font-size: 12px;
}

/* =============================================
   TOAST NOTIFICATIONS
   ============================================= */
#toastContainer {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
@keyframes toastOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
    transform: translateX(20px);
  }
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1200px) {
  .settings-sidebar {
    width: 220px;
    min-width: 220px;
  }
  .theme-options {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 1024px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-group.span-2 {
    grid-column: 1;
  }
  .audit-log-header,
  .audit-log-row {
    grid-template-columns: 120px 100px 90px 1fr 90px;
  }
}
@media (max-width: 768px) {
  body {
    overflow: auto;
  }
  .dashboard-container {
    flex-direction: column;
    height: auto;
  }
  .sidebar {
    width: 100%;
    min-width: 100%;
    border-radius: 20px 20px 0 0;
    border-right: 3px solid var(--accent-dark);
    border-bottom: none;
  }
  .main-content {
    border-radius: 0 0 20px 20px;
    border-left: 3px solid var(--accent-dark);
    border-top: none;
    overflow: visible;
  }
  .settings-layout {
    flex-direction: column;
  }
  .settings-sidebar {
    width: 100%;
    min-width: 100%;
    border-right: none;
    border-bottom: 2px solid var(--surface-alt);
    max-height: 260px;
  }
  .audit-log-header,
  .audit-log-row {
    grid-template-columns: 1fr 1fr;
    font-size: 11px;
  }
}

/* =============================================
   NOTIFICATION ANIMATIONS
   ============================================= */

@keyframes notifIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes notifOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(20px);
  }
}
