/* ============================================ */
/* BlitzTreff Design System                     */
/* ============================================ */

:root {
    --brand-50: #fff1f2;
    --brand-100: #ffe4e6;
    --brand-200: #fecdd3;
    --brand-300: #fda4af;
    --brand-400: #fb7185;
    --brand-500: #f43f5e;
    --brand-600: #e11d48;
    --brand-700: #be123c;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --green-500: #22c55e;
    --amber-500: #f59e0b;
    --red-500: #ef4444;
    --shadow-soft: 0 4px 20px -2px rgba(0, 0, 0, 0.05);
    --shadow-float: 0 10px 30px -5px rgba(0, 0, 0, 0.08);
    --shadow-nav: 0 -4px 20px -2px rgba(0, 0, 0, 0.03);
    --radius-xl: 1rem;
    --radius-2xl: 1.25rem;
    --radius-3xl: 1.5rem;
    --radius-full: 9999px;
}

/* --- Reset & Base --- */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
    background: var(--gray-100);
    color: var(--gray-900);
    display: flex;
    justify-content: center;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}

/* --- App Container --- */
#app-container {
    width: 100%;
    max-width: 28rem;
    background: var(--gray-50);
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
    overflow: hidden;
}

/* --- Views --- */
.app-view {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 7rem;
    height: 100%;
    scrollbar-width: none;
}
.app-view::-webkit-scrollbar { width: 0; background: transparent; }
.app-view.hide { display: none !important; }
.app-view.overlay {
    position: absolute;
    inset: 0;
    z-index: 50;
    display: flex;
    flex-direction: column;
}

/* --- View Transitions --- */
.view-enter {
    animation: viewSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.view-exit {
    animation: viewSlideOut 0.2s ease-in forwards;
}
@keyframes viewSlideIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes viewSlideOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-10px); }
}

/* --- Header --- */
.view-header {
    padding: 3rem 1.5rem 1.5rem;
    background: white;
    box-shadow: var(--shadow-soft);
    position: sticky;
    top: 0;
    z-index: 20;
}
.view-header.with-back {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.view-header .brand-tag {
    color: var(--brand-500);
    font-weight: 800;
    letter-spacing: -0.02em;
    font-size: 0.75rem;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}
.view-header h1 {
    font-size: 1.875rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}
.header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

/* --- Cards --- */
.card {
    background: white;
    border-radius: var(--radius-3xl);
    padding: 1.25rem;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--gray-100);
    transition: box-shadow 0.2s, transform 0.15s;
}
.card:hover { box-shadow: var(--shadow-float); }
.card:active { transform: scale(0.98); }
.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.3;
    margin-bottom: 0.25rem;
}
.card-subtitle {
    font-size: 0.875rem;
    color: var(--gray-500);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}
.card-subtitle svg { width: 1rem; height: 1rem; }

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: transform 0.15s, opacity 0.15s, box-shadow 0.2s;
    font-family: inherit;
}
.btn:active { transform: scale(0.95); }
.btn-primary {
    background: var(--brand-500);
    color: white;
    padding: 1rem;
    border-radius: var(--radius-2xl);
    font-size: 1.125rem;
    box-shadow: var(--shadow-float);
    width: 100%;
}
.btn-primary:hover { background: var(--brand-600); }
.btn-secondary {
    background: var(--gray-100);
    color: var(--gray-900);
    padding: 0.625rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
}
.btn-secondary:hover { background: var(--gray-200); }
.btn-brand-outline {
    background: var(--brand-50);
    color: var(--brand-600);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
}
.btn-brand-outline:hover { background: var(--brand-100); }
.btn-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius-full);
    background: var(--gray-900);
    color: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.btn-icon svg { width: 1.5rem; height: 1.5rem; }
.btn-back {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius-full);
    background: var(--gray-100);
    color: var(--gray-600);
    flex-shrink: 0;
}
.btn-back svg { width: 1.25rem; height: 1.25rem; }

/* --- Form Elements --- */
.form-group { margin-bottom: 1.5rem; }
.form-label {
    display: block;
    font-weight: 700;
    color: var(--gray-900);
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}
.form-input {
    width: 100%;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-2xl);
    padding: 1rem 1.25rem;
    font-size: 1.125rem;
    font-family: inherit;
    box-shadow: var(--shadow-soft);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-input:focus {
    border-color: var(--brand-500);
    box-shadow: 0 0 0 3px var(--brand-100);
}
.form-input::placeholder { color: var(--gray-400); }

