/* ==========================================================================
   TaleWeb Theme Stylesheet - Premium Glassmorphism Redesign
   Conforms strictly to 13-DESIGN-SYSTEM-UI-GUIDELINES.md
   ========================================================================== */

/* Design Tokens & CSS Custom Properties — sourced from 13-DESIGN-SYSTEM-UI-GUIDELINES.md */
:root {
  /* Neutral / Background */
  --color-bg: #F8FAFC;              /* Çok hafif gri/mavi alt tonlu temiz zemin */
  --color-surface: rgba(255, 255, 255, 0.75); /* Glassmorphism yüzeyleri */
  --color-surface-glass: rgba(255, 255, 255, 0.8);
  --color-border: #E2E8F0;
  --color-border-light: rgba(226, 232, 240, 0.5);
  --color-text: #0F172A;
  --color-text-muted: #64748B;
  
  /* Marka / Accent — Kurumsal lacivert (Design System zorunlu) */
  --color-primary: #0F172A;
  --color-primary-hover: #1E293B;
  --color-primary-soft: #F1F5F9;
  
  /* Status Colors */
  --color-success: #15803D;
  --color-success-subtle: #E7F5EC;
  --color-danger: #B91C1C;
  --color-danger-subtle: #FBEAEA;
  --color-warning: #B45309;
  --color-warning-subtle: #FDF3E4;
  
  /* Radius Scale */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 999px;
  
  /* Physical Shadow Simulation (No Neon Glows) */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -4px rgba(0, 0, 0, 0.025);
  --shadow-glass: 0 8px 32px 0 rgba(15, 23, 42, 0.08);
}

/* Core mail administration */
.mail-admin-page {
  max-width: var(--content-narrow);
  margin-inline: auto;
}

.mail-admin-card {
  margin-bottom: var(--space-lg);
}

.mail-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-md);
}

.mail-field-wide {
  grid-column: 1 / -1;
}

.mail-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-sm);
}

.mail-inline-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-md);
  align-items: end;
}

.mail-template-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(16rem, 1fr);
  gap: var(--space-lg);
  align-items: start;
}

.mail-template-sidebar {
  display: grid;
  gap: var(--space-md);
}

.mail-template-editor {
  min-height: var(--editor-height);
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.mail-placeholder-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.mail-placeholder-list code {
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  background: var(--color-primary-soft);
  color: var(--color-text);
}

.mail-preview-frame {
  width: 100%;
  min-height: var(--preview-height);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}

.form-help-link {
  margin-top: var(--space-xs);
  text-align: right;
  font-size: 0.8125rem;
}

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

@media (max-width: 48rem) {
  .mail-form-grid,
  .mail-inline-form,
  .mail-template-layout {
    grid-template-columns: 1fr;
  }

  .profile-layout-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Dark Mode Variables Override */
.dark-mode {
  --color-bg: #09090B;              /* Deep zinc black background */
  --color-bg-raised: #18181B;      /* One shade lighter than background (raised panel) */
  --color-surface: rgba(24, 24, 27, 0.65); /* Translucent dark zinc surface */
  --color-surface-glass: rgba(18, 18, 20, 0.75);
  --color-border: rgba(255, 255, 255, 0.07);
  --color-border-light: rgba(255, 255, 255, 0.03);
  --color-text: #F4F4F5;            /* Zinc-100 text */
  --color-text-muted: #A1A1AA;      /* Zinc-400 muted text */
  --color-primary: #E4E4E7;         /* Zinc-200 accent */
  --color-primary-hover: #F4F4F5;
  --color-primary-soft: rgba(228, 228, 231, 0.08);
  
  --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.5);
}

/* Reset & Global */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  overflow-x: hidden;
}

body {
  font-family: 'Inter', -apple-system, 'Segoe UI', sans-serif;
  background-color: var(--color-bg);
  background-image: radial-gradient(at 0% 0%, rgba(15, 23, 42, 0.02) 0px, transparent 50%),
                    radial-gradient(at 100% 100%, rgba(15, 23, 42, 0.02) 0px, transparent 50%);
  color: var(--color-text);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s ease, color 0.3s ease;
}

body.mobile-nav-open {
  overflow: hidden;
}

.dark-mode {
  background-image: radial-gradient(at 0% 0%, rgba(30, 41, 59, 0.15) 0px, transparent 50%),
                    radial-gradient(at 100% 100%, rgba(30, 41, 59, 0.1) 0px, transparent 50%);
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-primary-hover);
}

/* Typography Scale */
h1 { font-size: 32px; font-weight: 700; line-height: 1.2; }
h2 { font-size: 24px; font-weight: 600; line-height: 1.3; }
h3 { font-size: 18px; font-weight: 600; line-height: 1.4; }
h4 { font-size: 15px; font-weight: 600; }
.text-xs { font-size: 11px; }
.text-sm { font-size: 13px; }
.text-muted { color: var(--color-text-muted); }

/* Layout Grid & Base */
.main-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.dark-mode .main-header {
  background: rgba(24, 24, 27, 0.95);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 16px;
  height: 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.site-logo {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-text);
}

