/* ============================================
   Innovnet - Dark Theme CSS
   IT & Security Service Platform
   ============================================ */

/* CSS Custom Properties */
:root {
  --bg-primary: #0a0e17;
  --bg-secondary: #111827;
  --bg-card: #1a1f2e;
  --bg-sidebar: #0d1117;
  --bg-input: #1e2533;
  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent-blue: #3b82f6;
  --accent-purple: #8b5cf6;
  --accent-gradient: linear-gradient(135deg, #3b82f6, #8b5cf6);
  --border-color: #1e293b;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;
  --sidebar-width: 260px;
  --header-height: 64px;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.3);
}

/* ============================================
   Reset & Base Styles
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a:hover {
  color: var(--accent-purple);
}

img { max-width: 100%; }

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ============================================
   Auth Pages
   ============================================ */
.auth-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--bg-primary);
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(139, 92, 246, 0.08) 0%, transparent 50%);
}

.auth-container {
  width: 100%;
  max-width: 420px;
  padding: 1rem;
}

.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent-gradient);
}

.auth-logo {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-logo .logo-icon {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

.auth-logo h1 {
  font-size: 1.75rem;
  font-weight: 700;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-logo p {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.auth-form .form-group {
  margin-bottom: 1.25rem;
}

.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.auth-footer p {
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* ============================================
   Sidebar
   ============================================ */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform 0.3s ease;
}

.sidebar-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sidebar-logo .logo-icon {
  font-size: 1.5rem;
}

.sidebar-logo .logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sidebar-nav {
  flex: 1;
  padding: 1rem 0;
  overflow-y: auto;
}

.sidebar-nav ul {
  list-style: none;
}

.sidebar-nav li {
  margin: 2px 0;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}

.sidebar-nav a:hover {
  background: rgba(59, 130, 246, 0.08);
  color: var(--text-primary);
  border-left-color: rgba(59, 130, 246, 0.3);
}

.sidebar-nav a.active {
  background: rgba(59, 130, 246, 0.12);
  color: var(--accent-blue);
  border-left-color: var(--accent-blue);
  font-weight: 500;
}

.nav-icon {
  font-size: 1.1rem;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}

.sidebar-footer {
  padding: 1rem 0;
  border-top: 1px solid var(--border-color);
}

.sidebar-logout {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.sidebar-logout:hover {
  color: var(--danger);
  background: rgba(239, 68, 68, 0.08);
}

/* ============================================
   Header
   ============================================ */
.header {
  position: fixed;
  top: 0;
  left: var(--sidebar-width);
  right: 0;
  height: var(--header-height);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  z-index: 90;
  backdrop-filter: blur(8px);
  background: rgba(17, 24, 39, 0.9);
}

.header-title h2 {
  font-size: 1.2rem;
  font-weight: 600;
}

.header-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-name {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.875rem;
  color: white;
}

/* Mobile menu toggle */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.mobile-menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* ============================================
   Main Content
   ============================================ */
.main-content {
  margin-left: var(--sidebar-width);
  margin-top: var(--header-height);
  padding: 2rem;
  min-height: calc(100vh - var(--header-height));
}

/* ============================================
   Cards
   ============================================ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  border-color: rgba(59, 130, 246, 0.2);
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.05);
}

.card-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.card-header h3 {
  font-size: 1rem;
  font-weight: 600;
}

.card-body {
  padding: 1.5rem;
}

.card-danger {
  border-color: rgba(239, 68, 68, 0.3);
}

.card-danger:hover {
  border-color: rgba(239, 68, 68, 0.5);
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.05);
}

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

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all 0.2s ease;
}

.stat-card:hover {
  border-color: rgba(59, 130, 246, 0.2);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.stat-icon-blue { background: rgba(59, 130, 246, 0.15); }
.stat-icon-green { background: rgba(34, 197, 94, 0.15); }
.stat-icon-yellow { background: rgba(245, 158, 11, 0.15); }
.stat-icon-purple { background: rgba(139, 92, 246, 0.15); }

.stat-info h3 {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
}

.stat-info p {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 0.25rem;
}

/* ============================================
   Tables
   ============================================ */
.table-responsive {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 0.875rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.table th {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  white-space: nowrap;
}

.table tbody tr {
  transition: background 0.15s ease;
}

.table tbody tr:hover {
  background: rgba(59, 130, 246, 0.04);
}

.table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.01);
}

.table tbody tr:nth-child(even):hover {
  background: rgba(59, 130, 246, 0.04);
}

.actions-cell {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

/* ============================================
   Forms
   ============================================ */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: inherit;
  transition: all 0.2s ease;
  outline: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.form-row {
  display: flex;
  gap: 1rem;
  align-items: flex-end;
}

.flex-grow {
  flex: 1;
}

.form-action {
  flex-shrink: 0;
}

.form-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  font-family: inherit;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  gap: 0.5rem;
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--accent-gradient);
  color: white;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover:not(:disabled) {
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.4);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--border-color);
  border-color: var(--text-muted);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover:not(:disabled) {
  background: var(--danger);
  color: white;
}

.btn-sm {
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
}

.btn-block {
  width: 100%;
}

/* ============================================
   Badges
   ============================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 9999px;
  white-space: nowrap;
}

.badge-success {
  background: rgba(34, 197, 94, 0.15);
  color: var(--success);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
}

.badge-danger {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
}

.badge-info {
  background: rgba(59, 130, 246, 0.15);
  color: var(--info);
}

.badge-lg {
  padding: 0.375rem 0.875rem;
  font-size: 0.85rem;
}

/* ============================================
   Alerts / Flash Messages
   ============================================ */
.alert {
  padding: 0.875rem 1.25rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  border: 1px solid;
  animation: slideDown 0.3s ease;
}

.alert-success {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.3);
  color: var(--success);
}

.alert-error {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  color: var(--danger);
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   Welcome Section
   ============================================ */
.welcome-section {
  margin-bottom: 2rem;
}

.welcome-section h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.welcome-section p {
  color: var(--text-muted);
}

/* ============================================
   Section Header
   ============================================ */
.section-header {
  margin-bottom: 1.5rem;
}

.section-header h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

/* ============================================
   Activity List
   ============================================ */
.activity-list {
  display: flex;
  flex-direction: column;
}

.activity-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.875rem 0;
  border-bottom: 1px solid var(--border-color);
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.activity-dot-success { background: var(--success); }
.activity-dot-warning { background: var(--warning); }
.activity-dot-danger { background: var(--danger); }
.activity-dot-info { background: var(--info); }

.activity-info {
  flex: 1;
  min-width: 0;
}

.activity-event {
  font-size: 0.9rem;
  font-weight: 500;
}

.activity-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.125rem;
}

/* ============================================
   Empty State
   ============================================ */
.empty-state {
  text-align: center;
  padding: 2rem;
}

.empty-state p {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

/* ============================================
   Protection Grid
   ============================================ */
.protection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1.5rem;
}

.protection-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.protection-header h4 {
  font-size: 1.1rem;
  font-weight: 600;
}

.protection-details {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.protection-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-color);
}

.protection-item:last-child {
  border-bottom: none;
}

.protection-label {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.protection-actions {
  padding-top: 0.5rem;
}

/* ============================================
   Traffic Charts (Placeholder)
   ============================================ */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.chart-placeholder {
  padding: 1rem 0;
}

.chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 200px;
  padding: 0 0.5rem;
}

.chart-bar {
  flex: 1;
  background: var(--accent-gradient);
  border-radius: 4px 4px 0 0;
  position: relative;
  min-height: 20px;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.chart-bar:hover,
.chart-bar.active {
  opacity: 1;
}

.chart-bar span {
  position: absolute;
  bottom: -24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.traffic-breakdown {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1rem 0;
}

.traffic-item {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.traffic-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 150px;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.traffic-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.traffic-bar-container {
  flex: 1;
  height: 8px;
  background: var(--bg-input);
  border-radius: 4px;
  overflow: hidden;
}

.traffic-bar {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease;
}

.traffic-percent {
  font-size: 0.875rem;
  font-weight: 600;
  min-width: 40px;
  text-align: right;
}

/* ============================================
   Settings Grid
   ============================================ */
.settings-grid {
  display: grid;
  gap: 1.5rem;
}

/* API Key Display */
.api-key-display {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.875rem 1rem;
  margin-top: 0.75rem;
}

.api-key-display code {
  font-family: 'Fira Code', 'Cascadia Code', monospace;
  font-size: 0.9rem;
  color: var(--accent-blue);
}

/* ============================================
   Account Page
   ============================================ */
.account-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.account-avatar-large {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  color: white;
}

.info-grid {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.info-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-color);
}

.info-item:last-child {
  border-bottom: none;
}

.info-label {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.info-value {
  font-weight: 500;
}

/* Plan Card */
.plan-card {
  padding: 0.5rem 0;
}

.plan-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.plan-header h4 {
  font-size: 1.2rem;
  font-weight: 600;
}

.plan-features {
  list-style: none;
  margin-bottom: 1.5rem;
}

.plan-features li {
  padding: 0.5rem 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
}

.plan-features li:last-child {
  border-bottom: none;
}

/* ============================================
   Utility Classes
   ============================================ */
.text-muted {
  color: var(--text-muted);
}

.text-center {
  text-align: center;
}

/* ============================================
   Overlay for mobile sidebar
   ============================================ */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 99;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
  display: block;
  opacity: 1;
}

/* ============================================
   Animations
   ============================================ */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.main-content {
  animation: fadeIn 0.3s ease;
}

.stat-card {
  animation: fadeIn 0.4s ease backwards;
}

.stat-card:nth-child(1) { animation-delay: 0.05s; }
.stat-card:nth-child(2) { animation-delay: 0.1s; }
.stat-card:nth-child(3) { animation-delay: 0.15s; }
.stat-card:nth-child(4) { animation-delay: 0.2s; }

/* ============================================
   Inline Forms
   ============================================ */
.inline-form {
  display: inline;
}

/* ============================================
   Sidebar Section Titles
   ============================================ */
.sidebar-section-title {
  padding: 0.75rem 1.5rem 0.25rem;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-top: 0.5rem;
  list-style: none;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.sidebar-link:hover {
  color: var(--accent-blue);
  background: rgba(59, 130, 246, 0.08);
}

/* ============================================
   Setting Rows (for SSL, Firewall, Caching)
   ============================================ */
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-color);
  gap: 1rem;
}

.setting-row:last-child {
  border-bottom: none;
}

.setting-info {
  flex: 1;
  min-width: 0;
}

.setting-info strong {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.15rem;
}

.setting-info p {
  font-size: 0.8rem;
  margin: 0;
}

.card-actions {
  padding-top: 0.5rem;
}

/* SSL Mode Cards */
.ssl-modes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
}

.ssl-mode-option {
  cursor: pointer;
}

.ssl-mode-option input {
  display: none;
}

.ssl-mode-card {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 1rem;
  text-align: center;
  transition: all 0.2s ease;
}

.ssl-mode-card:hover {
  border-color: var(--accent-blue);
}

.ssl-mode-card strong {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.ssl-mode-card p {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 0;
}

.ssl-mode-active {
  border-color: var(--accent-blue);
  background: rgba(59, 130, 246, 0.08);
}

/* DNS Status Bar */
.dns-status-bar {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

/* Badge Purple */
.badge-purple {
  background: rgba(139, 92, 246, 0.15);
  color: var(--accent-purple);
}

.badge-secondary {
  background: rgba(100, 116, 139, 0.15);
  color: var(--text-secondary);
}

code {
  background: var(--bg-input);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.8rem;
  color: var(--accent-blue);
  word-break: break-all;
}

/* ============================================
   Landing Page Styles
   ============================================ */
.landing-body {
  background: var(--bg-primary);
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(59, 130, 246, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(139, 92, 246, 0.06) 0%, transparent 50%);
}

/* Landing Nav */
.landing-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 14, 23, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
}

.landing-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.landing-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.landing-logo .logo-icon {
  font-size: 1.4rem;
}

.landing-logo .logo-text {
  font-size: 1.2rem;
  font-weight: 700;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.landing-nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.landing-nav-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.landing-nav-links a:hover {
  color: var(--text-primary);
}

.landing-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.landing-menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Landing Container */
.landing-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Hero */
.hero-section {
  padding: 10rem 2rem 6rem;
  text-align: center;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-block;
  padding: 0.4rem 1rem;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 99px;
  font-size: 0.85rem;
  color: var(--accent-blue);
  margin-bottom: 1.5rem;
}

.hero-section h1 {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.5rem;
}

.gradient-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 2rem;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 3.5rem;
  flex-wrap: wrap;
}

.btn-lg {
  padding: 0.85rem 2rem;
  font-size: 1rem;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
}

.hero-stat {
  text-align: center;
}

.hero-stat strong {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-stat span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Landing Sections */
.landing-section {
  padding: 5rem 0;
}

.landing-section-alt {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.section-intro {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 3rem;
}

.section-intro h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.section-intro p {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

/* Feature Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 2rem;
  transition: all 0.2s ease;
}

.feature-card:hover {
  border-color: rgba(59, 130, 246, 0.3);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Security Grid */
.security-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1rem;
}

.security-item {
  display: flex;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s ease;
}

.security-item:hover {
  border-color: rgba(34, 197, 94, 0.3);
}

.security-check {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.15);
  color: var(--success);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  flex-shrink: 0;
}

.security-item h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.security-item p {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin: 0;
}

/* Pricing */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  align-items: start;
}

.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  position: relative;
  transition: all 0.2s ease;
}

.pricing-card:hover {
  border-color: rgba(59, 130, 246, 0.3);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.pricing-card-featured {
  border-color: var(--accent-blue);
  box-shadow: 0 0 30px rgba(59, 130, 246, 0.1);
}

.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-gradient);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 1rem;
  border-radius: 99px;
}

