/* =====================================================
 * TAPMERCHANT — GLOBAL DESIGN SYSTEM
 * File: css/main.css
 * Description: Design tokens, base styles, components,
 *              dark/light mode, and utilities.
 * ===================================================== */

/* -----------------------------------------------------
 * DESIGN TOKENS — LIGHT THEME (default)
 * ----------------------------------------------------- */
:root {
    /* Brand colors */
    --tm-brand-primary: #0B6E4F;
    --tm-brand-primary-hover: #08553D;
    --tm-brand-primary-light: #E8F5F0;
    --tm-brand-accent: #F59E0B;
    --tm-brand-accent-hover: #D97706;
    --tm-brand-gradient: linear-gradient(135deg, #0B6E4F 0%, #14B87F 100%);
    --tm-brand-gradient-warm: linear-gradient(135deg, #F59E0B 0%, #EF4444 100%);
    --tm-brand-gradient-hero: linear-gradient(135deg, #0B6E4F 0%, #14B87F 50%, #38D9A9 100%);

    /* Semantic colors */
    --tm-success: #10B981;
    --tm-success-bg: #D1FAE5;
    --tm-warning: #F59E0B;
    --tm-warning-bg: #FEF3C7;
    --tm-danger: #EF4444;
    --tm-danger-bg: #FEE2E2;
    --tm-info: #3B82F6;
    --tm-info-bg: #DBEAFE;

    /* Surfaces */
    --tm-bg: #FAFAF9;
    --tm-bg-elevated: #FFFFFF;
    --tm-bg-muted: #F5F5F4;
    --tm-bg-hover: #F0F0EE;
    --tm-surface: #FFFFFF;
    --tm-surface-2: #F9F9F8;

    /* Borders */
    --tm-border: #E7E5E4;
    --tm-border-strong: #D6D3D1;
    --tm-border-focus: var(--tm-brand-primary);

    /* Text */
    --tm-text: #1C1917;
    --tm-text-muted: #57534E;
    --tm-text-subtle: #78716C;
    --tm-text-inverted: #FFFFFF;
    --tm-text-link: var(--tm-brand-primary);

    /* Shadows */
    --tm-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --tm-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.06), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --tm-shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    --tm-shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.10), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --tm-shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.18);
    --tm-shadow-focus: 0 0 0 3px rgba(11, 110, 79, 0.20);

    /* Radius */
    --tm-radius-sm: 6px;
    --tm-radius: 10px;
    --tm-radius-md: 14px;
    --tm-radius-lg: 20px;
    --tm-radius-xl: 28px;
    --tm-radius-full: 999px;

    /* Spacing scale */
    --tm-space-1: 4px;
    --tm-space-2: 8px;
    --tm-space-3: 12px;
    --tm-space-4: 16px;
    --tm-space-5: 20px;
    --tm-space-6: 24px;
    --tm-space-8: 32px;
    --tm-space-10: 40px;
    --tm-space-12: 48px;
    --tm-space-16: 64px;
    --tm-space-20: 80px;
    --tm-space-24: 96px;

    /* Typography */
    --tm-font-sans: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --tm-font-mono: 'SFMono-Regular', 'JetBrains Mono', Menlo, Consolas, 'Liberation Mono', monospace;

    --tm-text-xs: 0.75rem;
    --tm-text-sm: 0.875rem;
    --tm-text-base: 1rem;
    --tm-text-lg: 1.125rem;
    --tm-text-xl: 1.25rem;
    --tm-text-2xl: 1.5rem;
    --tm-text-3xl: 1.875rem;
    --tm-text-4xl: 2.25rem;
    --tm-text-5xl: 3rem;
    --tm-text-6xl: 3.75rem;

    /* Layout */
    --tm-container: 1200px;
    --tm-container-narrow: 800px;
    --tm-container-wide: 1400px;

    /* Motion */
    --tm-transition-fast: 120ms ease;
    --tm-transition: 200ms ease;
    --tm-transition-slow: 320ms ease;

    /* Z-index scale */
    --tm-z-dropdown: 100;
    --tm-z-sticky: 200;
    --tm-z-modal: 900;
    --tm-z-toast: 1000;
    --tm-z-tooltip: 1100;
}

/* -----------------------------------------------------
 * DARK THEME
 * ----------------------------------------------------- */
