/* ==========================================================================
   MÜHÜR SAAS - DASHBOARD & LIVE EDITOR STYLESHEET
   ========================================================================== */

.dashboard-layout {
  display: flex;
  min-height: 100vh;
  background-color: var(--bg-dark);
}

/* Sidebar */
.dashboard-sidebar {
  width: 260px;
  background: #0D0F14;
  border-right: 1px solid rgba(212, 175, 55, 0.15);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 40;
  transition: all 0.3s ease;
}

.sidebar-brand {
  padding: 24px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.12);
}

.sidebar-brand .brand-logo {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--gold-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0B0C10;
  font-family: var(--font-royal);
  font-weight: 800;
  font-size: 1.2rem;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
}

.sidebar-nav {
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 10px;
  color: #9CA3AF;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.nav-link:hover {
  color: #FFF;
  background: rgba(212, 175, 55, 0.08);
}

.nav-link.active {
  color: var(--gold-300);
  background: rgba(212, 175, 55, 0.14);
  border: 1px solid rgba(212, 175, 55, 0.35);
  font-weight: 600;
}

.nav-link svg {
  width: 18px;
  height: 18px;
  color: var(--gold-400);
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(212, 175, 55, 0.12);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Main Content Area */
.dashboard-main {
  margin-left: 260px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.dashboard-header {
  height: 72px;
  background: rgba(13, 15, 20, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(212, 175, 55, 0.12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 30;
}

.dashboard-body {
  padding: 32px;
  flex: 1;
}

/* Stat Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: #13161F;
  border: 1px solid rgba(212, 175, 55, 0.18);
  border-radius: 14px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.25s ease;
}

.stat-card:hover {
  border-color: rgba(212, 175, 55, 0.4);
  transform: translateY(-2px);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-400);
}

.stat-value {
  font-family: var(--font-royal);
  font-size: 1.6rem;
  font-weight: 700;
  color: #FFF;
}

.stat-label {
  font-size: 0.8rem;
  color: #9CA3AF;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Split Screen Live Editor */
.live-editor-layout {
  display: grid;
  grid-template-columns: 1fr 440px;
  gap: 32px;
  align-items: start;
}

@media (max-width: 1100px) {
  .live-editor-layout {
    grid-template-columns: 1fr;
  }
}

.editor-form-panel {
  background: #121722;
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 16px;
  padding: 28px;
}

.editor-section {
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.12);
}

.editor-section-title {
  font-family: var(--font-royal);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gold-300);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

/* Phone Mockup Frame for Live Preview */
.phone-mockup-wrapper {
  position: sticky;
  top: 96px;
  background: #0A0D13;
  border: 10px solid #1E2430;
  border-radius: 40px;
  box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(212, 175, 55, 0.3);
  overflow: hidden;
  height: 720px;
  display: flex;
  flex-direction: column;
}

.phone-notch {
  height: 24px;
  background: #1E2430;
  border-bottom-left-radius: 14px;
  border-bottom-right-radius: 14px;
  width: 140px;
  margin: 0 auto;
  position: relative;
  z-index: 10;
}

.phone-preview-iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: #FFF;
}

/* Dashboard Tables */
.luxury-table-wrapper {
  background: #121722;
  border: 1px solid rgba(212, 175, 55, 0.18);
  border-radius: 14px;
  overflow: hidden;
}

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

.luxury-table th {
  background: rgba(14, 18, 26, 0.9);
  padding: 14px 20px;
  font-family: var(--font-royal);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-300);
  border-bottom: 1px solid rgba(212, 175, 55, 0.15);
}

.luxury-table td {
  padding: 14px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.9rem;
  color: #E5E7EB;
}

.luxury-table tr:hover td {
  background: rgba(212, 175, 55, 0.04);
}

/* Form Switch Controls - High-Contrast Luxury Gold */
.switch-control {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}

.switch-control input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-slider {
  position: relative;
  width: 50px;
  height: 28px;
  background: #242938;
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  border-radius: 20px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.6);
  flex-shrink: 0;
}

.switch-slider::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #9CA3AF;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.switch-control input:checked + .switch-slider {
  background: linear-gradient(135deg, #E5C06E 0%, #D4AF37 100%);
  border-color: #F8E7B9;
  box-shadow: 0 0 14px rgba(212, 175, 55, 0.45);
}

.switch-control input:checked + .switch-slider::after {
  transform: translateX(22px);
  background: #0B0C10;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

/* Toast Messages */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  padding: 14px 20px;
  border-radius: 12px;
  background: #121722;
  border: 1px solid rgba(212, 175, 55, 0.3);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  color: #FFF;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideInRight 0.3s ease;
}

.toast-success { border-color: #10B981; }
.toast-error { border-color: #EF4444; }

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@media (max-width: 768px) {
  .dashboard-sidebar {
    transform: translateX(-100%);
  }
  .dashboard-sidebar.mobile-open {
    transform: translateX(0);
  }
  .dashboard-main {
    margin-left: 0;
  }
  .dashboard-header {
    padding: 0 16px;
  }
  .dashboard-body {
    padding: 16px;
  }
}