/* Toggle switch */
.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
}
.toggle-label {
    font-weight: 600;
    font-size: 1rem;
    color: var(--gray-800);
}
.toggle-sublabel {
    font-size: 0.8rem;
    color: var(--gray-500);
    margin-top: 0.125rem;
}
.toggle-switch {
    width: 3rem;
    height: 1.75rem;
    background: var(--gray-300);
    border-radius: var(--radius-full);
    position: relative;
    cursor: pointer;
    transition: background 0.25s;
    flex-shrink: 0;
}
.toggle-switch.active { background: var(--brand-500); }
.toggle-switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 1.25rem;
    height: 1.25rem;
    background: white;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
    transition: transform 0.25s;
}
.toggle-switch.active::after { transform: translateX(1.25rem); }

/* --- Avatars --- */
.avatar {
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--gray-50);
}
.avatar-sm { width: 2rem; height: 2rem; }
.avatar-md { width: 3rem; height: 3rem; }
.avatar-lg { width: 6rem; height: 6rem; border-width: 4px; }
.avatar-stack {
    display: flex;
}
.avatar-stack .avatar { margin-left: -0.5rem; }
.avatar-stack .avatar:first-child { margin-left: 0; }

/* --- RSVP Buttons --- */
.rsvp-bar {
    display: flex;
    gap: 0.5rem;
    margin: 1rem 0;
}
.rsvp-btn {
    flex: 1;
    padding: 0.75rem;
    border-radius: var(--radius-xl);
    font-weight: 600;
    font-size: 0.875rem;
    border: 2px solid var(--gray-200);
    background: white;
    color: var(--gray-600);
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    text-align: center;
}
.rsvp-btn:active { transform: scale(0.95); }
.rsvp-btn.active-going {
    border-color: var(--green-500);
    background: #f0fdf4;
    color: #16a34a;
}
.rsvp-btn.active-maybe {
    border-color: var(--amber-500);
    background: #fffbeb;
    color: #d97706;
}
.rsvp-btn.active-declined {
    border-color: var(--red-500);
    background: #fef2f2;
    color: #dc2626;
}

/* --- Seat Counter --- */
.seat-counter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--gray-50);
    border-radius: var(--radius-xl);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-600);
}
.seat-counter .seat-bar {
    flex: 1;
    height: 6px;
    background: var(--gray-200);
    border-radius: var(--radius-full);
    overflow: hidden;
}
.seat-counter .seat-fill {
    height: 100%;
    background: var(--brand-500);
    border-radius: var(--radius-full);
    transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.seat-counter.full .seat-fill { background: var(--red-500); }

/* --- Assignments --- */
.assignment-list { display: flex; flex-direction: column; gap: 0.5rem; }
.assignment-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: var(--gray-50);
    border-radius: var(--radius-xl);
    transition: all 0.2s;
}
.assignment-item.claimed { background: #f0fdf4; }
.assignment-icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: var(--radius-full);
    background: var(--brand-100);
    color: var(--brand-600);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}
.assignment-item.claimed .assignment-icon {
    background: #dcfce7;
    color: #16a34a;
}
.assignment-info { flex: 1; }
.assignment-name { font-weight: 600; font-size: 0.9rem; }
.assignment-claimer { font-size: 0.75rem; color: var(--gray-500); }
.assignment-btn {
    padding: 0.375rem 0.875rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
}
.assignment-btn.claim {
    background: var(--brand-500);
    color: white;
}
.assignment-btn.unclaim {
    background: var(--gray-200);
    color: var(--gray-700);
}
.assignment-add {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}
.assignment-add input {
    flex: 1;
    padding: 0.625rem 1rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-full);
    font-family: inherit;
    font-size: 0.875rem;
    outline: none;
}
.assignment-add input:focus { border-color: var(--brand-500); }
.assignment-add button {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius-full);
    background: var(--gray-900);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* --- Chat --- */
