/* ══════════════════════════════════════════════════════════════════════════════
   VEKIL MAIL BOT — ULTRA-PREMIUM OBSIDIAN & CHAMPAGNE GOLD ENTERPRISE DESIGN SYSTEM
   ══════════════════════════════════════════════════════════════════════════════ */

:root {
  /* Surfaces */
  --bg-base: #08090c;
  --bg-surface: #0f1117;
  --bg-elevated: #151821;
  --bg-input: #12141c;

  /* Borders */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.15);
  --border-gold-subtle: rgba(212, 175, 55, 0.25);
  --border-gold-hover: rgba(230, 202, 101, 0.5);

  /* Gold Colors */
  --gold-primary: #d4af37;
  --gold-light: #f5e4b3;
  --gold-champagne: #e8d08d;
  --gold-muted: #9e822d;
  --gold-gradient: linear-gradient(135deg, #f5e4b3 0%, #d4af37 50%, #9e822d 100%);
  --gold-glow: 0 0 24px rgba(212, 175, 55, 0.18);

  /* Typography Colors */
  --text-main: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #808ea3;
  --text-gold: #e8d08d;

  /* Status Colors */
  --status-emerald: #10b981;
  --status-ruby: #f43f5e;
  --status-amber: #f59e0b;

  /* Geometry & Radius */
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 9999px;

  /* Fonts */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Transitions */
  --ease-snappy: 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  --ease-smooth: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-base);
  background-image: 
    radial-gradient(circle at 50% -10%, rgba(212, 175, 55, 0.08) 0%, transparent 60%),
    radial-gradient(circle at 100% 100%, rgba(212, 175, 55, 0.04) 0%, transparent 50%);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Ambient Subtle Glow */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(140px);
}
.gold-glow-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.09) 0%, transparent 70%);
  top: -120px;
  left: 30%;
}
.gold-glow-2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(245, 228, 179, 0.05) 0%, transparent 70%);
  bottom: 0;
  right: -50px;
}
.gold-glow-3 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(158, 130, 45, 0.05) 0%, transparent 70%);
  top: 45%;
  left: -80px;
}

/* Glass Card */
.glass-card-gold {
  background: rgba(15, 17, 23, 0.82);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-subtle);
  border-top: 1px solid rgba(212, 175, 55, 0.35);
  box-shadow: 
    0 16px 40px rgba(0, 0, 0, 0.7),
    0 1px 2px rgba(0, 0, 0, 0.4);
  border-radius: var(--radius-lg);
  transition: border-color var(--ease-smooth), box-shadow var(--ease-smooth);
}
.glass-card-gold:hover {
  border-color: var(--border-gold-subtle);
}

.font-mono {
  font-family: var(--font-mono);
}

.hidden {
  display: none !important;
}

/* ══════════════════════════════════════════════════════════════════════════════
   1. GİRİŞ KAPISI / TOKEN LOGIN GATE
   ══════════════════════════════════════════════════════════════════════════════ */
html.user-logged-in #loginGateModal {
  display: none !important;
}
html.user-logged-in #mainAppWrapper {
  display: block !important;
}

.login-gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(8, 9, 12, 0.94);
  backdrop-filter: blur(30px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 440px;
  padding: 44px 38px;
  text-align: center;
  position: relative;
  border-radius: var(--radius-lg);
  box-shadow: 
    0 24px 60px rgba(0, 0, 0, 0.9),
    0 0 40px rgba(212, 175, 55, 0.08);
}
.login-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 20%;
  right: 20%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #d4af37, #f5e4b3, transparent);
}

.login-brand {
  margin-bottom: 26px;
}
.login-crown-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border-radius: 14px;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.35);
  color: var(--gold-champagne);
  margin-bottom: 16px;
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.15);
}

.brand-title-gold {
  font-size: 1.65rem;
  letter-spacing: 0.5px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 6px;
}
.brand-tagline {
  color: var(--text-secondary);
  font-size: 0.88rem;
}

.login-desc {
  color: var(--text-secondary);
  font-size: 0.92rem;
  margin-bottom: 24px;
  line-height: 1.5;
}

.label-gold {
  display: block;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  letter-spacing: 0.2px;
  text-align: left;
}

