/* ======================== COLOR VARIABLES (CHANGE THEME HERE) ======================== */
:root {
  /* Primary accent color (red theme) */
  --accent-primary: #ef4444;
  --accent-primary-hover: #dc2626;
  --accent-gradient: linear-gradient(135deg, var(--accent-primary), var(--accent-primary-hover));
  --accent-light: rgba(239, 68, 68, 0.2);
  --accent-light-hover: rgba(239, 68, 68, 0.25);
  --accent-dark: #b91c1c;

  /* Status colors */
  --status-ok: #10b981;
  --status-ok-bg: rgba(16, 185, 129, 0.2);
  --status-banned: #dc2626;
  --status-banned-bg: rgba(220, 38, 38, 0.2);
  --status-expired: #f59e0b;
  --status-expired-bg: rgba(245, 158, 11, 0.2);
  --status-error: #f87171;
  --status-error-bg: rgba(248, 113, 113, 0.2);
  --status-warn: #facc15;
  --status-warn-bg: rgba(250, 204, 21, 0.2);

  /* Background shades */
  --bg-page: #0f0f0f;
  --bg-card: #1a1a1a;
  --bg-card-light: #1d1d1d;
  --bg-header: #1d1d1d;
  --bg-input: #2a2a2a;
  --bg-input-dark: #1a1a1a;
  --bg-hover: #2a2a2a;
  --bg-table-header: #111;
  --bg-table-row-hover: #222;
  --bg-modal: #1a1a1a;
  --bg-toast: #1a1a1a;
  --bg-map-loading: rgba(0, 0, 0, 0.85);
  --bg-status-2fa: rgba(255, 255, 255, 0.04);

  /* Text colors */
  --text-primary: #e0e0e0;
  --text-secondary: #aaa;
  --text-muted: #888;
  --text-light: #b0b0c0;
  --text-white: #fff;
  --text-black: #212529;

  /* Border colors */
  --border-default: #2a2a2a;
  --border-light: #333;
  --border-lighter: rgba(255, 255, 255, 0.1);
  --border-input: #3a3a3a;

  /* Chart colors */
  --chart-active: #10b981;
  --chart-banned: #dc2626;
  --chart-line: #ef4444;
  --chart-point-bg: #ef4444;
  --chart-point-border: #ffffff;

  /* Dashboard specific */
  --dashboard-bg: #0f0f0f;
  --dashboard-card-bg: rgba(29, 29, 29, 0.95);
  --dashboard-card-border: rgba(255, 255, 255, 0.1);
  --dashboard-stat-value: #fff;
  --dashboard-stat-label: rgba(255, 255, 255, 0.5);
  --dashboard-link: #ef4444;
  --dashboard-discord-btn: #5865f2;
  --dashboard-discord-btn-hover: #6d7af5;
  --dashboard-quicklink-icon: rgba(255, 255, 255, 0.6);
  --dashboard-quicklink-icon-hover: #ef4444;
  --dashboard-live-monitor-stats-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.02) 100%);
  --dashboard-live-monitor-stats-border: rgba(255, 255, 255, 0.1);
  --dashboard-live-monitor-stats-count-bg: rgba(74, 222, 128, 0.14);
  --dashboard-live-monitor-stats-count-border: rgba(74, 222, 128, 0.28);
  --dashboard-live-monitor-stats-count-color: #86efac;
  --dashboard-live-monitor-refresh-bg: rgba(255, 255, 255, 0.05);
  --dashboard-live-monitor-refresh-color: rgba(255, 255, 255, 0.72);
  --dashboard-live-monitor-refresh-hover-bg: rgba(255, 255, 255, 0.1);
  --dashboard-live-monitor-table-th-bg: rgba(0, 0, 0, 0.2);
  --dashboard-live-monitor-table-th-color: rgba(255, 255, 255, 0.7);
  --dashboard-live-monitor-table-td-color: rgba(255, 255, 255, 0.9);
  --dashboard-live-monitor-table-row-hover: rgba(255, 255, 255, 0.04);
  --dashboard-map-settings-panel-bg: rgba(29, 29, 29, 0.98);
  --dashboard-map-settings-panel-border: rgba(255, 255, 255, 0.1);
  --dashboard-map-legend-bg: rgba(29, 29, 29, 0.95);
  --dashboard-map-legend-border: rgba(255, 255, 255, 0.1);
}

/* Light mode overrides (will be applied via [data-mantine-color-scheme="light"]) */
[data-mantine-color-scheme="light"] {
  --bg-page: #f1f5f9;
  --bg-card: #fff;
  --bg-card-light: #fff;
  --bg-header: #fff;
  --bg-input: #f8f9fa;
  --bg-input-dark: #f8f9fa;
  --bg-hover: #f8f9fa;
  --bg-table-header: #f8f9fa;
  --bg-table-row-hover: #f1f3f5;
  --bg-modal: #fff;
  --bg-toast: #fff;
  --bg-map-loading: rgba(0, 0, 0, 0.85);
  --bg-status-2fa: rgba(0, 0, 0, 0.04);
  --text-primary: #212529;
  --text-secondary: #495057;
  --text-muted: #6c757d;
  --text-light: #495057;
  --text-white: #fff;
  --text-black: #212529;
  --border-default: #dee2e6;
  --border-light: #e9ecef;
  --border-lighter: #dee2e6;
  --border-input: #ced4da;
  --dashboard-bg: #f1f5f9;
  --dashboard-card-bg: #fff;
  --dashboard-card-border: #dee2e6;
  --dashboard-stat-value: #212529;
  --dashboard-stat-label: #495057;
  --dashboard-link: #ef4444;
  --dashboard-quicklink-icon: #868e96;
  --dashboard-quicklink-icon-hover: #ef4444;
  --dashboard-live-monitor-stats-bg: linear-gradient(180deg, #fff 0%, #f8f9fa 100%);
  --dashboard-live-monitor-stats-border: #dee2e6;
  --dashboard-live-monitor-stats-count-bg: rgba(34, 197, 94, 0.12);
  --dashboard-live-monitor-stats-count-border: rgba(34, 197, 94, 0.35);
  --dashboard-live-monitor-stats-count-color: #15803d;
  --dashboard-live-monitor-refresh-bg: #f8f9fa;
  --dashboard-live-monitor-refresh-color: #495057;
  --dashboard-live-monitor-refresh-hover-bg: #fff;
  --dashboard-live-monitor-table-th-bg: #f8f9fa;
  --dashboard-live-monitor-table-th-color: #495057;
  --dashboard-live-monitor-table-td-color: #212529;
  --dashboard-live-monitor-table-row-hover: #f8f9fa;
  --dashboard-map-settings-panel-bg: #fff;
  --dashboard-map-settings-panel-border: #dee2e6;
  --dashboard-map-legend-bg: #fff;
  --dashboard-map-legend-border: #dee2e6;
}

/* ======================== GLOBAL STYLES ======================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-page);
  color: var(--text-primary);
}

/* Dashboard Layout */
.dashboard {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--bg-page);
}

/* AuthGuards top bar */
.authguards_paper {
  background: var(--bg-header);
  border-bottom: 1px solid var(--border-lighter);
}
.authguards_container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1rem;
}
.authguards_group {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.nav-site-brand img {
  height: 80px;
  width: auto;
}
.navbar-search-row {
  flex: 1;
  max-width: 400px;
}
.navbar-search-wrap {
  width: 100%;
}
.search-bar {
  display: flex;
  align-items: center;
  background: var(--bg-input-dark);
  border-radius: 150px;
  padding: 0.25rem 0.75rem;
}
.search-bar input {
  background: transparent;
  border: none;
  color: var(--text-white);
  padding: 0.5rem;
  width: 100%;
}
.nav-header-actions {
  margin-left: auto;
  gap: 0.75rem;
}
.nav-header-separator {
  width: 1px;
  background: #333;
  height: 24px;
}
.nav-header-btn {
  background: none;
  border: none;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  border-radius: 2rem;
  cursor: pointer;
  font-size: 0.9rem;
  transition: 0.2s;
}
.nav-header-btn:hover {
  background: var(--bg-hover);
  color: var(--text-white);
}
.nav-theme-toggle {
  background: none;
  border: none;
  color: var(--text-white);
  cursor: pointer;
  font-size: 1.2rem;
  padding: 0.25rem;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav-theme-toggle:hover {
  background: var(--bg-hover);
}
.authguards_tabs {
  margin-top: 0.5rem;
  width: 100%;
}
.authguards_tabs-list {
  display: flex;
  gap: 0.5rem;
  background: var(--bg-card);
  padding: 0.25rem;
  border-radius: 2rem;
  justify-content: center;
  flex-wrap: wrap;
}
.authguards_tab {
  background: transparent;
  border: none;
  padding: 0.5rem 1.25rem;
  border-radius: 1.5rem;
  color: var(--text-light);
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  transition: all 0.2s;
}
.authguards_tab:hover {
  background: var(--bg-hover);
  color: var(--text-white);
}
.authguards_tab.active {
  background: var(--accent-primary);
  color: var(--text-white);
}

/* Dropdown inside tabs */
.nav-dropdown {
  position: relative;
}
.nav-dropdown-trigger {
  cursor: pointer;
}
.nav-dropdown-chevron {
  width: 0.85rem;
  height: 0.85rem;
  margin-left: 0.25rem;
}
.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--bg-card);
  border-radius: 0.5rem;
  min-width: 180px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
  border: 1px solid var(--border-default);
  display: none;
  z-index: 200;
  margin-top: 0.5rem;
}
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: none;
  background: none;
  color: #ccc;
  font-size: 0.875rem;
  text-align: left;
  cursor: pointer;
  border-radius: 0.375rem;
}
.dropdown-item:hover {
  background: var(--bg-hover);
  color: var(--text-white);
}
.nav-dropdown-menu.show {
  display: block;
}
.nav-dropdown[data-open="true"] .nav-dropdown-menu {
  display: block;
}

/* Main Content */
.main-content {
  flex: 1;
  padding: 1.5rem 2rem;
  overflow-y: auto;
}
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}
.page {
  padding-top: 0;
  margin-top: 0;
  display: none !important;
}
.page.active {
  display: block !important;
}

/*#page-api-keys .settings-card,
#page-functions .settings-card,
#page-custom-project-setup .settings-card,
#page-custom-overview .settings-card,
#page-custom-appearance .settings-card,
#page-custom-content .settings-card,
#page-custom-social .settings-card,
#page-custom-advanced .settings-card,
#page-custom-hwid-reset .settings-card,
#page-custom-appearance .settings-card,
#page-custom-content .settings-card,
#page-custom-social .settings-card,
#page-custom-hwid-reset .settings-card,
#page-messages .settings-card {
  margin-top: -750px;
}*/


