/* Presenza — theme.css */

:root {
    --bg:            #f6f7fb;
    --bg-elevated:   #ffffff;
    --surface:       #ffffff;
    --surface-2:     #f9fafb;
    --surface-hover: #f3f4f6;

    --border:        #e5e7eb;
    --border-strong: #d1d5db;

    --text:          #0f172a;
    --text-secondary:#475569;
    --text-muted:    #94a3b8;
    --text-inverse:  #ffffff;

    --primary:       #6366f1;
    --primary-hover: #4f46e5;
    --primary-soft:  #eef2ff;

    --success:       #10b981;
    --success-soft:  #d1fae5;
    --success-text:  #065f46;

    --danger:        #ef4444;
    --danger-soft:   #fee2e2;
    --danger-text:   #991b1b;

    --warning:       #f59e0b;
    --warning-soft:  #fef3c7;
    --warning-text:  #92400e;

    --info:          #3b82f6;
    --info-soft:     #dbeafe;
    --info-text:     #1e40af;

    --accent:        #6366f1;
    --accent-hover:  #4f46e5;
    --accent-soft:   #eef2ff;
    --accent-text:   #ffffff;

    --radius-xs:  4px;
    --radius-sm:  6px;
    --radius:     10px;
    --radius-md:  12px;
    --radius-lg:  16px;
    --radius-xl:  20px;
    --radius-full: 9999px;

    --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow:    0 4px 12px rgba(15, 23, 42, 0.06), 0 2px 4px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 20px 48px rgba(15, 23, 42, 0.12);

    --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px;
    --s-5: 20px; --s-6: 24px; --s-8: 32px; --s-10: 40px;

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;

    --fs-xs: 12px; --fs-sm: 13px; --fs-base: 14px; --fs-md: 15px;
    --fs-lg: 17px; --fs-xl: 20px; --fs-2xl: 24px; --fs-3xl: 30px;

    --lh-tight: 1.25; --lh-base: 1.55;

    --dur-fast: 120ms; --dur: 180ms; --dur-slow: 320ms;
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

    --container: 1280px;
    --topnav-h: 60px;
    --bottomnav-h: 62px;

    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg:            #0b0d12;
        --surface:       #14171f;
        --surface-2:     #1a1e28;
        --surface-hover: #1f2431;
        --border:        #262b38;
        --border-strong: #363c4d;
        --text:          #f1f5f9;
        --text-secondary:#a9b2c4;
        --text-muted:    #6b7280;

        --primary:       #818cf8;
        --primary-soft:  #1e1b4b;

        --success:       #34d399;
        --success-soft:  #064e3b;
        --success-text:  #a7f3d0;

        --danger:        #f87171;
        --danger-soft:   #7f1d1d;
        --danger-text:   #fecaca;

        --warning:       #fbbf24;
        --warning-soft:  #78350f;
        --warning-text:  #fde68a;

        --info:          #60a5fa;
        --info-soft:     #1e3a8a;
        --info-text:     #bfdbfe;

        --accent-soft:   #1e1b4b;

        color-scheme: dark;
    }
}

body.role-super  { --accent: var(--primary); --accent-hover: var(--primary-hover); --accent-soft: var(--primary-soft); }
body.role-client { --accent: #8b5cf6; --accent-hover: #7c3aed; --accent-soft: #f5f3ff; }
body.role-worker { --accent: #10b981; --accent-hover: #059669; --accent-soft: #ecfdf5; }

@media (prefers-color-scheme: dark) {
    body.role-client { --accent: #a78bfa; --accent-hover: #c4b5fd; --accent-soft: #2e1065; }
    body.role-worker { --accent: #34d399; --accent-hover: #6ee7b7; --accent-soft: #064e3b; }
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html {
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    font-size: var(--fs-base);
    line-height: var(--lh-base);
    color: var(--text);
    background: var(--bg);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img, picture, svg, video { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration: none; transition: color var(--dur-fast) var(--ease); }
a:hover { color: var(--accent-hover); }
button, input, select, textarea { font: inherit; color: inherit; }

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: var(--lh-tight);
    color: var(--text);
    letter-spacing: -0.01em;
}
h1 { font-size: var(--fs-3xl); }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-lg); }
h5 { font-size: var(--fs-md); }
h6 { font-size: var(--fs-base); }

p { color: var(--text-secondary); }

code, pre, .mono { font-family: var(--font-mono); font-size: 0.9em; }
code {
    background: var(--surface-2);
    padding: 2px 6px;
    border-radius: var(--radius-xs);
    color: var(--accent);
    border: 1px solid var(--border);
}

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--radius-xs); }

@media (pointer: fine) {
    ::-webkit-scrollbar { width: 10px; height: 10px; }
    ::-webkit-scrollbar-track { background: transparent; }
    ::-webkit-scrollbar-thumb {
        background: var(--border-strong);
        border-radius: var(--radius-full);
        border: 2px solid var(--bg);
    }
    ::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
}

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--s-4);
}
@media (min-width: 768px) {
    .container { padding: 0 var(--s-6); }
}

.hidden { display: none !important; }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }