/* Dashboard Styles */

/* ===== DARK ON LIGHT: Beyaz/açık arka planlı elementlerde koyu metin ve ikon ===== */
.dash-avatar,
.td-avatar-user,
.plan-card-badge,
.code-lang-tab.active {
  color: #0a0a0f !important;
}
.dash-avatar svg,
.td-avatar-user svg,
.plan-card-badge svg {
  color: #0a0a0f !important;
  stroke: #0a0a0f !important;
}

/* ==================== AUTH SCREEN ==================== */
.auth-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
}

/* Animated background orbs */
.auth-bg-orbs { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.auth-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.12;
  animation: orbFloat 20s ease-in-out infinite;
}
.auth-orb:nth-child(1) { width: 500px; height: 500px; background: rgba(255,255,255,0.3); top: -10%; left: -5%; animation-delay: 0s; }
.auth-orb:nth-child(2) { width: 400px; height: 400px; background: #00cec9; bottom: -10%; right: -5%; animation-delay: -7s; }
.auth-orb:nth-child(3) { width: 300px; height: 300px; background: #fdcb6e; top: 40%; left: 50%; animation-delay: -14s; }
@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -30px) scale(1.05); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
}

.auth-container {
  display: flex;
  width: 100%;
  max-width: 920px;
  min-height: 540px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
  position: relative;
  z-index: 1;
}

.auth-left {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  background: linear-gradient(135deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.02) 100%);
  border-right: 1px solid var(--border-color);
}

.auth-brand-section { max-width: 340px; }

.auth-brand-icon {
  width: 56px;
  height: 56px;
  background: var(--accent-gradient);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #0a0a0f;
  margin-bottom: 20px;
  box-shadow: 0 8px 32px rgba(255,255,255,0.1);
}

.auth-brand-section h1 {
  font-size: 28px;
  font-weight: 800;
  background: linear-gradient(135deg, #f0f0f5, #fdcb6e);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

.auth-brand-section p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 28px;
}

.auth-features { display: flex; flex-direction: column; gap: 14px; }
.auth-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--text-secondary);
}
.auth-feature i { color: var(--accent-secondary); flex-shrink: 0; }

.auth-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
}

.auth-card {
  width: 100%;
  max-width: 360px;
  animation: fadeSlideUp 0.4s ease;
}

.auth-card-header { margin-bottom: 28px; }
.auth-card-header h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 6px;
}
.auth-card-header p {
  font-size: 14px;
  color: var(--text-muted);
}

.auth-form { display: flex; flex-direction: column; gap: 14px; }

.auth-input-group {
  position: relative;
  display: flex;
  align-items: center;
}
.auth-input-group.phone-group {
  display: flex;
  gap: 0;
}
.auth-input-group.phone-group .phone-prefix {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border-color);
  border-right: none;
  border-radius: 12px 0 0 12px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  height: 48px;
  user-select: none;
}
.auth-input-group.phone-group .phone-prefix .auth-input-icon {
  position: static;
  width: 16px;
  height: 16px;
  color: var(--text-muted);
}
.auth-input-group.phone-group .auth-input {
  border-radius: 0 12px 12px 0;
  padding-left: 14px;
}
.auth-input-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  width: 18px;
  height: 18px;
  pointer-events: none;
  z-index: 1;
}
.auth-input {
  width: 100%;
  padding: 14px 14px 14px 44px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  transition: var(--transition);
  outline: none;
}
.auth-input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.06);
  background-color: rgba(255, 255, 255, 0.06);
}
.auth-input::placeholder { color: var(--text-muted); }

/* SMS Verify Styling */
.sms-codes-container {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
}
.sms-input {
  width: 48px;
  height: 56px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 24px;
  font-weight: 600;
  text-align: center;
  transition: var(--transition);
  outline: none;
}
.sms-input:focus {
  border-color: var(--accent-primary);
  background: rgba(255,255,255,0.04); /* accent color light */
  box-shadow: 0 0 0 3px rgba(255,255,255,0.06);
}
.sms-input.error {
  border-color: var(--danger);
  background: rgba(255, 71, 87, 0.08);
}
/* Select styling */
select.auth-input {
  padding-right: 40px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.5' 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 14px center;
  background-size: 16px;
  cursor: pointer;
}
select.auth-input:hover {
  border-color: var(--border-hover);
  background-color: rgba(255, 255, 255, 0.06);
}
select.auth-input:focus {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236c5ce7' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}
select.auth-input option {
  background: #1a1a2e;
  color: var(--text-primary);
  padding: 10px;
}

/* Textarea styling */
textarea.auth-input {
  padding: 14px;
  line-height: 1.6;
}

.auth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  background: var(--accent-gradient);
  border: none;
  border-radius: 12px;
  color: #0a0a0f;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 4px;
}
.auth-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(255,255,255,0.1);
}

.auth-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 13px;
  color: var(--text-muted);
}
.auth-footer a {
  color: var(--accent-secondary);
  font-weight: 600;
  text-decoration: none;
  margin-left: 4px;
}
.auth-footer a:hover { text-decoration: underline; }

.auth-error {
  color: var(--danger);
  font-size: 13px;
  text-align: center;
  margin-top: 12px;
  min-height: 18px;
}

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

/* ==================== DASHBOARD LAYOUT ==================== */
.dashboard-wrapper { min-height: 100vh; padding-bottom: 0; display: flex; flex-direction: column; position: relative; z-index: 1; }

/* Topbar */
.dash-topbar {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0 32px;
  height: 56px;
  border-bottom: 1px solid var(--border-color);
  background: rgba(10, 10, 15, 0.6);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  position: sticky;
  top: 0;
  z-index: 100;
}
.dash-brand { display: flex; align-items: center; gap: 10px; margin-right: 32px; flex-shrink: 0; }
.dash-brand-icon {
  width: 36px; height: 36px;
  background: var(--accent-gradient);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: #0a0a0f;
}
.dash-brand-text {
  font-size: 18px; font-weight: 700;
  background: linear-gradient(135deg, #f0f0f5, #fdcb6e);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

/* Navigation */
.dash-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
  height: 100%;
}
.dash-nav::-webkit-scrollbar { display: none; }
.dash-nav-link {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 16px;
  height: 100%;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
  text-decoration: none;
  position: relative;
  user-select: none;
}
.dash-nav-link:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.04);
}
.dash-nav-link.active {
  color: #fff;
}
.dash-nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 12px;
  right: 12px;
  height: 2px;
  background: var(--accent-gradient);
  border-radius: 2px 2px 0 0;
}
.dash-nav-link i { width: 15px; height: 15px; flex-shrink: 0; }
.dash-nav-link .ticket-badge { margin-left: 2px; }

