/* =============================================================================
   IHA Platform — Main Stylesheet
   Design system adapted from Substack style reference
   Stack: Plain CSS with custom properties. No preprocessor required.
   Mobile-first responsive. Progressive enhancement.
   ============================================================================= */

/* ─── Design Tokens ─────────────────────────────────────────────────────────── */
:root {
  /* Colors */
  --color-orange-ember:       #FF6719;
  --color-midnight-graphite:  #363737;
  --color-anchor-gray:        #777777;
  --color-ui-white:           #FFFFFF;
  --color-silver-mist:        #EEEEEE;
  --color-dark-overlay:       #232525;
  --color-cool-stone:         #C8C8C8;
  --color-light-steel:        #B6B6B6;
  --color-ghost-shadow:       #E6E6E6;
  --color-surface:            #F7F7F7;
  --color-danger:             #E53E3E;
  --color-success:            #2D7D46;
  --color-warning:            #D97706;
  --color-info:               #2B6CB0;
  --color-vip:                #D4A017;

  /* Typography */
  --font-body:     system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display:  'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-mono:     'JetBrains Mono', Menlo, Monaco, Consolas, monospace;

  /* Type scale */
  --text-xs:   11px;
  --text-sm:   13px;
  --text-base: 15px;
  --text-md:   17px;
  --text-lg:   19px;
  --text-xl:   24px;
  --text-2xl:  32px;
  --text-3xl:  40px;

  /* Spacing */
  --sp-1:  4px;
  --sp-2:  8px;
  --sp-3:  12px;
  --sp-4:  16px;
  --sp-5:  20px;
  --sp-6:  24px;
  --sp-7:  28px;
  --sp-8:  32px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-16: 64px;

  /* Radii */
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --radius-xl:   16px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0,0,0,.06);
  --shadow-sm: 0 4px 6px -1px rgba(0,0,0,.10), 0 2px 4px -1px rgba(0,0,0,.06);
  --shadow-md: 0 10px 15px -3px rgba(0,0,0,.10), 0 4px 6px -2px rgba(0,0,0,.05);
  --shadow-btn: rgba(255,255,255,.2) 0 1px 0 0 inset, rgba(0,0,0,.1) 0 -1px 0 0 inset;

  /* Layout */
  --content-max-width: 1200px;
  --sidebar-width:     280px;
  --nav-height:        60px;
}

/* ─── Reset & Base ───────────────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.5;
  color: var(--color-midnight-graphite);
  background: var(--color-surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--color-orange-ember); text-decoration: none; transition: opacity .15s; }
a:hover { opacity: .8; }

img { max-width: 100%; height: auto; display: block; }

ul, ol { list-style: none; }

input, textarea, select, button {
  font: inherit;
  color: inherit;
}

button { cursor: pointer; border: none; background: none; }

/* ─── Typography ─────────────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-midnight-graphite);
}

h1 { font-size: var(--text-2xl); }
h2 { font-size: var(--text-xl); }
h3 { font-size: var(--text-lg); }
h4 { font-size: var(--text-md); }
h5 { font-size: var(--text-base); }

p { line-height: 1.6; margin-bottom: var(--sp-4); }
p:last-child { margin-bottom: 0; }

small { font-size: var(--text-sm); }

/* ─── Layout Primitives ──────────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 0 var(--sp-4);
}

@media (min-width: 768px) {
  .container { padding: 0 var(--sp-6); }
}

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

.page-main {
  flex: 1;
  padding: var(--sp-6) 0 var(--sp-12);
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-6);
}

@media (min-width: 1024px) {
  .content-grid {
    grid-template-columns: 1fr var(--sidebar-width);
  }
}

/* ─── Navigation ─────────────────────────────────────────────────────────────── */
.site-nav {
  background: var(--color-ui-white);
  border-bottom: 1px solid var(--color-ghost-shadow);
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
}

.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}

.nav-logo {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-midnight-graphite);
  text-decoration: none;
  flex-shrink: 0;
}