[data-theme="dark"] {
    --tm-brand-primary: #14B87F;
    --tm-brand-primary-hover: #22C48D;
    --tm-brand-primary-light: rgba(20, 184, 127, 0.12);

    --tm-success: #22C55E;
    --tm-success-bg: rgba(34, 197, 94, 0.12);
    --tm-warning: #FBBF24;
    --tm-warning-bg: rgba(251, 191, 36, 0.12);
    --tm-danger: #F87171;
    --tm-danger-bg: rgba(248, 113, 113, 0.12);
    --tm-info: #60A5FA;
    --tm-info-bg: rgba(96, 165, 250, 0.12);

    --tm-bg: #0C0A09;
    --tm-bg-elevated: #1C1917;
    --tm-bg-muted: #171412;
    --tm-bg-hover: #2A2724;
    --tm-surface: #1C1917;
    --tm-surface-2: #292524;

    --tm-border: #292524;
    --tm-border-strong: #44403C;

    --tm-text: #FAFAF9;
    --tm-text-muted: #A8A29E;
    --tm-text-subtle: #78716C;
    --tm-text-inverted: #0C0A09;

    --tm-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
    --tm-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
    --tm-shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --tm-shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.6);
    --tm-shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
    --tm-shadow-focus: 0 0 0 3px rgba(20, 184, 127, 0.30);
}

/* -----------------------------------------------------
 * RESET & BASE
 * ----------------------------------------------------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--tm-font-sans);
    font-size: var(--tm-text-base);
    line-height: 1.6;
    color: var(--tm-text);
    background: var(--tm-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    transition: background var(--tm-transition), color var(--tm-transition);
}

img, svg, video {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--tm-text-link);
    text-decoration: none;
    transition: color var(--tm-transition-fast);
}

a:hover {
    color: var(--tm-brand-primary-hover);
}

button {
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
}

input, textarea, select {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}

h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    font-weight: 700;
    color: var(--tm-text);
    letter-spacing: -0.02em;
}

h1 { font-size: var(--tm-text-4xl); }
h2 { font-size: var(--tm-text-3xl); }
h3 { font-size: var(--tm-text-2xl); }
h4 { font-size: var(--tm-text-xl); }
h5 { font-size: var(--tm-text-lg); }
h6 { font-size: var(--tm-text-base); }

p { color: var(--tm-text); }

/* -----------------------------------------------------
 * LAYOUT UTILITIES
 * ----------------------------------------------------- */
.tm-container {
    max-width: var(--tm-container);
    margin: 0 auto;
    padding: 0 var(--tm-space-5);
}

.tm-container-narrow {
    max-width: var(--tm-container-narrow);
    margin: 0 auto;
    padding: 0 var(--tm-space-5);
}

.tm-container-wide {
    max-width: var(--tm-container-wide);
    margin: 0 auto;
    padding: 0 var(--tm-space-5);
}

.tm-flex { display: flex; }
.tm-flex-col { display: flex; flex-direction: column; }
.tm-items-center { align-items: center; }
.tm-items-start { align-items: flex-start; }
.tm-items-end { align-items: flex-end; }
.tm-justify-center { justify-content: center; }
.tm-justify-between { justify-content: space-between; }
.tm-justify-end { justify-content: flex-end; }
.tm-flex-wrap { flex-wrap: wrap; }
.tm-gap-1 { gap: var(--tm-space-1); }
.tm-gap-2 { gap: var(--tm-space-2); }
.tm-gap-3 { gap: var(--tm-space-3); }
.tm-gap-4 { gap: var(--tm-space-4); }
.tm-gap-5 { gap: var(--tm-space-5); }
.tm-gap-6 { gap: var(--tm-space-6); }
.tm-gap-8 { gap: var(--tm-space-8); }

.tm-grid { display: grid; }
.tm-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--tm-space-5); }
.tm-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--tm-space-5); }
.tm-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--tm-space-5); }

.tm-text-center { text-align: center; }
.tm-text-right { text-align: right; }
.tm-text-left { text-align: left; }

.tm-hidden { display: none !important; }
.tm-invisible { visibility: hidden; }

.tm-mt-2 { margin-top: var(--tm-space-2); }
.tm-mt-4 { margin-top: var(--tm-space-4); }
.tm-mt-6 { margin-top: var(--tm-space-6); }
.tm-mt-8 { margin-top: var(--tm-space-8); }
.tm-mb-2 { margin-bottom: var(--tm-space-2); }
.tm-mb-4 { margin-bottom: var(--tm-space-4); }
.tm-mb-6 { margin-bottom: var(--tm-space-6); }
.tm-mb-8 { margin-bottom: var(--tm-space-8); }

/* -----------------------------------------------------
 * BUTTONS
 * ----------------------------------------------------- */