/* User Menu */
.dash-user-area { position: relative; margin-left: auto; flex-shrink: 0; }
.dash-user-btn {
  display: flex; align-items: center; gap: 10px;
  cursor: pointer; padding: 6px 12px; border-radius: 10px; transition: var(--transition);
}
.dash-user-btn:hover { background: rgba(255,255,255,0.05); }
.dash-avatar {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--accent-gradient);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: #0a0a0f !important;
}
.dash-avatar .lucide { color: #0a0a0f !important; }
.dash-user-menu {
  position: absolute; top: calc(100% + 8px); right: 0; width: 240px;
  background: #141418; border: 1px solid var(--border-color);
  border-radius: var(--radius-lg); padding: 8px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.4);
  display: none; z-index: 200; animation: fadeSlideUp 0.15s ease;
}
.dash-user-menu.open { display: block; }
.dash-menu-header { padding: 12px; display: flex; flex-direction: column; }
.dash-menu-header span:first-child { font-weight: 600; font-size: 14px; }
.dash-menu-email { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.dash-menu-divider { height: 1px; background: var(--border-color); margin: 4px 0; }
.dash-menu-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 8px; font-size: 13px;
  color: var(--text-secondary); cursor: pointer; transition: var(--transition); text-decoration: none;
  position: relative;
  border-left: 3px solid transparent;
}
.dash-menu-item:hover { background: rgba(255,255,255,0.05); color: var(--text-primary); }
.dash-menu-item.active {
  background: rgba(255,255,255,0.05);
  color: var(--text-primary);
  border-left-color: var(--accent-primary);
  font-weight: 600;
}
.dash-menu-item.active i { color: var(--accent-primary); }
.dash-menu-danger { color: var(--danger) !important; }
.dash-menu-danger.active { background: none; border-left-color: transparent; color: var(--danger) !important; font-weight: 500; }

/* Content */
.dash-content { max-width: 1100px; margin: 0 auto; padding: 32px 40px; flex: 1; width: 100%; box-sizing: border-box; }

/* Tab Content */
.dash-tab-content { display: none; animation: fadeSlideUp 0.25s ease; }
#tab-chat { overflow: visible; }
.dash-tab-content.active { display: block; }

/* ==================== OVERVIEW WELCOME ==================== */
.overview-welcome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 32px;
  margin-bottom: 20px;
  background: linear-gradient(135deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.02) 100%);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}
.overview-welcome::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.overview-welcome-text h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
}
.overview-welcome-text p {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}
.overview-welcome-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

/* ==================== QUICK ACTIONS ==================== */
.overview-quick-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.quick-action-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: var(--transition);
}
.quick-action-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}
.quick-action-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.quick-action-icon i { width: 18px; height: 18px; }
.quick-action-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}
.quick-action-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}
.quick-action-desc {
  font-size: 12px;
  color: var(--text-muted);
}

/* ==================== STATS GRID ==================== */
.dash-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
.dash-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.dash-stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 3px;
  background: var(--accent-gradient);
}
.dash-stat-card.accent-green::before { background: var(--accent-gradient); }
.dash-stat-card.accent-blue::before { background: var(--accent-gradient); }
.dash-stat-card.accent-orange::before { background: var(--accent-gradient); }
.dash-stat-card:hover { border-color: var(--border-hover); transform: translateY(-2px); }
.dash-stat-icon { margin-bottom: 8px; color: var(--text-muted); }
.dash-stat-icon i { width: 22px; height: 22px; }
.dash-stat-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; font-weight: 600; }
.dash-stat-value { font-size: 28px; font-weight: 800; margin: 4px 0; font-family: 'SF Mono', monospace; color: var(--text-primary); }
.dash-stat-sub { font-size: 11px; color: var(--text-muted); }

/* ==================== OVERVIEW ==================== */
.overview-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.plan-status-card { padding: 24px; }
.plan-status-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px; }
.plan-status-label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; font-weight: 600; }
.plan-status-name { font-size: 22px; font-weight: 700; margin-top: 4px; background: var(--accent-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.plan-status-icon { width: 48px; height: 48px; border-radius: 14px; background: rgba(255,255,255,0.06); display: flex; align-items: center; justify-content: center; color: var(--accent-secondary); }
.plan-status-details { display: flex; flex-direction: column; gap: 8px; }
.plan-detail-row { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-muted); }
.plan-detail-row span:last-child { color: var(--text-primary); font-weight: 600; }

.usage-card { padding: 24px; }
.usage-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.usage-label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; font-weight: 600; }
.usage-bar-wrap { height: 8px; background: rgba(255,255,255,0.08); border-radius: 4px; overflow: hidden; margin-bottom: 20px; }
.usage-bar-fill { height: 100%; background: var(--accent-gradient); border-radius: 4px; transition: width 0.6s cubic-bezier(0.4,0,0.2,1); }
.usage-sub-stats { display: flex; gap: 32px; }
.usage-sub-stats > div { display: flex; flex-direction: column; gap: 2px; }
.usage-sub-stats > div > span:first-child { font-size: 11px; color: var(--text-muted); }
.usage-sub-stats > div > span:last-child { font-size: 16px; font-weight: 600; }

