:root {
  --bg: #0f1419;
  --surface: #181f26;
  --surface-2: #222a33;
  --border: #2c3540;
  --text: #e8eef5;
  --text-muted: #94a3b8;
  --primary: #0e8f6e;
  --primary-hover: #14a37e;
  --error: #ef4444;
  --success: #22c55e;
  --radius: 12px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial,
    sans-serif;
  line-height: 1.5;
  min-height: 100vh;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 20px 80px;
}

.page-header {
  margin-bottom: 24px;
}

.page-header h1 {
  margin: 0 0 6px;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.4px;
}

.subtitle {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
  max-width: 640px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
}

.card h2 {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 600;
}

.hidden {
  display: none !important;
}

.muted {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0 0 16px;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 360px;
}

input[type="text"],
input[type="password"],
input[type="url"] {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  padding: 12px 14px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease;
}

input:focus {
  border-color: var(--primary);
}

button {
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  border-radius: 10px;
  padding: 11px 18px;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

button.primary {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

button.primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

button.ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

button.ghost:hover {
  background: var(--surface-2);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.error {
  color: var(--error);
  font-size: 13px;
  min-height: 18px;
}

.editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.editor-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.badge {
  background: var(--surface-2);
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
}

.tabs-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tab-row {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.tab-row h3 {
  margin: 0 0 14px;
  font-size: 16px;
  font-weight: 600;
}

.lang-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

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

.lang-cell {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lang-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.lang-head label {
  font-weight: 600;
  font-size: 13px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
}

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

.slider {
  position: absolute;
  inset: 0;
  background: #3a4452;
  border-radius: 22px;
  transition: background 0.18s ease;
}

.slider::before {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.18s ease;
}

.switch input:checked + .slider {
  background: var(--primary);
}

.switch input:checked + .slider::before {
  transform: translateX(18px);
}

.actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.status {
  margin-top: 12px;
  font-size: 13px;
  min-height: 18px;
}

.status.success {
  color: var(--success);
}

.status.error {
  color: var(--error);
}