.field-hint {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}
/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}
.stat-card {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 24px;
  border: 1px solid var(--border-default);
  transition: 0.3s;
}
.stat-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-primary);
  box-shadow: 0 10px 30px rgba(239,68,68,0.1);
}
.stat-card h3 {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.stat-value {
  font-size: 36px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--text-white), var(--text-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.chart-container {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 24px;
  border: 1px solid var(--border-default);
  max-width: 500px;
}

/* Buttons */
.btn-primary {
  padding: 10px 20px;
  background: var(--accent-gradient);
  border: none;
  border-radius: 10px;
  color: var(--text-white);
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(239,68,68,0.4);
}
.btn-danger {
  padding: 6px 12px;
  background: var(--status-banned-bg);
  border: 1px solid var(--status-banned);
  border-radius: 8px;
  color: var(--status-banned);
  cursor: pointer;
}
.btn-danger:hover {
  background: var(--status-banned);
  color: var(--text-white);
}
.btn-success {
  padding: 6px 12px;
  background: var(--status-ok-bg);
  border: 1px solid var(--status-ok);
  border-radius: 8px;
  color: var(--status-ok);
  cursor: pointer;
}
.btn-success:hover {
  background: var(--status-ok);
  color: var(--text-white);
}
.btn-info {
  padding: 6px 12px;
  background: var(--accent-light);
  border: 1px solid var(--accent-primary);
  border-radius: 8px;
  color: var(--accent-primary);
  cursor: pointer;
  margin-right: 8px;
}
.btn-info:hover {
  background: var(--accent-primary);
  color: var(--text-white);
}

/* Tables */
.table-container {
  background: var(--bg-card);
  overflow-x: auto;
  border: 1px solid var(--border-default);
}
.data-table {
  width: 100%;
  border-collapse: collapse;
}
.data-table th,
.data-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-default);
}
.data-table th {
  background: var(--bg-table-header);
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 13px;
}
.data-table tr:hover {
  background: var(--bg-table-row-hover);
}
.status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}
.status-active {
  background: var(--status-ok-bg);
  color: var(--status-ok);
}
.status-banned {
  background: var(--status-banned-bg);
  color: var(--status-banned);
}
.status-expired {
  background: var(--status-expired-bg);
  color: var(--status-expired);
}

/* Modals */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);
  justify-content: center;
  align-items: center;
}
.modal-content {
  background: var(--bg-modal);
  border-radius: 20px;
  padding: 30px;
  width: 90%;
  max-width: 500px;
  border: 1px solid var(--border-light);
  position: relative;
}
.modal-content pre {
  background: var(--bg-page);
  padding: 1rem;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 12px;
}
.close {
  position: absolute;
  right: 20px;
  top: 20px;
  font-size: 28px;
  cursor: pointer;
  color: var(--text-muted);
}
.modal-content input,
.modal-content select {
  width: 100%;
  padding: 12px;
  margin-bottom: 16px;
  background: var(--bg-input);
  border: 1px solid var(--border-input);
  border-radius: 10px;
  color: var(--text-white);
}
.modal-content button[type="submit"] {
  width: 100%;
  padding: 12px;
  background: var(--accent-gradient);
  border: none;
  border-radius: 10px;
  color: var(--text-white);
  font-weight: 600;
  cursor: pointer;
}

/* API Key Modal */
.api-key-modal .modal-content {
  background: rgba(26,26,26,0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(239,68,68,0.5);
}
.api-key-display {
  background: var(--bg-page);
  padding: 16px;
  border-radius: 12px;
  font-family: monospace;
  font-size: 18px;
  text-align: center;
  word-break: break-all;
  color: var(--accent-primary);
  border: 1px solid var(--border-default);
  cursor: pointer;
  transition: 0.2s;
}
.api-key-display:hover {
  background: var(--accent-primary);
  color: var(--text-white);
  border-color: var(--accent-primary);
}
.copy-hint {
  text-align: center;
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-muted);
}

/* Duration Display */
.duration-display {
  background: var(--bg-input);
  border-radius: 8px;
  padding: 0.5rem;
  text-align: center;
  font-size: 0.9rem;
  margin: 0.5rem 0;
  color: var(--accent-primary);
}
.quick-add {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 1rem 0;
}
.quick-add button {
  background: var(--bg-input);
  border-radius: 2rem;
  padding: 0.4rem 1rem;
  border: none;
  color: var(--text-white);
  cursor: pointer;
}
.duration-row {
  display: flex;
  gap: 0.5rem;
}

/* Settings card */
.settings-card {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 30px;
  margin-top: 0;
  border: 1px solid var(--border-default);
}
.settings-card h3 {
  margin-bottom: 12px;
  color: var(--accent-primary);
}
.settings-card p {
  color: var(--text-secondary);
  margin-bottom: 20px;
}
.settings-card hr {
  border: none;
  height: 1px;
  background: var(--border-default);
  margin: 20px 0;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--bg-toast);
  border-left: 4px solid var(--accent-primary);
  padding: 12px 20px;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.3);
  transform: translateX(400px);
  transition: transform 0.3s;
  z-index: 2000;
}
.toast.show {
  transform: translateX(0);
}

/* License stats bar */
.licenses-top-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-lighter);
  background: var(--bg-card);
  border-radius: 1rem 1rem 0 0;
}
.licenses-stat-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.licenses-stat-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 2rem;
  font-size: 0.85rem;
  font-weight: 500;
}
.licenses-stat-pill-value {
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1;
}
.licenses-stat-pill-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
}
.licenses-stat-pill--primary .licenses-stat-pill-value { color: var(--accent-primary); }
.licenses-stat-pill--green .licenses-stat-pill-value { color: var(--status-ok); }
.licenses-stat-pill--red .licenses-stat-pill-value { color: var(--status-banned); }
.licenses-stat-pill--yellow .licenses-stat-pill-value { color: var(--status-expired); }

.licenses-quick-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-left: auto;
}
.licenses-quick-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9999px;
  text-decoration: none;
  cursor: pointer;
}
.licenses-quick-pill:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text-white);
}

/* Filter bar */
.license-filter-bar {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
  background: var(--bg-card);
  padding: 1rem 1.2rem;
}
.search-wrapper {
  display: flex;
  flex: 1;
  max-width: 400px;
}
.search-wrapper input {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: 0.5rem 0 0 0.5rem;
  padding: 0.5rem;
  color: var(--text-white);
}
.search-wrapper button {
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  border-left: none;
  border-radius: 0 0.5rem 0.5rem 0;
  padding: 0.5rem 1rem;
  cursor: pointer;
}
.filter-select {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: 0.5rem;
  padding: 0.5rem;
  color: var(--text-white);
}
.column-toggles {
  display: flex;
  gap: 1rem;
}
.column-toggles label {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* Danger zone */
.danger-zone {
  margin: 1rem 0;
}
.danger-box {
  border: 1px solid var(--status-banned);
  border-radius: 0.5rem;
  padding: 1rem;
  background: rgba(220,38,38,0.1);
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Detail tabs */
.detail-tabs {
  display: flex;
  gap: 0.5rem;
  margin: 1rem 0;
  border-bottom: 1px solid var(--border-default);
}
.tab-btn {
  background: none;
  border: none;
  padding: 0.5rem 1rem;
  cursor: pointer;
  color: var(--text-muted);
}
.tab-btn.active {
  color: var(--accent-primary);
  border-bottom: 2px solid var(--accent-primary);
}
.tab-content {
  display: none;
  margin-top: 1rem;
}
.tab-content.active {
  display: block;
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}
.detail-item {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem;
  border-bottom: 1px solid var(--border-default);
}
.detail-label {
  font-weight: bold;
  color: var(--text-secondary);
}
.clickable {
  cursor: pointer;
  color: var(--accent-primary);
}

/* Actions dropdown */
.actions-dropdown {
  position: relative;
}
.dropdown-trigger {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0 0.5rem;
}
.dropdown-content {
  position: absolute;
  right: 0;
  top: 100%;
  background: var(--bg-card);
  border-radius: 0.5rem;
  min-width: 150px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  display: none;
  z-index: 1000;
}
.dropdown-content button {
  display: block;
  width: 100%;
  padding: 0.5rem 1rem;
  background: none;
  border: none;
  text-align: left;
  color: var(--text-white);
  cursor: pointer;
}
.dropdown-content button:hover {
  background: var(--bg-hover);
}

/* Floating license menu */
.floating-license-menu {
  position: absolute;
  background: var(--bg-card);
  border-radius: 0.5rem;
  min-width: 150px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.5);
  z-index: 10000;
  border: 1px solid var(--border-light);
  overflow: hidden;
}
.floating-license-menu button {
  display: block;
  width: 100%;
  padding: 0.6rem 1rem;
  text-align: left;
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  font-size: 0.9rem;
}
.floating-license-menu button:hover {
  background: var(--bg-hover);
}

/* Unified Modals */
.unified-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  visibility: hidden;
  opacity: 0;
  transition: visibility 0.2s, opacity 0.2s;
}
.unified-modal-overlay.is-open {
  visibility: visible;
  opacity: 1;
}
.unified-modal {
  position: relative;
  width: 100%;
  max-width: 32rem;
  max-height: calc(100vh - 3rem);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(29, 29, 29, 0.98);
  border: 1px solid var(--border-lighter);
  border-radius: 0.5rem;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
  padding: 1.5rem 1.75rem;
  transform: scale(0.96);
  transition: transform 0.2s ease;
}
.unified-modal[data-size="sm"] {
  max-width: 24rem;
}
.unified-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}
.unified-modal-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
}
.unified-modal-close {
  background: none;
  border: none;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  color: var(--text-secondary);
}
.unified-modal-close:hover {
  color: var(--text-white);
}
.unified-modal-body {
  flex: 1;
}
.unified-modal-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 2rem 0;
}
.unified-modal-spinner {
  width: 2rem;
  height: 2rem;
  border: 2px solid rgba(255,255,255,0.2);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.is-hidden {
  display: none !important;
}
.is-visible {
  display: block;
}
.licenses-export-format {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}
.licenses-select {
  height: 2.5rem;
  padding: 0 2rem 0 0.75rem;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.95);
  background: rgba(45, 45, 45, 0.8);
  border: 1px solid var(--border-lighter);
  border-radius: 0.375rem;
  cursor: pointer;
}
.licenses-bulk-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}
.licenses-bulk-btn {
  padding: 6px 12px;
  font-size: 0.8125rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-lighter);
  border-radius: 6px;
  color: inherit;
  cursor: pointer;
}
.licenses-bulk-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}
.licenses-bulk-btn--danger {
  border-color: rgba(250, 82, 82, 0.4);
  color: #ff8787;
}
.licenses-bulk-add-time {
  margin-top: 1rem;
  padding: 0.75rem;
  background: #111;
  border-radius: 0.5rem;
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}
.create-input {
  background: var(--bg-input);
  border: 1px solid var(--border-input);
  border-radius: 6px;
  padding: 0.3rem 0.6rem;
  color: var(--text-white);
}
.create-button {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 0.375rem;
  padding: 0.4rem 0.8rem;
  color: var(--text-white);
  cursor: pointer;
}
.create-button:hover {
  background: rgba(255,255,255,0.15);
}
.unified-modal-body-inner {
  margin-bottom: 1.5rem;
}
.unified-modal-footer-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1rem;
}