/* API Key */
.api-key-card { padding: 24px; }
.api-key-header h3 { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.api-key-desc { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; }
.api-key-desc code { background: rgba(255,255,255,0.06); padding: 2px 6px; border-radius: 4px; font-size: 12px; color: var(--accent-secondary); }
.api-key-display {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: rgba(0,0,0,0.3); border: 1px solid var(--border-color); border-radius: 10px; padding: 12px 16px;
}
.api-key-value code { font-family: 'SF Mono','Fira Code',monospace; font-size: 14px; color: var(--accent-secondary); letter-spacing: 0.5px; }
.api-key-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

/* ==================== PLANS ==================== */
.plans-header { text-align: center; margin-bottom: 32px; }
.plans-header h2 { font-size: 24px; font-weight: 700; margin-bottom: 8px; }
.plans-header p { color: var(--text-muted); font-size: 14px; }

/* Plans Layout — sidebar + grid */
.plans-layout { display: flex; gap: 20px; align-items: flex-start; }
.plans-categories {
  width: 200px;
  min-width: 200px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 12px;
  position: sticky;
  top: 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.plans-cat-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 4px;
}
.plans-cat-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}
.plans-cat-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
}
.plans-cat-item.active {
  background: rgba(255,255,255,0.06);
  color: var(--accent-primary);
  font-weight: 600;
}
.plans-cat-item.active i { color: var(--accent-primary); }
.plans-cat-count {
  margin-left: auto;
  font-size: 11px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 8px;
  border-radius: 10px;
  color: var(--text-muted);
}
.plans-cat-item.active .plans-cat-count {
  background: rgba(255,255,255,0.06);
  color: var(--accent-primary);
}

.plans-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; flex: 1; }
.plan-card {
  background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: var(--radius-lg); overflow: hidden; transition: var(--transition); position: relative;
  display: flex; flex-direction: column;
}
.plan-card:hover { border-color: var(--border-hover); transform: translateY(-4px); box-shadow: 0 16px 48px rgba(0,0,0,0.3); }
.plan-card.current { border-color: var(--accent-primary); box-shadow: 0 0 0 1px var(--accent-primary), 0 8px 32px rgba(255,255,255,0.06); }
.plan-card-badge { position: absolute; top: 16px; right: 16px; background: var(--accent-gradient); color: #0a0a0f; font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 6px; }
.plan-card-header { padding: 28px 24px 20px; }
.plan-card-name { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.plan-card-price { font-size: 28px; font-weight: 800; background: var(--accent-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; margin-top: 8px; }
.plan-card-desc { font-size: 13px; color: var(--text-muted); line-height: 1.5; margin-top: 8px; }
.plan-card-features { padding: 0 24px 24px; display: flex; flex-direction: column; gap: 10px; }
.plan-feature { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-secondary); }
.plan-feature-icon { width: 20px; height: 20px; border-radius: 6px; background: rgba(0,206,201,0.15); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.plan-feature-icon i { color: var(--success); width: 12px; height: 12px; }
.plan-card-footer { padding: 16px 24px 24px; margin-top: auto; }
.plan-card-footer .btn { width: 100%; justify-content: center; }

/* ==================== DOCS ==================== */
.docs-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 0;
  min-height: 500px;
}

/* Sidebar */
.docs-sidebar {
  border-right: 1px solid var(--border-color);
  padding-right: 0;
  position: sticky;
  top: 80px;
  align-self: start;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}
.docs-sidebar-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 8px;
}
.docs-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px 8px;
}
.docs-sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  position: relative;
  user-select: none;
}
.docs-sidebar-link i { width: 16px; height: 16px; flex-shrink: 0; opacity: 0.6; }
.docs-sidebar-link:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.04);
}
.docs-sidebar-link:hover i { opacity: 1; }
.docs-sidebar-link.active {
  color: #fff;
  background: rgba(255,255,255,0.06);
}
.docs-sidebar-link.active i { opacity: 1; color: var(--accent-primary); }
.docs-sidebar-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--accent-primary);
}

/* Content */
.docs-content {
  padding-left: 28px;
  min-width: 0;
}
.docs-subtitle { color: var(--text-muted); font-size: 14px; margin-bottom: 24px; }

.doc-panel { display: none; animation: fadeSlideUp 0.2s ease; }
.doc-panel.active { display: block; }
.doc-panel h3 { font-size: 16px; font-weight: 700; margin-bottom: 12px; }
.doc-panel h4 { font-size: 14px; font-weight: 600; margin: 20px 0 8px; color: var(--text-secondary); }
.doc-panel p { font-size: 14px; color: var(--text-secondary); line-height: 1.7; margin-bottom: 12px; }
.doc-panel p code { background: rgba(255,255,255,0.06); padding: 2px 6px; border-radius: 4px; font-size: 12px; color: var(--accent-secondary); }

/* Language Selector Tabs */
.code-lang-tabs {
  display: flex;
  gap: 2px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 3px;
  margin-bottom: 16px;
  overflow-x: auto;
}

.code-lang-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.code-lang-tab:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

.code-lang-tab.active {
  color: #0a0a0f;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 2px 8px rgba(255,255,255,0.08);
}

/* Code Language Panels */
.code-lang-panel {
  display: none;
  animation: fadeSlideUp 0.2s ease;
}

.code-lang-panel.active {
  display: block;
}

/* Code Block Container */
.code-block {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  margin-bottom: 16px;
  background: rgba(0, 0, 0, 0.35);
}

.code-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid var(--border-color);
}

.code-block-header span {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.code-copy-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.code-copy-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--accent-secondary);
}

.code-copy-btn.copied {
  color: var(--success);
}

.code-block pre {
  margin: 0;
  padding: 16px 20px;
  overflow-x: auto;
  background: transparent;
  border: none;
  border-radius: 0;
}

.code-block code {
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: 13px;
  color: #e0e0e8;
  line-height: 1.7;
}