.input-wrapper-gold {
  position: relative;
  display: flex;
  align-items: center;
}
.input-icon-gold {
  position: absolute;
  left: 14px;
  color: var(--gold-primary);
  display: flex;
  align-items: center;
  pointer-events: none;
}
.form-control-gold {
  width: 100%;
  padding: 12px 14px 12px 42px;
  background: var(--bg-input);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 0.92rem;
  outline: none;
  transition: border-color var(--ease-snappy), box-shadow var(--ease-snappy);
}
select.form-control-gold {
  padding-left: 14px;
  cursor: pointer;
  background-color: #12141c;
}
select.form-control-gold option {
  background-color: #12141c;
  color: #fff;
  padding: 8px;
}
select.form-control-gold optgroup {
  background-color: #0b0c11;
  color: var(--gold-champagne);
  font-weight: 700;
}
.form-control-gold:focus {
  border-color: var(--gold-primary);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.18);
}

.login-error-msg {
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.35);
  color: #fda4af;
  padding: 10px 14px;
  border-radius: var(--radius-xs);
  font-size: 0.85rem;
  margin-bottom: 16px;
  text-align: left;
}

.btn-gold-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  background: var(--gold-gradient);
  color: #08090c;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 700;
  font-family: var(--font-sans);
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(212, 175, 55, 0.25);
  transition: transform var(--ease-snappy), box-shadow var(--ease-snappy), filter var(--ease-snappy);
}
.btn-gold-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
  filter: brightness(1.05);
}
.btn-gold-action:active {
  transform: translateY(0);
}
.w-full {
  width: 100%;
}

.login-footer {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}
.secure-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ══════════════════════════════════════════════════════════════════════════════
   2. NAVBAR & HEADER
   ══════════════════════════════════════════════════════════════════════════════ */
.app-container {
  max-width: 1540px;
  margin: 0 auto;
  padding: 24px;
  position: relative;
  z-index: 1;
}

.navbar-gold {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  margin-bottom: 24px;
  border-radius: var(--radius-md);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-badge-gold {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.3);
  color: var(--gold-champagne);
  display: flex;
  align-items: center;
  justify-content: center;
}
.brand-heading {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.3px;
  color: #fff;
  line-height: 1.2;
}
.brand-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.2px;
}

.header-stats {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.stat-pill-gold {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  background: rgba(18, 21, 29, 0.85);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  font-size: 0.84rem;
}
.stat-icon {
  font-size: 0.95rem;
}
.stat-meta {
  display: flex;
  align-items: center;
  gap: 6px;
}
.stat-label {
  color: var(--text-muted);
  font-size: 0.78rem;
}
.stat-value {
  color: var(--gold-champagne);
  font-weight: 700;
}

.user-pill {
  border-color: rgba(255, 255, 255, 0.12);
}
.user-name {
  color: var(--text-main);
  font-weight: 600;
}
.badge-superadmin {
  background: var(--gold-gradient);
  color: #08090c;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  letter-spacing: 0.5px;
}

.btn-admin-gold {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.3);
  color: var(--gold-champagne);
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--ease-snappy);
}
.btn-admin-gold:hover {
  background: rgba(212, 175, 55, 0.2);
  border-color: var(--gold-primary);
  transform: translateY(-1px);
}

.btn-logout-gold {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  background: rgba(244, 63, 94, 0.08);
  border: 1px solid rgba(244, 63, 94, 0.25);
  color: #fda4af;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--ease-snappy);
}
.btn-logout-gold:hover {
  background: rgba(244, 63, 94, 0.2);
  border-color: var(--status-ruby);
}

/* ══════════════════════════════════════════════════════════════════════════════
   3. 2/3 SOL FORM & 1/3 SAĞ SÜREKLİ CANLI ÖNİZLEME SPLIT LAYOUT
   ══════════════════════════════════════════════════════════════════════════════ */
.app-split-layout {
  display: grid;
  grid-template-columns: 2fr 1.15fr;
  gap: 24px;
  align-items: stretch;
  margin-bottom: 40px;
}
@media (max-width: 1100px) {
  .app-split-layout {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }
}

.composer-column {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.preview-column {
  min-width: 0;
  position: relative;
  display: flex;
  flex-direction: column;
}

.sticky-preview {
  position: sticky;
  top: 20px;
  height: 100%;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7);
}
@media (max-width: 1100px) {
  .sticky-preview {
    position: static;
    height: 650px;
  }
}

