@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
    :root {
        --admin-bg: #f8fafc;
        --admin-surface: #ffffff;
        --admin-border: #e2e8f0;
        --admin-text: #0f172a;
        --admin-muted: #64748b;
        --admin-primary: #16a34a;
        --admin-secondary: #2563eb;
        --admin-accent: #f59e0b;
        --admin-danger: #ef4444;
        --admin-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
        --admin-radius: 14px;
        --admin-sidebar: #0b1220;
        --admin-sidebar-accent: #111827;
        --admin-sidebar-text: #e2e8f0;
        --admin-sidebar-muted: #94a3b8;
        --admin-font-body: "Manrope", "Segoe UI", sans-serif;
        --admin-font-heading: "Sora", "Segoe UI", sans-serif;
        --user-bg: #f8fafc;
        --user-surface: #ffffff;
        --user-text: #0f172a;
        --user-muted: #64748b;
        --user-primary: #2563eb;
        --user-accent: #0ea5e9;
        --user-border: #e2e8f0;
        --user-radius: 16px;
        --user-shadow: 0 18px 35px rgba(15, 23, 42, 0.08);
        --franchise-primary: #16a34a;
        --franchise-accent: #14b8a6;
    }

    body {
        font-family: var(--admin-font-body);
    }

    h1, h2, h3, h4, h5, h6 {
        font-family: var(--admin-font-heading);
    }
}

@layer base {
    .theme-user {
        background: var(--user-bg);
        color: var(--user-text);
    }

    .theme-user.dark {
        --user-bg: #0f172a;
        --user-surface: #111827;
        --user-text: #e2e8f0;
        --user-muted: #94a3b8;
        --user-border: #1f2937;
        --user-primary: #38bdf8;
        --user-accent: #22d3ee;
        --user-shadow: 0 16px 30px rgba(15, 23, 42, 0.6);
    }

    .theme-franchise {
        background: #f8fafc;
        color: #0f172a;
        --user-primary: var(--franchise-primary);
        --user-accent: var(--franchise-accent);
    }
}

@layer components {
    .admin-card {
        border-radius: var(--admin-radius);
        border: 1px solid var(--admin-border);
        background: var(--admin-surface);
        box-shadow: var(--admin-shadow);
    }

    .admin-badge {
        border-radius: 999px;
        font-size: 12px;
        padding: 4px 10px;
        font-weight: 600;
    }

    .admin-badge.success {
        background: #dcfce7;
        color: #166534;
    }

    .admin-badge.warning {
        background: #fef3c7;
        color: #92400e;
    }

    .admin-badge.danger {
        background: #fee2e2;
        color: #991b1b;
    }

    .user-card {
        border-radius: var(--user-radius);
        border: 1px solid var(--user-border);
        background: var(--user-surface);
        box-shadow: var(--user-shadow);
    }

    .user-badge {
        border-radius: 999px;
        font-size: 12px;
        padding: 4px 10px;
        font-weight: 600;
    }

    .user-badge.success {
        background: #dcfce7;
        color: #166534;
    }

    .user-badge.danger {
        background: #fee2e2;
        color: #991b1b;
    }

    .user-badge.warning {
        background: #fef3c7;
        color: #92400e;
    }
}