/* Legacy pre/code in doc-panel (for non-block usage) */
.doc-panel > pre {
  background: rgba(0,0,0,0.4); border: 1px solid var(--border-color); border-radius: 10px;
  padding: 16px 20px; overflow-x: auto; margin-bottom: 16px;
}
.doc-panel > pre code, .doc-panel > code { font-family: 'SF Mono','Fira Code',monospace; font-size: 13px; color: #e0e0e8; line-height: 1.7; }

.code-keyword { color: #c792ea; }
.code-string { color: #c3e88d; }
.code-var { color: #f78c6c; }
.code-func { color: #82aaff; }
.code-comment { color: #546e7a; }

.docs-table { width: 100%; border-collapse: collapse; margin: 12px 0; }
.docs-table th, .docs-table td { padding: 10px 14px; text-align: left; font-size: 13px; border-bottom: 1px solid var(--border-color); }
.docs-table th { color: var(--text-muted); font-weight: 600; text-transform: uppercase; font-size: 11px; letter-spacing: 0.5px; }
.docs-table td { color: var(--text-secondary); }
.docs-table td code { background: rgba(255,255,255,0.06); padding: 2px 6px; border-radius: 4px; font-size: 12px; color: var(--accent-secondary); }

/* ==================== PROFILE ==================== */
.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.profile-card { padding: 32px; }
.profile-card-header h3 { font-size: 16px; font-weight: 600; }
.profile-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

/* ==================== TOAST ==================== */
.toast-container { position: fixed; top: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: rgba(20, 20, 35, 0.95); backdrop-filter: blur(12px);
  border: 1px solid var(--border-color); border-radius: 10px;
  padding: 12px 20px; font-size: 13px; color: var(--text-primary);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  animation: slideIn 0.3s ease; min-width: 250px;
}
.toast.success { border-left: 3px solid var(--success); }
.toast.error { border-left: 3px solid var(--danger); }
@keyframes slideIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }

/* ==================== SUPPORT TICKETS ==================== */

/* Ticket badge on tab */
.ticket-badge {
  background: var(--danger);
  color: white;
  font-size: 10px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  margin-left: 6px;
  line-height: 1;
}

/* Filter buttons */
.ticket-filters {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.ticket-filter-btn {
  padding: 7px 16px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: rgba(255,255,255,0.03);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
}
.ticket-filter-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
  background: rgba(255,255,255,0.06);
}
.ticket-filter-btn.active {
  color: white;
  background: var(--accent-primary);
  border-color: var(--accent-primary);
}

/* Ticket List */
.ticket-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ticket-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}
.ticket-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}
.ticket-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.ticket-card-subject {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ticket-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-muted);
}
.ticket-card-bottom {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.ticket-card-id {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  font-family: 'SF Mono','Fira Code',monospace;
}

/* Status badge */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.status-badge.status-open { background: rgba(0,184,148,0.15); color: #55efc4; }
.status-badge.status-awaiting_reply { background: rgba(253,203,110,0.15); color: #fdcb6e; }
.status-badge.status-processing { background: rgba(253,203,110,0.2); color: #ffeaa7; }
.status-badge.status-answered { background: rgba(9,132,227,0.15); color: #74b9ff; }
.status-badge.status-resolved { background: rgba(0,184,148,0.15); color: #00b894; }
.status-badge.status-closed { background: rgba(45,52,54,0.4); color: #636e72; }

/* Priority badge */
.priority-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.priority-badge.priority-low { background: rgba(99,110,114,0.15); color: #b2bec3; }
.priority-badge.priority-medium { background: rgba(9,132,227,0.15); color: #74b9ff; }
.priority-badge.priority-high { background: rgba(225,112,85,0.15); color: #e17055; }
.priority-badge.priority-urgent { background: rgba(214,48,49,0.2); color: #ff7675; }

/* Category badge */
.category-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(255,255,255,0.06);
  color: var(--accent-secondary);
  white-space: nowrap;
}

/* Pagination */
#ticketPagination, #adminTicketPagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 20px 0 8px;
}
.pagination-btn {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: rgba(255,255,255,0.03);
  color: var(--text-secondary);
  font-size: 13px; font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.pagination-btn:hover:not(:disabled):not(.active) {
  background: rgba(255,255,255,0.08);
  border-color: var(--border-hover);
  color: var(--text-primary);
}
.pagination-btn.active {
  background: var(--accent-gradient);
  border-color: transparent;
  color: #0a0a0f;
  box-shadow: 0 4px 12px rgba(255,255,255,0.08);
}
.pagination-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}
.pagination-dots {
  color: var(--text-muted);
  font-size: 14px;
  padding: 0 4px;
  user-select: none;
}

/* Ticket Detail Modal */
.ticket-detail-modal {
  padding: 0 !important;
  overflow: hidden;
  background: #141418 !important;
  backdrop-filter: none !important;
}
.ticket-detail-header {
  padding: 0;
  border-bottom: 1px solid var(--border-color);
  background: #1a1a22;
}
.ticket-detail-header h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
}
.ticket-detail-header-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Chat area */
.ticket-chat {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 200px;
  max-height: 45vh;
}

.chat-message {
  display: flex;
  flex-direction: column;
  max-width: 85%;
  animation: fadeSlideUp 0.2s ease;
}
.chat-message.user-msg {
  align-self: flex-end;
  align-items: flex-end;
}
.chat-message.admin-msg {
  align-self: flex-start;
  align-items: flex-start;
}
.chat-bubble {
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.6;
  word-break: break-word;
  white-space: pre-wrap;
}
.user-msg .chat-bubble {
  background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.06));
  border: 1px solid rgba(255,255,255,0.08);
  border-bottom-right-radius: 4px;
  color: var(--text-primary);
}
.admin-msg .chat-bubble {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border-color);
  border-bottom-left-radius: 4px;
  color: var(--text-primary);
}
.chat-sender {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.chat-sender .admin-icon {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background: var(--accent-gradient);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 10px;
}
.chat-time {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 4px;
  opacity: 0.7;
}

/* ==================== TICKET DETAIL PAGE ==================== */
/* Topbar */
.td-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  gap: 16px;
}
.td-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}
.td-back-btn:hover { background: rgba(255,255,255,0.04); color: var(--text-primary); border-color: var(--accent-primary); }
.td-topbar-right { display: flex; align-items: center; gap: 16px; min-width: 0; flex: 1; justify-content: flex-end; }
.td-title-area { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.td-title { font-size: 16px; font-weight: 700; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.td-id { font-size: 12px; color: var(--text-muted); background: rgba(255,255,255,0.05); padding: 2px 8px; border-radius: 6px; flex-shrink: 0; }
.td-close-ticket-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,107,107,0.08); border: 1px solid rgba(255,107,107,0.2);
  color: #ff6b6b; font-size: 12px; font-weight: 600;
  padding: 7px 14px; border-radius: 8px; cursor: pointer;
  transition: var(--transition); flex-shrink: 0;
}
.td-close-ticket-btn:hover { background: rgba(255,107,107,0.15); border-color: rgba(255,107,107,0.4); }

/* Layout */
.td-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  min-height: 400px;
}

/* Sidebar */
.td-sidebar { align-self: start; }
.td-info-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 0;
  overflow: hidden;
}
.td-info-section { padding: 14px 18px; }
.td-info-divider { height: 1px; background: var(--border-color); margin: 0; }
.td-info-label {
  font-size: 11px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px;
}
.td-info-value {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-secondary); font-weight: 500;
}

/* Messages area */
.td-main {
  display: flex; flex-direction: column;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255,255,255,0.01);
}
.td-messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-height: 55vh;
  min-height: 200px;
}

/* Single message */
.td-msg {
  padding: 16px 20px;
  border-radius: 10px;
  animation: fadeSlideUp 0.2s ease;
}
.td-msg-admin {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-color);
}
.td-msg-user {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
}
.td-msg-header {
  display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
}
.td-avatar {
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; flex-shrink: 0;
}
.td-avatar-user { background: var(--accent-gradient); color: #0a0a0f; }
.td-avatar-admin { background: rgba(255,255,255,0.08); color: var(--text-secondary); border: 1px solid var(--border-color); }
.td-msg-meta { display: flex; flex-direction: column; gap: 1px; }
.td-msg-sender { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.td-msg-time { font-size: 11px; color: var(--text-muted); }
.td-msg-body {
  font-size: 13.5px; line-height: 1.7; color: var(--text-secondary);
  white-space: pre-wrap; word-break: break-word;
  padding-left: 42px;
}

/* Reply area */
.td-reply {
  border-top: 1px solid var(--border-color);
  padding: 18px 24px 20px;
  background: rgba(255,255,255,0.02);
}
.td-reply-header {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.5px;
  margin-bottom: 10px;
}
.td-reply-input {
  width: 100%; box-sizing: border-box;
  background: var(--card-bg); border: 1px solid var(--border-color);
  border-radius: 10px; padding: 14px 16px;
  color: var(--text-primary); font-size: 13px; font-family: inherit;
  resize: vertical; min-height: 80px; transition: var(--transition);
}
.td-reply-input:focus { outline: none; border-color: var(--accent-primary); box-shadow: 0 0 0 3px rgba(255,255,255,0.06); }
.td-reply-actions { display: flex; justify-content: flex-end; margin-top: 12px; }
.td-send-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--accent-gradient); border: none;
  color: #0a0a0f; font-size: 13px; font-weight: 600;
  padding: 10px 22px; border-radius: 8px; cursor: pointer;
  transition: var(--transition);
}
.td-send-btn:hover { opacity: 0.9; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(255,255,255,0.08); }