.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(18, 21, 29, 0.95);
  flex-shrink: 0;
}
.preview-title {
  display: flex;
  align-items: center;
  gap: 8px;
}
.preview-title h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
}
.preview-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--status-emerald);
  box-shadow: 0 0 8px var(--status-emerald);
  animation: pulseDot 2s infinite ease-in-out;
}
@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.preview-bank-tag {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid rgba(212, 175, 55, 0.35);
  color: var(--gold-champagne);
  border-radius: var(--radius-pill);
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-meta-bar {
  background: rgba(14, 16, 23, 0.92);
  padding: 10px 18px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.8rem;
  flex-shrink: 0;
}
.preview-meta-item {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.preview-meta-label {
  color: var(--text-muted);
  width: 58px;
  flex-shrink: 0;
  font-weight: 600;
  font-size: 0.76rem;
}
.preview-meta-val {
  color: var(--text-main);
  word-break: break-all;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-frame-container {
  flex: 1;
  min-height: 480px;
  width: 100%;
  background: #ffffff;
  position: relative;
  overflow: hidden;
  border-bottom-left-radius: var(--radius-lg);
  border-bottom-right-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
}
.live-preview-iframe {
  flex: 1;
  width: 100%;
  height: 100%;
  min-height: 100%;
  border: none;
  background: #ffffff;
  display: block;
}

.composer-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-subtle);
}
.card-title-gold {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
}
.card-title-gold svg {
  color: var(--gold-primary);
}
.card-title-gold h2 {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.composer-tools {
  display: flex;
  gap: 8px;
}
.btn-gold-chip {
  padding: 6px 14px;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: var(--radius-pill);
  color: var(--gold-champagne);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--ease-snappy);
}
.btn-gold-chip:hover {
  background: rgba(212, 175, 55, 0.25);
  border-color: var(--gold-primary);
  color: #fff;
}
.btn-gold-chip-ghost {
  padding: 6px 12px;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  font-size: 0.8rem;
  cursor: pointer;
}
.btn-gold-chip-ghost:hover {
  color: var(--text-main);
  border-color: var(--border-medium);
}

.form-container {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex: 1;
}

.form-row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 720px) {
  .form-row-2col {
    grid-template-columns: 1fr;
  }
}

.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.label-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
}
.required {
  color: #f43f5e;
  margin-left: 2px;
}

.bank-color-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.custom-bank-box {
  margin-top: 10px;
  padding: 12px;
  background: rgba(18, 21, 29, 0.6);
  border: 1px dashed var(--border-medium);
  border-radius: var(--radius-sm);
}
.label-gold-sm {
  display: block;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
  font-weight: 600;
}

.btn-link-gold {
  background: none;
  border: none;
  color: var(--gold-champagne);
  font-size: 0.82rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
}
.btn-link-gold:hover {
  color: #fff;
}

/* ══════════════════════════════════════════════════════════════════════════════
   4. ŞABLON ALANLARI GRIDİ (DÜZELTİLMİŞ PROFESYONEL SAYFA YAPISI)
   ══════════════════════════════════════════════════════════════════════════════ */
.template-fields-box {
  background: rgba(13, 15, 22, 0.8);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--gold-primary);
  border-radius: var(--radius-md);
  padding: 20px;
}
.fields-header-gold {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}
.fields-header-gold h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}
.fields-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* 2-Kolonlu Temiz Grid */
.dynamic-inputs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
@media (max-width: 680px) {
  .dynamic-inputs-grid {
    grid-template-columns: 1fr;
  }
}

/* Textarea ve Geniş Alanlar İçin Full-Width Sınıfı */
.form-group-full {
  grid-column: 1 / -1;
  width: 100%;
}

textarea.form-control-gold {
  width: 100%;
  min-height: 130px;
  resize: vertical;
  padding: 12px 14px;
  font-family: var(--font-sans);
  line-height: 1.6;
}

/* Aksiyon Butonları */
.form-actions {
  margin-top: 10px;
}

.btn-send-gold {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 26px;
  background: var(--gold-gradient);
  color: #08090c;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1.02rem;
  font-weight: 800;
  font-family: var(--font-sans);
  letter-spacing: 0.3px;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(212, 175, 55, 0.25);
  transition: transform var(--ease-snappy), box-shadow var(--ease-snappy), filter var(--ease-snappy);
}
.btn-send-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(212, 175, 55, 0.4);
  filter: brightness(1.05);
}
.btn-send-gold:active {
  transform: translateY(0);
}
.btn-send-gold:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ══════════════════════════════════════════════════════════════════════════════
   5. ADMIN PANEL & PREVIEW MODALS
   ══════════════════════════════════════════════════════════════════════════════ */