.logo-accent {
  color: var(--color-primary);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-link {
  font-weight: 600;
  color: var(--color-text-muted);
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: color 0.15s ease, background-color 0.15s ease;
  white-space: nowrap;
}

.nav-link i {
  font-size: 15px;
}

.nav-link:hover, .nav-link.active {
  color: var(--color-primary);
  background-color: var(--color-primary-soft);
}

.header-auth {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.nav-cart-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  margin-right: 8px;
  transition: all 0.2s ease;
  text-decoration: none;
  cursor: pointer;
  flex-shrink: 0;
}

.nav-cart-btn i {
  font-size: 15px;
}

.nav-cart-btn:hover {
  background: var(--color-primary-soft);
  border-color: var(--color-primary);
  color: var(--color-primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.nav-cart-btn .badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: var(--color-danger);
  color: white;
  font-size: 10px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid var(--color-surface);
  box-shadow: var(--shadow-sm);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

/* Mobile Menu Toggle Button (Desktop: Hidden) */
.mobile-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  cursor: pointer;
  padding: 0;
  transition: all 0.2s ease;
  position: relative;
  flex-shrink: 0;
}

.mobile-menu-toggle:hover {
  background: var(--color-primary-soft);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.mobile-menu-toggle:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Animated Hamburger Icon */
.hamburger-box {
  width: 18px;
  height: 14px;
  display: inline-block;
  position: relative;
}

.hamburger-inner,
.hamburger-inner::before,
.hamburger-inner::after {
  width: 18px;
  height: 2px;
  background-color: currentColor;
  border-radius: 2px;
  position: absolute;
  transition: transform 0.22s cubic-bezier(0.55, 0.055, 0.675, 0.19),
              top 0.22s cubic-bezier(0.55, 0.055, 0.675, 0.19) 0.1s,
              opacity 0.22s ease;
}

.hamburger-inner {
  top: 6px;
  display: block;
}

.hamburger-inner::before,
.hamburger-inner::after {
  content: "";
  left: 0;
}

.hamburger-inner::before {
  top: -6px;
}

.hamburger-inner::after {
  top: 6px;
}

/* Active Hamburger state -> X icon */
.mobile-menu-toggle.is-active .hamburger-inner {
  transform: rotate(225deg);
  transition-delay: 0.12s;
  transition-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
}

.mobile-menu-toggle.is-active .hamburger-inner::before {
  top: 0;
  opacity: 0;
  transition: top 0.1s ease, opacity 0.1s ease 0.12s;
}

.mobile-menu-toggle.is-active .hamburger-inner::after {
  top: 0;
  transform: rotate(-90deg);
  transition: top 0.1s ease, transform 0.22s cubic-bezier(0.215, 0.61, 0.355, 1) 0.12s;
}

/* Mobile Nav Drawer & Backdrop (Desktop: Hidden) */
.mobile-nav-drawer {
  display: none;
}

.mobile-nav-backdrop {
  display: none;
}

/* User Dropdown & Badge */
.user-dropdown {
  position: relative;
  display: inline-block;
}

.user-badge-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  cursor: pointer;
  color: var(--color-text);
  transition: all 0.2s ease;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  outline: none;
  height: 38px;
}

.dark-mode .user-badge-btn {
  background: rgba(24, 24, 27, 0.95);
  border-color: rgba(255, 255, 255, 0.1);
}

.user-badge-btn:hover {
  background: var(--color-primary-soft);
  border-color: var(--color-primary);
}

.user-dropdown-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 230px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  box-shadow: 0 14px 36px -4px rgba(15, 23, 42, 0.18), 0 4px 6px -2px rgba(15, 23, 42, 0.08);
  display: none;
  flex-direction: column;
  padding: 6px 0;
  z-index: 1000;
  overflow: hidden;
  animation: fadeIn 0.2s ease;
}

.dark-mode .user-dropdown-menu {
  background: rgba(24, 24, 27, 0.97);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 14px 36px -4px rgba(0, 0, 0, 0.7), 0 4px 6px -2px rgba(0, 0, 0, 0.4);
}

.user-dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  color: var(--color-text);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s ease;
}

.user-dropdown-menu a:hover {
  background: var(--color-primary-soft);
  color: var(--color-primary);
}

.user-dropdown-menu a.logout-item {
  color: var(--color-danger);
  background: transparent;
  border: none;
  cursor: pointer;
  width: 100%;
}

.user-dropdown-menu a.logout-item:hover {
  background: var(--color-danger-subtle);
  color: var(--color-danger);
}

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

.user-greeting {
  font-size: 14px;
  color: var(--color-text-muted);
  font-weight: 500;
}

/* Main Content envelope */
.main-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 16px 80px 16px;
  min-height: calc(100vh - 220px);
}

/* Alert system */
.alerts-container {
  margin-bottom: 24px;
}

.alert {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  font-weight: 500;
  font-size: 14px;
}

.alert-success {
  background-color: var(--color-success-subtle);
  color: var(--color-success);
  border: 1px solid rgba(21, 128, 61, 0.2);
}

.alert-danger {
  background-color: var(--color-danger-subtle);
  color: var(--color-danger);
  border: 1px solid rgba(185, 28, 28, 0.2);
}