/* Closed bar */
.td-closed-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  background: rgba(45,52,54,0.3);
  font-size: 13px; color: var(--text-muted);
}

/* Message footer */
.td-msg-footer-divider {
  height: 1px;
  background: var(--border-color);
  margin: 12px 42px 10px;
  opacity: 0.6;
}
.td-msg-footer {
  font-size: 12px;
  line-height: 1.7;
  color: var(--text-muted);
  padding-left: 42px;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Ticket empty state */
.ticket-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.ticket-empty-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  color: var(--accent-secondary);
}
.ticket-empty h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.ticket-empty p {
  font-size: 13px;
}

/* Ticket buttons */
.ticket-new-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--accent-gradient);
  color: white;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 15px rgba(255,255,255,0.08);
}
.ticket-new-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(255,255,255,0.12);
}

.ticket-btn-send {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  background: var(--accent-gradient);
  color: white;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 15px rgba(255,255,255,0.08);
}
.ticket-btn-send:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 25px rgba(255,255,255,0.12);
}

.ticket-btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}
.ticket-btn-ghost:hover {
  background: rgba(255,255,255,0.05);
  border-color: var(--border-hover);
  color: var(--text-primary);
}

/* Select wrapper for icon+select */
.ticket-select-group {
  position: relative;
}
.ticket-select-group .auth-input-icon {
  pointer-events: none;
}

/* Modal overlay fix for dashboard */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}
.modal-overlay .modal {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px;
  width: 100%;
  box-shadow: 0 24px 80px rgba(0,0,0,0.5);
  animation: fadeSlideUp 0.2s ease;
}
.modal-overlay .modal h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ==================== CHAT UI ==================== */
.chat-container {
  display: flex;
  gap: 20px;
  height: calc(100vh - 200px);
  min-height: 400px;
  overflow: visible;
  /* Genişleme: JS tarafından --chat-expand ayarlanır */
  margin-left: calc(var(--chat-expand, 0px) * -1);
  margin-right: calc(var(--chat-expand, 0px) * -1);
}
.chat-sidebar {
  width: 280px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.chat-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.chat-item {
  padding: 12px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text-secondary, #8888a0);
  font-size: 13.5px;
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.chat-item:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--text);
}
.chat-item.active {
  background: rgba(255,255,255,0.06);
  color: var(--accent-secondary, rgba(255,255,255,0.15));
  font-weight: 500;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 0 12px rgba(255,255,255,0.05);
}
.chat-item-title {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-item-delete {
  display: none;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  flex-shrink: 0;
  transition: all 0.15s ease;
}
.chat-item:hover .chat-item-delete {
  display: flex;
}
.chat-item-delete:hover {
  color: #ff6b6b;
  background: rgba(255, 107, 107, 0.1);
}
.chat-main {
  flex: 1;
  background: var(--surface-light);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
  position: relative;
}
.chat-resize-handle {
  position: absolute;
  top: 0;
  right: -8px;
  width: 16px;
  height: 100%;
  cursor: col-resize;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}
.chat-resize-handle::after {
  content: '';
  width: 4px;
  height: 48px;
  border-radius: 4px;
  background: rgba(255,255,255,0.1);
  transition: all 0.2s ease;
}
.chat-resize-handle:hover::after,
.chat-resize-handle.active::after {
  width: 5px;
  height: 70px;
  background: rgba(255,255,255,0.5);
  box-shadow: 0 0 12px rgba(108,92,231,0.4);
}
body.chat-resizing {
  cursor: col-resize !important;
  user-select: none !important;
}
body.chat-resizing * {
  cursor: col-resize !important;
  user-select: none !important;
}
.chat-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(26, 26, 26, 0.5);
}

.chat-model-selector {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 0 16px;
  height: 48px;
  width: 260px;
  transition: all 0.2s ease;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  user-select: none;
}
.chat-model-selector:hover {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
}
.chat-model-selector.open {
  border-color: var(--accent-primary, rgba(255,255,255,0.3));
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.08);
}
.chat-model-selector .model-icon {
  color: var(--accent-secondary);
  flex-shrink: 0;
  margin-right: 10px;
}
.chat-model-selected {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary, #fff);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-model-selector .chevron {
  color: var(--text-muted);
  flex-shrink: 0;
  margin-left: 8px;
  transition: transform 0.2s;
}
.chat-model-selector.open .chevron { transform: rotate(180deg); }

