
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: #f4f6f9;
  color: #1e293b;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body.dark-theme {
  background-color: #0b0f17;
  color: #f1f5f9;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ==========================================
   2. DESKTOP / LAPTOP FULLSCREEN LAYOUT
   ========================================== */
.app-layout {
  display: flex;
  width: 100vw;
  min-height: 100vh;
}

/* Sidebar Navigation */
.sidebar {
  width: 240px;
  background-color: #ffffff;
  border-right: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  padding: 20px 12px;
  position: fixed;
  height: 100vh;
  left: 0;
  top: 0;
  z-index: 100;
}

body.dark-theme .sidebar {
  background-color: #111827;
  border-right-color: #1f293d;
}

.brand-logo {
  font-size: 18px;
  font-weight: 700;
  color: #000033;
  padding-left: 10px;
  margin-bottom: 24px;
  letter-spacing: -0.3px;
}

body.dark-theme .brand-logo {
  color: #3b82f6;
}

.nav-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-links a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  color: #64748b;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s ease;
}

body.dark-theme .nav-links a {
  color: #94a3b8;
}

.nav-links a:hover,
.nav-links a.active {
  background-color: #ebf2ff;
  color: #000033;
  font-weight: 600;
}

body.dark-theme .nav-links a:hover,
body.dark-theme .nav-links a.active {
  background-color: #1e293b;
  color: #3b82f6;
}

/* Main Content Workspace */
.main-wrapper {
  flex: 1;
  margin-left: 240px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: calc(100% - 240px);
}

/* Header Section */
.header-blue {
  background-color: #000033;
  color: #ffffff;
  padding: 24px 32px 40px 32px;
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
}

body.dark-theme .header-blue {
  background: linear-gradient(135deg, #0d1b2a 0%, #1b2a4a 100%);
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-actions {
  display: flex;
  gap: 10px;
}

.icon-btn {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}

body.dark-theme .icon-btn {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
}

.header-page-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-page-title h1 {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
}

/* ==========================================
   3. CATEGORY NAV + CONTENT LAYOUT
   ========================================== */
.settings-workspace {
  display: flex;
  gap: 16px;
  margin: -20px 32px 32px 32px;
}

.settings-nav-card {
  width: 210px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 8px;
  height: fit-content;
  position: sticky;
  top: 16px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.03);
}

body.dark-theme .settings-nav-card {
  background-color: #111827;
  border-color: #1f293d;
}

.settings-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.settings-nav-list a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  color: #64748b;
  transition: all 0.15s ease;
}

body.dark-theme .settings-nav-list a {
  color: #94a3b8;
}

.settings-nav-list a:hover,
.settings-nav-list a.active {
  background-color: #ebf2ff;
  color: #000033;
  font-weight: 600;
}

body.dark-theme .settings-nav-list a:hover,
body.dark-theme .settings-nav-list a.active {
  background-color: #1e293b;
  color: #3b82f6;
}

.settings-content-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.settings-card {
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.03);
  scroll-margin-top: 16px;
}

body.dark-theme .settings-card {
  background-color: #111827;
  border-color: #1f293d;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.settings-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 14px;
}

body.dark-theme .settings-card-header {
  border-bottom-color: #1f293d;
}

.settings-card-header > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-icon {
  font-size: 14px;
  color: #000033;
}

body.dark-theme .card-icon {
  color: #3b82f6;
}

.settings-card-header h3 {
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
}

body.dark-theme .settings-card-header h3 {
  color: #f8fafc;
}

/* ==========================================
   4. FORM CONTROLS & COMPONENT UI
   ========================================== */
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-group {
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-group label {
  font-size: 11px;
  font-weight: 600;
  color: #475569;
}

body.dark-theme .form-group label {
  color: #cbd5e1;
}

.form-control {
  width: 100%;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background-color: #f8fafc;
  font-size: 12px;
  color: #0f172a;
  outline: none;
  transition: border-color 0.15s ease;
}

body.dark-theme .form-control {
  background-color: #0f172a;
  border-color: #334155;
  color: #f8fafc;
}

.form-control:focus {
  border-color: #000033;
}

body.dark-theme .form-control:focus {
  border-color: #3b82f6;
}

select.form-control {
  cursor: pointer;
}

.setting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #f1f5f9;
}

body.dark-theme .setting-row {
  border-bottom-color: #1f293d;
}

.setting-row:last-child {
  border-bottom: none;
}

.setting-info strong {
  display: block;
  font-size: 12px;
  color: #0f172a;
}

body.dark-theme .setting-info strong {
  color: #f8fafc;
}

.setting-info span {
  font-size: 11px;
  color: #64748b;
}