.alert-warning {
  background-color: var(--color-warning-subtle);
  color: var(--color-warning);
  border: 1px solid rgba(180, 83, 9, 0.2);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-weight: 500;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  cursor: pointer;
  user-select: none;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  padding: 12px 24px;
  border-radius: var(--radius-lg);
  font-size: 14px;
}

.btn-sm {
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
}

.btn-lg {
  padding: 14px 32px;
  font-size: 16px;
  border-radius: var(--radius-pill);
}

.btn-xs {
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
}

.btn-primary {
  background-color: var(--color-primary);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background-color: var(--color-primary-hover);
  box-shadow: var(--shadow-md);
  color: #ffffff;
}

.dark-mode .btn-primary,
.dark-mode a.btn-primary,
.dark-mode button.btn-primary,
.dark-mode input.btn-primary {
  color: #09090b !important;
}

.dark-mode .btn-primary:hover,
.dark-mode .btn-primary:focus,
.dark-mode .btn-primary:active,
.dark-mode a.btn-primary:hover,
.dark-mode a.btn-primary:focus,
.dark-mode a.btn-primary:active,
.dark-mode button.btn-primary:hover,
.dark-mode button.btn-primary:focus,
.dark-mode button.btn-primary:active,
.dark-mode input.btn-primary:hover,
.dark-mode input.btn-primary:focus,
.dark-mode input.btn-primary:active {
  color: #09090b !important;
}

.dark-mode .btn-primary i,
.dark-mode .btn-primary span,
.dark-mode .btn-primary svg,
.dark-mode a.btn-primary i,
.dark-mode a.btn-primary span,
.dark-mode a.btn-primary svg,
.dark-mode button.btn-primary i,
.dark-mode button.btn-primary span,
.dark-mode button.btn-primary svg {
  color: #09090b !important;
}

.btn-secondary {
  background-color: var(--color-primary-soft);
  color: var(--color-text);
  border-color: var(--color-border);
}

.btn-secondary:hover {
  background-color: rgba(226, 232, 240, 0.8);
  border-color: var(--color-text-muted);
}

.dark-mode .btn-secondary:hover {
  background-color: rgba(51, 65, 85, 0.8);
}

.btn-link {
  background: none;
  border: none;
  color: var(--color-text-muted);
  padding: 0;
  display: inline;
  font-size: 12px;
}

.btn-link:hover {
  color: var(--color-primary);
  text-decoration: underline;
}

.btn-block {
  display: flex;
  width: 100%;
}

/* Glassmorphism Cards */
.card {
  background-color: var(--color-surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-glass);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--color-border);
  background-color: rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dark-mode .card-header {
  background-color: rgba(15, 23, 42, 0.1);
}

.card-body {
  padding: 24px;
}

.card-footer {
  padding: 16px 24px;
  background-color: var(--color-primary-soft);
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  vertical-align: baseline;
  border-radius: var(--radius-sm);
}

.badge-pill {
  border-radius: var(--radius-pill);
}

.badge-primary {
  background-color: var(--color-primary-soft);
  color: var(--color-primary);
}

.badge-success {
  background-color: var(--color-success-subtle);
  color: var(--color-success);
}

.badge-danger {
  background-color: var(--color-danger-subtle);
  color: var(--color-danger);
}

.badge-warning {
  background-color: var(--color-warning-subtle);
  color: var(--color-warning);
}

.badge-secondary {
  background-color: #e2e8f0;
  color: #475569;
}

.dark-mode .badge-secondary {
  background-color: #334155;
  color: #94a3b8;
}

/* Glassmorphism Tables */
.table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.table th {
  background-color: var(--color-primary-soft);
  color: var(--color-text);
  font-weight: 600;
  padding: 14px 20px;
  font-size: 14px;
  border-bottom: 1px solid var(--color-border);
}

.table td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text);
  font-size: 14px;
}

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

/* Form Styling */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: 8px;
}

.form-control {
  display: block;
  width: 100%;
  height: 46px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--color-text);
  background-color: var(--color-surface);
  backdrop-filter: blur(8px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
  border-color: var(--color-primary);
  outline: 0;
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 16px;
  padding-right: 40px;
}

.dark-mode select.form-control {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
}

/* Public Redesigned Header Banner */
.header-banner {
  background-image: url('/assets/images/banner_bg.png');
  background-size: cover;
  background-position: center;
  padding: 90px 0;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 -20px 40px rgba(0, 0, 0, 0.2);
}

.header-banner::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(15, 23, 42, 0.25); /* Slightly darker blend screen */
  z-index: 1;
}

.dark-mode .header-banner::before {
  background-color: rgba(7, 9, 19, 0.6); /* Tint darker in dark mode */
}

.header-banner-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 2;
}

.banner-card {
  background: transparent;
  border: none;
  border-radius: var(--radius-lg);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.banner-card:hover {
  background: rgba(255, 255, 255, 0.05); /* Very subtle hover feedback indicator */
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.banner-card-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: var(--shadow-sm);
}

.banner-card-info {
  display: flex;
  flex-direction: column;
}

.banner-card-title {
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
}

.banner-card-subtext {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
}

.banner-logo a {
  font-size: 36px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.banner-logo .logo-accent {
  color: #E2E8F0;
}

.banner-logo-img {
  max-height: 180px;
  width: auto;
  object-fit: contain;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.3s ease;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.35));
}