/* Custom Dropdown */
.chat-model-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 300px;
  max-height: 320px;
  background: rgba(18, 16, 38, 0.98);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5), 0 0 40px rgba(255,255,255,0.04);
  backdrop-filter: blur(20px);
  z-index: 100;
  overflow: hidden;
  display: none;
  animation: modelDropIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.chat-model-dropdown.open { display: block; }
@keyframes modelDropIn {
  from { opacity: 0; transform: translateY(-8px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.chat-model-dropdown-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px 8px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.35);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.chat-model-dropdown-list {
  overflow-y: auto;
  max-height: 268px;
  padding: 6px;
}
.chat-model-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.chat-model-item:hover {
  background: rgba(255,255,255,0.05);
}
.chat-model-item.active {
  background: rgba(255,255,255,0.06);
}
.chat-model-item-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}
.chat-model-item.active .chat-model-item-icon {
  background: linear-gradient(135deg, rgba(255,255,255,0.06), rgba(255,255,255,0.06));
  border-color: rgba(255,255,255,0.1);
}
.chat-model-item-icon i {
  width: 16px;
  height: 16px;
  color: rgba(255,255,255,0.15);
}
.chat-model-item-info {
  flex: 1;
  min-width: 0;
}
.chat-model-item-name {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-model-item-id {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.35);
  font-family: 'JetBrains Mono', monospace;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-model-item-check {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s;
}
.chat-model-item.active .chat-model-item-check {
  border-color: #00cec9;
  background: #00cec9;
}
.chat-model-item.active .chat-model-item-check i {
  width: 10px;
  height: 10px;
  color: #fff;
}

.chat-messages {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.chat-empty-state {
  margin: auto;
  text-align: center;
  color: var(--text-muted);
  max-width: 400px;
}
.chat-empty-state h3 {
  color: var(--text);
  margin-bottom: 8px;
}
/* Chat message row (bubble + avatar) */
.chat-msg-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  max-width: 85%;
}
.chat-msg-row.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}
.chat-msg-row.assistant {
  align-self: flex-start;
}
.chat-msg-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 14px;
}
.chat-msg-row.user .chat-msg-avatar {
  background: linear-gradient(135deg, rgba(255,255,255,0.3), rgba(255,255,255,0.15));
  color: #fff;
}
.chat-msg-row.assistant .chat-msg-avatar {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--accent-secondary, rgba(255,255,255,0.15));
}
.chat-bubble {
  padding: 14px 18px;
  border-radius: 18px;
  font-size: 14.5px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.chat-msg-row.user .chat-bubble {
  background: linear-gradient(135deg, rgba(255,255,255,0.3), #7c6cf0);
  color: #fff;
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 15px rgba(255,255,255,0.08);
}
.chat-msg-row.assistant .chat-bubble {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
  border-bottom-left-radius: 4px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  white-space: pre-wrap;
  word-wrap: break-word;
}
.chat-streaming-cursor {
  display: inline-block;
  width: 2px;
  height: 16px;
  background: var(--accent-primary, rgba(255,255,255,0.3));
  border-radius: 1px;
  animation: cursorBlink 0.8s step-end infinite;
  vertical-align: text-bottom;
}
@keyframes cursorBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}
.chat-stream-chunk {
  display: inline;
  animation: chunkFadeIn 0.3s ease both;
}
@keyframes chunkFadeIn {
  from { opacity: 0; filter: blur(2px); }
  to { opacity: 1; filter: blur(0); }
}
.chat-input-area {
  padding: 16px 24px 24px;
  background: var(--surface-light);
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}
.chat-input-wrapper {
  width: 100%;
  max-width: 850px;
  background: #1e1e2a;
  border: 1px solid #2a2a3a;
  border-radius: 26px;
  display: flex;
  align-items: flex-end;
  padding: 6px 8px 6px 18px;
  gap: 10px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  transition: box-shadow 0.2s, border-color 0.2s, background 0.2s;
  -webkit-font-smoothing: antialiased;
}
.chat-input-wrapper:hover {
  background: #222233;
  border-color: #333345;
}
.chat-input-wrapper:focus-within {
  border-color: #4a3fa0;
  background: #222233;
  box-shadow: 0 4px 20px rgba(255,255,255,0.08);
}
.chat-input-wrapper textarea {
  flex: 1;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 12px 0;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  resize: none;
  min-height: 48px;
  max-height: 250px;
  line-height: 1.5;
  outline: none;
}
.chat-send-btn {
  height: 42px;
  width: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.25);
  cursor: pointer;
  margin-bottom: 3px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}
.chat-send-btn svg {
  width: 18px;
  height: 18px;
  transition: transform 0.2s ease;
}
.chat-send-btn.active {
  background: linear-gradient(135deg, rgba(255,255,255,0.3), rgba(255,255,255,0.15));
  color: #fff;
  box-shadow: 0 0 20px rgba(108, 92, 231, 0.4);
  animation: sendBtnPulse 2s ease-in-out infinite;
}
.chat-send-btn.active:hover {
  transform: scale(1.08);
  box-shadow: 0 0 28px rgba(108, 92, 231, 0.6);
}
.chat-send-btn.active:hover svg {
  transform: translateY(-1px);
}
.chat-send-btn.active:active {
  transform: scale(0.95);
}
@keyframes sendBtnPulse {
  0%, 100% { box-shadow: 0 0 20px rgba(108, 92, 231, 0.4); }
  50% { box-shadow: 0 0 28px rgba(108, 92, 231, 0.55); }
}
.chat-input-footer {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}

/* ===== File Attachment Styles ===== */
.chat-attach-btn {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  cursor: pointer;
  margin-bottom: 5px;
  transition: all 0.2s ease;
}
.chat-attach-btn:hover {
  background: rgba(255,255,255,0.06);
  color: var(--accent-secondary);
  transform: rotate(15deg);
}