.modal-backdrop-gold {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(6, 7, 10, 0.88);
  backdrop-filter: blur(25px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-window-gold {
  width: 100%;
  max-width: 960px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.9);
}
.modal-header-gold {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-subtle);
}
.btn-close-gold {
  background: transparent;
  border: none;
  font-size: 1.6rem;
  color: var(--text-muted);
  cursor: pointer;
}
.btn-close-gold:hover {
  color: #fff;
}
.modal-body-gold {
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.admin-sub-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
}

.admin-create-box {
  background: rgba(18, 21, 29, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 18px;
}
.admin-create-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) auto;
  gap: 12px;
  align-items: flex-end;
}
.form-group-sm label {
  display: block;
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-bottom: 5px;
}

.table-responsive {
  overflow-x: auto;
}
.table-gold {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.82rem;
}
.table-gold th {
  padding: 10px 12px;
  background: rgba(18, 21, 29, 0.8);
  color: var(--text-secondary);
  font-weight: 700;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}
.table-gold td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-main);
  white-space: nowrap;
}
.table-gold tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.badge-tag-gold {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  font-size: 0.7rem;
  font-weight: 700;
}
.badge-tag-danger {
  background: rgba(244, 63, 94, 0.12);
  color: #fda4af;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  font-size: 0.7rem;
  font-weight: 700;
}

.btn-action-table {
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  color: var(--text-main);
  font-size: 0.72rem;
  cursor: pointer;
  margin-right: 4px;
}
.btn-action-table:hover {
  background: rgba(212, 175, 55, 0.15);
  border-color: rgba(212, 175, 55, 0.3);
  color: var(--gold-champagne);
}
.btn-action-danger {
  color: #fda4af;
  border-color: rgba(244, 63, 94, 0.2);
}
.btn-action-danger:hover {
  background: rgba(244, 63, 94, 0.15);
  border-color: var(--status-ruby);
}

/* ══════════════════════════════════════════════════════════════════════════════
   6. CANLI ÖNİZLEME MODALI & BAŞLIK BİLGİ BARI
   ══════════════════════════════════════════════════════════════════════════════ */