.banner-logo-img:hover {
  transform: scale(1.1);
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.5));
}

/* Copy IP Tooltip Styling */
.copy-tooltip {
  position: absolute;
  bottom: -38px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #0f172a;
  color: #ffffff;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  white-space: nowrap;
  box-shadow: var(--shadow-md);
}

.copy-ip-card:hover .copy-tooltip {
  opacity: 1;
  visibility: visible;
}

/* Public Two-Column Homepage Grid */
.homepage-layout-grid {
  display: grid;
  grid-template-columns: 2.1fr 1fr;
  gap: 32px;
  align-items: start;
}

/* Image scaling inside news card updates */
.news-card-image img {
  transition: transform 0.3s ease;
}
.news-card:hover .news-card-image img {
  transform: scale(1.05);
}

/* Public Redesigned Footer */
.main-footer {
  background-color: var(--color-surface);
  border-top: 1px solid var(--color-border);
  margin-top: 60px;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.dark-mode .main-footer {
  background-color: var(--color-surface-glass);
}


/* ==========================================================================
   Premium SaaS Admin Panel Styles (Redesigned)
   ========================================================================== */

.admin-wrapper {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar (240px Wide) ────────────────────────────────────────── */
.admin-sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--color-surface-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  border-right: 1px solid var(--color-border);
  box-shadow: var(--shadow-glass);
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 200;
  transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.sidebar-logo {
  width: 100%;
  height: 64px;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
  padding: 0 20px;
  box-sizing: border-box;
}

.sidebar-logo a {
  color: var(--color-text);
  font-size: 20px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-decoration: none;
  gap: 12px;
}

.sidebar-logo a span {
  font-size: 18px;
  font-weight: 700;
}

.sidebar-logo a i {
  color: var(--color-primary);
  font-size: 20px;
}

.sidebar-menu {
  flex: 1;
  padding: 12px 10px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  overflow-y: auto;
  box-sizing: border-box;
}

/* Sidebar Link: Wide style with icon and label */
.sidebar-link {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  height: 40px;
  padding: 0 14px;
  color: var(--color-text-muted);
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius-md);
  transition: all 0.18s ease;
  position: relative;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  background: none;
  flex-shrink: 0;
  gap: 12px;
  box-sizing: border-box;
}

.sidebar-link span {
  display: inline-block;
}

.sidebar-link i {
  width: 20px;
  font-size: 16px;
  text-align: center;
  transition: transform 0.18s ease;
  flex-shrink: 0;
}

.sidebar-link:hover {
  color: var(--color-text);
  background-color: var(--color-primary-soft);
  border-color: var(--color-border);
}

.sidebar-link:hover i {
  transform: scale(1.1);
}

.sidebar-link.active,
.sidebar-link[aria-expanded="true"] {
  color: #ffffff !important;
  background-color: var(--color-primary) !important;
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary-hover);
}

.dark-mode .sidebar-link.active,
.dark-mode .sidebar-link[aria-expanded="true"] {
  color: #0f172a !important;
}

/* Hide tooltips on wide sidebar */
.sidebar-link::after {
  display: none !important;
}

.sidebar-footer {
  padding: 12px 10px;
  width: 100%;
  display: flex;
  justify-content: stretch;
  border-top: 1px solid var(--color-border);
  box-sizing: border-box;
}


/* ── Store Fly-out Panel ─────────────────────────────────────────────── */
.store-subnav {
  position: fixed;
  top: 0;
  left: 240px;
  bottom: 0;
  width: 220px;
  background: var(--color-surface-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid var(--color-border);
  box-shadow: var(--shadow-glass);
  z-index: 190;
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.store-subnav.open {
  transform: translateX(0);
}

.store-subnav-header {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
}

.store-subnav-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
}

.store-subnav-close {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  cursor: pointer;
  border: 1px solid transparent;
  background: none;
  font-size: 13px;
  transition: all 0.15s;
}

.store-subnav-close:hover {
  background: var(--color-primary-soft);
  border-color: var(--color-border);
  color: var(--color-text);
}

.store-subnav-menu {
  flex: 1;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
}

.store-subnav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 38px;
  padding: 0 12px;
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s;
  border: 1px solid transparent;
}

.store-subnav-link i {
  width: 16px;
  font-size: 13px;
  text-align: center;
  flex-shrink: 0;
}

.store-subnav-link:hover {
  color: var(--color-text);
  background: var(--color-primary-soft);
  border-color: var(--color-border);
}

.store-subnav-link.active {
  color: #ffffff;
  background: var(--color-primary);
  border-color: var(--color-primary-hover);
  box-shadow: var(--shadow-sm);
}

.dark-mode .store-subnav-link.active {
  color: #0f172a;
}

/* Push main content when store panel is open */
.admin-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  background-color: transparent;
  margin-left: 240px;
  transition: margin-left 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.store-panel-open .admin-main {
  margin-left: 460px; /* 240 sidebar + 220 store panel */
}