.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 250px;
    border-top: 1px solid var(--gray-100);
    padding-top: 1.5rem;
}
.chat-messages {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-right: 0.5rem;
    padding-bottom: 0.5rem;
    scrollbar-width: none;
}
.chat-messages::-webkit-scrollbar { width: 0; }
.chat-bubble-row { display: flex; flex-direction: column; }
.chat-bubble-row.mine { align-items: flex-end; }
.chat-bubble-row.theirs { align-items: flex-start; }
.chat-meta {
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--gray-400);
    margin-bottom: 0.25rem;
    margin-left: 0.25rem;
}
.chat-bubble {
    padding: 0.625rem 1rem;
    border-radius: var(--radius-2xl);
    max-width: 85%;
    font-size: 0.875rem;
    box-shadow: var(--shadow-soft);
    line-height: 1.4;
    word-break: break-word;
}
.chat-bubble.mine {
    background: var(--brand-500);
    color: white;
    border-bottom-right-radius: 4px;
}
.chat-bubble.theirs {
    background: var(--gray-100);
    color: var(--gray-800);
    border-bottom-left-radius: 4px;
}
.chat-form {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}
.chat-input {
    flex: 1;
    background: var(--gray-50);
    border: 1px solid var(--gray-100);
    border-radius: var(--radius-full);
    padding: 0.75rem 1.25rem;
    font-family: inherit;
    font-size: 0.875rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.chat-input:focus {
    border-color: var(--brand-500);
    box-shadow: 0 0 0 3px var(--brand-100);
}
.chat-send {
    width: 3rem;
    height: 3rem;
    border-radius: var(--radius-full);
    background: var(--brand-500);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(244,63,94,0.3);
    transition: transform 0.15s;
}
.chat-send:active { transform: scale(0.9); }
.chat-send svg { width: 1.25rem; height: 1.25rem; }
.chat-empty {
    text-align: center;
    color: var(--gray-400);
    font-size: 0.875rem;
    margin-top: 3rem;
}

/* --- Bottom Nav --- */
#bottom-nav {
    position: absolute;
    bottom: 0;
    width: 100%;
    background: white;
    border-top: 1px solid var(--gray-100);
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    padding-top: 0.5rem;
    padding-bottom: env(safe-area-inset-bottom, 1.25rem);
    z-index: 40;
    box-shadow: var(--shadow-nav);
}
#bottom-nav.hide { display: none !important; }
.nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem;
    width: 4rem;
    color: var(--gray-400);
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.2s;
    font-family: inherit;
}
.nav-btn:hover { color: var(--gray-900); }
.nav-btn.active { color: var(--brand-500); }
.nav-btn svg { width: 1.5rem; height: 1.5rem; margin-bottom: 0.25rem; }
.nav-btn span { font-size: 0.625rem; font-weight: 500; letter-spacing: 0.03em; }
.nav-badge {
    position: absolute;
    top: 0;
    right: 0;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: var(--brand-500);
    border: 2px solid white;
}

/* --- Map --- */
#map, .map-container {
    height: 200px;
    width: 100%;
    z-index: 10;
    border-radius: 0;
}
.map-picker { height: 250px; border-radius: var(--radius-2xl); overflow: hidden; border: 1px solid var(--gray-200); }
.custom-map-marker {
    background-color: var(--brand-500);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(244,63,94,0.4);
    border: 3px solid white;
}
.route-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--gray-900);
    color: white;
    border: none;
    border-radius: var(--radius-xl);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    font-family: inherit;
    margin-top: 0.75rem;
    width: 100%;
    justify-content: center;
    transition: opacity 0.2s;
}
.route-btn:hover { opacity: 0.9; }
.route-btn svg { width: 1.25rem; height: 1.25rem; }

/* --- Toast --- */
#toast {
    visibility: hidden;
    min-width: 250px;
    background: var(--gray-800);
    color: white;
    text-align: center;
    border-radius: var(--radius-full);
    padding: 0.75rem 1.5rem;
    position: fixed;
    z-index: 9999;
    left: 50%;
    bottom: 100px;
    transform: translateX(-50%);
    font-size: 0.875rem;
    font-weight: 500;
    backdrop-filter: blur(10px);
}
#toast.show {
    visibility: visible;
    animation: toastIn 0.4s cubic-bezier(0.16,1,0.3,1), toastOut 0.4s 2.6s ease-in;
}
@keyframes toastIn { from { opacity: 0; transform: translateX(-50%) translateY(20px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; } }

/* --- Onboarding --- */
.onboarding-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
}
.onboarding-logo {
    font-size: 4rem;
    margin-bottom: 1rem;
}
.onboarding-title {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 0.5rem;
    color: var(--gray-900);
}
.onboarding-subtitle {
    font-size: 1rem;
    color: var(--gray-500);
    margin-bottom: 2rem;
    max-width: 280px;
    line-height: 1.5;
}
.onboarding-form {
    width: 100%;
    max-width: 320px;
}
.onboarding-form .form-group { margin-bottom: 1rem; }
.onboarding-form .form-input {
    text-align: center;
    font-size: 1.25rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}
.onboarding-form .name-input {
    text-align: left;
    font-size: 1.125rem;
    letter-spacing: normal;
    text-transform: none;
}