/* Light mode overrides for elements not covered by variables (legacy) */
[data-mantine-color-scheme="light"] .navbar-search-wrap .search-bar {
  background: #fff;
  border: 1px solid #dee2e6;
}
[data-mantine-color-scheme="light"] .navbar-search-wrap input {
  color: #212529;
}
[data-mantine-color-scheme="light"] .nav-header-btn {
  color: #495057;
}
[data-mantine-color-scheme="light"] .nav-header-btn:hover {
  background: #f8f9fa;
  color: #212529;
}
[data-mantine-color-scheme="light"] .authguards_tabs-list {
  background: #f8f9fa;
}
[data-mantine-color-scheme="light"] .authguards_tab {
  color: #495057;
}
[data-mantine-color-scheme="light"] .authguards_tab.active {
  background: #ef4444;
  color: white;
}
[data-mantine-color-scheme="light"] .stat-card,
[data-mantine-color-scheme="light"] .chart-container,
[data-mantine-color-scheme="light"] .table-container,
[data-mantine-color-scheme="light"] .settings-card,
[data-mantine-color-scheme="light"] .modal-content {
  background: #fff;
  border-color: #dee2e6;
}
[data-mantine-color-scheme="light"] .stat-card h3 {
  color: #6c757d;
}
[data-mantine-color-scheme="light"] .stat-value {
  background: linear-gradient(135deg, #212529, #6c757d);
  -webkit-background-clip: text;
}
[data-mantine-color-scheme="light"] .data-table th {
  background: #f8f9fa;
  color: #495057;
}
[data-mantine-color-scheme="light"] .data-table tr:hover {
  background: #f1f3f5;
}
[data-mantine-color-scheme="light"] .licenses-top-bar,
[data-mantine-color-scheme="light"] .license-filter-bar {
  background: #fff;
}
[data-mantine-color-scheme="light"] .licenses-stat-pill {
  background: rgba(0,0,0,0.05);
}
[data-mantine-color-scheme="light"] .licenses-quick-pill {
  color: #212529;
  background: rgba(0,0,0,0.04);
  border-color: #dee2e6;
}
[data-mantine-color-scheme="light"] .licenses-quick-pill:hover {
  background: #f8f9fa;
}
[data-mantine-color-scheme="light"] .filter-select,
[data-mantine-color-scheme="light"] .search-wrapper input {
  background: #fff;
  color: #212529;
  border-color: #dee2e6;
}
[data-mantine-color-scheme="light"] .search-wrapper button {
  background: #f8f9fa;
  border-color: #dee2e6;
}
[data-mantine-color-scheme="light"] .toast {
  background: #fff;
  border-left-color: #ef4444;
  color: #212529;
}
[data-mantine-color-scheme="light"] .dropdown-content,
[data-mantine-color-scheme="light"] .floating-license-menu {
  background: #fff;
  border-color: #dee2e6;
}
[data-mantine-color-scheme="light"] .dropdown-content button,
[data-mantine-color-scheme="light"] .floating-license-menu button {
  color: #212529;
}
[data-mantine-color-scheme="light"] .dropdown-content button:hover,
[data-mantine-color-scheme="light"] .floating-license-menu button:hover {
  background: #f8f9fa;
}

/* ========== FULL LANDING PAGE STYLES (red version) ========== */

/* Landing page base */
.landing-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-page);
}

/* Landing header */
.landing-header {
  background: #242424;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}
.landing-header__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  max-width: 80rem;
  margin: 0 auto;
  padding: 0.875rem 1.5rem;
  min-height: 4rem;
}
.landing-header__logo img {
  height: 46px;
  width: auto;
}
.landing-header__nav {
  display: flex;
  gap: 2.25rem;
}
.landing-header__link {
  color: rgba(255,255,255,0.9);
  text-decoration: none;
  font-weight: 500;
}
.landing-header__link:hover {
  color: #fff;
}
.landing-header__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.landing-header__actions-divider {
  width: 1px;
  height: 1.5rem;
  background: rgba(255,255,255,0.15);
}
.landing-header__theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.85);
  cursor: pointer;
}
.landing-header__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.25rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid transparent;
}
.landing-header__btn--secondary {
  color: rgba(255,255,255,0.9);
  background: transparent;
  border-color: rgba(255,255,255,0.2);
}
.landing-header__btn--secondary:hover {
  background: rgba(255,255,255,0.08);
}
.landing-header__btn--primary {
  color: #fff;
  background: var(--accent-gradient);
}

/* Hero section */
.landing-hero {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 4rem 1.5rem;
  position: relative;
}
.landing-hero__container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  text-align: center;
}
.landing-hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  background: linear-gradient(135deg, #fff, #fecaca, #fca5a5);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1rem;
}
.landing-hero p {
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  color: rgba(255,255,255,0.55);
  max-width: 600px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}
.landing-hero__cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}
.landing-hero__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 2rem;
  font-weight: 600;
  transition: 0.2s;
  cursor: pointer;
  border: none;
}
.landing-hero__btn--primary {
  background: var(--accent-gradient);
  color: white;
}
.landing-hero__btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(239,68,68,0.4);
}
.landing-hero__btn--secondary {
  background: #2a2a2a;
  color: white;
  border: 1px solid #3a3a3a;
}
.landing-hero__btn--secondary:hover {
  background: #3a3a3a;
  transform: translateY(-2px);
}
.landing-hero__pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.landing-hero__pills li {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fca5a5;
  padding: 0.4rem 0.65rem;
  border-radius: 999px;
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.2);
}
.landing-hero__badge {
  display: inline-block;
  padding: 0.42rem 1rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: #fca5a5;
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.2);
  border-radius: 999px;
  margin-bottom: 1.35rem;
}
.landing-hero__title {
  margin: 0;
}
.landing-hero__highlight {
  display: block;
  font-size: clamp(2.125rem, 5.5vw, 3.5rem);
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-primary-hover), var(--accent-dark));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.landing-hero__description {
  font-size: clamp(0.9375rem, 1.55vw, 1.075rem);
  color: rgba(255,255,255,0.64);
}
.landing-hero__media {
  margin-top: 2rem;
}
.landing-hero__img {
  max-width: 100%;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.1);
}

/* How it works */
.landing-how {
  padding: 4rem 1.5rem;
}
.landing-how__container {
  max-width: 1200px;
  margin: 0 auto;
}
.landing-how__header {
  text-align: center;
  margin-bottom: 3rem;
}
.landing-how__badge {
  display: inline-block;
  padding: 0.35rem 0.9rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fca5a5;
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.25);
  border-radius: 999px;
  margin-bottom: 0.75rem;
}
.landing-how__title {
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  font-weight: 800;
  background: linear-gradient(135deg, #fff, #fecaca);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.landing-how__desc {
  font-size: 1rem;
  color: rgba(255,255,255,0.5);
}
.landing-how__steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}
.landing-how__step {
  background: var(--bg-card);
  border-radius: 18px;
  padding: 1.5rem;
  border: 1px solid var(--border-default);
  transition: 0.3s;
}
.landing-how__step:hover {
  border-color: var(--accent-primary);
  transform: translateY(-4px);
}
.landing-how__num {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--accent-primary);
  margin-bottom: 0.5rem;
}
.landing-how__step-title {
  font-size: 1.0625rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
}
.landing-how__step-text {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.45);
}

/* Features */
.landing-features {
  padding: 4rem 1.5rem;
  background: rgba(0,0,0,0.2);
}
.landing-features__container {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}
.landing-features__badge {
  display: inline-block;
  padding: 0.35rem 0.9rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fca5a5;
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.2);
  border-radius: 8px;
  margin-bottom: 0.75rem;
}
.landing-features__title {
  font-size: clamp(1.5rem, 3vw, 2.125rem);
  font-weight: 800;
  background: linear-gradient(135deg, #fff, #fecaca);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.landing-features__description {
  font-size: 0.9375rem;
  color: rgba(255,255,255,0.55);
  max-width: 36rem;
  margin: 0 auto 2rem;
}
.landing-features__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}
.landing-features__card {
  background: var(--bg-card);
  border-radius: 18px;
  padding: 1.75rem;
  border: 1px solid var(--border-default);
  transition: 0.3s;
}
.landing-features__card:hover {
  border-color: var(--accent-primary);
  transform: translateY(-6px);
}
.landing-features__card-icon {
  color: var(--accent-primary);
  margin-bottom: 1rem;
}
.landing-features__card-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.5rem;
}
.landing-features__card-desc {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.55);
}