/* ── Admin Header ────────────────────────────────────────────────────── */
.admin-header {
  height: 64px;
  background: var(--color-surface-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 90;
  box-shadow: var(--shadow-sm);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-breadcrumb {
  font-size: 13px;
  color: var(--color-text-muted);
}

.breadcrumb-active {
  color: var(--color-text);
  font-weight: 600;
}

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

.theme-toggle-btn {
  background: var(--color-primary-soft);
  border: 1px solid var(--color-border);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  color: var(--color-text);
  transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
  background-color: var(--color-border);
}

.user-info-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: var(--color-primary-soft);
  border: 1px solid var(--color-border);
  padding: 5px 14px;
  border-radius: var(--radius-pill);
}

.user-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: var(--color-primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
}

.dark-mode .user-avatar {
  color: #0f172a;
}

.user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
}

.admin-content-inner {
  padding: 28px;
  flex: 1;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}


/* Redesigned Glassmorphism metrics */
.dashboard-header-banner {
  background: var(--color-surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-glass);
}

.dashboard-header-banner h1 {
  font-size: 26px;
  margin-bottom: 8px;
  color: var(--color-text);
}

.dashboard-header-banner p {
  color: var(--color-text-muted);
  font-size: 14px;
  max-width: 800px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.stat-card {
  display: flex;
  align-items: center;
  padding: 20px 24px;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-glass);
}

.stat-icon {
  font-size: 20px;
  background-color: var(--color-primary-soft);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  margin-right: 14px;
}

.stat-value {
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 12px;
  color: var(--color-text-muted);
  font-weight: 500;
}

.stat-gauge-box {
  width: 44px;
  height: 44px;
  margin-left: auto;
  position: relative;
}

.circular-chart {
  display: block;
  max-width: 100%;
  max-height: 100%;
}

.circle-bg {
  fill: none;
  stroke: var(--color-primary-soft);
  stroke-width: 3.8;
}

.circle {
  fill: none;
  stroke: var(--color-primary);
  stroke-width: 3.8;
  stroke-linecap: round;
}

.dark-mode .circle {
  stroke: var(--color-primary);
}

.gauge-percentage {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 9px;
  font-weight: 700;
  color: var(--color-text);
}

.dashboard-grid-main {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  margin-top: 20px;
}

.graph-card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
}

