/*
 * LOFT-THEME.CSS — Unified Design System
 * IRONSERVICE KK | สไตล์เฟอร์นิเจอร์ลอฟท์อินดัสเทรียล
 * ใช้กับทุกหน้า: estimate, admin-pro, quotation, payment, login, register
 * ============================================================
 */

/* ── Google Fonts ───────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Prompt:wght@300;400;500;600;700&family=Outfit:wght@300;400;500;600;700&display=swap');

/* ── Design Tokens ──────────────────────────────────────────── */
:root {
    /* Colors — Industrial Loft Palette */
    --bg-base:        #0c0c0f;      /* ดำสนิทเหมือนเหล็กดิบ */
    --bg-card:        #16161a;      /* พื้นหลังการ์ด */
    --bg-elevated:    #1e1e24;      /* elevated surface */
    --bg-input:       #1a1a20;      /* input background */

    --gold:           #c89b3c;      /* ทองเก่า — วัสดุลอฟท์ */
    --gold-light:     #e8b84b;      /* highlight gold */
    --gold-dim:       rgba(200,155,60,0.15);
    --gold-border:    rgba(200,155,60,0.25);
    --gold-glow:      0 0 20px rgba(200,155,60,0.2);

    --rust:           #b94a1e;      /* สนิมเหล็ก accent */
    --rust-light:     #d4552a;
    --wood:           #8b6343;      /* ไม้ลอฟท์ */
    --wood-light:     #a5745a;

    --text-primary:   #f0ece4;      /* ครีมอุ่น */
    --text-secondary: #a89880;      /* warm muted */
    --text-muted:     #6b6358;
    --text-inverse:   #0c0c0f;

    --border:         rgba(255,255,255,0.07);
    --border-gold:    rgba(200,155,60,0.3);
    --divider:        rgba(255,255,255,0.04);

    --success:        #4ade80;
    --warning:        #fbbf24;
    --danger:         #ef4444;
    --info:           #60a5fa;

    /* Typography */
    --font-head:  'Outfit', 'Prompt', sans-serif;
    --font-body:  'Prompt', 'Outfit', sans-serif;
    --font-mono:  'JetBrains Mono', 'Courier New', monospace;

    /* Spacing */
    --space-xs:   4px;
    --space-sm:   8px;
    --space-md:   16px;
    --space-lg:   24px;
    --space-xl:   40px;

    /* Radius */
    --r-sm:   6px;
    --r-md:   10px;
    --r-lg:   16px;
    --r-full: 9999px;

    /* Shadows */
    --shadow-sm:  0 2px 8px rgba(0,0,0,0.4);
    --shadow-md:  0 4px 20px rgba(0,0,0,0.5);
    --shadow-lg:  0 8px 40px rgba(0,0,0,0.6);
    --shadow-gold: 0 4px 20px rgba(200,155,60,0.15);

    /* Transitions */
    --ease:       0.2s ease;
    --ease-slow:  0.4s ease;
}

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

html { font-size: 16px; scroll-behavior: smooth; background: var(--bg-base); }

body {
    font-family: var(--font-body);
    background: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ── Sub-page Top Bar ───────────────────────────────────────── */
.loft-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-lg);
    height: 56px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-gold);
    position: sticky; top: 0; z-index: 100;
    gap: var(--space-md);
}
.loft-topbar-brand {
    display: flex; align-items: center; gap: 10px;
    text-decoration: none;
    font-family: var(--font-head);
    font-weight: 700; font-size: 1rem;
    color: var(--gold-light);
    letter-spacing: 1px;
    white-space: nowrap;
}
.loft-topbar-brand i { color: var(--gold); font-size: 1.1rem; }
.loft-topbar-title {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-weight: 400;
}
.loft-topbar-nav { display: flex; gap: var(--space-sm); align-items: center; }
.loft-topbar-link {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 6px 12px;
    border-radius: var(--r-sm);
    transition: var(--ease);
    display: flex; align-items: center; gap: 6px;
}
.loft-topbar-link:hover, .loft-topbar-link.active {
    background: var(--gold-dim);
    color: var(--gold-light);
}

/* ── Page Layout ────────────────────────────────────────────── */
.loft-page { max-width: 1100px; margin: 0 auto; padding: var(--space-lg); }
.loft-page-sm { max-width: 680px; margin: 0 auto; padding: var(--space-lg); }
.loft-page-full { padding: var(--space-lg); }