/* Attachments preview area */
.chat-attachments-preview {
  width: 100%;
  max-width: 850px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px 16px 0 0;
  margin-bottom: -2px;
  animation: attachSlide 0.2s ease;
}
@keyframes attachSlide {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.chat-attachment-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  max-width: 220px;
  position: relative;
  animation: cardPop 0.2s ease;
}
@keyframes cardPop {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}
.chat-attachment-card.uploading {
  opacity: 0.7;
}
.chat-attachment-card.uploading::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  border-radius: 0 0 10px 10px;
  animation: uploadProgress 1.5s ease-in-out infinite;
}
@keyframes uploadProgress {
  0% { width: 0%; }
  50% { width: 70%; }
  100% { width: 100%; }
}
.chat-attachment-thumb {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}
.chat-attachment-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.chat-attachment-icon.pdf { background: rgba(239, 68, 68, 0.15); color: #ef4444; }
.chat-attachment-icon.doc { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.chat-attachment-icon.xls { background: rgba(34, 197, 94, 0.15); color: #22c55e; }
.chat-attachment-icon.csv { background: rgba(34, 197, 94, 0.15); color: #22c55e; }
.chat-attachment-icon.txt { background: rgba(168, 162, 158, 0.15); color: #a8a29e; }
.chat-attachment-icon.code { background: rgba(249, 115, 22, 0.15); color: #f97316; }

.chat-attachment-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.chat-attachment-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-attachment-meta {
  font-size: 10px;
  color: var(--text-muted);
}
.chat-attachment-remove {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: none;
  background: #ef4444;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  line-height: 1;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 2;
}
.chat-attachment-card:hover .chat-attachment-remove {
  opacity: 1;
}

/* Drag & Drop Overlay */
.chat-drop-overlay {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 50;
  background: rgba(255,255,255,0.04);
  border: 2px dashed rgba(108, 92, 231, 0.5);
  border-radius: 12px;
  backdrop-filter: blur(4px);
}
.chat-drop-overlay.visible {
  display: flex;
  align-items: center;
  justify-content: center;
  animation: dropFadeIn 0.2s ease;
}
@keyframes dropFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.chat-drop-overlay-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--accent-secondary);
  font-size: 16px;
  font-weight: 600;
}

/* Message attachments (in bubbles) */
.chat-msg-images {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.chat-msg-image {
  max-width: 280px;
  max-height: 200px;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.2s;
  object-fit: cover;
}
.chat-msg-image:hover {
  transform: scale(1.02);
}
.chat-msg-file-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  margin-bottom: 10px;
  backdrop-filter: blur(4px);
  width: fit-content;
}
.chat-msg-file-badge i {
  width: 16px;
  height: 16px;
  opacity: 0.9;
  flex-shrink: 0;
}
.chat-msg-text {
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* Image lightbox */
.chat-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
  animation: lbFadeIn 0.2s ease;
}
@keyframes lbFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.chat-lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* ==================== MOBILE DRAWER ==================== */
.dash-mobile-hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  flex-shrink: 0;
  transition: all 0.2s;
}
.dash-mobile-hamburger:hover {
  background: rgba(255,255,255,0.06);
  color: var(--text-primary);
}

.dash-mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.3s;
}
.dash-mobile-overlay.open {
  opacity: 1;
}

.dash-mobile-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 280px;
  background: #0c0c12;
  border-right: 1px solid rgba(255,255,255,0.06);
  z-index: 210;
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.dash-mobile-drawer.open {
  transform: translateX(0);
}
.dash-mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.dash-mobile-drawer-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.dash-mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
}
.dash-mobile-nav-link:hover {
  background: rgba(255,255,255,0.04);
  color: var(--text-primary);
}
.dash-mobile-nav-link.active {
  background: rgba(255,255,255,0.06);
  color: var(--accent-secondary);
  font-weight: 600;
}
.dash-mobile-drawer-footer {
  padding: 16px 18px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
  /* ---- Hamburger visible ---- */
  .dash-mobile-hamburger { display: flex; }
  .dash-mobile-overlay { display: block; }

  /* ---- Topbar: hide desktop nav & user text ---- */
  .dash-topbar { padding: 0 12px; height: 50px; position: relative; }
  .dash-nav { display: none !important; }
  .dash-user-btn span { display: none; }
  .dash-user-area { margin-left: auto; }
  .dash-brand {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
  }
  .dash-brand img { height: 26px !important; }
  #resellerPanelBtn { display: none !important; }

  /* ---- Content padding ---- */
  .dash-content { padding: 16px 12px; }

  /* ---- Stats grid ---- */
  .dash-stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .dash-stat-card { padding: 16px; }
  .dash-stat-value { font-size: 22px; }
  .dash-stat-label { font-size: 10px; }

  /* ---- Overview ---- */
  .overview-grid { grid-template-columns: 1fr; }
  .overview-welcome { flex-direction: column; align-items: flex-start; padding: 18px; gap: 12px; }
  .overview-welcome h2 { font-size: 18px; }
  .overview-welcome-actions { width: 100%; }
  .overview-welcome-actions .btn { flex: 1; }
  .overview-quick-actions { grid-template-columns: 1fr; }

  /* ---- Profile ---- */
  .profile-grid { grid-template-columns: 1fr; }

  /* ---- Tables horizontal scroll ---- */
  .glass-card[style*="overflow:hidden"],
  .glass-card[style*="overflow: hidden"] {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }
  .data-table { font-size: 12px; min-width: 500px; }
  .data-table th, .data-table td { padding: 10px 12px; white-space: nowrap; }

  /* ---- Keys table ---- */
  #tab-keys > div:first-child {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  #tab-keys > div:first-child .btn { width: 100%; justify-content: center; }
  #tab-keys > div:first-child p { font-size: 12px; }

  /* ---- Plans layout ---- */
  .plans-layout { flex-direction: column; }
  .plans-categories {
    width: 100%; min-width: auto; position: static;
    flex-direction: row; flex-wrap: wrap; gap: 6px; padding: 10px;
  }
  .plans-cat-header { display: none; }
  .plans-cat-item { padding: 8px 14px; font-size: 12px; }
  .plans-grid { grid-template-columns: 1fr; }

  /* ---- Plan cards ---- */
  .plan-card { padding: 20px; }
  .plan-card-price { font-size: 28px; }

  /* ---- Docs layout ---- */
  .docs-layout { grid-template-columns: 1fr; }
  .docs-sidebar {
    border-right: none; border-bottom: 1px solid var(--border-color);
    position: static; padding-bottom: 12px; margin-bottom: 16px;
  }
  .docs-sidebar-nav {
    flex-direction: row; overflow-x: auto; gap: 4px; padding: 4px;
    scrollbar-width: none;
  }
  .docs-sidebar-nav::-webkit-scrollbar { display: none; }
  .docs-sidebar-link { white-space: nowrap; padding: 8px 12px; font-size: 12px; }
  .docs-sidebar-link.active::before { display: none; }
  .docs-content { padding-left: 0; }

  /* ---- Code blocks ---- */
  .code-block pre { font-size: 11px; padding: 14px; overflow-x: auto; }
  .code-lang-tabs { overflow-x: auto; scrollbar-width: none; flex-wrap: nowrap; gap: 4px; }
  .code-lang-tabs::-webkit-scrollbar { display: none; }
  .code-lang-tab { font-size: 11px; padding: 6px 10px; white-space: nowrap; }

  /* ---- Chat layout: hide sidebar ---- */
  .chat-container { flex-direction: column; height: calc(100vh - 120px); margin-left: 0 !important; margin-right: 0 !important; --chat-expand: 0px !important; }
  .chat-sidebar { width: 100%; height: auto; max-height: 160px; border-radius: 12px 12px 0 0; overflow-y: auto; }
  .chat-main { border-radius: 0 0 12px 12px; }
  .chat-resize-handle { display: none !important; }
  .chat-header { padding: 12px 14px; flex-direction: column; gap: 8px; align-items: stretch; }
  .chat-model-selector { width: 100%; }
  .chat-model-dropdown { width: 100%; }
  .chat-messages { padding: 14px; }
  .chat-msg-row { max-width: 95%; }
  .chat-input-area { padding: 12px 14px 16px; }
  .chat-input-wrapper { padding: 4px 6px 4px 6px; border-radius: 22px; }
  .chat-input-wrapper textarea { font-size: 14px; min-height: 40px; }

  /* ---- Support / Tickets ---- */
  .td-layout { grid-template-columns: 1fr; }
  .td-topbar { flex-wrap: wrap; }
  .td-back-btn span { display: none; }
  .td-title { font-size: 14px; }
  .td-msg-body { padding-left: 0; }
  .ticket-filters { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .ticket-filters::-webkit-scrollbar { display: none; }
  .ticket-filter-btn { white-space: nowrap; font-size: 12px; }

  /* ---- Ticket form ---- */
  .ticket-form-card { padding: 20px; }

  /* ---- Modals ---- */
  .modal-overlay { padding: 10px; }
  .modal-overlay .modal {
    width: 100% !important; max-width: 100% !important;
    padding: 20px !important; border-radius: 16px;
    max-height: calc(100vh - 20px);
  }

  /* ---- Glass cards ---- */
  .glass-card { padding: 16px; }

  /* ---- Key created display ---- */
  .key-created-display {
    font-size: 11px; padding: 12px;
    flex-direction: column; align-items: flex-start; gap: 8px;
  }

  /* ---- Reseller boxes ---- */
  .reseller-status-pending, .reseller-status-rejected {
    flex-direction: column; text-align: center; padding: 16px;
  }

  /* ---- Coupon input ---- */
  #tab-plans [style*="display:flex"][style*="gap:10px"] {
    flex-direction: column;
  }
  #couponBtn { width: 100%; }

  /* ---- Usage sub-stats ---- */
  .usage-sub-stats { gap: 8px; }
  .usage-sub-stats > div { font-size: 12px; }

  /* ---- Footer ---- */
  .dash-footer-inner { padding: 0 16px; }
}

@media (max-width: 480px) {
  .dash-stats-grid { grid-template-columns: 1fr; }
  .dash-content { padding: 14px 8px; }
  .plan-card-price { font-size: 24px; }
  .chat-sidebar { max-height: 120px; }
  .chat-bubble { font-size: 13px; padding: 12px 14px; }
  .docs-sidebar-link { font-size: 11px; padding: 6px 10px; }
  .overview-welcome h2 { font-size: 16px; }
  .overview-welcome p { font-size: 12px; }
  .dash-topbar { padding: 0 8px; }
}

/* ==================== FOOTER ==================== */
.dash-footer {
  margin-top: auto;
  padding: 40px 0 32px;
  border-top: 1px solid var(--border-color);
  background: linear-gradient(180deg, transparent, rgba(108, 92, 231, 0.03));
}
.dash-footer-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.dash-footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.dash-footer-copy {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}
.dash-footer-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}
.dash-footer-links a {
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
  padding: 4px 6px;
  border-radius: 6px;
}
.dash-footer-links a:hover {
  color: var(--accent-secondary);
  background: rgba(255,255,255,0.04);
}
.dash-footer-dot {
  color: rgba(255, 255, 255, 0.12);
  font-size: 16px;
  user-select: none;
}
.dash-footer-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}
.dash-footer-meta span {
  font-size: 12px;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
}
.dash-footer-meta i {
  color: var(--accent-primary);
  opacity: 0.7;
}