/* Testimonials */
.landing-testimonials {
  padding: 4rem 1.5rem;
}
.landing-testimonials__container {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}
.landing-testimonials__badge {
  display: inline-block;
  padding: 0.35rem 0.9rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fca5a5;
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.22);
  border-radius: 999px;
  margin-bottom: 0.75rem;
}
.landing-testimonials__title {
  font-size: clamp(1.5rem, 3.5vw, 2.125rem);
  font-weight: 800;
  background: linear-gradient(135deg, #fff, #fecaca);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.landing-testimonials__desc {
  font-size: 0.9375rem;
  color: rgba(255,255,255,0.55);
  max-width: 36rem;
  margin: 0 auto 2rem;
}
.landing-testimonials__rows {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.landing-testimonials__cta {
  margin-top: 2rem;
}
.landing-testimonials__link {
  color: #f87171;
  text-decoration: none;
  font-weight: 600;
}
.landing-testimonials__link:hover {
  color: #fca5a5;
}

/* Pricing */
.landing-pricing {
  padding: 4rem 1.5rem;
  background: rgba(0,0,0,0.2);
}
.landing-pricing .authguards_container {
  max-width: 1200px;
  margin: 0 auto;
}
.landing-pricing__title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 0.5rem;
}
.landing-pricing__desc {
  text-align: center;
  color: rgba(255,255,255,0.55);
  margin-bottom: 2rem;
}

/* Discord widget */
.landing-discord {
  padding: 4rem 1.5rem;
}
.landing-discord__container {
  max-width: 1200px;
  margin: 0 auto;
}
.landing-discord__badge {
  display: inline-block;
  padding: 0.35rem 0.9rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fca5a5;
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.22);
  border-radius: 999px;
  margin-bottom: 0.75rem;
}
.landing-discord__title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  color: #fff;
}
.landing-discord__lede {
  color: rgba(255,255,255,0.55);
}
.landing-discord__layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}
.landing-discord__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.15rem;
  background: var(--accent-gradient);
  border-radius: 12px;
  color: white;
  text-decoration: none;
  font-weight: 700;
}
.landing-discord__iframe {
  width: 100%;
  height: 500px;
  border-radius: 16px;
  border: none;
}

/* FAQ */
.landing-faq {
  padding: 4rem 1.5rem;
  background: rgba(0,0,0,0.2);
}
.landing-faq__container {
  max-width: 800px;
  margin: 0 auto;
}
.landing-faq__badge {
  display: inline-block;
  padding: 0.35rem 0.9rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fca5a5;
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.22);
  border-radius: 999px;
  margin-bottom: 0.75rem;
}
.landing-faq__title {
  font-size: clamp(1.625rem, 3.2vw, 2.25rem);
  font-weight: 800;
  color: #fff;
}
.landing-faq__desc {
  color: rgba(255,255,255,0.55);
  margin-bottom: 2rem;
}
.landing-faq__item {
  background: var(--bg-card);
  border-radius: 14px;
  margin-bottom: 1rem;
  border: 1px solid var(--border-default);
}
.landing-faq__item[open] {
  border-color: var(--accent-primary);
}
.landing-faq__control {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 1rem;
  background: transparent;
  border: none;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}
.landing-faq__panel {
  padding: 0 1rem 1rem 1rem;
  color: rgba(255,255,255,0.55);
}

/* Ecosystem / Partners */
.landing-ecosystem {
  padding: 4rem 1.5rem;
}
.landing-ecosystem__container {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}
.landing-ecosystem__badge {
  display: inline-block;
  padding: 0.35rem 0.9rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fca5a5;
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.22);
  border-radius: 999px;
  margin-bottom: 0.75rem;
}
.landing-ecosystem__title {
  font-size: clamp(1.5rem, 3.5vw, 2.125rem);
  font-weight: 800;
  background: linear-gradient(135deg, #fff, #fecaca);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.landing-ecosystem__logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}
.landing-ecosystem__logo {
  background: var(--bg-card);
  padding: 0.75rem;
  border-radius: 12px;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-default);
}
.landing-ecosystem__logo img {
  max-width: 100%;
  max-height: 100%;
}

/* Footer */
.footer-centered {
  text-align: center;
  padding: 2rem;
  border-top: 1px solid rgba(255,255,255,0.07);
  background: #17171c;
}
.footer-centered-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.footer-centered a {
  color: rgba(255,255,255,0.55);
  text-decoration: none;
}
.footer-centered a:hover {
  color: rgba(255,255,255,0.9);
}

/* Auth lines background */
.landing-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
}
.auth-lines {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  margin: auto;
  width: 90vw;
}
.auth-line {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  margin-left: auto;
  margin-right: auto;
  width: 2px;
  background: rgba(255,255,255,0.08);
}
.auth-line:nth-child(1) { left: 20%; }
.auth-line:nth-child(2) { left: 50%; }
.auth-line:nth-child(3) { left: 80%; }
.auth-line::after {
  content: '';
  position: absolute;
  top: 0;
  left: -1px;
  width: 4px;
  height: 100%;
  background: linear-gradient(to bottom, transparent 0%, rgba(255,255,255,0.4) 70%, rgba(255,255,255,0.6) 100%);
  animation: auth-line-fade 6s ease-in-out infinite;
}
@keyframes auth-line-fade {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* Light mode for landing */
[data-mantine-color-scheme="light"] .landing-page {
  background: #f1f5f9;
}
[data-mantine-color-scheme="light"] .landing-header {
  background: #fff;
  border-bottom-color: #e9ecef;
}
[data-mantine-color-scheme="light"] .landing-header__link {
  color: #495057;
}
[data-mantine-color-scheme="light"] .landing-header__link:hover {
  color: #212529;
}
[data-mantine-color-scheme="light"] .landing-header__btn--secondary {
  color: #495057;
  border-color: #dee2e6;
}
[data-mantine-color-scheme="light"] .landing-header__btn--secondary:hover {
  background: #f8f9fa;
}
[data-mantine-color-scheme="light"] .landing-hero p {
  color: #64748b;
}
[data-mantine-color-scheme="light"] .landing-hero__btn--secondary {
  background: #fff;
  color: #212529;
  border-color: #dee2e6;
}
[data-mantine-color-scheme="light"] .landing-testimonials {
  background: rgba(0,0,0,0.03);
}
[data-mantine-color-scheme="light"] .footer-centered {
  background: #fff;
  border-top-color: #e9ecef;
}
[data-mantine-color-scheme="light"] .footer-centered a {
  color: #6c757d;
}
[data-mantine-color-scheme="light"] .footer-centered a:hover {
  color: #212529;
}
[data-mantine-color-scheme="light"] .auth-line {
  background: rgba(0,0,0,0.08);
}
[data-mantine-color-scheme="light"] .auth-line::after {
  background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.2) 70%, rgba(0,0,0,0.3) 100%);
}
[data-mantine-color-scheme="light"] .landing-how__step,
[data-mantine-color-scheme="light"] .landing-features__card,
[data-mantine-color-scheme="light"] .landing-faq__item {
  background: #fff;
  border-color: #dee2e6;
}
[data-mantine-color-scheme="light"] .landing-how__step-title,
[data-mantine-color-scheme="light"] .landing-features__card-title {
  color: #212529;
}
[data-mantine-color-scheme="light"] .landing-how__step-text,
[data-mantine-color-scheme="light"] .landing-features__card-desc {
  color: #6c757d;
}
[data-mantine-color-scheme="light"] .landing-pricing {
  background: rgba(0,0,0,0.03);
}
[data-mantine-color-scheme="light"] .landing-ecosystem__logo {
  background: #fff;
  border-color: #dee2e6;
}

/* ===== Dashboard page – Mantine-style Grid asymmetrical ===== */
.dashboard-main {
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
  background-color: var(--dashboard-bg);
}

.dashboard-container {
  padding-inline: var(--mantine-spacing-md, 1rem);
}

@media (min-width: 64em) {
  .dashboard-container {
      padding-inline: var(--mantine-spacing-lg, 1.5rem);
  }
}

.dashboard-header {
  margin-bottom: calc(1.5rem * var(--mantine-scale, 1));
}

.dashboard-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: calc(1.5rem * var(--mantine-scale, 1));
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95);
  margin: 0 0 0.25rem 0;
}

.dashboard-title-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 0.5rem;
  color: var(--accent-primary);
}

.dashboard-subtitle {
  margin: 0 0 0 3rem;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.55);
}

@media (max-width: 63.99em) {
  .dashboard-subtitle {
      margin-left: 0;
  }
}

/* Mantine Subgrid – 4 cols, vertical stacks (SimpleGrid + Stack pattern) */
.dashboard-subgrid {
  --dashboard-base-height: 400px;
  --dashboard-spacing: calc(1.25rem * var(--mantine-scale, 1));
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--dashboard-spacing);
}

@media (min-width: 64em) {
  .dashboard-subgrid {
      grid-template-columns: repeat(4, 1fr);
  }
}

.dashboard-subgrid-col {
  min-height: var(--dashboard-base-height);
}

.dashboard-subgrid-col--tall {
  min-height: var(--dashboard-base-height);
}

.dashboard-subgrid-col--tall .dashboard-card {
  height: 100%;
  min-height: 100%;
}

@media (max-width: 63.99em) {
  .dashboard-subgrid-col,
  .dashboard-subgrid-col--tall {
      min-height: 0;
  }
  .dashboard-stack {
      min-height: 0;
  }
  .dashboard-stack--2 .dashboard-stack-item,
  .dashboard-stack--3 .dashboard-stack-item {
      min-height: 0;
  }
}

/* Stack – vertical items with getSubHeight(children, spacing) */
.dashboard-stack {
  display: flex;
  flex-direction: column;
  gap: var(--dashboard-spacing);
  min-height: var(--dashboard-base-height);
}

.dashboard-stack--2 .dashboard-stack-item {
  min-height: calc(var(--dashboard-base-height) / 2 - var(--dashboard-spacing) * 0.5);
  flex: 1 1 auto;
}

.dashboard-stack--2 .dashboard-stack-item .dashboard-card,
.dashboard-stack--3 .dashboard-stack-item .dashboard-card {
  height: 100%;
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.dashboard-stack--2 .dashboard-stack-item .dashboard-announcements,
.dashboard-stack--2 .dashboard-stack-item .dashboard-activity {
  flex: 1;
  min-height: 0;
}
.dashboard-stack--2 .dashboard-stack-item .dashboard-activity {
  min-height: 16.5rem; /* keep consistent height when no activity */
}

.dashboard-stack--3 .dashboard-stack-item {
  min-height: calc(var(--dashboard-base-height) / 3 - var(--dashboard-spacing) * 0.6667);
  flex: 1 1 auto;
}

/* Legacy grid classes (kept for compatibility) */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: calc(1rem * var(--mantine-scale, 1));
}

.mantine-Grid-Col--span-12 { grid-column: span 12; }
.mantine-Grid-Col--span-6 { grid-column: span 6; }
.mantine-Grid-Col--span-4 { grid-column: span 4; }
.mantine-Grid-Col--span-8 { grid-column: span 8; }

@media (max-width: 63.99em) {
  .mantine-Grid-Col--span-md-4,
  .mantine-Grid-Col--span-md-6,
  .mantine-Grid-Col--span-md-8 { grid-column: span 12; }
}

@media (min-width: 64em) {
  .mantine-Grid-Col--span-md-4 { grid-column: span 4; }
  .mantine-Grid-Col--span-md-6 { grid-column: span 6; }
  .mantine-Grid-Col--span-md-8 { grid-column: span 8; }
}