/* ── Page Header ────────────────────────────────────────────── */
.loft-page-header {
    padding: var(--space-lg) 0 var(--space-md);
    border-bottom: 1px solid var(--border);
    margin-bottom: var(--space-lg);
}
.loft-page-header h1 {
    font-family: var(--font-head);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex; align-items: center; gap: 10px;
}
.loft-page-header h1 i { color: var(--gold); }
.loft-page-header p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 4px;
}
.loft-gold-line {
    width: 48px; height: 3px;
    background: linear-gradient(90deg, var(--gold), transparent);
    border-radius: 2px;
    margin: var(--space-sm) 0 0;
}

/* ── Cards ──────────────────────────────────────────────────── */
.loft-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: var(--space-lg);
    box-shadow: var(--shadow-sm);
    transition: border-color var(--ease);
}
.loft-card:hover { border-color: var(--border-gold); }
.loft-card-title {
    font-family: var(--font-head);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
    display: flex; align-items: center; gap: 8px;
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--divider);
}
.loft-card-title i { color: var(--gold); }
.loft-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: var(--space-md);
}

/* ── Stat Cards ─────────────────────────────────────────────── */
.loft-stat {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: var(--space-md) var(--space-lg);
    display: flex; align-items: center; gap: var(--space-md);
}
.loft-stat-icon {
    width: 44px; height: 44px;
    border-radius: var(--r-md);
    background: var(--gold-dim);
    display: flex; align-items: center; justify-content: center;
    color: var(--gold); font-size: 1.2rem;
    flex-shrink: 0;
}
.loft-stat-label { font-size: 0.75rem; color: var(--text-secondary); }
.loft-stat-value { font-size: 1.5rem; font-weight: 700; font-family: var(--font-head); color: var(--text-primary); line-height: 1; margin-top: 2px; }
.loft-stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: var(--space-md); margin-bottom: var(--space-lg); }

/* ── Buttons ────────────────────────────────────────────────── */
.loft-btn {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 10px 20px;
    font-family: var(--font-body);
    font-size: 0.88rem; font-weight: 500;
    border: none; border-radius: var(--r-md);
    cursor: pointer;
    transition: var(--ease);
    text-decoration: none;
    white-space: nowrap;
}
.loft-btn-primary {
    background: linear-gradient(135deg, var(--gold), #a87928);
    color: #1a1208;
    box-shadow: var(--shadow-gold);
}
.loft-btn-primary:hover { background: linear-gradient(135deg, var(--gold-light), var(--gold)); transform: translateY(-1px); }
.loft-btn-outline {
    background: transparent;
    border: 1px solid var(--border-gold);
    color: var(--gold);
}
.loft-btn-outline:hover { background: var(--gold-dim); }
.loft-btn-ghost {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    color: var(--text-secondary);
}
.loft-btn-ghost:hover { border-color: var(--border-gold); color: var(--text-primary); }
.loft-btn-danger { background: rgba(239,68,68,0.12); border: 1px solid rgba(239,68,68,0.3); color: #ef4444; }
.loft-btn-danger:hover { background: rgba(239,68,68,0.2); }
.loft-btn-sm { padding: 7px 14px; font-size: 0.8rem; }
.loft-btn-lg { padding: 14px 28px; font-size: 1rem; }
.loft-btn-block { width: 100%; justify-content: center; }
.loft-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none !important; }

/* ── Forms ──────────────────────────────────────────────────── */
.loft-form-group { margin-bottom: var(--space-md); }
.loft-label {
    display: block;
    font-size: 0.8rem; font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
    letter-spacing: 0.3px;
}
.loft-label span.req { color: var(--gold); margin-left: 3px; }
.loft-input, .loft-select, .loft-textarea {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 10px 14px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--text-primary);
    transition: border-color var(--ease), box-shadow var(--ease);
    outline: none;
}
.loft-input::placeholder, .loft-textarea::placeholder { color: var(--text-muted); }
.loft-input:focus, .loft-select:focus, .loft-textarea:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(200,155,60,0.1);
}
.loft-select { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 7'%3E%3Cpath fill='%23c89b3c' d='M6 7L0 0h12z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 10px; padding-right: 36px; }
.loft-textarea { resize: vertical; min-height: 100px; }
.loft-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-md); }
.loft-form-row.col3 { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 640px) { .loft-form-row, .loft-form-row.col3 { grid-template-columns: 1fr; } }