.pricing-header h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.pricing-price {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
}

.pricing-price span {
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-muted);
}

.pricing-features {
  list-style: none;
  text-align: left;
  margin-bottom: 2rem;
}

.pricing-features li {
  padding: 0.5rem 0;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pricing-features .check {
  color: var(--success);
  font-weight: bold;
}

.pricing-features .cross {
  color: var(--text-muted);
}

.pricing-features .disabled {
  color: var(--text-muted);
}

/* Footer */
.landing-footer {
  border-top: 1px solid var(--border-color);
  padding: 4rem 0 2rem;
  background: var(--bg-sidebar);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

.footer-brand p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 1rem;
  line-height: 1.6;
}

.footer-links h4 {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.footer-links a {
  display: block;
  color: var(--text-secondary);
  font-size: 0.9rem;
  padding: 0.3rem 0;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--text-primary);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ============================================
   Improved Mobile Responsive
   ============================================ */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
  .hero-section h1 {
    font-size: 2.25rem;
  }
}

@media (max-width: 768px) {
  /* Landing nav mobile */
  .landing-menu-toggle {
    display: flex;
  }

  .landing-nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    flex-direction: column;
    padding: 1rem;
    gap: 0.5rem;
  }

  .landing-nav-links.active {
    display: flex;
  }

  .landing-nav-links a {
    padding: 0.5rem 1rem;
    width: 100%;
    text-align: center;
  }

  /* Hero mobile */
  .hero-section {
    padding: 7rem 1rem 3rem;
  }

  .hero-section h1 {
    font-size: 1.75rem;
  }

  .hero-subtitle {
    font-size: 0.95rem;
  }

  .hero-stats {
    gap: 1.5rem;
  }

  .hero-stat strong {
    font-size: 1.2rem;
  }

  /* Sections mobile */
  .landing-section {
    padding: 3rem 0;
  }

  .section-intro h2 {
    font-size: 1.5rem;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .security-grid {
    grid-template-columns: 1fr;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  /* Dashboard mobile improvements */
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.active {
    transform: translateX(0);
  }

  .header {
    left: 0;
    padding: 0 1rem;
  }

  .main-content {
    margin-left: 0;
    padding: 1.25rem;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .form-row {
    flex-direction: column;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }

  .protection-grid {
    grid-template-columns: 1fr;
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }

  .chart-bars {
    height: 150px;
  }

  .header-title h2 {
    font-size: 1rem;
  }

  .welcome-section h1 {
    font-size: 1.2rem;
  }

  .user-name {
    display: none;
  }

  /* Table mobile */
  .table th,
  .table td {
    padding: 0.6rem 0.5rem;
    font-size: 0.8rem;
  }

  .actions-cell {
    white-space: nowrap;
  }

  /* SSL modes mobile */
  .ssl-modes {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Setting rows mobile */
  .setting-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .stat-card {
    padding: 1rem;
  }

  .auth-card {
    padding: 1.5rem;
  }

  .traffic-label {
    min-width: 100px;
    font-size: 0.75rem;
  }

  .hero-section h1 {
    font-size: 1.4rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .hero-stat strong {
    font-size: 1rem;
  }

  .hero-stats {
    gap: 1rem;
  }

  .ssl-modes {
    grid-template-columns: 1fr;
  }

  .card-body {
    padding: 1rem;
  }

  .card-header {
    padding: 1rem;
  }
}

/* ============================================
   Domain Setup / DNS Verification
   ============================================ */
.setup-intro {
  margin-bottom: 1.5rem;
}

.setup-intro p {
  color: var(--text-secondary);
  line-height: 1.7;
}

.setup-domain-block {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.setup-domain-block h4 {
  font-size: 1.1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.setup-step {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  align-items: flex-start;
}

.setup-step:last-child {
  margin-bottom: 0;
}

.step-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-gradient);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.step-content {
  flex: 1;
  min-width: 0;
}

.step-content strong {
  display: block;
  margin-bottom: 0.25rem;
}

.dns-record-box {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin-top: 0.75rem;
}

.dns-record-box strong {
  display: block;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
}

.record-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.4rem 0;
  font-size: 0.875rem;
}

.record-label {
  color: var(--text-muted);
  min-width: 100px;
  flex-shrink: 0;
}

.record-value {
  background: var(--bg-input);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  color: var(--accent-blue);
  word-break: break-all;
  font-family: 'Fira Code', 'JetBrains Mono', monospace;
}

.dns-verified-info p {
  color: var(--success);
  font-weight: 500;
  margin-bottom: 1rem;
}

/* How-it-works grid */
.how-it-works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.how-step {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.how-step strong {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
}

/* Worker examples / code blocks */
.worker-example {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1.5rem;
}

.worker-example:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.code-block {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 1rem;
  font-family: 'Fira Code', 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  line-height: 1.6;
  overflow-x: auto;
  color: var(--text-secondary);
  margin-top: 0.5rem;
  white-space: pre;
}

/* Mobile adjustments for setup */
@media (max-width: 768px) {
  .setup-step {
    flex-direction: column;
    gap: 0.5rem;
  }

  .record-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  .record-label {
    min-width: unset;
  }

  .how-it-works-grid {
    grid-template-columns: 1fr;
  }
}

/* Setup step states */
.setup-step.step-done .step-number {
  background: var(--success);
  font-size: 1rem;
}

.setup-step.step-pending {
  opacity: 0.45;
}

.setup-step.step-pending .step-number {
  background: var(--bg-input);
  color: var(--text-muted);
}

.setup-step.step-active .step-number {
  background: var(--accent-gradient);
  animation: pulse-step 2s ease-in-out infinite;
}

@keyframes pulse-step {
  0%, 100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(99, 102, 241, 0); }
}