.tm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--tm-space-2);
    padding: 12px 20px;
    font-size: var(--tm-text-base);
    font-weight: 600;
    line-height: 1;
    border-radius: var(--tm-radius);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--tm-transition);
    white-space: nowrap;
    user-select: none;
    text-decoration: none;
    min-height: 44px;
}

.tm-btn:disabled,
.tm-btn.is-disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.tm-btn-primary {
    background: var(--tm-brand-primary);
    color: #FFFFFF;
    box-shadow: var(--tm-shadow-sm);
}

.tm-btn-primary:hover {
    background: var(--tm-brand-primary-hover);
    color: #FFFFFF;
    transform: translateY(-1px);
    box-shadow: var(--tm-shadow);
}

.tm-btn-secondary {
    background: var(--tm-surface);
    color: var(--tm-text);
    border-color: var(--tm-border-strong);
}

.tm-btn-secondary:hover {
    background: var(--tm-bg-hover);
    border-color: var(--tm-text-muted);
    color: var(--tm-text);
}

.tm-btn-accent {
    background: var(--tm-brand-accent);
    color: #FFFFFF;
}

.tm-btn-accent:hover {
    background: var(--tm-brand-accent-hover);
    color: #FFFFFF;
    transform: translateY(-1px);
}

.tm-btn-ghost {
    background: transparent;
    color: var(--tm-text);
}

.tm-btn-ghost:hover {
    background: var(--tm-bg-hover);
    color: var(--tm-text);
}

.tm-btn-danger {
    background: var(--tm-danger);
    color: #FFFFFF;
}

.tm-btn-danger:hover {
    background: #DC2626;
    color: #FFFFFF;
}

.tm-btn-lg {
    padding: 16px 28px;
    font-size: var(--tm-text-lg);
    min-height: 52px;
    border-radius: var(--tm-radius-md);
}

.tm-btn-sm {
    padding: 8px 14px;
    font-size: var(--tm-text-sm);
    min-height: 36px;
}

.tm-btn-block {
    width: 100%;
}

.tm-btn-icon {
    padding: 10px;
    min-height: 40px;
    min-width: 40px;
}

/* -----------------------------------------------------
 * FORMS
 * ----------------------------------------------------- */
.tm-form-group {
    margin-bottom: var(--tm-space-5);
}

.tm-label {
    display: block;
    font-size: var(--tm-text-sm);
    font-weight: 600;
    color: var(--tm-text);
    margin-bottom: var(--tm-space-2);
}

.tm-input,
.tm-select,
.tm-textarea {
    display: block;
    width: 100%;
    padding: 12px 16px;
    font-size: var(--tm-text-base);
    color: var(--tm-text);
    background: var(--tm-surface);
    border: 1px solid var(--tm-border-strong);
    border-radius: var(--tm-radius);
    transition: all var(--tm-transition-fast);
    min-height: 48px;
    outline: none;
}

.tm-input:focus,
.tm-select:focus,
.tm-textarea:focus {
    border-color: var(--tm-brand-primary);
    box-shadow: var(--tm-shadow-focus);
}

.tm-input::placeholder,
.tm-textarea::placeholder {
    color: var(--tm-text-subtle);
}

.tm-textarea {
    min-height: 96px;
    resize: vertical;
    font-family: inherit;
}

.tm-select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2378716C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 18px;
    padding-right: 44px;
}

.tm-input-error {
    border-color: var(--tm-danger);
}

.tm-input-error:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.20);
}

.tm-help-text {
    font-size: var(--tm-text-xs);
    color: var(--tm-text-subtle);
    margin-top: var(--tm-space-2);
}

.tm-error-text {
    font-size: var(--tm-text-xs);
    color: var(--tm-danger);
    margin-top: var(--tm-space-2);
}

/* -----------------------------------------------------
 * CARDS
 * ----------------------------------------------------- */
.tm-card {
    background: var(--tm-surface);
    border: 1px solid var(--tm-border);
    border-radius: var(--tm-radius-md);
    padding: var(--tm-space-6);
    box-shadow: var(--tm-shadow-sm);
    transition: box-shadow var(--tm-transition), transform var(--tm-transition);
}

.tm-card-hoverable:hover {
    box-shadow: var(--tm-shadow-md);
    transform: translateY(-2px);
}

.tm-card-elevated {
    box-shadow: var(--tm-shadow-md);
}

.tm-card-title {
    font-size: var(--tm-text-lg);
    font-weight: 700;
    margin-bottom: var(--tm-space-2);
    color: var(--tm-text);
}

.tm-card-subtitle {
    font-size: var(--tm-text-sm);
    color: var(--tm-text-muted);
}

