@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  --bg-dark: #07080c;
  --bg-sidebar: #090a10;
  --bg-card: #0d0f17;
  --bg-card-hover: #12141f;
  --bg-input: #0b0d15;
  
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-card: rgba(255, 255, 255, 0.08);
  --border-input: rgba(255, 255, 255, 0.12);
  --border-focus: #10b981;

  --color-primary: #10b981;
  --color-accent: #00ffa3;
  --color-purple: #6366f1;
  --color-discord: #5865f2;
  --color-gold: #f59e0b;
  --color-danger: #ef4444;

  --text-white: #ffffff;
  --text-muted: #94a3b8;
  --text-faint: #64748b;

  --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

body {
  background-color: var(--bg-dark);
  color: var(--text-white);
  font-family: var(--font-main);
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
}

/* Ambient glow */
.bg-ambient {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.ambient-blob-1 {
  position: absolute;
  top: -100px;
  left: 20%;
  width: 500px;
  height: 400px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.09) 0%, transparent 70%);
  filter: blur(80px);
}

.ambient-blob-2 {
  position: absolute;
  bottom: 10%;
  right: 15%;
  width: 450px;
  height: 350px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.08) 0%, transparent 70%);
  filter: blur(80px);
}

/* ========================================================================= */
/* DISCORD LOGIN SCREEN                                                      */
/* ========================================================================= */
.login-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 30%, rgba(16, 185, 129, 0.08) 0%, #07080c 70%);
  z-index: 1000;
  padding: 20px;
}

.login-box {
  width: 100%;
  max-width: 460px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 24px;
  padding: 40px 32px;
  text-align: center;
  box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.8), 0 0 40px rgba(16, 185, 129, 0.1);
}

.login-brand-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px auto;
  filter: drop-shadow(0 4px 15px rgba(16, 185, 129, 0.3));
}

.login-title {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.login-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  line-height: 1.5;
}

.login-alert {
  display: none;
  padding: 12px 16px;
  border-radius: 12px;
  margin-top: 16px;
  margin-bottom: 8px;
  font-size: 0.84rem;
  text-align: left;
  line-height: 1.4;
}

.login-alert.error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.login-alert.pending {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fcd34d;
}

.btn-discord-login {
  width: 100%;
  background: var(--color-discord);
  color: #ffffff;
  font-weight: 700;
  font-size: 1rem;
  padding: 14px 20px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 6px 20px rgba(88, 101, 242, 0.35);
  text-decoration: none;
}

.btn-discord-login:hover {
  background: #4752c4;
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(88, 101, 242, 0.5);
}

.login-alert {
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 0.85rem;
  margin-bottom: 20px;
  text-align: left;
  line-height: 1.4;
  display: none;
}

.login-alert.error {
  display: block;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.login-alert.pending {
  display: block;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fcd34d;
}

.dev-simulator-box {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
  text-align: left;
}

/* ========================================================================= */
/* MAIN DASHBOARD LAYOUT                                                     */
/* ========================================================================= */
.app-wrapper {
  display: flex;
  width: 100vw;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* Left Sidebar */
.sidebar {
  width: 250px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
}

.sidebar-brand {
  padding: 24px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.sidebar-logo {
  width: 34px;
  height: 34px;
}

.sidebar-title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
  line-height: 1.1;
}

.sidebar-badge {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-faint);
  letter-spacing: 0.08em;
  display: block;
  margin-top: 2px;
}

/* Sidebar Nav Links */
.sidebar-nav {
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border-radius: 12px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.93rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
  background: rgba(99, 102, 241, 0.16);
  color: #ffffff;
  border: 1px solid rgba(99, 102, 241, 0.4);
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.12);
  font-weight: 600;
}

.nav-link.active svg {
  color: #818cf8;
}

.nav-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Bottom Profile / User Info (Discord User Profile Card) */
.sidebar-profile {
  padding: 14px 16px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.35);
  margin-top: auto;
}