/* --- Invite Code Display --- */
.invite-code-card {
    background: linear-gradient(135deg, var(--brand-500), var(--brand-600));
    color: white;
    border-radius: var(--radius-3xl);
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 10px 30px -5px rgba(244,63,94,0.3);
}
.invite-code-value {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    margin: 1rem 0;
    font-family: 'Inter', monospace;
}
.invite-code-label {
    font-size: 0.875rem;
    opacity: 0.85;
}

/* --- Share Link --- */
.share-link-box {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-xl);
    padding: 0.75rem;
}
.share-link-box input {
    flex: 1;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 0.8rem;
    color: var(--gray-600);
    outline: none;
}
.share-link-box button {
    padding: 0.5rem 0.875rem;
    border-radius: var(--radius-full);
    background: var(--brand-500);
    color: white;
    border: none;
    font-weight: 600;
    font-size: 0.75rem;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
}

/* --- Friends List --- */
.friend-card {
    background: white;
    padding: 1rem;
    border-radius: var(--radius-3xl);
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--gray-50);
}
.friend-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.friend-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.friend-name { font-weight: 700; color: var(--gray-900); }
.friend-network-bar {
    border-top: 1px solid var(--gray-50);
    padding-top: 0.75rem;
    margin-top: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* --- Profile --- */
.profile-card {
    background: white;
    border-radius: var(--radius-3xl);
    padding: 1.5rem;
    box-shadow: var(--shadow-soft);
    text-align: center;
}
.profile-name { font-size: 1.5rem; font-weight: 700; margin-top: 1rem; }
.profile-location { color: var(--gray-500); }
.profile-menu {
    background: white;
    border-radius: var(--radius-3xl);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    margin-top: 1.5rem;
}
.profile-menu-item {
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: background 0.15s;
    border: none;
    background: none;
    width: 100%;
    font-family: inherit;
    font-size: 1rem;
}
.profile-menu-item:hover { background: var(--gray-50); }
.profile-menu-item + .profile-menu-item { border-top: 1px solid var(--gray-50); }
.profile-menu-item.danger { color: var(--brand-500); }
.profile-menu-item svg { width: 1.25rem; height: 1.25rem; }

/* --- Network Graph --- */
#network-graph {
    position: absolute;
    inset: 0;
    outline: none;
}
.network-action-card {
    position: absolute;
    bottom: 2rem;
    left: 1.5rem;
    right: 1.5rem;
    background: white;
    padding: 1rem;
    border-radius: var(--radius-3xl);
    box-shadow: var(--shadow-float);
    border: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: transform 0.3s cubic-bezier(0.16,1,0.3,1);
    z-index: 30;
}
.network-action-card.hidden { transform: translateY(8rem); }

/* --- Inbox Message --- */
.inbox-item {
    background: white;
    border-radius: var(--radius-3xl);
    padding: 1rem;
    box-shadow: var(--shadow-soft);
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: transform 0.15s;
}
.inbox-item:active { transform: scale(0.98); }
.inbox-avatar {
    width: 3rem;
    height: 3rem;
    border-radius: var(--radius-full);
    background: var(--brand-100);
    color: var(--brand-600);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}
.inbox-content { flex: 1; min-width: 0; }
.inbox-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 0.25rem; }
.inbox-title { font-weight: 700; color: var(--gray-900); }
.inbox-time { font-size: 0.75rem; color: var(--gray-400); }
.inbox-preview { font-size: 0.875rem; color: var(--gray-500); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --- Section Headers --- */
.section-title {
    font-weight: 700;
    color: var(--gray-900);
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

/* --- Guest List --- */
.guest-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.guest-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
}
.guest-name { font-weight: 500; font-size: 0.9rem; }
.guest-badge {
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-full);
    margin-left: auto;
}
.guest-badge.host { background: var(--brand-100); color: var(--brand-600); }
.guest-badge.going { background: #dcfce7; color: #16a34a; }
.guest-badge.maybe { background: #fef3c7; color: #d97706; }

/* --- Spacing / Layout Utilities --- */
.p-6 { padding: 1.5rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }
.flex-1 { flex: 1; }
.text-center { text-align: center; }
.relative { position: relative; }

/* --- Loading Spinner --- */
.spinner {
    width: 2rem;
    height: 2rem;
    border: 3px solid var(--gray-200);
    border-top-color: var(--brand-500);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 3rem auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --- Empty State --- */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--gray-400);
}
.empty-state-icon { font-size: 3rem; margin-bottom: 1rem; }
.empty-state-title { font-weight: 600; color: var(--gray-600); margin-bottom: 0.5rem; }
.empty-state-text { font-size: 0.875rem; line-height: 1.5; }

/* --- Misc --- */
.divider { border-top: 1px solid var(--gray-100); margin: 1.5rem 0; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