.nav-logo span { color: var(--color-orange-ember); }

.nav-links {
  display: none;
  align-items: center;
  gap: var(--sp-1);
  margin-left: var(--sp-4);
}

@media (min-width: 768px) {
  .nav-links { display: flex; }
}

.nav-link {
  color: var(--color-anchor-gray);
  font-size: var(--text-sm);
  font-weight: 500;
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--radius-md);
  transition: color .15s, background .15s;
}

.nav-link:hover, .nav-link.active {
  color: var(--color-midnight-graphite);
  background: var(--color-silver-mist);
  opacity: 1;
}

.nav-spacer { flex: 1; }

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.nav-icon-btn {
  position: relative;
  width: 36px; height: 36px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  color: var(--color-anchor-gray);
  transition: background .15s, color .15s;
}

.nav-icon-btn:hover {
  background: var(--color-silver-mist);
  color: var(--color-midnight-graphite);
  opacity: 1;
}

.nav-badge {
  position: absolute;
  top: 2px; right: 2px;
  background: var(--color-orange-ember);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  min-width: 16px; height: 16px;
  border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
  padding: 0 3px;
}

.nav-avatar {
  width: 32px; height: 32px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 2px solid var(--color-ghost-shadow);
}

.nav-hamburger {
  width: 36px; height: 36px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  color: var(--color-anchor-gray);
}

@media (min-width: 768px) {
  .nav-hamburger { display: none; }
}

/* ─── Mobile Menu ────────────────────────────────────────────────────────────── */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 200;
}

.mobile-menu.is-open { display: block; }

.mobile-menu-panel {
  position: absolute;
  top: 0; left: 0;
  width: min(320px, 85vw);
  height: 100%;
  background: var(--color-ui-white);
  padding: var(--sp-6) var(--sp-5);
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform .25s ease;
}

.mobile-menu.is-open .mobile-menu-panel { transform: translateX(0); }

/* ─── Buttons ─────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  font-weight: 500;
  font-size: var(--text-base);
  line-height: 1;
  border-radius: var(--radius-full);
  padding: var(--sp-3) var(--sp-5);
  transition: opacity .15s, transform .1s, background .15s, color .15s;
  white-space: nowrap;
  text-decoration: none;
}

.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn-primary {
  background: var(--color-orange-ember);
  color: var(--color-ui-white);
  box-shadow: var(--shadow-btn);
}

.btn-primary:hover { opacity: .9; }

.btn-secondary {
  background: transparent;
  color: var(--color-anchor-gray);
  border: 1px solid var(--color-anchor-gray);
}

.btn-secondary:hover { background: var(--color-silver-mist); opacity: 1; }

.btn-ghost {
  background: transparent;
  color: var(--color-midnight-graphite);
}

.btn-ghost:hover { background: var(--color-silver-mist); opacity: 1; }

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

.btn-sm {
  font-size: var(--text-sm);
  padding: var(--sp-2) var(--sp-4);
}

.btn-lg {
  font-size: var(--text-md);
  padding: var(--sp-4) var(--sp-8);
}

.btn-block { width: 100%; }

.btn-icon { padding: var(--sp-2); border-radius: var(--radius-md); }

/* ─── Cards ──────────────────────────────────────────────────────────────────── */
.card {
  background: var(--color-ui-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.card-body { padding: var(--sp-5) var(--sp-6); }

.card-header {
  padding: var(--sp-4) var(--sp-6);
  border-bottom: 1px solid var(--color-ghost-shadow);
  font-weight: 600;
  font-size: var(--text-base);
}

.card-footer {
  padding: var(--sp-4) var(--sp-6);
  border-top: 1px solid var(--color-ghost-shadow);
  background: var(--color-surface);
}

/* ─── Forms ──────────────────────────────────────────────────────────────────── */
.form-group {
  margin-bottom: var(--sp-5);
}

label, .form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-midnight-graphite);
  margin-bottom: var(--sp-2);
}