.profile-info {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: hidden;
}

.profile-avatar-wrap {
  position: relative;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
}

.profile-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  object-fit: cover;
}

.online-dot {
  position: absolute;
  bottom: 0px;
  right: 0px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #23a55a;
  border: 2px solid var(--bg-sidebar);
}

.profile-names {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  line-height: 1.25;
}

.profile-username {
  font-size: 0.9rem;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-discord-handle {
  font-size: 0.74rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-sidebar-logout {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

.btn-sidebar-logout:hover {
  color: var(--color-danger);
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
}

/* ========================================================================= */
/* MAIN VIEWPORT AREA                                                        */
/* ========================================================================= */
.main-viewport {
  margin-left: 250px;
  flex: 1;
  padding: 36px 44px;
  min-height: 100vh;
}

/* View Header */
.view-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 28px;
}

.view-heading {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.view-subheading {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.status-live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #34d399;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 9999px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 10px #10b981;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* ========================================================================= */
/* STAT CARDS (Overview 4 Cards)                                             */
/* ========================================================================= */
.stat-cards-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 28px;
}

.stat-card-screenshot {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 115px;
  transition: all 0.2s ease;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.stat-card-screenshot:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.16);
  transform: translateY(-2px);
}

.stat-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stat-card-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-faint);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stat-card-icon {
  color: var(--text-faint);
  display: flex;
  align-items: center;
}

.stat-card-val {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
  margin-top: 10px;
}

/* ========================================================================= */
/* PANELS (Recent Executions & Top Countries)                                */
/* ========================================================================= */
.dashboard-split-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 22px;
  margin-bottom: 28px;
}

.panel-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 18px;
  padding: 26px 28px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35);
}

.panel-title-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 20px;
}

.panel-title-icon {
  color: #818cf8;
}

/* Executions List */
.execution-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.03);
  font-size: 0.88rem;
  transition: background 0.15s;
}

.execution-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

.execution-key {
  font-family: var(--font-mono);
  color: #38bdf8;
  font-size: 0.85rem;
  font-weight: 600;
}

.execution-meta {
  color: var(--text-muted);
  font-size: 0.78rem;
  margin-top: 2px;
}

/* Country Progress Bars */
.country-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.country-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  font-weight: 500;
}

.country-bar-bg {
  width: 100%;
  height: 7px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  overflow: hidden;
}

.country-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #00ffa3);
  border-radius: 999px;
}

/* ========================================================================= */
/* FORMS & INPUT CONTROLS (ELEVATED DARK THEME)                              */
/* ========================================================================= */
.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 18px;
  text-align: left;
}

.form-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: #cbd5e1;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-input {
  width: 100%;
  background: var(--bg-input) !important;
  border: 1.5px solid var(--border-input) !important;
  color: #ffffff !important;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-family: var(--font-main);
  outline: none;
  transition: all 0.2s ease;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

.form-input:focus {
  border-color: var(--border-focus) !important;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2), inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

.form-input::placeholder {
  color: #475569;
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  font-weight: 700;
  padding: 13px 22px;
  border-radius: 12px;
  border: none;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.45);
}

.btn-create-key {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  font-weight: 700;
  padding: 11px 20px;
  border-radius: 12px;
  border: none;
  font-size: 0.92rem;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.btn-create-key:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.45);
}

/* Action bar: Search and Filter controls */
.table-action-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
  gap: 16px;
  flex-wrap: wrap;
}

.search-filters {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  max-width: 650px;
}

.search-box {
  flex: 1;
  position: relative;
}

.search-input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  color: #fff;
  padding: 11px 16px 11px 42px;
  border-radius: 12px;
  font-size: 0.92rem;
  outline: none;
  transition: border-color 0.2s;
}

.search-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-faint);
}

.filter-select {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  color: #fff;
  padding: 11px 16px;
  border-radius: 12px;
  font-size: 0.9rem;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s;
}