/* Dashboard cards (Paper-like) */
.dashboard-card {
  background: var(--dashboard-card-bg);
  border: 1px solid var(--dashboard-card-border);
  border-radius: calc(0.5rem * var(--mantine-scale, 1));
  padding: 1.25rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.dashboard-card--featured {
  background: linear-gradient(135deg, rgba(29, 29, 29, 0.98) 0%, rgba(35, 35, 40, 0.95) 100%);
}

.dashboard-card--compact {
  padding: 1rem;
}

.dashboard-card--compact .dashboard-card-title {
  margin-bottom: 0.5rem;
}

.dashboard-card--compact .dashboard-card-header {
  margin-bottom: 0.75rem;
}

.dashboard-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.dashboard-card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-white);
  margin: 0;
}

.dashboard-stats-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (min-width: 48em) {
  .dashboard-stats-row {
      grid-template-columns: repeat(4, 1fr);
  }
}

.dashboard-stat {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.dashboard-stat-label {
  font-size: 0.75rem;
  color: var(--dashboard-stat-label);
}

.dashboard-stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--dashboard-stat-value);
}

.dashboard-stat-value--muted {
  color: rgba(255, 255, 255, 0.6);
}

.dashboard-balance {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.dashboard-balance-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #4ade80;
}

.dashboard-balance-btn {
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.4rem 0.75rem;
  border-radius: 0.35rem;
  background: var(--accent-primary);
  color: #fff;
  text-decoration: none;
  transition: background 0.2s, opacity 0.2s;
}

.dashboard-balance-btn:hover {
  background: var(--accent-primary-hover);
}

.dashboard-announcements {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  max-height: 14.5rem;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.dashboard-announcements::-webkit-scrollbar {
  display: none;
}

.dashboard-announcement {
  position: relative;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.dashboard-announcement:last-child {
  border-bottom: none;
}

.dashboard-announcement-trigger {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  padding: 0.5rem 0;
  background: none;
  border: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s;
}

.dashboard-announcement-trigger:hover {
  background: rgba(255, 255, 255, 0.04);
}

.dashboard-announcement-preview {
  flex: 1;
  min-width: 0;
}

.dashboard-announcement-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  margin: 0 0 0.15rem 0;
}

.dashboard-announcement-content {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.dashboard-announcement-content:empty {
  display: none;
}

.dashboard-announcement-time {
  flex-shrink: 0;
  font-size: 0.6875rem;
  color: rgba(255, 255, 255, 0.4);
}

/* Mantine-style announcement popover (fixed to escape overflow clipping) */
.dashboard-announcement-popover {
  position: fixed;
  z-index: 9999;
  min-width: 16rem;
  max-width: 22rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 1px rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(29, 29, 29, 0.98);
}

.dashboard-announcement-popover::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 1rem;
  width: 10px;
  height: 10px;
  background: rgba(29, 29, 29, 0.98);
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  transform: rotate(45deg);
}

.dashboard-announcement-popover[hidden] {
  display: none !important;
}

.dashboard-announcement-popover-inner {
  padding: 1rem 1.25rem;
  position: relative;
  z-index: 1;
}

.dashboard-announcement-popover-title {
  font-size: 1rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  margin: 0 0 0.5rem 0;
}

.dashboard-announcement-popover-content {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.8);
  margin: 0 0 0.75rem 0;
  line-height: 1.5;
  -webkit-line-clamp: unset;
  display: block;
}

.dashboard-announcement-popover-time {
  font-size: 0.6875rem;
  color: rgba(255, 255, 255, 0.45);
}

.dashboard-card--discord {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}
.dashboard-discord-image {
  width: 100%;
  height: 100px;
  overflow: hidden;
  flex-shrink: 0;
}
.dashboard-discord-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.dashboard-discord-body {
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.dashboard-discord-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.dashboard-discord-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  margin: 0;
}
.dashboard-discord-badge {
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 9999px;
  background: rgba(246, 92, 92, 0.3);
  color: rgb(250, 139, 139);
  flex-shrink: 0;
}
.dashboard-discord-desc {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.55);
  margin: 0;
  line-height: 1.4;
}
.dashboard-discord-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.5rem 1rem;
  margin-top: 0.25rem;
  border-radius: 0.375rem;
  background: var(--dashboard-discord-btn);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  transition: background 0.2s;
}
.dashboard-discord-btn:hover {
  background: var(--dashboard-discord-btn-hover);
}

/* Discord + Chart + Heatmap column – Discord & chart keep size, heatmap compact */
.dashboard-stack--discord-chart .dashboard-stack-item:first-child {
  flex: 0 0 auto;
  min-height: 0;
}
.dashboard-stack--discord-chart .dashboard-stack-item:nth-child(2) {
  flex: 1 1 auto;
  min-height: 140px;
}
.dashboard-stack--discord-chart .dashboard-stack-item--heatmap {
  flex: 0 0 auto;
  min-height: 0;
}

/* Monthly User Stats chart card */
/* Make Monthly User Stats card wider and taller */
.dashboard-card--chart {
  min-width: 420px;           /* wider card */
  padding: 1.75rem 1.5rem;    /* taller internal space */
  min-height: 320px;          /* minimum card height */
}

.dashboard-card--chart .dashboard-chart-wrap {
  min-height: 220px;          /* container height */
}

.dashboard-card--chart .dashboard-chart-wrap canvas {
  height: 200px !important;   /* chart drawing area */
  max-height: 200px !important;
}

