/* =========================================================
   ODERLAND-INSPIRERAD APP.CSS
   Ren • Professionell • Stabil
   ========================================================= */

/* ---------- DESIGN TOKENS ---------- */
:root {
  --bg: #f5f7fb;
  --card: #ffffff;
  --border: #e5e7eb;
  --text: #1f2937;
  --muted: #6b7280;
  --primary: #2563eb;
  --primary-dark: #1e40af;
  --success: #16a34a;
  --warning: #d97706;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  line-height: 1.6;
}

/* ---------- LAYOUT ---------- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 24px 48px;
}

/* Större skärmar: utnyttja mer bredd */
@media (min-width: 1600px) {
  .container {
    max-width: none;
        width: 100%;
	padding-left: 24px;
	padding-right: 24px;
  }
}

/ ------- HEADER ---------- */
header {
  margin-bottom: 20px;
}

/* ===== TOPBAR ===== */
.topbar {
  background: #0f172a;
  color: #fff;
  padding: 10px 20px;
}

.topbar-inner {
  max-width: 1200px;
  margin: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

@media (min-width: 1400px) {
  .topbar-inner {
    max-width: 1400px;
  }
}

@media (min-width: 1800px) {
  .topbar-inner {
    max-width: 1600px;
  }
}

.brand {
  font-weight: 600;
}

.user-status {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-email {
  font-size: 0.9rem;
  opacity: 0.9;
}

.btn-small {
  padding: 4px 10px;
  font-size: 0.85rem;
}

header h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* ---------- CARDS ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 24px;
  margin-bottom: 24px;
  box-shadow:
    0 10px 20px rgba(0,0,0,.04),
    0 2px 6px rgba(0,0,0,.04);
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(180deg, var(--primary), var(--primary-dark));
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(37,99,235,.25);
  transition: transform .15s ease, box-shadow .15s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(37,99,235,.35);
}

.btn-outline {
  background: transparent;
  border: 1px solid #cbd5e1;
  color: #1f2937;
}

.btn-outline:hover {
  background: #f3f4f6;
}

/* ---------- BADGES / LABELS ---------- */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef2ff;
  color: #1f2937;
  font-size: 12px;
}

/* ---------- FORMS ---------- */
form label {
  display: block;
  margin: 14px 0 6px;
  font-weight: 600;
  color: var(--text);
}

form input,
form select,
form textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 0.95rem;
  transition: border-color .15s ease, box-shadow .15s ease;
}

form textarea {
  min-height: 90px;
  resize: vertical;
}

form input:focus,
form select:focus,
form textarea:focus {
  outline: none;
  border-color: #93c5fd;
  box-shadow: 0 0 0 4px rgba(59,130,246,.12);
}

/* ---------- STEGINDIKATOR / STATUSRAD ---------- */
.step-indicator {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.step {
  padding: 6px 12px;
  border-radius: 20px;
  background: #f3f4f6;
  font-size: 0.9rem;
}

.step a {
  text-decoration: none;
  color: inherit;
}

/* Klar */
.step.done {
  background: #dcfce7;
  color: #166534;
}

/* Aktiv */
.step.active {
  background: #dbeafe;
  color: #1e40af;
  font-weight: 600;
}

/* Låst */
.step.locked {
  background: #f3f4f6;
  color: #9ca3af;
  cursor: not-allowed;
}

/* Pilar mellan steg */
.step-separator {
  color: #9ca3af;
}

/* Ikoner i stegindikator */
.step-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 700;
  background: #e5e7eb;
  color: #374151;
}

.step-item.active .step-icon {
  background: #2563eb;
  color: #fff;
}

.step-item.done .step-icon {
  background: #16a34a;
  color: #fff;
}

/* Status-badges (för verifiering m.m.) */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* Grå – ej påbörjad */
.badge-muted {
  background: #f1f5f9;
  color: #64748b;
}

/* Blå – aktivt steg */
.badge-active {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}

/* Gul – kvar */
.badge-warning {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}

/* Grön – klar */
.badge-success {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #bbf7d0;
}

/* ---------- TABLES ---------- */
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

table th {
  background: #f8fafc;
  color: #475569;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
}

table th,
table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

table tr:hover td {
  background: #fafcff;
}

/* Större skärmar – lite mer luft i tabeller */
@media (min-width: 1400px) {
  table th,
  table td {
    padding: 12px 18px;
  }
}

/* ---------- HEADINGS ---------- */
h3 {
  margin-top: 32px;
  margin-bottom: 12px;
  font-size: 1.1rem;
}

/* ---------- UTIL ---------- */
.text-muted,
.muted {
  color: var(--muted);
}

.info {
  background: #f1f5f9;
  border-left: 4px solid #2563eb;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 16px;
}

/* Fieldsets (verifiering, signering etc.) */
fieldset {
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 16px;
  margin-bottom: 20px;
}

legend {
  font-weight: 600;
  padding: 0 8px;
}

.hint {
  font-size: 0.85rem;
  color: #6b7280;
  margin-top: 8px;
}

/* ---------- USER BAR (LOGIN STATUS) ---------- */
.user-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 8px 12px;
  margin-bottom: 16px;
  font-size: 0.85rem;
  color: #374151;
}

.user-actions a {
  color: #2563eb;
  font-weight: 600;
  text-decoration: none;
}

.user-actions a:hover {
  text-decoration: underline;
}

/* ---------- FORM-GRID (för bredare skärmar) ---------- */
/* Kan användas i t.ex. Services- och DNS-vyer för bättre layout */
.form-grid {
  display: block;
}

@media (min-width: 1200px) {
  .form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 24px;
  }

  .form-grid .field-full {
    grid-column: 1 / -1;
  }
}