/* -----------------------------------------------------
 * BADGES
 * ----------------------------------------------------- */
.tm-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--tm-space-1);
    padding: 4px 10px;
    font-size: var(--tm-text-xs);
    font-weight: 600;
    border-radius: var(--tm-radius-full);
    line-height: 1.4;
}

.tm-badge-success {
    background: var(--tm-success-bg);
    color: var(--tm-success);
}

.tm-badge-warning {
    background: var(--tm-warning-bg);
    color: var(--tm-warning);
}

.tm-badge-danger {
    background: var(--tm-danger-bg);
    color: var(--tm-danger);
}

.tm-badge-info {
    background: var(--tm-info-bg);
    color: var(--tm-info);
}

.tm-badge-neutral {
    background: var(--tm-bg-muted);
    color: var(--tm-text-muted);
}

.tm-badge-brand {
    background: var(--tm-brand-primary-light);
    color: var(--tm-brand-primary);
}

/* -----------------------------------------------------
 * TOAST NOTIFICATIONS
 * ----------------------------------------------------- */
.tm-toast-container {
    position: fixed;
    top: var(--tm-space-5);
    right: var(--tm-space-5);
    z-index: var(--tm-z-toast);
    display: flex;
    flex-direction: column;
    gap: var(--tm-space-3);
    max-width: 400px;
}

.tm-toast {
    background: var(--tm-surface);
    border: 1px solid var(--tm-border);
    border-left: 4px solid var(--tm-brand-primary);
    border-radius: var(--tm-radius);
    padding: var(--tm-space-4);
    box-shadow: var(--tm-shadow-lg);
    display: flex;
    align-items: flex-start;
    gap: var(--tm-space-3);
    animation: tm-toast-in 240ms ease-out;
}

.tm-toast-success { border-left-color: var(--tm-success); }
.tm-toast-warning { border-left-color: var(--tm-warning); }
.tm-toast-error { border-left-color: var(--tm-danger); }
.tm-toast-info { border-left-color: var(--tm-info); }

.tm-toast-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

.tm-toast-content {
    flex: 1;
}

.tm-toast-title {
    font-weight: 600;
    font-size: var(--tm-text-sm);
    margin-bottom: 2px;
    color: var(--tm-text);
}

.tm-toast-body {
    font-size: var(--tm-text-sm);
    color: var(--tm-text-muted);
}

.tm-toast-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--tm-text-subtle);
    padding: 2px;
    line-height: 1;
    font-size: 18px;
}

@keyframes tm-toast-in {
    from { transform: translateX(120%); opacity: 0; }
    to   { transform: translateX(0); opacity: 1; }
}

/* -----------------------------------------------------
 * MODAL
 * ----------------------------------------------------- */
.tm-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: var(--tm-z-modal);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--tm-space-4);
    animation: tm-fade-in 200ms ease;
}

.tm-modal {
    background: var(--tm-surface);
    border-radius: var(--tm-radius-lg);
    box-shadow: var(--tm-shadow-xl);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: tm-modal-in 240ms ease;
}

.tm-modal-header {
    padding: var(--tm-space-6);
    border-bottom: 1px solid var(--tm-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tm-modal-title {
    font-size: var(--tm-text-xl);
    font-weight: 700;
    color: var(--tm-text);
}

.tm-modal-body {
    padding: var(--tm-space-6);
}

.tm-modal-footer {
    padding: var(--tm-space-5) var(--tm-space-6);
    border-top: 1px solid var(--tm-border);
    display: flex;
    gap: var(--tm-space-3);
    justify-content: flex-end;
}

@keyframes tm-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes tm-modal-in {
    from { transform: translateY(20px) scale(0.98); opacity: 0; }
    to   { transform: translateY(0) scale(1); opacity: 1; }
}

/* -----------------------------------------------------
 * SPINNER / LOADING
 * ----------------------------------------------------- */
.tm-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--tm-border);
    border-top-color: var(--tm-brand-primary);
    border-radius: 50%;
    animation: tm-spin 700ms linear infinite;
}

.tm-spinner-lg {
    width: 40px;
    height: 40px;
    border-width: 3px;
}

@keyframes tm-spin {
    to { transform: rotate(360deg); }
}

.tm-loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: var(--tm-z-modal);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* -----------------------------------------------------
 * THEME TOGGLE BUTTON
 * ----------------------------------------------------- */
.tm-theme-toggle {
    background: var(--tm-bg-muted);
    border: 1px solid var(--tm-border);
    border-radius: var(--tm-radius-full);
    padding: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    transition: all var(--tm-transition-fast);
    color: var(--tm-text);
}