/* Activity Heatmap – compact variant (in col 4) */
.dashboard-card--heatmap-compact {
  padding: 0.75rem 1rem;
}
.dashboard-card--heatmap-compact .dashboard-card-header {
  margin-bottom: 0.5rem;
}
.dashboard-card--heatmap-compact .dashboard-card-title {
  font-size: 0.875rem;
}
.dashboard-heatmap-wrap--compact {
  max-height: 90px;
  overflow-x: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.dashboard-heatmap-wrap--compact .dashboard-heatmap-cell {
  width: 6px;
  height: 8px;
  min-width: 6px;
  min-height: 8px;
}
.dashboard-heatmap-wrap--compact .dashboard-heatmap-row {
  gap: 1px;
}
.dashboard-heatmap-wrap--compact .dashboard-heatmap-grid {
  gap: 1px;
}
.dashboard-heatmap-wrap--compact .dashboard-heatmap-legend {
  margin-top: 0.35rem;
  font-size: 0.625rem;
}
.dashboard-heatmap-wrap--compact .dashboard-heatmap-legend-cells span {
  width: 6px;
  height: 6px;
}

/* Activity Heatmap – GitHub-style grid */
.dashboard-card--heatmap {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.dashboard-card--heatmap .dashboard-card-header {
  margin-bottom: 0.75rem;
}
.dashboard-heatmap-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 0.25rem;
}
.dashboard-heatmap-grid {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.dashboard-heatmap-row {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
}
.dashboard-heatmap-cell {
  width: 10px;
  height: 10px;
  min-width: 10px;
  min-height: 10px;
  border-radius: 2px;
  transition: transform 0.1s ease;
}
.dashboard-heatmap-cell:hover {
  transform: scale(1.15);
}

.dashboard-heatmap-legend {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  font-size: 0.6875rem;
  color: rgba(255, 255, 255, 0.5);
}
.dashboard-heatmap-legend-cells {
  display: flex;
  gap: 2px;
}
.dashboard-heatmap-legend-cells span {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}
[data-mantine-color-scheme=light] .dashboard-card--heatmap .dashboard-card-title { color: #212529; }
[data-mantine-color-scheme=light] .dashboard-heatmap-legend { color: #868e96; }

.dashboard-activity {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 11.5rem;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 0.25rem;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
.dashboard-activity::-webkit-scrollbar {
  width: 6px;
}
.dashboard-activity::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 4px;
}
[data-mantine-color-scheme=light] .dashboard-activity::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
}

.dashboard-activity-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.75rem;
  padding: 0.5rem 0;
  font-size: 0.8125rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.dashboard-activity-item:last-child {
  border-bottom: none;
}

.dashboard-activity-action {
  color: rgba(255, 255, 255, 0.9);
}

.dashboard-activity-key,
.dashboard-activity-project {
  color: rgba(255, 255, 255, 0.5);
  font-family: ui-monospace, monospace;
  font-size: 0.75rem;
}

.dashboard-activity-time {
  margin-left: auto;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.75rem;
}

.dashboard-activity-single .dashboard-activity-item {
  border-bottom: none;
}

/* Balance card (compact in stack) */
.dashboard-card--balance {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Quick Links – grid of icon+label tiles (matches quick-action-card style) */
.dashboard-quicklinks {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

.dashboard-quicklink {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.65rem;
  font-size: 0.8125rem;
  font-weight: 500;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.375rem;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.dashboard-quicklink:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.dashboard-quicklink-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--dashboard-quicklink-icon);
  transition: color 0.15s ease;
}

.dashboard-quicklink:hover .dashboard-quicklink-icon {
  color: var(--dashboard-quicklink-icon-hover);
}

.dashboard-quicklink-label {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Light mode – Quick Links (already covered by variables) */
[data-mantine-color-scheme=light] .dashboard-quicklink {
  color: var(--text-black);
  background: rgba(0, 0, 0, 0.03);
  border-color: #dee2e6;
}
[data-mantine-color-scheme=light] .dashboard-quicklink:hover {
  background: #f8f9fa;
  border-color: #ced4da;
  color: var(--text-black);
}
[data-mantine-color-scheme=light] .dashboard-quicklink-icon {
  color: #868e96;
}
[data-mantine-color-scheme=light] .dashboard-quicklink:hover .dashboard-quicklink-icon {
  color: var(--accent-primary);
}

/* Status card – plain text style */
.dashboard-status-intro {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
  margin: 0 0 0.5rem 0;
}

.dashboard-card--status .dashboard-status-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.dashboard-status-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
}

.dashboard-status-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  flex-shrink: 0;
}

.dashboard-status-dot--ok {
  background: var(--status-ok);
}

.dashboard-status-dot--warn {
  background: var(--status-warn);
}

.dashboard-status-dot--error {
  background: var(--status-error);
}

.dashboard-status-label {
  flex: 1;
  color: rgba(255, 255, 255, 0.8);
}

.dashboard-status-value {
  font-weight: 500;
  color: var(--status-ok);
}

.dashboard-status-value--muted {
  color: rgba(255, 255, 255, 0.5);
}

.dashboard-status-value--warn {
  color: var(--status-warn);
}

.dashboard-status-2fa-rec {
  margin-top: 0.25rem;
  padding: 0.5rem 0.65rem;
  background: var(--bg-status-2fa);
  border-radius: 0.35rem;
  border-left: 3px solid rgba(250, 204, 21, 0.6);
}

.dashboard-status-2fa-rec-text {
  font-size: 0.6875rem;
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
  line-height: 1.4;
}

.dashboard-status-2fa-link {
  color: var(--dashboard-link);
  text-decoration: none;
}

.dashboard-status-2fa-link:hover {
  text-decoration: underline;
}

[data-mantine-color-scheme=light] .dashboard-status-value--muted { color: #868e96; }
[data-mantine-color-scheme=light] .dashboard-status-value--warn { color: #ca8a04; }
[data-mantine-color-scheme=light] .dashboard-status-2fa-rec {
  background: rgba(0, 0, 0, 0.04);
  border-left-color: rgba(250, 204, 21, 0.7);
}
[data-mantine-color-scheme=light] .dashboard-status-2fa-rec-text { color: #495057; }
[data-mantine-color-scheme=light] .dashboard-status-2fa-link { color: var(--accent-primary); }
[data-mantine-color-scheme=light] .dashboard-status-intro { color: #868e96; }

/* Global License Activity Map – same card style as Live Monitor */
.dashboard-map-card {
  margin-top: 1.5rem;
  background: var(--dashboard-card-bg);
  border: 1px solid var(--dashboard-card-border);
  border-radius: 0.5rem;
  overflow: hidden;
}

/* First card in application pages: match dashboard gap (1.5rem only, no extra margin) */
.dashboard-container > .dashboard-map-card:first-child {
  margin-top: 0;
}

.dashboard-map-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-lighter);
}

.dashboard-map-subtitle {
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
  margin: 0 0 0.25rem 0;
}

.dashboard-map-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dashboard-map-dot {
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  background: #4ade80;
  flex-shrink: 0;
}
.dashboard-map-dot--red { background: #fa5252; }
.dashboard-map-dot--green { background: #4ade80; }
.dashboard-map-dot--primary { background: rgba(255, 0, 0, 0.9); }

.dashboard-map-filters {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.dashboard-map-settings-btn {
  padding: 0.5rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 0.375rem;
  background: #fff;
  color: #1a1a1a;
  cursor: pointer;
  transition: background 0.15s;
}

.dashboard-map-settings-btn:hover {
  background: #f0f0f0;
}

.dashboard-map-body {
  position: relative;
  overflow: hidden;
}

.dashboard-map-wrap { position: relative; width: 100%; height: 400px; }

.dashboard-map-container { width: 100%; height: 100%; }

.leaflet-container { z-index: 1; }

/* Leaflet dark theme – filter for map tiles */
:root {
--map-tiles-filter: brightness(0.6) invert(1) contrast(3) hue-rotate(200deg) saturate(0.3) brightness(0.7);
}

[data-mantine-color-scheme=dark] .map-tiles {
filter: var(--map-tiles-filter, none);
}

.dashboard-map-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--bg-map-loading);
  color: #fff;
  padding: 1.25rem 1.5rem;
  border-radius: 0.5rem;
  z-index: 1000;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
}

.dashboard-map-loading-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: #1a76fd;
  border-radius: 50%;
  animation: dashboard-map-spin 1s linear infinite;
}

@keyframes dashboard-map-spin { to { transform: rotate(360deg); } }

.dashboard-map-progress { font-size: 0.75rem; color: rgba(255, 255, 255, 0.7); margin: 0; }

.dashboard-map-legend {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  background: var(--dashboard-map-legend-bg);
  border: 1px solid var(--dashboard-map-legend-border);
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.8125rem;
  z-index: 1000;
}

.dashboard-map-legend-title { font-weight: 600; }

.dashboard-map-legend-hint { font-size: 0.6875rem; color: rgba(255, 255, 255, 0.5); }

.dashboard-map-settings-panel {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 260px;
  background: var(--dashboard-map-settings-panel-bg);
  border: 1px solid var(--dashboard-map-settings-panel-border);
  border-radius: 0.5rem;
  padding: 1rem;
  z-index: 1000;
  display: none;
}

.dashboard-map-settings-panel.open { display: block; }

.dashboard-map-settings-panel h4 { font-size: 0.875rem; font-weight: 600; margin: 0 0 0.5rem 0; }

.dashboard-map-settings-panel label { display: block; font-size: 0.75rem; color: rgba(255, 255, 255, 0.8); margin-bottom: 0.25rem; }

.dashboard-map-settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }

.dashboard-map-settings-panel input,
.dashboard-map-settings-panel select {
  width: 100%;
  padding: 0.375rem 0.5rem;
  border-radius: 0.375rem;
  border: 1px solid var(--border-lighter);
  background: rgba(45, 45, 45, 0.9);
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.75rem;
}

.dashboard-map-settings-panel input::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.dashboard-map-settings-panel select {
  color-scheme: dark;
}

.dashboard-map-settings-actions { display: flex; justify-content: flex-end; gap: 0.5rem; margin-top: 0.75rem; }

.dashboard-map-settings-panel button {
  padding: 0.375rem 0.625rem;
  font-size: 0.75rem;
  border: 1px solid var(--border-lighter);
  border-radius: 0.375rem;
  background: rgba(55, 55, 55, 0.9);
  color: rgba(255, 255, 255, 0.95);
  cursor: pointer;
}

.dashboard-map-settings-panel button:hover { background: rgba(70, 70, 70, 0.95); }

.map-popup {
  background: rgba(29, 29, 29, 0.98);
  border: 1px solid var(--border-lighter);
  border-radius: 0.5rem;
  padding: 0.625rem;
  color: rgba(255, 255, 255, 0.9);
  min-width: 200px;
}

.map-popup__header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 0.5rem; }

.map-popup__title { font-size: 0.875rem; font-weight: 600; }

.map-popup__subtitle { font-size: 0.6875rem; color: rgba(255, 255, 255, 0.6); margin-top: 0.125rem; }

.map-popup__badge {
  font-size: 0.6875rem;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

.map-popup__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }

.map-popup__grid div {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.375rem;
  padding: 0.375rem 0.5rem;
}

.map-popup__grid span { display: block; font-size: 0.625rem; color: rgba(255, 255, 255, 0.5); margin-bottom: 0.125rem; }

.map-popup__grid strong { font-size: 0.75rem; }

/* Second row */
.dashboard-row2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

@media (min-width: 64em) {
  .dashboard-row2 {
      grid-template-columns: 1fr 320px;
  }
}

.dashboard-card--wide {
  min-width: 0;
}

.dashboard-card-link {
  font-size: 0.8125rem;
  color: var(--dashboard-link);
  text-decoration: none;
}

.dashboard-card-link:hover {
  text-decoration: underline;
}

.dashboard-recent-keys {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: calc(2 * (1rem + 1.125rem) + 0.5rem);
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 0.35rem;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
}

.dashboard-key-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0;
  font-size: 0.875rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.dashboard-key-row:last-child {
  border-bottom: none;
}

.dashboard-key-mask {
  font-family: ui-monospace, monospace;
  color: rgba(255, 255, 255, 0.9);
}

.dashboard-key-time {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.45);
}

/* Docs card */
.dashboard-card--docs {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.dashboard-docs-desc {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
  line-height: 1.5;
}

.dashboard-docs-btn {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 0.35rem;
  background: var(--dashboard-link);
  color: #fff;
  text-decoration: none;
  transition: background 0.2s;
  align-self: flex-start;
}

.dashboard-docs-btn:hover {
  background: var(--accent-primary-hover);
}

/* Quick actions row (Overview style) */
.dashboard-quick-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}

@media (min-width: 48em) {
  .dashboard-quick-actions {
      grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 64em) {
  .dashboard-quick-actions {
      grid-template-columns: repeat(6, 1fr);
  }
}

.dashboard-quick-action-card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem;
  background: var(--dashboard-card-bg);
  border: 1px solid var(--dashboard-card-border);
  border-radius: 0.5rem;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s ease;
}

@media (hover: hover) {
  .dashboard-quick-action-card:hover {
      background: var(--bg-hover);
  }
}

.dashboard-quick-action-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
}

.dashboard-quick-action-desc {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.55);
}

/* Live Monitoring */
.dashboard-live-monitor {
  margin-top: 1.5rem;
  background: var(--dashboard-card-bg);
  border: 1px solid var(--dashboard-card-border);
  border-radius: 0.5rem;
  overflow: hidden;
}

.dashboard-live-monitor-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.25rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-lighter);
}

.dashboard-live-monitor-header-right {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  flex-shrink: 0;
  margin-left: auto;
}

.dashboard-live-monitor-stats {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.4375rem 0.75rem 0.4375rem 0.875rem;
  background: var(--dashboard-live-monitor-stats-bg);
  border: 1px solid var(--dashboard-live-monitor-stats-border);
  border-radius: 0.625rem;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.05) inset,
    0 8px 24px rgba(0, 0, 0, 0.25);
}

.dashboard-live-monitor-stats-time {
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.52);
  letter-spacing: 0.02em;
  white-space: nowrap;
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-live-monitor-stats-divider {
  width: 1px;
  height: 0.875rem;
  background: rgba(255, 255, 255, 0.14);
  flex-shrink: 0;
  border-radius: 1px;
}

.dashboard-live-monitor-stats-count {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  padding: 0.1875rem 0.5625rem;
  border-radius: 0.4375rem;
  background: var(--dashboard-live-monitor-stats-count-bg);
  border: 1px solid var(--dashboard-live-monitor-stats-count-border);
  color: var(--dashboard-live-monitor-stats-count-color);
  line-height: 1.25;
}

.dashboard-live-monitor-refresh {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.375rem;
  height: 2.375rem;
  padding: 0;
  border: 1px solid var(--border-lighter);
  border-radius: 0.625rem;
  background: var(--dashboard-live-monitor-refresh-bg);
  color: var(--dashboard-live-monitor-refresh-color);
  cursor: pointer;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease,
    transform 0.12s ease,
    box-shadow 0.15s ease;
  flex-shrink: 0;
}

