:root {
  --bg-dark: #0a0e14;
  --bg-card: #151b23;
  --primary: #f6821f; /* Cloudflare Orange */
  --text-main: #e6edf3;
  --text-muted: #8b949e;
  --accent: #238636;
  --error: #da3633;
  --border: #30363d;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  direction: rtl;
  min-height: 100vh;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 20px;
}

header {
  margin-bottom: 40px;
  text-align: center;
}

h1 { color: var(--primary); font-size: 28px; margin-bottom: 10px; }
p.subtitle { color: var(--text-muted); font-size: 14px; }

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.zone-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.zone-item {
  background: #1c2128;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: transform 0.2s;
}

.zone-item:hover { transform: translateY(-2px); border-color: var(--primary); }

.btn {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: opacity 0.2s;
  text-decoration: none;
  font-size: 14px;
}

.btn-primary { background: var(--primary); color: white; }
.btn-accent { background: var(--accent); color: white; }
.btn:hover { opacity: 0.9; }

input[type="text"], input[type="password"] {
  width: 100%;
  padding: 12px;
  background: #0d1117;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: white;
  margin-bottom: 16px;
}

label { display: block; margin-bottom: 8px; font-weight: 500; font-size: 14px; color: var(--text-muted); }

.status { padding: 12px; border-radius: 6px; margin-bottom: 16px; font-size: 14px; font-weight: 500; }
.status-success { background: rgba(35, 134, 54, 0.15); color: #3fb950; border: 1px solid #238636; }
.status-error { background: rgba(218, 54, 51, 0.15); color: #f85149; border: 1px solid #da3633; }

.dns-table { width: 100%; border-collapse: collapse; margin-top: 20px; }
.dns-table th, .dns-table td { text-align: right; padding: 12px; border-bottom: 1px solid var(--border); font-size: 14px; }
.dns-table th { color: var(--text-muted); font-weight: 600; }

/* ========== AJAX PROGRESS ========== */
.progress-container {
  display: none;
  background: #0d1117;
  border-radius: 8px;
  overflow: hidden;
  height: 24px;
  margin-bottom: 20px;
  position: relative;
  border: 1px solid var(--border);
}

.progress-bar {
  background: var(--primary);
  width: 0%;
  height: 100%;
  transition: width 0.3s ease;
}

.progress-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 12px;
  font-weight: 700;
  color: white;
}

.log-list {
  background: #0d1117;
  padding: 15px;
  border-radius: 8px;
  font-family: monospace;
  font-size: 12px;
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid var(--border);
  display: none;
}

.log-item { margin-bottom: 5px; color: var(--text-muted); }
.log-item.success { color: #3fb950; }
.log-item.error { color: #f85149; }

/* ========== MINI CONTROLS ========== */
.mini-input {
  background: #0d1117;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: white;
  padding: 5px 10px;
  font-size: 13px;
  width: 100%;
}

.switch {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
}

.switch input { opacity: 0; width: 0; height: 0; }

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #30363d;
  transition: .4s;
  border-radius: 20px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 14px; width: 14px;
  left: 3px; bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider { background-color: var(--primary); }
input:checked + .slider:before { transform: translateX(16px); }

.btn-mini {
  padding: 4px 10px;
  font-size: 12px;
}
