/* =========================
   ROOT / THEME
========================= */

:root {
  --bg: #ffffff;
  --fg: #1f2937;
  --muted: #6b7280;
  --border: #e5e7eb;

  --primary: #ff6f6f;
  --primary-hover: #ff5252;

  --card-bg: #ffffff;
  --radius: 14px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.06);
}

/* =========================
     RESET
  ========================= */

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

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

/* =========================
     UTILITIES
  ========================= */

.hidden {
  display: none !important;
}

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

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

.mt-1 {
  margin-top: 8px;
}
.mt-2 {
  margin-top: 16px;
}
.mt-3 {
  margin-top: 24px;
}

.mb-1 {
  margin-bottom: 8px;
}
.mb-2 {
  margin-bottom: 16px;
}
.mb-3 {
  margin-bottom: 24px;
}

/* =========================
     LAYOUT
  ========================= */

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
}

/* =========================
     HEADER
  ========================= */

.header {
  border-bottom: 1px solid var(--border);
  background: #fff;
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 20px;
  font-weight: 800;
  color: var(--primary);
}

/* =========================
     CARDS
  ========================= */

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 20px;
}

.card-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
}

/* =========================
     BUTTONS
  ========================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-outline {
  background: #fff;
  color: var(--primary);
  border-color: var(--primary);
}

.btn-outline:hover {
  background: rgba(255, 111, 111, 0.08);
}

.btn-danger {
  background: #fee2e2;
  color: #b91c1c;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
}

/* =========================
     FORMS
  ========================= */

.form-group {
  margin-bottom: 16px;
}

label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}

input,
textarea,
select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 14px;
  outline: none;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 111, 111, 0.15);
}

/* =========================
     TABLE
  ========================= */

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

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

.table th {
  color: var(--muted);
  font-weight: 700;
}

/* =========================
     STATUS BADGES
  ========================= */

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.badge-ok {
  background: #dcfce7;
  color: #166534;
}

.badge-warn {
  background: #fef3c7;
  color: #92400e;
}

.badge-danger {
  background: #fee2e2;
  color: #b91c1c;
}

/* ===============================
   TOAST
================================ */

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  min-width: 260px;
  padding: 14px 18px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  z-index: 9999;
  animation: slideIn 0.25s ease;
}

.toast.success {
  background: #16a34a;
}

.toast.error {
  background: #dc2626;
}

.toast.hidden {
  display: none;
}

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