.dashboard-live-monitor-refresh:hover {
  background: var(--dashboard-live-monitor-refresh-hover-bg);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.dashboard-live-monitor-refresh:active {
  transform: scale(0.96);
}

.dashboard-live-monitor-refresh:focus-visible {
  outline: 2px solid rgba(59, 130, 246, 0.65);
  outline-offset: 2px;
}

@media (max-width: 36rem) {
  .dashboard-live-monitor-header-right {
    width: 100%;
    justify-content: flex-end;
  }
  .dashboard-live-monitor-stats {
    flex: 1;
    min-width: 0;
    justify-content: flex-end;
  }
}

.dashboard-live-monitor-subtitle {
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
  margin: 0 0 0.25rem 0;
}

.dashboard-live-monitor-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.dashboard-live-monitor-dot {
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  flex-shrink: 0;
}

.dashboard-live-monitor-dot--connected {
  background: #4ade80;
}

.dashboard-live-monitor-dot--disconnected {
  background: var(--status-error);
}

.status-pending {
  background-color: #f59e0b;
  color: #000;
}

.dashboard-live-monitor-dot--reconnecting {
  background: #fbbf24;
  animation: dashboard-live-monitor-pulse 1.2s ease-in-out infinite;
}

.dashboard-live-monitor-dot--offline {
  background: rgba(255, 255, 255, 0.4);
}

@keyframes dashboard-live-monitor-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.dashboard-live-monitor-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.dashboard-live-monitor-select,
.dashboard-live-monitor-search {
  padding: 0.5rem 0.75rem;
  font-size: 0.8125rem;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 0.375rem;
  background: #fff;
  color: #1a1a1a;
}

.dashboard-live-monitor-search {
  min-width: 12rem;
}

.dashboard-live-monitor-search::placeholder {
  color: rgba(0, 0, 0, 0.45);
}

.dashboard-live-monitor-table-wrap {
  overflow-x: auto;
  position: relative;
}

.dashboard-live-monitor-loading {
  display: none;
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.2);
  pointer-events: none;
  z-index: 1;
}

.dashboard-live-monitor-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1.5rem;
  height: 1.5rem;
  margin: -0.75rem 0 0 -0.75rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #4ade80;
  border-radius: 50%;
  animation: dashboard-live-monitor-spin 0.7s linear infinite;
}

.dashboard-live-monitor-loading--active {
  display: block;
}

@keyframes dashboard-live-monitor-spin {
  to { transform: rotate(360deg); }
}

.dashboard-live-monitor-table-wrap--loading .dashboard-live-monitor-table {
  opacity: 0.85;
}

.dashboard-live-monitor-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.dashboard-live-monitor-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-weight: 600;
  color: var(--dashboard-live-monitor-table-th-color);
  border-bottom: 1px solid var(--border-lighter);
  background: var(--dashboard-live-monitor-table-th-bg);
}

.dashboard-live-monitor-table td {
  padding: 0.625rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--dashboard-live-monitor-table-td-color);
}

.dashboard-live-monitor-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

.dashboard-live-monitor-table tbody tr:hover {
  background: var(--dashboard-live-monitor-table-row-hover);
}

.dashboard-live-monitor-table td:nth-child(4) {
  font-family: ui-monospace, monospace;
  font-size: 0.75rem;
}

.dashboard-status--ok {
  color: var(--status-ok) !important;
}

.dashboard-status--error {
  color: var(--status-error) !important;
}

.dashboard-status--warn {
  color: var(--status-warn) !important;
}

[data-mantine-color-scheme=light] .dashboard-status--warn {
  color: #d97706 !important;
}

.dashboard-live-monitor-table td:nth-child(3) {
  max-width: 12rem;
  word-break: break-word;
}

.dashboard-health {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.dashboard-health-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.85);
}

.dashboard-health-dot {
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 9999px;
}

.dashboard-health-dot--ok {
  background: var(--status-ok);
}

.dashboard-health-status {
  margin-left: auto;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
}

/* Status error classes (inline style override) */
.dashboard-status-value--error {
  color: var(--status-error) !important;
}

.dashboard-status-dot--error {
  background: var(--status-error);
}

/* Nested submenu styling */
.nav-dropdown-item--has-sub {
  position: relative;
}

.nav-dropdown-item--has-sub .nav-dropdown-submenu {
  position: absolute;
  left: 100%;
  top: 0;
  margin-left: 0.25rem;
  min-width: 180px;
  background: var(--bg-card, #1a1a1a);
  border: 1px solid var(--border-default, #2a2a2a);
  border-radius: 0.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  z-index: 1001;
  display: none;
  padding: 0.25rem;
}

.nav-dropdown-item--has-sub:hover .nav-dropdown-submenu {
  display: block;
}

.nav-dropdown-subitem {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  text-align: left;
  background: none;
  border: none;
  color: var(--text-primary, #e0e0e0);
  cursor: pointer;
  font-size: 0.875rem;
  border-radius: 0.25rem;
  white-space: nowrap;
}

.nav-dropdown-subitem:hover {
  background: var(--bg-hover, #2a2a2a);
  color: white;
}

/* Optional: if dropdown is near right edge, open submenu to the left */
.nav-dropdown-menu {
  overflow: visible !important;
}

.dashboard-key-row {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid #2a2a2a;
}
.dashboard-key-mask {
  font-family: monospace;
  color: #ef4444;
}
.dashboard-key-time {
  color: #888;
  font-size: 0.8rem;
}

.license-level-btn {
  background: #2a2a2a;
  border: none;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  cursor: pointer;
  transition: 0.2s;
}
.license-level-btn.active {
  background: #ef4444;
  color: white;
}
.license-level-btn:hover {
  background: #3b82f6;
}
#customLevelsContainer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.floating-subscription-menu,
.floating-license-menu {
  position: absolute;
  background: #1a1a1a;
  border-radius: 0.5rem;
  min-width: 150px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.5);
  z-index: 10000;
  border: 1px solid #333;
  overflow: hidden;
}

.floating-subscription-menu button,
.floating-license-menu button {
  display: block;
  width: 100%;
  padding: 0.6rem 1rem;
  text-align: left;
  background: none;
  border: none;
  color: #e0e0e0;
  cursor: pointer;
  font-size: 0.9rem;
}

.floating-subscription-menu button:hover,
.floating-license-menu button:hover {
  background-color: #2a2a2a;
}

.subscription-action-trigger {
  background: none;
  border: none;
  color: #aaa;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}
.subscription-action-trigger:hover {
  background: #2a2a2a;
  color: white;
}

/* Reseller Panel Styles */
.reseller-mode-toggle {
  display: flex;
  gap: 0.5rem;
  background: #2a2a2a;
  border-radius: 2rem;
  padding: 0.25rem;
}
.reseller-mode-btn {
  background: transparent;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 1.5rem;
  color: #aaa;
  cursor: pointer;
  transition: 0.2s;
}
.reseller-mode-btn.active {
  background: #ef4444;
  color: white;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}
.form-grid label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.85rem;
  color: #aaa;
}
.form-grid input, .form-grid select {
  width: 100%;
  padding: 0.5rem;
  background: #2a2a2a;
  border: 1px solid #444;
  border-radius: 6px;
  color: white;
}
#subLevelsCheckboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.25rem;
}
#subLevelsCheckboxes label {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: #2a2a2a;
  padding: 0.25rem 0.75rem;
  border-radius: 2rem;
  cursor: pointer;
}
#subLevelsCheckboxes input {
  width: auto;
  margin-right: 0.25rem;
}

/* Balance Management Buttons */
.balance-update-btn,
.balance-pricing-btn {
  padding: 0.4rem 1rem;
  border-radius: 2rem;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  margin-right: 0.5rem;
}

.balance-update-btn {
  background: linear-gradient(135deg, #f63b3b, #eb2525);
  color: white;
  box-shadow: 0 2px 6px rgba(246, 59, 59, 0.3);
}

.balance-update-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
  box-shadow: 0 4px 12px rgba(246, 59, 59, 0.4);
}

.balance-pricing-btn {
  background: linear-gradient(135deg, #f65c5c, #ed3a3a);
  color: white;
  box-shadow: 0 2px 6px rgba(246, 92, 92, 0.3);
}

.balance-pricing-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
  box-shadow: 0 4px 12px rgba(246, 92, 92, 0.4);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .balance-update-btn,
  .balance-pricing-btn {
    padding: 0.3rem 0.7rem;
    font-size: 0.7rem;
    margin-right: 0.3rem;
  }
}

/* ======================== ACTION ICON BUTTONS ======================== */
.copy-key-btn,
.copy-btn,
.action-eye,
.action-pencil,
.licenses-action-menu-trigger,
.subscription-action-trigger,
.reseller-action-trigger {
  background: transparent;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.25rem 0.4rem;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
  color: #cbd5e1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
}

/* Hover effects */
.copy-key-btn:hover,
.copy-btn:hover,
.action-eye:hover,
.action-pencil:hover,
.licenses-action-menu-trigger:hover,
.subscription-action-trigger:hover,
.reseller-action-trigger:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  transform: scale(1.05);
}

/* Specific colors for edit/pencil */
.action-pencil:hover {
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.15);
}

/* Copy button specific */
.copy-key-btn:hover,
.copy-btn:hover {
  color: #10b981;
  background: rgba(16, 185, 129, 0.15);
}

/* View/Eye button specific */
.action-eye:hover {
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.15);
}

/* Dropdown trigger (three dots) */
.licenses-action-menu-trigger,
.subscription-action-trigger,
.reseller-action-trigger {
  font-size: 1.2rem;
  font-weight: bold;
  letter-spacing: 2px;
  padding: 0.25rem 0.6rem;
}

/* Ensure buttons in tables are aligned */
td button {
  margin: 0 0.1rem;
  vertical-align: middle;
}

/* For action groups in licenses table */
.actions-dropdown {
  display: inline-block;
  position: relative;
}

/* Floating menu styling (already present, but ensure consistency) */
.floating-license-menu,
.floating-subscription-menu,
.floating-reseller-menu {
  position: absolute;
  background: #1a1a1a;
  border-radius: 0.5rem;
  min-width: 150px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.5);
  z-index: 10000;
  border: 1px solid #333;
  overflow: hidden;
}

.floating-license-menu button,
.floating-subscription-menu button,
.floating-reseller-menu button {
  display: block;
  width: 100%;
  padding: 0.6rem 1rem;
  text-align: left;
  background: none;
  border: none;
  color: #e0e0e0;
  cursor: pointer;
  font-size: 0.9rem;
}

.floating-license-menu button:hover,
.floating-subscription-menu button:hover,
.floating-reseller-menu button:hover {
  background-color: #2a2a2a;
}

.delete-blacklist-btn {
  background: #dc2626;
  border: none;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  color: white;
  cursor: pointer;
  font-size: 0.75rem;
}
.delete-blacklist-btn:hover {
  background: #b91c1c;
}