.form-control {
  width: 100%;
  padding: var(--sp-3) var(--sp-4);
  background: var(--color-ui-white);
  border: 1px solid var(--color-cool-stone);
  border-radius: var(--radius-lg);
  font-size: var(--text-base);
  color: var(--color-midnight-graphite);
  transition: border-color .15s, box-shadow .15s;
}

.form-control::placeholder { color: var(--color-anchor-gray); }

.form-control:focus {
  outline: none;
  border-color: var(--color-orange-ember);
  box-shadow: 0 0 0 3px rgba(255,103,25,.12);
}

.form-control.is-invalid { border-color: var(--color-danger); }

textarea.form-control {
  resize: vertical;
  min-height: 100px;
}

select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23777' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }

.form-hint {
  font-size: var(--text-sm);
  color: var(--color-anchor-gray);
  margin-top: var(--sp-1);
}

.form-error {
  font-size: var(--text-sm);
  color: var(--color-danger);
  margin-top: var(--sp-1);
}

.form-check {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  cursor: pointer;
}

.form-check input[type="checkbox"] {
  width: 16px; height: 16px;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: var(--color-orange-ember);
  cursor: pointer;
}

/* ─── User Card (profile grid) ───────────────────────────────────────────────── */
.user-card {
  background: var(--color-ui-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
  transition: box-shadow .2s, transform .15s;
  position: relative;
}

.user-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.user-card-photo {
  position: relative;
  aspect-ratio: 3 / 4;
  background: var(--color-silver-mist);
  overflow: hidden;
}

.user-card-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}

.user-card:hover .user-card-photo img { transform: scale(1.03); }

.user-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.7) 0%, transparent 50%);
  opacity: 0;
  transition: opacity .2s;
  display: flex;
  align-items: flex-end;
  padding: var(--sp-3);
  gap: var(--sp-2);
}

.user-card:hover .user-card-overlay { opacity: 1; }

.user-card-body {
  padding: var(--sp-3);
}

.user-card-name {
  font-weight: 600;
  font-size: var(--text-base);
  color: var(--color-midnight-graphite);
  display: flex;
  align-items: center;
  gap: var(--sp-1);
}

.user-card-meta {
  font-size: var(--text-sm);
  color: var(--color-anchor-gray);
  margin-top: var(--sp-1);
}

.user-card-online {
  position: absolute;
  top: var(--sp-2);
  right: var(--sp-2);
  width: 10px; height: 10px;
  background: #22c55e;
  border-radius: var(--radius-full);
  border: 2px solid var(--color-ui-white);
}

.user-card-vip {
  position: absolute;
  top: var(--sp-2);
  left: var(--sp-2);
  background: var(--color-vip);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: .5px;
}

/* User grid */
.user-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-3);
}

@media (min-width: 480px) {
  .user-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 768px) {
  .user-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 1200px) {
  .user-grid { grid-template-columns: repeat(6, 1fr); }
}

/* ─── Alerts / Notices ───────────────────────────────────────────────────────── */
.alert {
  padding: var(--sp-4);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  margin-bottom: var(--sp-5);
}