/* ==================== RESELLER FAQ ACCORDION ==================== */
.reseller-faq-item {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s;
}
.reseller-faq-item:hover {
  border-color: var(--border-hover);
  background: rgba(255,255,255,0.04);
}
.reseller-faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  user-select: none;
}
.reseller-faq-icon {
  transition: transform 0.25s ease;
  color: var(--text-muted);
  flex-shrink: 0;
}
.reseller-faq-item.open .reseller-faq-icon {
  transform: rotate(180deg);
  color: var(--accent-secondary);
}
.reseller-faq-a {
  max-height: 0;
  overflow: hidden;
  padding: 0 18px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  transition: max-height 0.3s ease, padding 0.3s ease;
}
.reseller-faq-item.open .reseller-faq-a {
  max-height: 200px;
  padding: 0 18px 16px;
}
.reseller-faq-item.open {
  border-color: rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.02);
}

/* Reseller Status Boxes */
.reseller-status-pending {
  background: rgba(253,203,110,0.08);
  border: 1px solid rgba(253,203,110,0.2);
  border-radius: 14px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.reseller-status-rejected {
  background: rgba(255,107,107,0.06);
  border: 1px solid rgba(255,107,107,0.2);
  border-radius: 14px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}

/* ==================== REFERRAL RESPONSIVE ==================== */
@media (max-width: 768px) {
  #referralStatsGrid { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 480px) {
  #referralStatsGrid { grid-template-columns: 1fr !important; }
}
