/* =============================================
   SubDomain Panel - Main Stylesheet
   ============================================= */
:root {
  --primary: #4f46e5;
  --primary-dark: #3730a3;
  --primary-light: #818cf8;
  --secondary: #06b6d4;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;
  --dark: #1e293b;
  --darker: #0f172a;
  --gray: #64748b;
  --light: #f8fafc;
  --border: #e2e8f0;
  --card-bg: #ffffff;
  --shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: all 0.3s ease;
}

* { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: #f1f5f9;
  color: var(--dark);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---- NAVBAR ---- */
.navbar {
  background: var(--darker);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}
.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav-brand {
  color: #fff;
  text-decoration: none;
  font-size: 1.25rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.nav-brand i { color: var(--primary-light); }
.nav-menu {
  list-style: none;
  display: flex;
  gap: 0.25rem;
}
.nav-menu a {
  color: #cbd5e1;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
}
.nav-menu a:hover { color: #fff; background: rgba(255,255,255,0.1); }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
}

/* ---- PAGE CONTENT ---- */
.page-content { flex: 1; }

/* ---- HERO SECTION ---- */
.hero {
  background: linear-gradient(135deg, var(--darker) 0%, #1e1b4b 50%, var(--primary-dark) 100%);
  padding: 5rem 1.5rem;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%234f46e5' fill-opacity='0.08'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-content { position: relative; z-index: 1; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800; margin-bottom: 1rem; }
.hero h1 span { color: var(--primary-light); }
.hero p { font-size: 1.15rem; color: #c7d2fe; max-width: 600px; margin: 0 auto 2.5rem; }

/* ---- SEARCH BOX ---- */
.search-box {
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 20px;
  padding: 2rem;
  max-width: 700px;
  margin: 0 auto;
}
.search-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.search-input {
  flex: 1;
  min-width: 150px;
  padding: 0.85rem 1.25rem;
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: 10px;
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-size: 1rem;
  outline: none;
  transition: var(--transition);
}
.search-input::placeholder { color: rgba(255,255,255,0.5); }
.search-input:focus { border-color: var(--primary-light); background: rgba(255,255,255,0.15); }
.domain-select {
  padding: 0.85rem 1.25rem;
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: 10px;
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-size: 1rem;
  outline: none;
  cursor: pointer;
  min-width: 160px;
}
.domain-select option { background: var(--darker); color: #fff; }

/* Custom dropdown (replaces native <select> for consistent styling on index.php) */
.custom-select-wrapper { position: relative; flex: 0 0 auto; }
.custom-select-trigger {
    display: flex; align-items: center; gap: 10px; border: none; background: transparent;
    color: var(--text-dark); padding: 18px 18px 18px 15px; font-size: 1.1rem; font-weight: 600;
    cursor: pointer; white-space: nowrap;
}
body.light-mode .custom-select-trigger { color: #111827; }
.custom-select-trigger i { font-size: 0.8rem; color: var(--text-muted-dark); transition: transform 0.25s; }
body.light-mode .custom-select-trigger i { color: #9ca3af; }
.custom-select-wrapper.open .custom-select-trigger i { transform: rotate(180deg); }

.custom-select-options {
    display: none; position: absolute; top: calc(100% + 8px); right: 0; min-width: 180px;
    background: var(--surface-dark); border: 1px solid var(--border-dark); border-radius: 10px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.35); overflow: hidden; z-index: 50;
    max-height: 260px; overflow-y: auto;
}
body.light-mode .custom-select-options { background: #ffffff; border-color: #d1d5db; box-shadow: 0 12px 30px rgba(0,0,0,0.12); }
.custom-select-wrapper.open .custom-select-options { display: block; }

.custom-select-option {
    padding: 12px 18px; font-size: 1rem; font-weight: 600; color: var(--text-dark);
    cursor: pointer; transition: 0.15s;
}
body.light-mode .custom-select-option { color: #111827; }
.custom-select-option:hover { background: rgba(37,99,235,0.12); }
.custom-select-option.selected { color: var(--accent); background: rgba(37,99,235,0.08); }

@media (max-width: 600px) {
    .custom-select-trigger { padding: 15px 12px 15px 10px; font-size: 0.95rem; }
    .custom-select-options { min-width: 150px; left: auto; right: 0; }
}

.btn-search {
  padding: 0.85rem 2rem;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.btn-search:hover { background: var(--primary-dark); transform: translateY(-1px); }
.search-result-box { margin-top: 1.25rem; }
.avail-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.5rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
}
.avail-badge.available { background: rgba(16,185,129,0.2); color: #6ee7b7; border: 1px solid rgba(16,185,129,0.4); }
.avail-badge.taken { background: rgba(239,68,68,0.2); color: #fca5a5; border: 1px solid rgba(239,68,68,0.4); }
.btn-claim {
  margin-top: 0.75rem;
  padding: 0.7rem 2rem;
  background: var(--success);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.btn-claim:hover { background: #059669; }

/* ---- FEATURES ---- */
.features { padding: 4rem 1.5rem; }
.features .container { max-width: 1200px; margin: 0 auto; }
.section-title { text-align: center; margin-bottom: 2.5rem; }
.section-title h2 { font-size: 2rem; font-weight: 700; color: var(--dark); }
.section-title p { color: var(--gray); margin-top: 0.5rem; }
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}
.feature-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid var(--border);
}
.feature-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.feature-icon {
  width: 60px; height: 60px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  font-size: 1.5rem;
  color: #fff;
}
.feature-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.5rem; }
.feature-card p { color: var(--gray); font-size: 0.9rem; }

/* ---- CARDS & CONTAINERS ---- */
.container { max-width: 1200px; margin: 0 auto; padding: 2rem 1.5rem; }
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  margin-bottom: 1.5rem;
  overflow: hidden;
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.card-header h2, .card-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  min-width: 0;
}

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: var(--transition);
  white-space: nowrap;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #059669; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-warning { background: var(--warning); color: #fff; }
.btn-warning:hover { background: #d97706; }
.btn-info { background: var(--info); color: #fff; }
.btn-info:hover { background: #2563eb; }
.btn-secondary { background: var(--gray); color: #fff; }
.btn-secondary:hover { background: #475569; }
.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-sm { padding: 0.4rem 0.85rem; font-size: 0.8rem; }
.btn-lg { padding: 0.85rem 2rem; font-size: 1rem; }
.btn-block { width: 100%; justify-content: center; }

/* ---- FORMS ---- */
.form-group { margin-bottom: 1.25rem; }
.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 0.4rem;
}
.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  color: var(--dark);
  background: #fff;
  outline: none;
  transition: var(--transition);
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,70,229,0.1); }
.form-control.error { border-color: var(--danger); }
select.form-control { cursor: pointer; }
.form-hint { font-size: 0.8rem; color: var(--gray); margin-top: 0.3rem; }

/* ---- TABLES ---- */
.table-responsive { overflow-x: auto; border-radius: var(--radius-sm); }
table { width: 100%; border-collapse: collapse; }
th {
  background: var(--darker);
  color: #fff;
  padding: 0.85rem 1rem;
  text-align: left;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--dark);
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: #f8fafc; }

/* ---- BADGES ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-success { background: #d1fae5; color: #065f46; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-info { background: #dbeafe; color: #1e40af; }
.badge-secondary { background: #f1f5f9; color: #475569; }
.badge-purple { background: #ede9fe; color: #5b21b6; }

/* ---- ALERTS ---- */
.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  font-weight: 500;
}
.alert-success { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.alert-warning { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.alert-info { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }
.flash-msg { position: fixed; top: 80px; right: 1.5rem; z-index: 9999; min-width: 300px; max-width: 450px; box-shadow: var(--shadow-lg); animation: slideIn 0.3s ease; }
.close-alert { margin-left: auto; background: none; border: none; cursor: pointer; font-size: 1.1rem; color: inherit; opacity: 0.7; }
.close-alert:hover { opacity: 1; }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ---- AUTH PAGES ---- */
.auth-wrapper {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  background: linear-gradient(135deg, var(--darker), #1e1b4b);
}
.auth-card {
  background: #fff;
  border-radius: 20px;
  padding: 2.5rem;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 25px 50px rgba(0,0,0,0.3);
}
.auth-card h2 { font-size: 1.6rem; font-weight: 800; text-align: center; margin-bottom: 0.5rem; }
.auth-card .subtitle { text-align: center; color: var(--gray); margin-bottom: 2rem; }
.auth-tabs { display: flex; border-bottom: 2px solid var(--border); margin-bottom: 1.75rem; }
.auth-tab {
  flex: 1;
  padding: 0.75rem;
  text-align: center;
  cursor: pointer;
  font-weight: 600;
  color: var(--gray);
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: var(--transition);
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-size: 0.95rem;
}
.auth-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.auth-form { display: none; }
.auth-form.active { display: block; }
.input-icon { position: relative; }
.input-icon i { position: absolute; left: 0.9rem; top: 50%; transform: translateY(-50%); color: var(--gray); font-size: 0.9rem; }
.input-icon .form-control { padding-left: 2.5rem; }
.divider { display: flex; align-items: center; gap: 1rem; margin: 1rem 0; }
.divider::before, .divider::after { content:''; flex:1; height:1px; background:var(--border); }
.divider span { color: var(--gray); font-size: 0.8rem; }
.terms-check { display: flex; align-items: flex-start; gap: 0.6rem; font-size: 0.85rem; color: var(--gray); }
.terms-check input { margin-top: 0.2rem; accent-color: var(--primary); cursor: pointer; }
.terms-check a { color: var(--primary); }

/* ---- DASHBOARD ---- */
.dashboard-header { background: linear-gradient(135deg, var(--darker), #1e1b4b); color: #fff; padding: 2rem 1.5rem; }
.dashboard-header .container { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.dashboard-header h1 { font-size: 1.5rem; font-weight: 700; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1.25rem; margin-bottom: 2rem; }
.stat-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--primary);
  overflow: hidden;
}
.stat-info { min-width: 0; }
.stat-card.success { border-left-color: var(--success); }
.stat-card.warning { border-left-color: var(--warning); }
.stat-card.danger { border-left-color: var(--danger); }
.stat-card.info { border-left-color: var(--info); }
.stat-icon { width: 50px; height: 50px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.25rem; }
.stat-icon.primary { background: #ede9fe; color: var(--primary); }
.stat-icon.success { background: #d1fae5; color: var(--success); }
.stat-icon.warning { background: #fef3c7; color: var(--warning); }
.stat-icon.danger { background: #fee2e2; color: var(--danger); }
.stat-icon.info { background: #dbeafe; color: var(--info); }
.stat-info h3 { font-size: 1.6rem; font-weight: 800; }
.stat-info p { font-size: 0.8rem; color: var(--gray); }

/* ---- ADMIN SIDEBAR ---- */
.admin-layout { display: flex; min-height: calc(100vh - 64px); }
.admin-sidebar {
  width: 260px;
  background: var(--darker);
  color: #fff;
  padding: 1.5rem 0;
  flex-shrink: 0;
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  overflow-y: auto;
}
.sidebar-brand { padding: 0 1.5rem 1.5rem; font-weight: 700; font-size: 0.9rem; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.1em; }
.sidebar-menu { list-style: none; }
.sidebar-menu a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
  border-left: 3px solid transparent;
}
.sidebar-menu a:hover, .sidebar-menu a.active {
  color: #fff;
  background: rgba(255,255,255,0.07);
  border-left-color: var(--primary-light);
}
.sidebar-menu a i { width: 18px; text-align: center; }
.admin-content { flex: 1; padding: 2rem; overflow-x: hidden; }
.admin-page-header { margin-bottom: 2rem; }
.admin-page-header h1 { font-size: 1.5rem; font-weight: 700; }
.admin-page-header p { color: var(--gray); margin-top: 0.25rem; }

/* ---- DNS MANAGER ---- */
.dns-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; margin-top: 1.5rem; }
.dns-column { background: var(--card-bg); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); border: 1px solid var(--border); }
.dns-column h3 { font-size: 1rem; font-weight: 700; margin-bottom: 1.25rem; display: flex; align-items: center; gap: 0.5rem; color: var(--primary); }
.quick-connect-cards { display: grid; grid-template-columns: 1fr; gap: 0.75rem; }
.qc-card {
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.qc-card:hover { border-color: var(--primary); background: #f5f3ff; }
.qc-card.active-connect { border-color: var(--success); background: #f0fdf4; }
.qc-card .qc-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; color: #fff; }
.qc-card .qc-icon.blogger { background: #ff5722; }
.qc-card .qc-icon.github { background: #24292e; }
.qc-card .qc-icon.firebase { background: #ff9800; }
.qc-card h4 { font-size: 0.9rem; font-weight: 700; }
.qc-card p { font-size: 0.78rem; color: var(--gray); }
.active-badge { font-size: 0.7rem; background: var(--success); color: #fff; padding: 0.15rem 0.5rem; border-radius: 50px; margin-left: auto; }
.dns-record-row { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.dns-record-row .form-control { font-size: 0.8rem; padding: 0.5rem 0.75rem; }

/* ---- MODAL ---- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal-overlay.active { display: flex; }
/* Section Title Fix - visible in both modes */
.section-title, .section-title h2 { color: var(--text-dark); }
body.light-mode .section-title, body.light-mode .section-title h2 { color: var(--text-light); }

/* Search Result Cards (solid background) */
.result-card {
    display: flex; align-items: center; justify-content: space-between; gap: 15px;
    padding: 18px 22px; border-radius: 10px; flex-wrap: wrap;
    animation: fadeInResult 0.3s ease;
}
@keyframes fadeInResult { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }
.result-card.available { background: #16a34a; color: #ffffff; }
.result-card.taken     { background: #dc2626; color: #ffffff; }
.result-card.checking  { background: #475569; color: #ffffff; }
.result-card .result-text { font-size: 1.05rem; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.result-card .btn-claim-new {
    background: #ffffff; color: #16a34a; border: none; padding: 10px 22px;
    border-radius: 8px; font-weight: 700; cursor: pointer; font-size: 0.95rem;
    display: flex; align-items: center; gap: 8px; transition: 0.2s;
}
.result-card .btn-claim-new:hover { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0,0,0,0.2); }

/* FAQ Accordion */
.faq-item { text-align: left; cursor: pointer; }
.faq-question { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.faq-question h3 { margin: 0 !important; }
.faq-question .faq-arrow { transition: transform 0.3s; color: var(--accent); flex-shrink: 0; }
.faq-item.faq-open .faq-arrow { transform: rotate(180deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.faq-answer p { padding-top: 0.8rem; margin: 0 !important; }
.faq-item.faq-open .faq-answer { max-height: 300px; }
.modal {
  background: #fff;
  border-radius: 16px;
  padding: 2rem;
  max-width: 520px;
  width: 100%;
  box-shadow: 0 25px 50px rgba(0,0,0,0.4);
  animation: modalIn 0.3s ease;
}
@keyframes modalIn { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 1rem; }
.modal-footer { display: flex; gap: 0.75rem; justify-content: flex-end; margin-top: 1.5rem; }

/* ---- FOOTER ---- */
.footer {
  background: var(--darker);
  color: #94a3b8;
  text-align: center;
  padding: 1.5rem;
  font-size: 0.85rem;
}
.footer a { color: var(--primary-light); text-decoration: none; }

/* ---- TERMS ---- */
.terms-section { padding: 3rem 1.5rem; }
.terms-card { max-width: 800px; margin: 0 auto; background: #fff; border-radius: var(--radius); padding: 2.5rem; box-shadow: var(--shadow); }
.terms-card h1 { margin-bottom: 1.5rem; color: var(--dark); }
.terms-card h2 { margin: 1.5rem 0 0.75rem; color: var(--primary); font-size: 1.1rem; }
.terms-card p, .terms-card ul { color: var(--gray); line-height: 1.8; }
.terms-card ul { padding-left: 1.5rem; }

/* ---- EMPTY STATE ---- */
.empty-state { text-align: center; padding: 3rem 1rem; }
.empty-state i { font-size: 3rem; color: #cbd5e1; margin-bottom: 1rem; }
.empty-state h3 { font-size: 1.1rem; color: var(--gray); margin-bottom: 0.5rem; }
.empty-state p { color: #94a3b8; font-size: 0.9rem; }

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-menu {
    display: none;
    position: absolute;
    top: 64px; left: 0; right: 0;
    background: var(--darker);
    flex-direction: column;
    padding: 1rem;
    gap: 0.25rem;
  }
  .nav-menu.open { display: flex; }
  .search-row { flex-direction: column; }
  .search-input, .domain-select, .btn-search { width: 100%; }
  .admin-layout { flex-direction: column; }
  .admin-sidebar { width: 100%; position: static; height: auto; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .dns-columns { grid-template-columns: 1fr; }
  .modal { padding: 1.5rem; }
  .dashboard-header .container { flex-direction: column; align-items: flex-start; }
  .card-header { flex-direction: column; align-items: stretch; }
  .card-header > a.btn, .card-header > button.btn { width: 100%; justify-content: center; }
}
@media (max-width: 480px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
  .stat-card { padding: 1rem; gap: 0.6rem; }
  .stat-icon { width: 40px; height: 40px; font-size: 1rem; flex-shrink: 0; }
  .stat-info h3 { font-size: 1.25rem; }
  .stat-info p { font-size: 0.72rem; }
  .auth-card { padding: 1.75rem 1.25rem; }
  .hero { padding: 3rem 1rem; }
}

/* ---- GLOBAL OVERFLOW SAFETY ---- */
html, body { overflow-x: hidden; max-width: 100%; }
img, table { max-width: 100%; }
.card-header h2, .card-header h3, .nav-menu a span, p, .form-hint { min-width: 0; }
.stat-icon, .feature-icon, .qc-icon, .badge { flex-shrink: 0; }