:root {
  /* Palette */
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --bg-soft-2: #f1f5f9;
  --primary: #0ea5e9; /* sky-500 */
  --primary-600: #0284c7;
  --primary-700: #0369a1; /* hover/active */
  --text: #334155; /* slate-700 */
  --text-muted: #64748b; /* slate-500 */
  --text-disabled: #cbd5e1; /* slate-300 */
  --border: #e2e8f0; /* slate-200 */

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 12px;

  /* Shadows */
  --shadow-sm: 0 1px 3px 0 rgba(0,0,0,.1), 0 1px 2px 0 rgba(0,0,0,.06);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -1px rgba(0,0,0,.06);

  /* Transitions */
  --easing: all .2s ease-in-out;
}

/* Base */
html { scroll-behavior: smooth; }
body {
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1,h2,h3,h4 { font-weight: 700; color: var(--text); letter-spacing: -0.01em; }
p,li,small { color: var(--text); }
a { color: var(--primary); text-decoration: none; transition: var(--easing); }
a:hover { color: var(--primary-700); }

main { flex: 1; padding: 2rem 0; }

/* Navbar */
.arctic-navbar {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.arctic-navbar .navbar-brand { font-weight: 700; }
.arctic-navbar .nav-link { color: var(--text-muted); transition: var(--easing); }
.arctic-navbar .nav-link.active { color: var(--primary); font-weight: 600; }
.arctic-navbar .nav-link:hover, .arctic-navbar .nav-link:focus { color: var(--primary); }
.arctic-navbar .dropdown-menu { border-radius: var(--radius-md); border: 1px solid var(--border); }
.navbar-toggler {
  border-color: var(--border);
  border-radius: var(--radius-sm);
  padding: .35rem .5rem;
}
.navbar-toggler:focus { box-shadow: 0 0 0 .2rem rgba(14,165,233,.25); }
.navbar-toggler-icon {
  position: relative;
  width: 1.4rem;
  height: 2px;
  background: currentColor;
  color: var(--text);
  display: inline-block;
}
.navbar-toggler-icon::before,
.navbar-toggler-icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
}
.navbar-toggler-icon::before { top: -6px; }
.navbar-toggler-icon::after { bottom: -6px; }
.arctic-badge-notify {
  position: absolute; top: -6px; right: -8px;
  background: var(--primary);
  color: #fff; width: 20px; height: 20px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center; font-size: 12px;
  box-shadow: var(--shadow-sm);
}

/* Hero */
.hero { background: linear-gradient(180deg, var(--bg), var(--bg-soft)); padding: 4rem 0; }
.hero h1 { font-size: clamp(2rem, 3.5vw, 3rem); margin-bottom: .75rem; }
.hero p.lead { color: var(--text-muted); max-width: 60ch; }

/* Buttons */
.btn { border-radius: var(--radius-sm); transition: var(--easing); }
.btn-primary { background: var(--primary); border-color: var(--primary); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--primary-700); border-color: var(--primary-700); box-shadow: var(--shadow-md); }
.btn-outline-primary { color: var(--primary); border-color: var(--primary); }
.btn-outline-primary:hover { background: var(--primary); color: #fff; }

/* Cards */
.card { border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); transition: var(--easing); }
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.card .card-title { font-weight: 600; }

/* Forms */
.form-control, .form-select, .form-check-input { border-radius: var(--radius-sm); border-color: var(--border); color: var(--text); }
.form-control:focus, .form-select:focus { border-color: var(--primary); box-shadow: 0 0 0 .25rem rgba(14,165,233,.15); }
.form-check-input:focus { box-shadow: 0 0 0 .2rem rgba(14,165,233,.2); border-color: var(--primary); }
.form-text { color: var(--text-muted); }
label.form-label { color: var(--text); font-weight: 500; }
.form-error, .text-danger.small { color: #b91c1c !important; font-weight: 600; display: block; margin-top: .35rem; }

/* Tables */
.table { --bs-table-bg: transparent; --bs-table-striped-bg: var(--bg-soft); border-color: var(--border); }
.table thead th { color: var(--text-muted); font-weight: 600; border-bottom: 1px solid var(--border); }

/* Alerts */
.alert { border-radius: var(--radius-sm); border-color: var(--border); }
.toast-stack {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 1080;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.toast-message {
  background: #0f172a;
  color: #f8fafc;
  padding: .75rem 1rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: .5rem;
  min-width: 16rem;
}
.toast-message.success { background: #0f766e; }
.toast-message.info { background: #1d4ed8; }
.toast-message.warning { background: #b45309; }
.toast-message.error { background: #b91c1c; }
.toast-message button {
  background: transparent;
  border: none;
  color: inherit;
  margin-left: auto;
}

/* Progress */
.progress { background: var(--bg-soft-2); border-radius: 999px; }
.progress-bar { background: linear-gradient(90deg, var(--primary), var(--primary-600)); }
.progress-bar.bg-success { background: #198754 !important; }

/* Badges */
.badge { border-radius: 999px; font-weight: 500; }

/* Footer */
.arctic-footer { background: var(--bg-soft); border-top: 1px solid var(--border); color: var(--text-muted); }
.arctic-footer h5 { color: var(--text); }

/* Utilities */
.soft-section { background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.muted { color: var(--text-muted) !important; }
.elevate { box-shadow: var(--shadow-md); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }

/* Focus visible for accessibility */
:focus-visible { outline: 3px solid rgba(14,165,233,.35); outline-offset: 2px; border-radius: var(--radius-sm); }

/* Micro animations */
.lift:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