/* Copy Owner ID button */
.copy-owner-btn {
  background: none;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  border-radius: 0.25rem;
  transition: all 0.2s ease;
  color: #cbd5e1;
  margin-left: 0.25rem;
}
.copy-owner-btn:hover {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
  transform: scale(1.05);
}

/* ======================== FUNCTIONS PAGE – IP BLOCKING STYLES ======================== */
.blocked-ips-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  padding: 0.5rem 0;
}

.blocked-ip-tag {
  background: var(--bg-input);
  border-radius: 2rem;
  padding: 0.3rem 0.7rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-family: monospace;
  color: var(--text-primary);
  border: 1px solid var(--border-input);
  transition: all 0.2s ease;
}

.blocked-ip-tag:hover {
  background: var(--bg-hover);
  border-color: var(--accent-primary);
}

.blocked-ip-tag button.remove-ip {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1;
  padding: 0 0.2rem;
  transition: color 0.2s;
}

.blocked-ip-tag button.remove-ip:hover {
  color: var(--status-error);
}

#newBlockedIp {
  background: var(--bg-input);
  border: 1px solid var(--border-input);
  border-radius: 0.5rem;
  padding: 0.6rem;
  color: var(--text-primary);
  font-family: monospace;
  transition: border-color 0.2s;
}

#newBlockedIp:focus {
  outline: none;
  border-color: var(--accent-primary);
}

#addBlockedIpBtn {
  background: var(--accent-primary);
  border: none;
  border-radius: 0.5rem;
  padding: 0.6rem 1rem;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

#addBlockedIpBtn:hover {
  background: var(--accent-primary-hover);
}

/* ======================== FUNCTIONS PAGE – INPUT STYLES ======================== */
#appFunctionsForm input[type="text"],
#appFunctionsForm select {
  width: 100%;
  padding: 0.6rem;
  background: var(--bg-input);
  border: 1px solid var(--border-input);
  border-radius: 0.5rem;
  color: var(--text-primary);
  font-size: 0.9rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

#appFunctionsForm input[type="text"]:focus,
#appFunctionsForm select:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
}

#appFunctionsForm input::placeholder {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Specific style for the custom IP block message input */
#customIpBlockMessage {
  font-family: monospace;
  background: var(--bg-input-dark);
}

.field-hint {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  line-height: 1.4;
}

.blocked-ips-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.blocked-ip-tag {
  background: var(--bg-input);
  border-radius: 2rem;
  padding: 0.2rem 0.6rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
}
.blocked-ip-tag button {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1;
  padding: 0 0.2rem;
}
.blocked-ip-tag button:hover {
  color: var(--status-error);
}

input[type="color"] {
  cursor: pointer;
  background: var(--bg-input);
  border: 1px solid var(--border-input);
  border-radius: 0.5rem;
  padding: 0.2rem;
}

.files-wizard { background: #1a1a1a; border-radius: 1rem; padding: 1.5rem; margin-bottom: 2rem; }
.wizard-steps { display: flex; gap: 1rem; margin-bottom: 2rem; border-bottom: 1px solid #333; padding-bottom: 1rem; }
.wizard-step { flex: 1; text-align: center; padding: 0.5rem; background: #2a2a2a; border-radius: 2rem; color: #aaa; }
.wizard-step.active { background: var(--accent-primary); color: white; }
.wizard-step-content { display: none; }
.wizard-step-content.active { display: block; }
.wizard-next, .wizard-prev { margin-top: 1rem; margin-right: 0.5rem; }
.review-box { background: #0a0a0a; padding: 1rem; border-radius: 0.5rem; margin-bottom: 1rem; }
.review-box p { margin: 0.5rem 0; }

/* Files Wizard Styling */
.files-wizard {
  background: var(--bg-card);
  border-radius: 1rem;
  padding: 1.5rem;
  margin-bottom: 2rem;
  border: 1px solid var(--border-default);
}

.wizard-steps {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-lighter);
  padding-bottom: 1rem;
}

.wizard-step {
  flex: 1;
  text-align: center;
  padding: 0.6rem;
  background: var(--bg-input);
  border-radius: 2rem;
  color: var(--text-secondary);
  font-weight: 500;
  transition: all 0.2s;
}

.wizard-step.active {
  background: var(--accent-primary);
  color: white;
  box-shadow: 0 2px 8px rgba(239,68,68,0.3);
}

.wizard-step-content {
  display: none;
  animation: fadeIn 0.3s ease;
}

.wizard-step-content.active {
  display: block;
}

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

.wizard-next, .wizard-prev {
  margin-top: 1rem;
  margin-right: 0.5rem;
  padding: 0.6rem 1.2rem;
  border-radius: 2rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.wizard-next {
  background: var(--accent-primary);
  color: white;
}

.wizard-next:hover {
  background: var(--accent-primary-hover);
  transform: translateY(-2px);
}

.wizard-prev {
  background: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border-default);
}

.wizard-prev:hover {
  background: var(--bg-hover);
  transform: translateY(-2px);
}

.review-box {
  background: var(--bg-input-dark);
  padding: 1rem;
  border-radius: 0.75rem;
  margin-bottom: 1.5rem;
  border-left: 3px solid var(--accent-primary);
}

.review-box p {
  margin: 0.5rem 0;
  word-break: break-all;
}

/* Form groups inside wizard */
.files-wizard .form-group {
  margin-bottom: 1.2rem;
}

.files-wizard label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.files-wizard input, .files-wizard select {
  width: 100%;
  padding: 0.7rem 1rem;
  background: var(--bg-input);
  border: 1px solid var(--border-input);
  border-radius: 0.75rem;
  color: var(--text-primary);
  font-size: 0.9rem;
}

.files-wizard input:focus, .files-wizard select:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px rgba(239,68,68,0.2);
}

.field-hint {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* Cancel / Secondary Button */
.btn-secondary {
  background: #2a2a2a;
  border: 1px solid #3a3a3a;
  color: #e0e0e0;
  padding: 0.6rem 1.2rem;
  border-radius: 2rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: #3a3a3a;
  border-color: #4a4a4a;
  transform: translateY(-1px);
  color: #ffffff;
}

.btn-secondary:active {
  transform: translateY(1px);
}

/* ============================================
   AuthGuard Icon Buttons – 🔌 ✏️ ☰ 🔄 🗑️
   ============================================ */

/* Base style for all icon-only buttons */
button:has(> .icon-emoji),
button:has(> span:contains("🔌")),
button:has(> span:contains("✏️")),
button:has(> span:contains("☰")),
button:has(> span:contains("🔄")),
button:has(> span:contains("⟳")),
button:has(> span:contains("🗑️")),
.app-toggle-btn,
.app-edit-btn,
.app-delete-btn,
.nav-mobile-burger,
#regenApiKeyButton,
#regenerateOwnerModal .btn-primary,
button[onclick*="regenerate"],
button[data-action*="regenerate"] {
  all: unset; /* reset default button styles */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  font-size: 1.25rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(4px);
  transition: all 0.2s cubic-bezier(0.2, 0.9, 0.4, 1.1);
  cursor: pointer;
  color: inherit;
  margin: 0 0.15rem;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Hover state – each icon gets a unique color */
.app-toggle-btn:hover,
button:has(> span:contains("🔌")):hover {
  background: #3b82f6;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
  border-color: #3b82f6;
}

.app-edit-btn:hover,
button:has(> span:contains("✏️")):hover {
  background: #f59e0b;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
  border-color: #f59e0b;
}

.nav-mobile-burger:hover,
button:has(> span:contains("☰")):hover {
  background: #8b5cf6;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
  border-color: #8b5cf6;
}

#regenApiKeyButton:hover,
button:has(> span:contains("🔄")):hover,
button:has(> span:contains("⟳")):hover {
  background: #10b981;
  color: white;
  transform: translateY(-2px) rotate(180deg);
  transition: transform 0.3s ease, background 0.2s, color 0.2s;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
  border-color: #10b981;
}

.app-delete-btn:hover,
button:has(> span:contains("🗑️")):hover {
  background: #ef4444;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
  border-color: #ef4444;
}

/* Tooltip on hover (uses title attribute if available, otherwise generic text) */
.app-toggle-btn::after,
.app-edit-btn::after,
.app-delete-btn::after,
.nav-mobile-burger::after,
#regenApiKeyButton::after,
button:has(> span:contains("🔄"))::after,
button:has(> span:contains("⟳"))::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: -2rem;
  left: 50%;
  transform: translateX(-50%);
  background: #1e293b;
  color: #f1f5f9;
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  border-radius: 0.5rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  font-weight: normal;
  letter-spacing: normal;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  z-index: 1000;
}

/* Provide default tooltip text if no data-tooltip is set */
.app-toggle-btn:not([data-tooltip])::after { content: "Toggle application"; }
.app-edit-btn:not([data-tooltip])::after { content: "Edit"; }
.app-delete-btn:not([data-tooltip])::after { content: "Delete"; }
.nav-mobile-burger:not([data-tooltip])::after { content: "Menu"; }
#regenApiKeyButton:not([data-tooltip])::after { content: "Regenerate API key"; }
button:has(> span:contains("🔄")):not([data-tooltip])::after,
button:has(> span:contains("⟳")):not([data-tooltip])::after { content: "Regenerate"; }

/* Show tooltip on hover */
.app-toggle-btn:hover::after,
.app-edit-btn:hover::after,
.app-delete-btn:hover::after,
.nav-mobile-burger:hover::after,
#regenApiKeyButton:hover::after,
button:has(> span:contains("🔄")):hover::after,
button:has(> span:contains("⟳")):hover::after {
  opacity: 1;
}

/* Focus ring for accessibility */
.app-toggle-btn:focus-visible,
.app-edit-btn:focus-visible,
.app-delete-btn:focus-visible,
.nav-mobile-burger:focus-visible,
#regenApiKeyButton:focus-visible {
  outline: 2px solid #60a5fa;
  outline-offset: 2px;
}

/* Small screens – adjust size */
@media (max-width: 640px) {
  .app-toggle-btn,
  .app-edit-btn,
  .app-delete-btn,
  .nav-mobile-burger,
  #regenApiKeyButton {
    width: 2rem;
    height: 2rem;
    font-size: 1rem;
  }
  .app-toggle-btn::after,
  .app-edit-btn::after,
  .app-delete-btn::after,
  .nav-mobile-burger::after,
  #regenApiKeyButton::after {
    font-size: 0.6rem;
    bottom: -1.75rem;
  }
}

/* Additional helper for the mobile burger button visibility */
.nav-mobile-burger {
  display: inline-flex !important; /* ensure it's visible when needed */
}