.chart-legend {
  display: flex;
  gap: 16px;
  justify-content: flex-end;
  font-size: 12px;
  margin-bottom: 16px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

.line-chart-svg-box {
  position: relative;
  width: 100%;
  height: 240px;
  margin-top: 10px;
}

.line-chart-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.chart-grid-line {
  stroke: var(--color-border);
  stroke-width: 1;
  stroke-dasharray: 4,4;
}

.chart-curve {
  fill: none;
  stroke: var(--color-primary);
  stroke-width: 3.5;
  stroke-linecap: round;
  filter: drop-shadow(0px 4px 10px rgba(15, 23, 42, 0.15));
}

.dark-mode .chart-curve {
  stroke: var(--color-primary);
  filter: drop-shadow(0px 4px 10px rgba(15, 23, 42, 0.2));
}

.chart-curve-area {
  fill: url(#chart-gradient-light);
  opacity: 0.15;
}

.dark-mode .chart-curve-area {
  fill: url(#chart-gradient-dark);
  opacity: 0.2;
}

.chart-point {
  fill: var(--color-surface);
  stroke: var(--color-primary);
  stroke-width: 3;
  cursor: pointer;
  transition: r 0.1s ease;
}

.dark-mode .chart-point {
  stroke: var(--color-primary);
}

.chart-point:hover {
  r: 7;
}

.chart-labels-x {
  display: flex;
  justify-content: space-between;
  padding: 10px 10px 0 10px;
  border-top: 1px solid var(--color-border);
  font-size: 11px;
  color: var(--color-text-muted);
}

.chart-label-x-item {
  flex: 1;
  text-align: center;
}

.gauge-semi-box {
  width: 180px;
  height: 90px;
  margin: 30px auto 10px auto;
  position: relative;
  overflow: hidden;
}

.gauge-semi-body {
  position: absolute;
  top: 0;
  left: 0;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  border: 18px solid var(--color-primary-soft);
  border-bottom-color: var(--color-primary) !important;
  border-right-color: var(--color-primary) !important;
  transform: rotate(-45deg);
  box-sizing: border-box;
}

.dark-mode .gauge-semi-body {
  border-bottom-color: var(--color-primary) !important;
  border-right-color: var(--color-primary) !important;
}

.gauge-semi-text {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  text-align: center;
  font-size: 20px;
  font-weight: 700;
}

.admin-grid-two {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  align-items: start;
}

.table-card {
  box-shadow: var(--shadow-sm);
}

.form-card {
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 94px;
}

.page-title-area {
  margin-bottom: 24px;
}

.page-title-area h2 {
  font-size: 24px;
  margin-bottom: 4px;
  color: var(--color-text);
}

.page-title-area p {
  font-size: 14px;
  color: var(--color-text-muted);
}

.permission-group-box {
  margin-bottom: 24px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.permission-group-header {
  background-color: var(--color-primary-soft);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--color-border);
}

.permission-group-header h4 {
  margin-right: auto;
  color: var(--color-text);
}

.permission-checkboxes-grid {
  padding: 16px 20px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  background-color: var(--color-surface);
}

.permission-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  transition: all 0.15s ease;
  color: var(--color-text);
}

.permission-checkbox-label:hover {
  background-color: var(--color-primary-soft);
  border-color: var(--color-border);
}

.permission-checkbox-label input[type="checkbox"] {
  margin-top: 3px;
  cursor: pointer;
}

.chk-key code {
  font-family: monospace;
  font-weight: 600;
  color: var(--color-text);
  font-size: 12px;
}

/* Responsive configurations */
@media (max-width: 992px) {
  /* Mobile Navbar & Hamburger */
  .mobile-menu-toggle {
    display: inline-flex;
  }

  .main-nav {
    display: none;
  }

  .mobile-nav-drawer {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.97);
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 16px 36px -4px rgba(15, 23, 42, 0.2), 0 4px 6px -2px rgba(15, 23, 42, 0.05);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    z-index: 101;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    pointer-events: none;
  }

  .dark-mode .mobile-nav-drawer {
    background: rgba(24, 24, 27, 0.97);
    border-bottom-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 16px 36px -4px rgba(0, 0, 0, 0.7), 0 4px 6px -2px rgba(0, 0, 0, 0.4);
  }

  .mobile-nav-drawer.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
  }

  .mobile-nav-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 1400px;
    margin: 0 auto;
  }

  .mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    min-height: 48px;
    border-radius: var(--radius-md);
    color: var(--color-text);
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    border: 1px solid transparent;
  }

  .mobile-nav-link .mobile-nav-icon {
    font-size: 16px;
    width: 22px;
    text-align: center;
    color: var(--color-text-muted);
    transition: color 0.15s ease;
    flex-shrink: 0;
  }

  .mobile-nav-link .mobile-nav-text {
    flex: 1;
  }

  .mobile-nav-link .mobile-nav-external {
    font-size: 12px;
    color: var(--color-text-muted);
    opacity: 0.7;
    flex-shrink: 0;
  }

  .mobile-nav-link:hover {
    background: var(--color-primary-soft);
    color: var(--color-primary);
  }

  .mobile-nav-link:hover .mobile-nav-icon {
    color: var(--color-primary);
  }

  .mobile-nav-link.active {
    background: var(--color-primary-soft);
    color: var(--color-primary);
    border-color: var(--color-border-light);
    font-weight: 700;
  }

  .mobile-nav-link.active .mobile-nav-icon {
    color: var(--color-primary);
  }

  .mobile-nav-auth {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid var(--color-border);
  }

  .mobile-nav-auth .btn-block {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
  }

  .mobile-nav-backdrop {
    display: block;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.35);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s;
    pointer-events: none;
  }

  .mobile-nav-backdrop.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .hero-section {
    flex-direction: column;
    text-align: center;
    padding: 40px 0;
  }
  .hero-actions {
    justify-content: center;
  }
  .admin-wrapper {
    flex-direction: column;
  }
  .admin-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--color-border);
  }
  .sidebar-menu {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    padding: 12px;
  }
  .sidebar-link::after {
    display: none; /* Hide hover tooltips on small screens */
  }
  .admin-grid-two, .dashboard-grid-main {
    grid-template-columns: 1fr;
  }
  .form-card {
    position: static;
  }
  .header-banner-container {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }
  .banner-logo-img {
    max-height: 120px;
  }
  .banner-card {
    width: 100%;
    justify-content: center;
  }
  .homepage-layout-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .header-container {
    padding: 0 12px;
  }
  .header-auth .auth-btn-login,
  .header-auth .auth-btn-register {
    padding: 6px 8px;
    font-size: 12px;
  }
  .user-badge-btn span {
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* News List Row Layout */
.news-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.news-row-card {
  display: flex;
  overflow: hidden;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-glass);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  min-height: 160px;
}

.news-row-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.news-row-card .news-image-area {
  width: 240px;
  min-width: 240px;
  position: relative;
  overflow: hidden;
  background-color: var(--color-primary-soft);
}

.news-row-card .news-image-area img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.news-row-card:hover .news-image-area img {
  transform: scale(1.05);
}

.news-row-card .news-content-area {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}

/* Responsive adjustment for news row list card */
@media (max-width: 768px) {
  .news-row-card {
    flex-direction: column;
  }
  .news-row-card .news-image-area {
    width: 100%;
    height: 160px;
  }
}

/* Welcome Hero Card Styles */
.welcome-hero-card {
  position: relative;
  overflow: hidden;
  padding: 40px;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.75) 0%, rgba(255, 255, 255, 0.45) 100%) !important;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.6) !important;
  box-shadow: var(--shadow-glass);
}

.dark-mode .welcome-hero-card {
  background: linear-gradient(135deg, rgba(24, 24, 27, 0.75) 0%, rgba(24, 24, 27, 0.45) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

/* Auth Container & Form Styles */
.auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 16px;
  min-height: calc(100vh - 400px);
}

.auth-card {
  max-width: 460px;
  width: 100%;
  padding: 40px !important; /* Force layout padding to override card default padding */
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-glass);
}

.auth-header {
  text-align: center;
  margin-bottom: 32px;
}

.auth-header h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 8px;
}

.auth-header p {
  font-size: 13px;
  color: var(--color-text-muted);
}