.modal-preview {
  max-width: 860px;
  height: 88vh;
}
.preview-meta-bar {
  background: rgba(18, 21, 29, 0.95);
  padding: 12px 24px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 0.82rem;
}
.preview-meta-item {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.preview-meta-label {
  color: var(--text-muted);
  width: 100px;
  flex-shrink: 0;
  font-weight: 600;
}
.preview-meta-val {
  color: var(--text-main);
  word-break: break-all;
}

.modal-preview-body {
  flex: 1;
  padding: 0;
  background: #ffffff;
}
.preview-iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast-gold {
  min-width: 280px;
  max-width: 400px;
  padding: 12px 16px;
  background: rgba(18, 21, 29, 0.96);
  border: 1px solid var(--border-gold-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
  font-size: 0.88rem;
  animation: slideIn 0.25s ease forwards;
}
.toast-gold.toast-error {
  border-color: rgba(244, 63, 94, 0.4);
}
@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}


/* Professional admin dashboard */
.admin-dashboard-shell {
  max-width: 1240px;
  max-height: 94vh;
  background: linear-gradient(145deg, rgba(17, 20, 28, 0.98), rgba(8, 10, 15, 0.99));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.72), 0 0 0 1px rgba(212, 175, 55, 0.05);
}
.admin-dashboard-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 25px 28px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: linear-gradient(100deg, rgba(212, 175, 55, 0.08), transparent 40%);
}
.admin-header-copy h3 { font-size: 1.45rem; letter-spacing: -0.03em; margin: 3px 0 4px; }
.admin-header-copy p { color: var(--text-muted); font-size: 0.84rem; }
.admin-eyebrow, .admin-section-kicker {
  display: block;
  color: var(--gold-champagne);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.admin-header-actions { display: flex; align-items: center; gap: 14px; }
.admin-system-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border: 1px solid rgba(16, 185, 129, 0.22);
  border-radius: var(--radius-pill);
  background: rgba(16, 185, 129, 0.08);
  color: #6ee7b7;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}
.admin-system-status i { width: 7px; height: 7px; border-radius: 50%; background: #34d399; box-shadow: 0 0 12px #34d399; }
.admin-dashboard-body { gap: 18px; padding: 22px 28px 28px; }
.admin-stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.admin-stat-card {
  position: relative;
  overflow: hidden;
  min-height: 116px;
  padding: 17px 18px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(26, 30, 40, 0.85), rgba(14, 17, 23, 0.82));
}
.admin-stat-card::after { content: ''; position: absolute; inset: auto -25px -35px auto; width: 90px; height: 90px; border-radius: 50%; background: rgba(148, 163, 184, 0.08); filter: blur(3px); }
.admin-stat-success::after { background: rgba(16, 185, 129, 0.12); }
.admin-stat-gold::after { background: rgba(212, 175, 55, 0.14); }
.admin-stat-warning::after { background: rgba(245, 158, 11, 0.12); }
.admin-stat-label { display: block; color: var(--text-muted); font-size: 0.72rem; font-weight: 700; }
.admin-stat-card strong { display: block; margin: 7px 0 1px; color: #fff; font-size: 1.7rem; letter-spacing: -0.04em; }
.admin-stat-card small { color: var(--text-muted); font-size: 0.68rem; }
.admin-panel-card {
  padding: 19px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 15px;
  background: rgba(15, 18, 25, 0.72);
}
.admin-section-heading h4 { margin: 2px 0 2px; color: #fff; font-size: 1rem; }
.admin-section-heading p { color: var(--text-muted); font-size: 0.74rem; }
.admin-create-grid { grid-template-columns: 1.3fr 0.7fr 0.7fr 1.35fr auto; margin-top: 15px; }
.form-group-sm label span { color: #596579; font-weight: 500; }
.admin-primary-action { min-height: 43px; padding-inline: 20px; white-space: nowrap; }
.admin-table-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 14px; }
.admin-toolbar-actions { display: flex; align-items: center; gap: 9px; }
.admin-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 245px;
  height: 38px;
  padding: 0 11px;
  border: 1px solid var(--border-subtle);
  border-radius: 9px;
  background: rgba(7, 9, 13, 0.72);
  color: var(--text-muted);
}
.admin-search-box:focus-within { border-color: rgba(212, 175, 55, 0.45); box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.07); }
.admin-search-box input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--text-main); font: inherit; font-size: 0.76rem; }
.admin-secondary-action {
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--border-subtle);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--text-secondary);
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
}
.admin-secondary-action:hover { border-color: rgba(212, 175, 55, 0.35); color: var(--gold-champagne); }
.admin-table-scroll { border: 1px solid rgba(255, 255, 255, 0.06); border-radius: 11px; }
.admin-token-table th { padding: 12px 13px; background: rgba(9, 11, 16, 0.86); font-size: 0.68rem; letter-spacing: 0.035em; text-transform: uppercase; }
.admin-token-table td { padding: 12px 13px; }
.admin-user-cell { display: flex; align-items: center; gap: 9px; }
.admin-avatar { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: rgba(212, 175, 55, 0.11); color: var(--gold-champagne); font-weight: 800; font-size: 0.7rem; }
.admin-user-name { display: block; font-size: 0.78rem; }
.admin-token-cell { display: flex; align-items: center; gap: 7px; }
.admin-token-code { max-width: 130px; overflow: hidden; color: var(--gold-champagne); text-overflow: ellipsis; }
.admin-copy-btn { border: 0; background: transparent; color: var(--text-muted); cursor: pointer; font-size: 0.68rem; }
.admin-copy-btn:hover { color: #fff; }
.admin-quota-cell strong { display: block; font-size: 0.76rem; }
.admin-quota-cell small { color: var(--text-muted); font-size: 0.64rem; }
.admin-action-group { display: flex; align-items: center; gap: 5px; }
.btn-action-table { margin: 0; padding: 6px 8px; font-size: 0.67rem; white-space: nowrap; }
.admin-empty-state { padding: 36px !important; color: var(--text-muted) !important; text-align: center; }

@media (max-width: 1050px) {
  .admin-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-create-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-create-action { display: flex; align-items: flex-end; }
}
@media (max-width: 720px) {
  .modal-backdrop-gold { padding: 0; }
  .admin-dashboard-shell { max-height: 100vh; min-height: 100vh; border-radius: 0; }
  .admin-dashboard-header, .admin-dashboard-body { padding-left: 16px; padding-right: 16px; }
  .admin-dashboard-header { gap: 12px; }
  .admin-header-copy p, .admin-system-status { display: none; }
  .admin-stat-grid, .admin-create-grid { grid-template-columns: 1fr; }
  .admin-table-toolbar { align-items: stretch; flex-direction: column; }
  .admin-toolbar-actions { width: 100%; }
  .admin-search-box { min-width: 0; flex: 1; }
  .admin-primary-action { width: 100%; }
}

/* ══════════════════════════════════════════════════════════════════════════════
   LIGHT BLUE PROFESSIONAL UI THEME — site chrome only, email iframe untouched
   ══════════════════════════════════════════════════════════════════════════════ */
:root {
  --bg-base: #f3f7fb;
  --bg-surface: #ffffff;
  --bg-elevated: #f7fbff;
  --bg-input: #ffffff;
  --border-subtle: #e1e9f2;
  --border-medium: #cbd8e6;
  --border-gold-subtle: rgba(56, 189, 248, 0.28);
  --border-gold-hover: rgba(14, 165, 233, 0.48);
  --gold-primary: #38bdf8;
  --gold-light: #dff5ff;
  --gold-champagne: #168bc1;
  --gold-muted: #5ca9ce;
  --gold-gradient: linear-gradient(135deg, #8ed8fb 0%, #57c3f3 55%, #36afe8 100%);
  --gold-glow: 0 10px 28px rgba(56, 189, 248, 0.2);
  --text-main: #172033;
  --text-secondary: #42526a;
  --text-muted: #718096;
  --text-gold: #168bc1;
}
body {
  background-color: #f3f7fb;
  background-image:
    radial-gradient(circle at 12% -10%, rgba(125, 211, 252, 0.3), transparent 34%),
    radial-gradient(circle at 100% 20%, rgba(186, 230, 253, 0.36), transparent 32%);
  color: var(--text-main);
}
.gold-glow-1, .gold-glow-2, .gold-glow-3 { background: radial-gradient(circle, rgba(125, 211, 252, 0.18), transparent 70%); }
.glass-card-gold {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #e0e9f3;
  border-top-color: #d5eaf7;
  box-shadow: 0 12px 34px rgba(45, 77, 105, 0.09), 0 2px 8px rgba(45, 77, 105, 0.04);
}
.glass-card-gold:hover { border-color: #c9e6f6; box-shadow: 0 15px 38px rgba(45, 77, 105, 0.12); }

/* Login */
.login-gate-overlay { background: rgba(243, 247, 251, 0.94); }
.login-card {
  background: #ffffff;
  border-color: #dce7f1;
  box-shadow: 0 24px 70px rgba(45, 77, 105, 0.16);
}
.login-card::before { background: linear-gradient(90deg, transparent, #7dd3fc, #38bdf8, transparent); }
.login-crown-badge, .brand-badge-gold {
  background: #eaf7fe;
  border-color: #bde7fa;
  color: #168bc1;
  box-shadow: none;
}
.brand-title-gold, .brand-heading, .card-title-gold, .card-title-gold h3,
.preview-title h3, .fields-header-gold h4, .admin-header-copy h3,
.admin-section-heading h4, .admin-stat-card strong, .admin-sub-title { color: #172033; }
.brand-tagline, .login-desc, .brand-sub { color: #607089; }
.label-gold, .label-gold-sm, .form-group-sm label { color: #40516a; }
.input-icon-gold { color: #289fd3; }
.form-control-gold {
  background: #ffffff;
  border-color: #cfdce8;
  color: #172033;
  box-shadow: 0 1px 2px rgba(45, 77, 105, 0.03);
}
.form-control-gold::placeholder { color: #9aa9ba; }
.form-control-gold:focus {
  border-color: #57c3f3;
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.14);
}
select.form-control-gold, select.form-control-gold option { background-color: #ffffff; color: #172033; }
select.form-control-gold optgroup { background-color: #eff8fd; color: #187da9; }
.login-footer { border-color: #e6edf4; }
.secure-badge { color: #718096; }

/* Light-blue actions */
.btn-gold-action, .btn-send-gold, .admin-primary-action {
  background: linear-gradient(135deg, #8ed8fb 0%, #57c3f3 52%, #36afe8 100%);
  color: #07334a;
  border: 1px solid #55bde9;
  box-shadow: 0 8px 20px rgba(56, 189, 248, 0.22);
}
.btn-gold-action:hover, .btn-send-gold:hover, .admin-primary-action:hover {
  box-shadow: 0 11px 25px rgba(56, 189, 248, 0.3);
  filter: brightness(1.03);
}
.btn-admin-gold, .btn-gold-chip {
  background: #e7f6fd;
  border-color: #b8e3f7;
  color: #147fae;
}
.btn-admin-gold:hover, .btn-gold-chip:hover {
  background: #d9f1fc;
  border-color: #7dd3fc;
  color: #0c6e99;
}
.btn-gold-chip-ghost, .admin-secondary-action, .btn-action-table {
  background: #ffffff;
  border-color: #d5e1ec;
  color: #40516a;
}
.btn-gold-chip-ghost:hover, .admin-secondary-action:hover, .btn-action-table:hover {
  background: #edf8fd;
  border-color: #9edcf7;
  color: #147fae;
}
.btn-action-danger { color: #d64a62; border-color: #f1c5ce; }
.btn-action-danger:hover { background: #fff1f3; border-color: #ee9aaa; color: #bd2945; }
.btn-logout-gold { background: #fff3f5; border-color: #f3ccd4; color: #c33b55; }
.btn-logout-gold:hover { background: #ffe8ec; border-color: #eba5b3; }

/* Header and workspace */
.navbar-gold { background: rgba(255, 255, 255, 0.96); }
.stat-pill-gold { background: #f7fbfe; border-color: #dce8f1; }
.stat-label { color: #718096; }
.stat-value { color: #1385b6; }
.user-name { color: #26354b; }
.badge-superadmin { background: #d9f2fd; color: #0d739f; border: 1px solid #a9ddf3; }
.composer-card, .preview-panel { background: #ffffff; }
.card-header, .preview-header { border-color: #e4ebf2; }
.highlight-group { background: #f8fbfe; border-color: #e2ebf3; }
.custom-bank-box, .template-fields-box {
  background: #f7fbfe;
  border-color: #dce9f2;
}
.fields-header-gold { background: #eef8fd; border-color: #d4eaf5; }
.fields-hint, .label-hint { color: #76879a; }
.preview-header { background: #f7fbfe; }
.preview-dot { background: #38bdf8; box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.13); }
.preview-bank-tag { background: #e5f6fd; border-color: #bee7f8; color: #167eaa; }
.preview-meta-bar { background: #f4f9fc; border-color: #dde8f0; }
.preview-meta-label { color: #718096; }
.preview-meta-val { color: #24344a; }
.preview-frame-container { background: #edf2f7; border-color: #dce5ed; }

/* Dialogs and admin dashboard */
.modal-backdrop-gold { background: rgba(225, 235, 244, 0.82); }
.modal-window-gold, .admin-dashboard-shell {
  background: #f7fafc;
  border-color: #dce7f0;
  box-shadow: 0 28px 90px rgba(45, 77, 105, 0.2);
}
.modal-header-gold, .admin-dashboard-header {
  background: linear-gradient(100deg, #eef9fe, #ffffff 48%);
  border-color: #dfe9f2;
}
.btn-close-gold { color: #718096; }
.btn-close-gold:hover { color: #172033; }
.admin-eyebrow, .admin-section-kicker { color: #168bc1; }
.admin-header-copy p, .admin-section-heading p, .admin-stat-label, .admin-stat-card small { color: #718096; }
.admin-system-status { background: #ecfdf5; border-color: #b9ecd7; color: #087a57; }
.admin-stat-card, .admin-panel-card {
  background: #ffffff;
  border-color: #dfe8f0;
  box-shadow: 0 5px 16px rgba(45, 77, 105, 0.05);
}
.admin-stat-card::after { background: rgba(125, 211, 252, 0.17); }
.admin-stat-success::after { background: rgba(52, 211, 153, 0.13); }
.admin-stat-warning::after { background: rgba(251, 191, 36, 0.15); }
.admin-search-box { background: #ffffff; border-color: #d3e0eb; color: #718096; }
.admin-search-box:focus-within { border-color: #57c3f3; box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.12); }
.admin-search-box input { color: #172033; }
.admin-table-scroll { border-color: #dfe8f0; }
.table-gold th, .admin-token-table th { background: #eff6fa; color: #53657a; border-color: #dfe8f0; }
.table-gold td { color: #26354b; border-color: #edf1f5; }
.table-gold tr:hover td { background: #f5fbfe; }
.admin-avatar { background: #e5f6fd; color: #147fae; }
.admin-token-code { color: #147fae; }
.admin-copy-btn { color: #60758a; }
.admin-copy-btn:hover { color: #147fae; }
.admin-empty-state { color: #718096 !important; }
.toast-gold { background: #ffffff; border-color: #d9e5ee; color: #26354b; box-shadow: 0 12px 36px rgba(45, 77, 105, 0.16); }

/* Utility colors adapted for light surfaces */
.text-muted { color: #718096 !important; }
.text-gold-sm { color: #147fae !important; }

/* Composer light-theme layout refinement */
.form-container {
  background: #ffffff;
  gap: 18px;
}
.form-container > .form-group.highlight-group {
  padding: 16px;
  background: #f8fbfd;
  border: 1px solid #e1eaf2;
  border-radius: 14px;
}
.form-container > .form-group.highlight-group .label-row {
  margin-bottom: 10px;
}
.form-container > .form-group.highlight-group .form-control-gold {
  background: #ffffff;
}
.bank-color-badge {
  min-height: 34px;
  padding: 5px 12px;
  background: #ffffff !important;
  border: 1px solid #d6e2ec;
  color: #304158 !important;
  box-shadow: 0 4px 14px rgba(45, 77, 105, 0.12);
}
.template-fields-box {
  padding: 0;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #dce7f0;
  border-left: 1px solid #dce7f0;
  border-radius: 14px;
}
.fields-header-gold {
  margin: 0;
  padding: 17px 18px 15px;
  background: #eef8fd;
  border-bottom: 1px solid #d7eaf4;
}
.fields-header-gold h4 {
  margin: 0 0 4px;
  font-size: 1rem;
}
.dynamic-inputs-grid {
  padding: 18px;
  gap: 16px;
  background: #ffffff;
}
.dynamic-inputs-grid .form-group {
  min-width: 0;
}
.dynamic-inputs-grid .label-gold,
.dynamic-inputs-grid label {
  color: #40516a;
}
.dynamic-inputs-grid textarea.form-control-gold {
  min-height: 150px;
}
@media (max-width: 720px) {
  .form-container { padding: 16px; }
  .form-container > .form-group.highlight-group { padding: 13px; }
  .label-row { align-items: flex-start; gap: 8px; }
  .label-hint { text-align: right; }
  .dynamic-inputs-grid { padding: 14px; }
}


/* Mobile navigation layout refinement */
@media (max-width: 720px) {
  .navbar-gold {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 14px;
  }
  .navbar-gold .brand {
    width: 100%;
    min-width: 0;
  }
  .navbar-gold .brand-text {
    min-width: 0;
  }
  .navbar-gold .brand-heading,
  .navbar-gold .brand-sub {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .navbar-gold .brand-heading { font-size: 1.08rem; }
  .navbar-gold .header-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 8px;
  }
  .navbar-gold .stat-pill-gold,
  .navbar-gold .btn-admin-gold,
  .navbar-gold .btn-logout-gold {
    width: 100%;
    min-width: 0;
    justify-content: center;
  }
  .navbar-gold .user-pill {
    grid-column: 1 / -1;
  }
  .navbar-gold .stat-label,
  .navbar-gold .stat-value,
  .navbar-gold .user-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* Compact mobile account statistics */
@media (max-width: 720px) {
  .navbar-gold .stat-pill-gold {
    gap: 5px;
    padding: 7px 8px;
    overflow: hidden;
  }
  .navbar-gold .stat-icon {
    flex: 0 0 auto;
    font-size: 0.82rem;
  }
  .navbar-gold .stat-meta {
    min-width: 0;
    flex: 1 1 auto;
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
    line-height: 1.1;
  }
  .navbar-gold .stat-label {
    max-width: 100%;
    font-size: 0.63rem;
  }
  .navbar-gold .stat-value {
    display: block;
    max-width: 100%;
    font-size: 0.72rem;
  }
}