.tm-theme-toggle:hover {
    background: var(--tm-bg-hover);
    transform: rotate(15deg);
}

.tm-theme-toggle svg {
    width: 20px;
    height: 20px;
}

[data-theme="light"] .tm-theme-toggle .tm-icon-sun { display: none; }
[data-theme="light"] .tm-theme-toggle .tm-icon-moon { display: block; }
[data-theme="dark"]  .tm-theme-toggle .tm-icon-sun { display: block; }
[data-theme="dark"]  .tm-theme-toggle .tm-icon-moon { display: none; }
.tm-theme-toggle .tm-icon-sun { display: none; }

/* -----------------------------------------------------
 * IMAGE PLACEHOLDER (managed by admin)
 * ----------------------------------------------------- */
.tm-image-slot {
    position: relative;
    width: 100%;
    background: var(--tm-bg-muted);
    border: 2px dashed var(--tm-border-strong);
    border-radius: var(--tm-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--tm-text-subtle);
    overflow: hidden;
    aspect-ratio: 16 / 10;
}

.tm-image-slot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tm-image-slot-empty {
    padding: var(--tm-space-6);
    text-align: center;
    font-size: var(--tm-text-sm);
}

.tm-image-slot-label {
    font-weight: 600;
    color: var(--tm-text-muted);
    margin-bottom: var(--tm-space-1);
}

/* -----------------------------------------------------
 * DIVIDERS
 * ----------------------------------------------------- */
.tm-divider {
    height: 1px;
    background: var(--tm-border);
    margin: var(--tm-space-6) 0;
    border: none;
}

/* -----------------------------------------------------
 * TABLES
 * ----------------------------------------------------- */
.tm-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--tm-surface);
}

.tm-table th,
.tm-table td {
    padding: var(--tm-space-3) var(--tm-space-4);
    text-align: left;
    border-bottom: 1px solid var(--tm-border);
    font-size: var(--tm-text-sm);
    color: var(--tm-text);
}

.tm-table th {
    font-weight: 600;
    color: var(--tm-text-muted);
    background: var(--tm-bg-muted);
    text-transform: uppercase;
    font-size: var(--tm-text-xs);
    letter-spacing: 0.05em;
}

.tm-table tbody tr:hover {
    background: var(--tm-bg-hover);
}

.tm-table-wrap {
    overflow-x: auto;
    border-radius: var(--tm-radius-md);
    border: 1px solid var(--tm-border);
}

/* -----------------------------------------------------
 * EMPTY STATES
 * ----------------------------------------------------- */
.tm-empty-state {
    padding: var(--tm-space-10) var(--tm-space-6);
    text-align: center;
    color: var(--tm-text-muted);
}

.tm-empty-state-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--tm-space-4);
    opacity: 0.5;
}

.tm-empty-state-title {
    font-size: var(--tm-text-lg);
    font-weight: 600;
    color: var(--tm-text);
    margin-bottom: var(--tm-space-2);
}

.tm-empty-state-text {
    font-size: var(--tm-text-sm);
    max-width: 400px;
    margin: 0 auto var(--tm-space-5);
}

/* -----------------------------------------------------
 * RESPONSIVE
 * ----------------------------------------------------- */
@media (max-width: 1024px) {
    .tm-grid-4 { grid-template-columns: repeat(2, 1fr); }
    .tm-grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    :root {
        --tm-text-4xl: 1.875rem;
        --tm-text-3xl: 1.5rem;
        --tm-text-2xl: 1.25rem;
    }

    .tm-container,
    .tm-container-narrow,
    .tm-container-wide {
        padding: 0 var(--tm-space-4);
    }

    .tm-grid-4,
    .tm-grid-3,
    .tm-grid-2 {
        grid-template-columns: 1fr;
    }

    .tm-btn-lg {
        padding: 14px 22px;
        font-size: var(--tm-text-base);
    }

    .tm-modal {
        max-width: 100%;
    }

    .tm-toast-container {
        left: var(--tm-space-4);
        right: var(--tm-space-4);
        max-width: none;
    }
}

/* -----------------------------------------------------
 * ACCESSIBILITY
 * ----------------------------------------------------- */
.tm-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;
}

*:focus-visible {
    outline: 2px solid var(--tm-brand-primary);
    outline-offset: 2px;
    border-radius: var(--tm-radius-sm);
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* -----------------------------------------------------
 * PRINT
 * ----------------------------------------------------- */
@media print {
    .tm-no-print { display: none !important; }
    body { background: white; color: black; }
}

/* =====================================================
 * END OF main.css
 * ===================================================== */