.primary-btn {
  background-color: #000033;
  color: #ffffff;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

body.dark-theme .primary-btn {
  background-color: #2563eb;
}

.primary-btn:hover {
  opacity: 0.9;
}

.secondary-btn {
  background-color: #f1f5f9;
  border: 1px solid #cbd5e1;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  color: #0f172a;
}

body.dark-theme .secondary-btn {
  background-color: #1e293b;
  border-color: #334155;
  color: #cbd5e1;
}

.danger-btn {
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

body.dark-theme .danger-btn {
  background-color: rgba(220, 38, 38, 0.15);
  border-color: rgba(220, 38, 38, 0.3);
  color: #f87171;
}

/* Badges & Tables */
.status-badge {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 600;
}

.status-badge.verified {
  background-color: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

body.dark-theme .status-badge.verified {
  background-color: rgba(5, 150, 105, 0.15);
  border-color: rgba(5, 150, 105, 0.3);
}

.status-badge.warning {
  background-color: #fffbe3;
  color: #d97706;
  border: 1px solid #fde68a;
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin-top: 8px;
}

.custom-table th, .custom-table td {
  padding: 10px;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
}

body.dark-theme .custom-table th, body.dark-theme .custom-table td {
  border-bottom-color: #1f293d;
}

.custom-table th {
  color: #64748b;
  font-weight: 600;
}

/* Toggle Switches */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 20px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #cbd5e1;
  transition: .3s;
}

.slider.round {
  border-radius: 20px;
}

.slider.round:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #000033;
}

body.dark-theme input:checked + .slider {
  background-color: #2563eb;
}

input:checked + .slider:before {
  transform: translateX(18px);
}

.desktop-footer {
  padding: 16px 32px;
  font-size: 11px;
  color: #64748b;
  text-align: center;
}

/* ==========================================
   5. POPUP / MODAL (CENTERED DESKTOP, BOTTOM MOBILE)
   ========================================== */
.cz-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1000;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.cz-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.custom-modal {
  background-color: #ffffff;
  border-radius: 14px;
  width: 100%;
  max-width: 480px;
  padding: 16px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
  transform: scale(0.95);
  transition: transform 0.25s ease;
}

body.dark-theme .custom-modal {
  background-color: #111827;
  border: 1px solid #1f293d;
}

.cz-modal-overlay.active .custom-modal {
  transform: scale(1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.modal-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #000033;
}

.modal-title-group h3 {
  font-size: 14px;
  font-weight: 600;
}

body.dark-theme .modal-title-group {
  color: #3b82f6;
}

.close-modal-btn {
  background: none;
  border: none;
  font-size: 16px;
  color: #64748b;
  cursor: pointer;
}

/* ==========================================
   6. FLOATING MOBILE NAV & RESPONSIVE BREAKPOINTS
   ========================================== */
.mobile-nav {
  display: none;
}

@media (max-width: 992px) {
  .settings-workspace {
    flex-direction: column;
  }

  .settings-nav-card {
    width: 100%;
    position: static;
    overflow-x: auto;
  }

  .settings-nav-list {
    flex-direction: row;
    white-space: nowrap;
  }
}

@media (max-width: 768px) {
  .sidebar { display: none; }
  .main-wrapper { margin-left: 0; width: 100%; }

  .header-blue {
    padding: 20px 16px 28px 16px;
    border-radius: 0 0 8px 8px;
  }

  .settings-workspace {
    margin: 12px;
  }

  .form-grid-2 {
    grid-template-columns: 1fr;
  }

  /* Bottom sheet modal styling for mobile screens */
  .cz-modal-overlay {
    align-items: flex-end;
  }

  .custom-modal {
    max-width: 100%;
    border-radius: 20px 20px 0 0;
    /* Clean clearance above the floating nav */
    margin-bottom: calc(16px + 45px + 8px);
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .cz-modal-overlay.active .custom-modal {
    transform: translateY(0);
  }

  /* MATCHED FLOATING MOBILE NAVIGATION BAR (MATCHES DASHBOARD SIZE) */
  .mobile-nav {
    display: flex;
    position: fixed;
    bottom: 16px;
    left: 5%;
    width: 90%;
    background-color: #000033;
    border-radius: 30px;
    justify-content: space-around;
    align-items: center;
    padding: 8px 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    z-index: 200;
  }

  body.dark-theme .mobile-nav {
    background-color: #1e293b;
    border: 1px solid #334155;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  }

  .mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    font-size: 9px;
    color: rgba(255, 255, 255, 0.65);
    font-weight: 500;
  }

  .mobile-nav-item i {
    font-size: 15px;
  }

  .mobile-nav-item.active {
    color: #ffffff;
    font-weight: 600;
  }

  body.dark-theme .mobile-nav-item.active {
    color: #60a5fa;
  }

  .desktop-footer {
    padding-bottom: 80px;
  }
}