.auth-footer {
  text-align: center;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--color-border-light);
  font-size: 13px;
  color: var(--color-text-muted);
}

.auth-footer a {
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: none;
}

.auth-footer a:hover {
  text-decoration: underline;
}

/* ── Admin Dashboard Modals ─────────────────────────────────────────── */
.admin-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.admin-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.admin-modal-content {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-glass);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  transform: scale(0.95);
  transition: transform 0.2s ease;
}

.admin-modal.open .admin-modal-content {
  transform: scale(1);
}

.admin-modal-header {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
}

.admin-modal-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text);
  margin: 0;
}

.admin-modal-close {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  cursor: pointer;
  border: 1px solid transparent;
  background: none;
  font-size: 20px;
  line-height: 1;
  transition: all 0.15s;
}

.admin-modal-close:hover {
  background: var(--color-primary-soft);
  border-color: var(--color-border);
  color: var(--color-text);
}

.admin-modal-body {
  padding: 24px;
  flex: 1;
  overflow-y: auto;
}


/* Top Credit Loader — Minotar tam vücut render kırpma (üst %80 görünür, ayaklar kesilir) */
.top-loader-avatar-wrap {
  width: 60px;
  height: 96px; /* 0.8 x 120px görsel yüksekliği */
  overflow: hidden;
  position: relative;
  z-index: 2;
}