.alert-error   { background: #FEF2F2; color: #991B1B; border: 1px solid #FECACA; }
.alert-success { background: #F0FDF4; color: #166534; border: 1px solid #BBF7D0; }
.alert-warning { background: #FFFBEB; color: #92400E; border: 1px solid #FDE68A; }
.alert-info    { background: #EFF6FF; color: #1E40AF; border: 1px solid #BFDBFE; }

/* ─── Badges / Tags ──────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px var(--sp-2);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: .4px;
}

.badge-vip   { background: var(--color-vip); color: #fff; }
.badge-online { background: #22c55e; color: #fff; }
.badge-mod   { background: var(--color-info); color: #fff; }
.badge-admin { background: var(--color-danger); color: #fff; }

/* ─── Pagination ─────────────────────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-1);
  margin-top: var(--sp-8);
  flex-wrap: wrap;
}

.page-btn {
  width: 36px; height: 36px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-anchor-gray);
  border: 1px solid var(--color-ghost-shadow);
  background: var(--color-ui-white);
  transition: all .15s;
}

.page-btn:hover {
  border-color: var(--color-orange-ember);
  color: var(--color-orange-ember);
  opacity: 1;
}

.page-btn.active {
  background: var(--color-orange-ember);
  border-color: var(--color-orange-ember);
  color: #fff;
}

.page-btn:disabled {
  opacity: .4;
  cursor: not-allowed;
}

/* ─── Search / Filter Bar ────────────────────────────────────────────────────── */
.search-bar {
  background: var(--color-ui-white);
  border: 1px solid var(--color-ghost-shadow);
  border-radius: var(--radius-lg);
  padding: var(--sp-4) var(--sp-5);
  margin-bottom: var(--sp-5);
}

.search-input-wrap {
  position: relative;
}

.search-input-wrap .search-icon {
  position: absolute;
  left: var(--sp-4);
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-anchor-gray);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: var(--sp-3) var(--sp-5) var(--sp-3) 42px;
  border: 1px solid var(--color-cool-stone);
  border-radius: var(--radius-lg);
  font-size: var(--text-base);
  background: var(--color-ui-white);
  color: var(--color-midnight-graphite);
}

.search-input:focus {
  outline: none;
  border-color: var(--color-orange-ember);
  box-shadow: 0 0 0 3px rgba(255,103,25,.1);
}

.filter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
  margin-top: var(--sp-4);
}

@media (min-width: 768px) {
  .filter-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ─── Online indicator ───────────────────────────────────────────────────────── */
.online-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: var(--radius-full);
  background: #22c55e;
  flex-shrink: 0;
}

/* ─── Sidebar widgets ────────────────────────────────────────────────────────── */
.widget {
  background: var(--color-ui-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: var(--sp-5);
}

.widget-header {
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--color-ghost-shadow);
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--color-midnight-graphite);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.widget-body {
  padding: var(--sp-4) var(--sp-5);
}

.widget-list li {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-2) 0;
  border-bottom: 1px solid var(--color-ghost-shadow);
  font-size: var(--text-sm);
}

.widget-list li:last-child { border-bottom: none; }

/* ─── Stats grid ─────────────────────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-3);
}

.stat-item {
  text-align: center;
  padding: var(--sp-3);
}

.stat-value {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-midnight-graphite);
  line-height: 1;
  font-family: var(--font-display);
}

.stat-label {
  font-size: var(--text-xs);
  color: var(--color-anchor-gray);
  margin-top: var(--sp-1);
  text-transform: uppercase;
  letter-spacing: .5px;
}

/* ─── Message thread ─────────────────────────────────────────────────────────── */
.message-wrap {
  display: flex;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}

.message-wrap.outgoing { flex-direction: row-reverse; }

.message-avatar {
  width: 36px; height: 36px;
  border-radius: var(--radius-full);
  object-fit: cover;
  flex-shrink: 0;
}

.message-bubble {
  max-width: 70%;
  background: var(--color-silver-mist);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  line-height: 1.5;
}

.message-wrap.outgoing .message-bubble {
  background: var(--color-orange-ember);
  color: #fff;
}

.message-time {
  font-size: var(--text-xs);
  color: var(--color-anchor-gray);
  margin-top: var(--sp-1);
  text-align: right;
}

.message-wrap.outgoing .message-time { color: rgba(255,255,255,.7); }

/* ─── Forum ──────────────────────────────────────────────────────────────────── */
.forum-category {
  background: var(--color-ui-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
  margin-bottom: var(--sp-3);
  transition: box-shadow .15s;
}

.forum-category:hover { box-shadow: var(--shadow-sm); }

.forum-category a {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-5);
  color: inherit;
}

.forum-category-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-md);
  background: var(--color-silver-mist);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--color-orange-ember);
}