/* ── Tables ─────────────────────────────────────────────────── */
.loft-table-wrap { overflow-x: auto; border-radius: var(--r-lg); border: 1px solid var(--border); }
.loft-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.loft-table th {
    background: var(--bg-elevated);
    color: var(--text-secondary);
    font-weight: 600; font-size: 0.75rem;
    text-transform: uppercase; letter-spacing: 0.5px;
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.loft-table td {
    padding: 11px 14px;
    border-bottom: 1px solid var(--divider);
    color: var(--text-primary);
    vertical-align: middle;
}
.loft-table tr:last-child td { border-bottom: none; }
.loft-table tr:hover td { background: rgba(200,155,60,0.04); }

/* ── Badges ─────────────────────────────────────────────────── */
.loft-badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 10px;
    border-radius: var(--r-full);
    font-size: 0.72rem; font-weight: 600;
    white-space: nowrap;
}
.loft-badge-gold    { background: var(--gold-dim); color: var(--gold-light); border: 1px solid var(--gold-border); }
.loft-badge-green   { background: rgba(74,222,128,0.1); color: #4ade80; border: 1px solid rgba(74,222,128,0.2); }
.loft-badge-red     { background: rgba(239,68,68,0.1); color: #ef4444; border: 1px solid rgba(239,68,68,0.2); }
.loft-badge-blue    { background: rgba(96,165,250,0.1); color: #60a5fa; border: 1px solid rgba(96,165,250,0.2); }
.loft-badge-gray    { background: rgba(255,255,255,0.06); color: var(--text-secondary); border: 1px solid var(--border); }

/* ── Section Divider ────────────────────────────────────────── */
.loft-section-title {
    font-family: var(--font-head);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: var(--space-md);
    display: flex; align-items: center; gap: 10px;
}
.loft-section-title::after { content: ''; flex: 1; height: 1px; background: var(--divider); }

/* ── Alert / Toast ──────────────────────────────────────────── */
.loft-alert {
    padding: var(--space-md);
    border-radius: var(--r-md);
    font-size: 0.875rem;
    display: flex; align-items: flex-start; gap: 10px;
    border-left: 3px solid;
    margin-bottom: var(--space-md);
}
.loft-alert-success { background: rgba(74,222,128,0.08); border-color: #4ade80; color: #4ade80; }
.loft-alert-warning { background: rgba(251,191,36,0.08); border-color: #fbbf24; color: #fbbf24; }
.loft-alert-danger  { background: rgba(239,68,68,0.08);  border-color: #ef4444; color: #ef4444; }
.loft-alert-info    { background: rgba(96,165,250,0.08);  border-color: #60a5fa; color: #60a5fa; }

/* ── Toast Notification ─────────────────────────────────────── */
#loft-toast-container {
    position: fixed; bottom: 24px; right: 24px;
    z-index: 9999; display: flex; flex-direction: column; gap: 8px;
    pointer-events: none;
}
.loft-toast {
    background: var(--bg-elevated);
    border: 1px solid var(--border-gold);
    border-left: 3px solid var(--gold);
    border-radius: var(--r-md);
    padding: 12px 16px;
    font-size: 0.85rem;
    color: var(--text-primary);
    box-shadow: var(--shadow-md);
    animation: loftToastIn 0.3s ease;
    min-width: 240px; max-width: 360px;
    pointer-events: auto;
}
.loft-toast.success { border-color: #4ade80; }
.loft-toast.error   { border-color: #ef4444; }
@keyframes loftToastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ── Modal ──────────────────────────────────────────────────── */
.loft-modal-backdrop {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.75); z-index: 1000;
    place-items: center;
    backdrop-filter: blur(4px);
}
.loft-modal-backdrop.open { display: grid; }
.loft-modal {
    background: var(--bg-card);
    border: 1px solid var(--border-gold);
    border-radius: var(--r-lg);
    padding: var(--space-xl);
    max-width: 520px; width: 95%;
    box-shadow: var(--shadow-lg), var(--gold-glow);
    animation: loftModalIn 0.25s ease;
    max-height: 90vh; overflow-y: auto;
}
@keyframes loftModalIn { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: scale(1); } }
.loft-modal-title {
    font-family: var(--font-head); font-size: 1.15rem; font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-lg);
    display: flex; align-items: center; gap: 10px;
}
.loft-modal-title i { color: var(--gold); }

/* ── Login / Auth Page ──────────────────────────────────────── */
.loft-auth-page {
    min-height: 100vh;
    display: grid; place-items: center;
    background: radial-gradient(ellipse at 50% 0%, rgba(200,155,60,0.08) 0%, transparent 60%), var(--bg-base);
    padding: var(--space-lg);
}
.loft-auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border-gold);
    border-radius: var(--r-lg);
    padding: var(--space-xl);
    width: 100%; max-width: 440px;
    box-shadow: var(--shadow-lg), var(--gold-glow);
}
.loft-auth-logo {
    text-align: center;
    margin-bottom: var(--space-lg);
}
.loft-auth-logo i { font-size: 2.5rem; color: var(--gold); }
.loft-auth-logo h2 {
    font-family: var(--font-head);
    font-size: 1.3rem; font-weight: 700;
    color: var(--text-primary);
    margin-top: 8px;
}
.loft-auth-logo p { font-size: 0.8rem; color: var(--text-secondary); margin-top: 3px; }
.loft-tab-row {
    display: flex; gap: 4px;
    background: var(--bg-elevated);
    border-radius: var(--r-md);
    padding: 4px;
    margin-bottom: var(--space-lg);
}
.loft-tab-btn {
    flex: 1; padding: 8px;
    border: none; border-radius: var(--r-sm);
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font-body); font-size: 0.85rem; font-weight: 500;
    cursor: pointer; transition: var(--ease);
}
.loft-tab-btn.active { background: var(--gold); color: #1a1208; }

/* ── Admin Sidebar Layout ───────────────────────────────────── */
.loft-admin-layout { display: flex; min-height: 100vh; }
.loft-sidebar {
    width: 240px; flex-shrink: 0;
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    display: flex; flex-direction: column;
    position: sticky; top: 0; height: 100vh;
    overflow-y: auto;
}
.loft-sidebar-brand {
    padding: var(--space-lg) var(--space-md);
    border-bottom: 1px solid var(--border-gold);
    font-family: var(--font-head);
    font-size: 0.95rem; font-weight: 700;
    color: var(--gold-light);
    display: flex; align-items: center; gap: 8px;
}
.loft-sidebar-brand i { color: var(--gold); }
.loft-sidebar-nav { padding: var(--space-sm) 0; flex: 1; }
.loft-nav-section {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    padding: var(--space-md) var(--space-md) var(--space-xs);
    font-weight: 600;
}
.loft-nav-item {
    display: flex; align-items: center; gap: 10px;
    padding: 9px var(--space-md);
    color: var(--text-secondary);
    font-size: 0.875rem;
    cursor: pointer; border: none;
    background: transparent; width: 100%; text-align: left;
    border-radius: 0;
    transition: var(--ease);
    text-decoration: none;
    position: relative;
}
.loft-nav-item i { width: 18px; text-align: center; color: var(--text-muted); flex-shrink: 0; }
.loft-nav-item:hover { background: rgba(255,255,255,0.04); color: var(--text-primary); }
.loft-nav-item.active {
    background: var(--gold-dim);
    color: var(--gold-light);
    border-left: 3px solid var(--gold);
    padding-left: calc(var(--space-md) - 3px);
}
.loft-nav-item.active i { color: var(--gold); }
.loft-sidebar-footer {
    padding: var(--space-md);
    border-top: 1px solid var(--border);
    font-size: 0.75rem;
    color: var(--text-muted);
}
.loft-admin-content {
    flex: 1; padding: var(--space-lg);
    overflow-y: auto; overflow-x: hidden;
}
.loft-admin-panel { display: none; }
.loft-admin-panel.active { display: block; }

/* ── Step Progress (Estimate Wizard) ───────────────────────── */
.loft-steps {
    display: flex; align-items: center;
    gap: 0; margin-bottom: var(--space-xl);
    overflow-x: auto;
}
.loft-step {
    display: flex; flex-direction: column; align-items: center;
    gap: 6px; flex: 1; min-width: 80px;
    position: relative;
}
.loft-step::after {
    content: '';
    position: absolute; top: 17px; left: 50%;
    width: 100%; height: 2px;
    background: var(--divider);
    z-index: 0;
}
.loft-step:last-child::after { display: none; }
.loft-step-dot {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: var(--bg-elevated);
    border: 2px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.8rem; font-weight: 700; font-family: var(--font-head);
    color: var(--text-muted);
    position: relative; z-index: 1;
    transition: var(--ease);
}
.loft-step.active .loft-step-dot {
    background: var(--gold);
    border-color: var(--gold);
    color: #1a1208;
    box-shadow: var(--gold-glow);
}
.loft-step.done .loft-step-dot { background: var(--bg-elevated); border-color: var(--gold); color: var(--gold); }
.loft-step.done::after { background: var(--gold-border); }
.loft-step-label { font-size: 0.7rem; color: var(--text-muted); text-align: center; white-space: nowrap; }
.loft-step.active .loft-step-label { color: var(--gold-light); }

/* ── Range slider ───────────────────────────────────────────── */
input[type="range"].loft-range {
    -webkit-appearance: none; appearance: none;
    width: 100%; height: 6px;
    background: var(--bg-elevated);
    border-radius: var(--r-full); outline: none;
    cursor: pointer;
}
input[type="range"].loft-range::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: var(--gold);
    border: 2px solid var(--bg-base);
    cursor: pointer; transition: var(--ease);
}
input[type="range"].loft-range::-webkit-slider-thumb:hover { background: var(--gold-light); transform: scale(1.15); }

/* ── Price Summary Box ──────────────────────────────────────── */
.loft-price-box {
    background: var(--bg-elevated);
    border: 1px solid var(--border-gold);
    border-radius: var(--r-lg);
    padding: var(--space-lg);
    margin-top: var(--space-md);
}
.loft-price-row {
    display: flex; justify-content: space-between;
    padding: 7px 0;
    font-size: 0.875rem;
    border-bottom: 1px solid var(--divider);
    color: var(--text-secondary);
}
.loft-price-row:last-child { border-bottom: none; }
.loft-price-row.total {
    font-size: 1.1rem; font-weight: 700;
    color: var(--text-primary);
    padding-top: var(--space-md);
    margin-top: var(--space-sm);
    border-top: 1px solid var(--border-gold);
}
.loft-price-val { color: var(--text-primary); font-weight: 600; }
.loft-price-row.total .loft-price-val { color: var(--gold-light); font-size: 1.2rem; }

/* ── QR / Payment ───────────────────────────────────────────── */
.loft-qr-box {
    text-align: center;
    background: #fff;
    border-radius: var(--r-lg);
    padding: var(--space-lg);
    display: inline-block;
}
.loft-qr-box img { max-width: 200px; display: block; margin: 0 auto; }

/* ── Tag / color option ─────────────────────────────────────── */
.loft-color-grid { display: flex; flex-wrap: wrap; gap: var(--space-sm); }
.loft-color-opt {
    width: 32px; height: 32px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid transparent;
    transition: var(--ease);
}
.loft-color-opt:hover, .loft-color-opt.selected { border-color: var(--gold); box-shadow: var(--gold-glow); }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
    .loft-sidebar { display: none; }
    .loft-admin-layout { flex-direction: column; }
    .loft-page, .loft-page-sm, .loft-page-full { padding: var(--space-md); }
    .loft-topbar { padding: 0 var(--space-md); }
    .loft-topbar-nav { display: none; }
    .loft-stat-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
    .loft-stat-grid { grid-template-columns: 1fr; }
}

/* ── Scrollbar ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: rgba(200,155,60,0.25); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(200,155,60,0.4); }

/* ── Utility ────────────────────────────────────────────────── */
.text-gold    { color: var(--gold); }
.text-muted   { color: var(--text-muted); }
.text-sm      { font-size: 0.8rem; }
.text-xs      { font-size: 0.72rem; }
.font-mono    { font-family: var(--font-mono); }
.flex         { display: flex; }
.flex-center  { display: flex; align-items: center; justify-content: center; }
.gap-sm       { gap: var(--space-sm); }
.gap-md       { gap: var(--space-md); }
.mt-sm        { margin-top: var(--space-sm); }
.mt-md        { margin-top: var(--space-md); }
.mt-lg        { margin-top: var(--space-lg); }
.mb-sm        { margin-bottom: var(--space-sm); }
.mb-md        { margin-bottom: var(--space-md); }
.hidden       { display: none !important; }
.w-full       { width: 100%; }

/* ── Loading spinner ────────────────────────────────────────── */
.loft-spinner {
    width: 24px; height: 24px;
    border: 2px solid var(--border);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Toast helper (JS) ──────────────────────────────────────── */
/* Call: loftToast('ข้อความ', 'success'|'error'|'warning') */