.filter-select:focus {
  border-color: var(--color-primary);
}

/* ========================================================================= */
/* TABLES (Accounts, Keys, Scripts)                                          */
/* ========================================================================= */
.table-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table th {
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border-card);
  padding: 16px 20px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.data-table td {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 0.9rem;
  vertical-align: middle;
}

.data-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* Mono Key Code */
.key-mono {
  font-family: var(--font-mono);
  font-weight: 600;
  color: #38bdf8;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(56, 189, 248, 0.08);
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid rgba(56, 189, 248, 0.2);
}

.btn-table-copy {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: color 0.2s;
}

.btn-table-copy:hover {
  color: #fff;
}

/* Status Badges */
.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 9999px;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge-status.active {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.badge-status.expired {
  background: rgba(148, 163, 184, 0.12);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.badge-status.revoked {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

/* Tier Pill */
.tier-pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.07);
  color: #f1f5f9;
}

.tier-pill.featured {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

/* Table Actions */
.table-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-action-small {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-card);
  color: #cbd5e1;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-action-small:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.btn-action-small.danger:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.4);
}

/* ========================================================================= */
/* ACCOUNTS VIEW (Discord Accounts, Email Editing, Approval)                 */
/* ========================================================================= */
.account-user-card {
  display: flex;
  align-items: center;
  gap: 12px;
}

.account-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
}

.account-name-group {
  display: flex;
  flex-direction: column;
}

.account-username {
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
}

.account-id {
  font-size: 0.74rem;
  color: var(--text-faint);
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.03);
  padding: 2px 6px;
  border-radius: 6px;
  display: inline-block;
}

.editable-email-box {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.03);
  padding: 6px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-edit-email-inline {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px;
  display: flex;
  align-items: center;
}

.btn-edit-email-inline:hover {
  color: var(--color-accent);
}

/* Email masking stars */
.email-stars {
  font-family: var(--font-mono);
  letter-spacing: 0.12em;
  color: #94a3b8;
  font-size: 0.88rem;
  user-select: none;
}

/* Eye toggle for email reveal */
.btn-toggle-email {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px;
  display: flex;
  align-items: center;
  transition: color 0.2s;
}

.btn-toggle-email:hover {
  color: #818cf8;
}

/* Status toggles */
.switch-status-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s;
}

.switch-status-btn.approved {
  background: rgba(16, 185, 129, 0.16);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.4);
}

.switch-status-btn.pending {
  background: rgba(245, 158, 11, 0.16);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.4);
}

.switch-status-btn:hover {
  transform: scale(1.03);
}

/* Tab Switching Panes */
.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
  animation: fadeIn 0.25s ease-out forwards;
}

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

/* Lua Code Pre */
.roblox-code-pre {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  background: #040509;
  padding: 16px;
  border-radius: 12px;
  color: #38bdf8;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 10px;
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(5, 7, 11, 0.85);
  backdrop-filter: blur(14px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-box {
  background: #0f121d;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 22px;
  width: 100%;
  max-width: 520px;
  padding: 32px;
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8), 0 0 40px rgba(16, 185, 129, 0.12);
  transform: scale(0.95);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active .modal-box {
  transform: scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.2rem;
  transition: all 0.2s;
}

.modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.modal-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.modal-header-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent);
}

.modal-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
}

.modal-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Toast */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #111422;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-left: 4px solid var(--color-primary);
  padding: 12px 18px;
  border-radius: 10px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.6);
  font-size: 0.88rem;
  pointer-events: auto;
  animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.toast.error {
  border-left-color: #ef4444;
}

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

/* Responsive */
@media (max-width: 1100px) {
  .stat-cards-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .dashboard-split-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .sidebar {
    width: 68px;
  }
  .sidebar-title, .sidebar-badge, .nav-link span, .profile-names {
    display: none;
  }
  .main-viewport {
    margin-left: 68px;
    padding: 20px;
  }
}