.forum-thread-row {
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--color-ghost-shadow);
  display: flex;
  align-items: flex-start;
  gap: var(--sp-4);
}

.forum-thread-row:last-child { border-bottom: none; }

/* ─── VIP Banner ─────────────────────────────────────────────────────────────── */
.vip-banner {
  background: linear-gradient(135deg, #232525 0%, #363737 100%);
  color: #fff;
  border-radius: var(--radius-md);
  padding: var(--sp-6);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.vip-banner::before {
  content: '';
  position: absolute;
  top: -20px; right: -20px;
  width: 120px; height: 120px;
  background: rgba(255,103,25,.15);
  border-radius: var(--radius-full);
}

.vip-banner h3 {
  color: var(--color-vip);
  font-family: var(--font-display);
  font-size: var(--text-xl);
  margin-bottom: var(--sp-2);
}

.vip-banner p {
  color: rgba(255,255,255,.7);
  font-size: var(--text-sm);
  margin-bottom: var(--sp-4);
}

/* ─── Photo rating ───────────────────────────────────────────────────────────── */
.rating-stars {
  display: flex;
  gap: var(--sp-1);
}

.rating-btn {
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  background: var(--color-silver-mist);
  color: var(--color-anchor-gray);
  font-size: var(--text-sm);
  font-weight: 600;
  transition: all .15s;
}

.rating-btn:hover, .rating-btn.active {
  background: var(--color-orange-ember);
  color: #fff;
}

/* ─── Loader / Skeleton ──────────────────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--color-silver-mist) 25%, var(--color-ghost-shadow) 50%, var(--color-silver-mist) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-card { height: 200px; border-radius: var(--radius-md); }
.skeleton-text { height: 14px; margin-bottom: var(--sp-2); }
.skeleton-text.short { width: 60%; }

/* ─── Footer ─────────────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--color-dark-overlay);
  color: var(--color-anchor-gray);
  padding: var(--sp-8) 0;
  margin-top: auto;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  text-align: center;
}

@media (min-width: 768px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    text-align: left;
  }
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-4);
}

.footer-links a {
  color: var(--color-anchor-gray);
  font-size: var(--text-sm);
}

.footer-links a:hover { color: var(--color-ui-white); opacity: 1; }

.footer-copy {
  font-size: var(--text-xs);
}

/* ─── Utility classes ────────────────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-muted  { color: var(--color-anchor-gray); }
.text-small  { font-size: var(--text-sm); }
.text-orange { color: var(--color-orange-ember); }
.text-danger { color: var(--color-danger); }

.d-flex       { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--sp-2); }
.gap-3 { gap: var(--sp-3); }
.gap-4 { gap: var(--sp-4); }

.mt-2 { margin-top: var(--sp-2); }
.mt-4 { margin-top: var(--sp-4); }
.mt-6 { margin-top: var(--sp-6); }
.mt-8 { margin-top: var(--sp-8); }
.mb-4 { margin-bottom: var(--sp-4); }
.mb-6 { margin-bottom: var(--sp-6); }

.w-100 { width: 100%; }

.hidden { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ─── Loading spinner ────────────────────────────────────────────────────────── */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--color-ghost-shadow);
  border-top-color: var(--color-orange-ember);
  border-radius: var(--radius-full);
  animation: spin .7s linear infinite;
  display: inline-block;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Toast notifications ───────────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: var(--sp-6);
  right: var(--sp-6);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  pointer-events: none;
}

.toast {
  background: var(--color-dark-overlay);
  color: var(--color-ui-white);
  padding: var(--sp-4) var(--sp-5);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  font-size: var(--text-sm);
  max-width: 320px;
  pointer-events: auto;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .25s, transform .25s;
}

.toast.is-visible { opacity: 1; transform: translateY(0); }
.toast.toast-success { border-left: 3px solid var(--color-success); }
.toast.toast-error   { border-left: 3px solid var(--color-danger); }