.top-loader-avatar-wrap img {
  position: absolute;
  top: 0;
  left: 0;
  width: 60px;
  height: 120px; /* tam görsel, üst hizalı; taşan alt kısım gizlenir */
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

/* Recent Registrations — footer üstü, tam sayfa genişliği (card değil): sol gradyan bilgi paneli + sağ kafa listesi */
.recent-registrations-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  /* Sol yarı lacivert-mavi, sağ yarı zeminden bir ton açık yüzey; ortada yumuşak geçiş */
  background: linear-gradient(90deg, #1e3a8a 0%, #3b82f6 40%, var(--color-bg-raised) 55%);
}

.recent-registrations-info {
  padding: 28px 36px 28px 96px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.recent-registrations-list {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 28px;
  padding: 24px 36px;
}

.recent-registrations-user {
  text-align: center;
  min-width: 80px;
}

.recent-registrations-user img {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.recent-registrations-section + .main-footer {
  margin-top: 0; /* bölüm footer'a bitişik olsun (main-footer varsayılan margin-top 60px) */
}

@media (max-width: 992px) {
  .recent-registrations-grid {
    grid-template-columns: 1fr;
  }
}

/* ─────────────────────────────────────────────────────────────────────────────
   CKEditor 5 Design System Skin (Light & Dark Mode)
   Adheres to .context/13-DESIGN-SYSTEM-UI-GUIDELINES.md
   ───────────────────────────────────────────────────────────────────────────── */

/* Light Mode (Default) */
.ck.ck-editor {
  position: relative;
  width: 100%;
}

.ck.ck-editor__top .ck-sticky-panel .ck-toolbar,
.ck.ck-toolbar {
  border-color: var(--color-border) !important;
  border-top-left-radius: var(--radius-md) !important;
  border-top-right-radius: var(--radius-md) !important;
  border-bottom-left-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
  background: var(--color-primary-soft) !important;
  padding: 6px 8px !important;
}

.ck.ck-toolbar .ck-toolbar__separator {
  background: var(--color-border) !important;
}

.ck.ck-editor__main > .ck-editor__editable {
  background-color: var(--color-surface) !important;
  color: var(--color-text) !important;
  border-color: var(--color-border) !important;
  border-top-left-radius: 0 !important;
  border-top-right-radius: 0 !important;
  border-bottom-left-radius: var(--radius-md) !important;
  border-bottom-right-radius: var(--radius-md) !important;
  padding: 1rem 1.25rem !important;
  font-size: 15px;
  line-height: 1.7;
  font-family: inherit;
}

.ck.ck-editor__main > .ck-editor__editable.ck-focused {
  border-color: var(--color-primary) !important;
  box-shadow: none !important;
}

.ck.ck-toolbar .ck-button {
  color: var(--color-text) !important;
  cursor: pointer;
  border-radius: var(--radius-sm) !important;
}

.ck.ck-toolbar .ck-button:hover:not(.ck-disabled) {
  background: rgba(0, 0, 0, 0.06) !important;
}

.ck.ck-toolbar .ck-button.ck-on {
  background: rgba(0, 0, 0, 0.1) !important;
}

.ck.ck-toolbar .ck-button .ck-icon {
  color: currentColor !important;
}

/* Dropdowns & Panels */
.ck.ck-dropdown__panel {
  background: var(--color-surface) !important;
  border-color: var(--color-border) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-lg) !important;
}

.ck.ck-list {
  background: transparent !important;
  padding: 4px 0 !important;
}

.ck.ck-list__item .ck-button {
  color: var(--color-text) !important;
  border-radius: 0 !important;
}

.ck.ck-list__item .ck-button:hover:not(.ck-disabled) {
  background: var(--color-primary-soft) !important;
}

.ck.ck-list__item .ck-button.ck-on {
  background: var(--color-primary-soft) !important;
  color: var(--color-primary) !important;
  font-weight: 600;
}

/* Balloon panels / link dialogs */
.ck.ck-balloon-panel {
  background: var(--color-surface) !important;
  border-color: var(--color-border) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-lg) !important;
}

.ck.ck-balloon-panel[class*="arrow_n"]::after {
  border-bottom-color: var(--color-surface) !important;
}
.ck.ck-balloon-panel[class*="arrow_s"]::after {
  border-top-color: var(--color-surface) !important;
}
.ck.ck-balloon-panel[class*="arrow_e"]::after {
  border-left-color: var(--color-surface) !important;
}
.ck.ck-balloon-panel[class*="arrow_w"]::after {
  border-right-color: var(--color-surface) !important;
}

.ck.ck-input {
  background: var(--color-surface) !important;
  border-color: var(--color-border) !important;
  color: var(--color-text) !important;
  border-radius: var(--radius-sm) !important;
}

.ck.ck-input:focus {
  border-color: var(--color-primary) !important;
  box-shadow: none !important;
}

.ck.ck-labeled-field-label {
  color: var(--color-text-muted) !important;
  background: var(--color-surface) !important;
}

.ck.ck-button.ck-button-action {
  background: var(--color-success) !important;
  color: #FFFFFF !important;
}

.ck.ck-button.ck-button-cancel {
  background: var(--color-danger) !important;
  color: #FFFFFF !important;
}

/* ── Dark Mode CKEditor Specifics ── */
.dark-mode .ck.ck-editor__top .ck-sticky-panel .ck-toolbar,
.dark-mode .ck.ck-toolbar,
.dark-mode .ck-toolbar {
  background-color: #27272A !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

.dark-mode .ck.ck-toolbar .ck-toolbar__separator {
  background: rgba(255, 255, 255, 0.1) !important;
}

.dark-mode .ck.ck-editor__main > .ck-editor__editable,
.dark-mode .ck-editor__editable {
  background-color: #18181B !important;
  color: #F4F4F5 !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

.dark-mode .ck.ck-editor__main > .ck-editor__editable.ck-focused,
.dark-mode .ck-editor__editable.ck-focused {
  border-color: var(--color-primary) !important;
}

.dark-mode .ck.ck-toolbar .ck-button {
  color: #F4F4F5 !important;
}

.dark-mode .ck.ck-toolbar .ck-button:hover:not(.ck-disabled) {
  background-color: #3F3F46 !important;
  color: #FFFFFF !important;
}

.dark-mode .ck.ck-toolbar .ck-button.ck-on {
  background-color: #3F3F46 !important;
  color: #FFFFFF !important;
}

.dark-mode .ck.ck-dropdown .ck-button.ck-dropdown__button {
  background-color: transparent !important;
  color: #F4F4F5 !important;
}

.dark-mode .ck.ck-dropdown__panel {
  background-color: #18181B !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6) !important;
}

.dark-mode .ck.ck-list {
  background-color: #18181B !important;
}

.dark-mode .ck.ck-list__item .ck-button {
  background-color: transparent !important;
  color: #F4F4F5 !important;
}

.dark-mode .ck.ck-list__item .ck-button:hover:not(.ck-disabled) {
  background-color: #27272A !important;
  color: #FFFFFF !important;
}

.dark-mode .ck.ck-list__item .ck-button.ck-on {
  background-color: #3F3F46 !important;
  color: #FFFFFF !important;
}

.dark-mode .ck.ck-balloon-panel {
  background-color: #18181B !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  color: #F4F4F5 !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6) !important;
}

.dark-mode .ck.ck-balloon-panel[class*="arrow_n"]::after {
  border-bottom-color: #18181B !important;
}
.dark-mode .ck.ck-balloon-panel[class*="arrow_s"]::after {
  border-top-color: #18181B !important;
}
.dark-mode .ck.ck-balloon-panel[class*="arrow_e"]::after {
  border-left-color: #18181B !important;
}
.dark-mode .ck.ck-balloon-panel[class*="arrow_w"]::after {
  border-right-color: #18181B !important;
}

.dark-mode .ck.ck-input {
  background-color: #09090B !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  color: #F4F4F5 !important;
}

.dark-mode .ck.ck-input:focus {
  border-color: var(--color-primary) !important;
}

.dark-mode .ck.ck-labeled-field-label {
  background-color: transparent !important;
  color: var(--color-text-muted) !important;
}

/* Content typography inside editable in dark mode */
.dark-mode .ck-content h2,
.dark-mode .ck-content h3,
.dark-mode .ck-content h4 {
  color: #F4F4F5 !important;
}

.dark-mode .ck-content p,
.dark-mode .ck-content ul,
.dark-mode .ck-content ol,
.dark-mode .ck-content li {
  color: #E4E4E7 !important;
}

.dark-mode .ck-content blockquote {
  border-left-color: rgba(255, 255, 255, 0.2) !important;
  color: #A1A1AA !important;
  background: rgba(255, 255, 255, 0.03) !important;
}

.dark-mode .ck-content code {
  background-color: #27272A !important;
  color: #F4F4F5 !important;
}

.dark-mode .ck-content a {
  color: #60A5FA !important;
}

.dark-mode .ck-content hr {
  border-color: rgba(255, 255, 255, 0.1) !important;
}

