/* ==========================================================================
   RESET & CORE STYLES (Mantido idêntico ao original)
   ========================================================================== */
:root {
    color-scheme: dark;
    --bg-body: #0b1120;       /* Dark Navy */
    --bg-sidebar: #0f172a;    /* Slate 900 */
    --bg-card: #1e293b;       /* Slate 800 */
    --bg-input: #334155;      /* Slate 700 */
    --bg-secondary: #162032;  /* Intermediate layer (selection bar, etc) */
    
    --primary: #3b82f6;       /* Blue 500 */
    --primary-hover: #2563eb; /* Blue 600 */
    --accent: #06b6d4;        /* Cyan 500 */
    
    --success: #10b981;       /* Emerald 500 */
    --danger: #ef4444;        /* Red 500 */
    --warning: #f59e0b;       /* Amber 500 */
    
    --text-main: #f8fafc;     /* Slate 50 */
    --text-muted: #94a3b8;    /* Slate 400 */
    --border: rgba(255, 255, 255, 0.08);
    
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --font-main: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

/* Previne auto-zoom de texto em TODOS os modos */
html {
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* PWA standalone: compensa a perda de saturação e vivacidade */
@media (display-mode: standalone) {
    :root {
        --primary: #4f8ef7;
        --accent: #22d3ee;
        --success: #14c98a;
        --danger: #f55353;
        --warning: #fbbf24;
        --text-main: #ffffff;
        --text-muted: #a8bdd4;
        --bg-card: #1f2f45;
        --bg-secondary: #1a2b3d;
    }
    body {
        -webkit-font-smoothing: subpixel-antialiased;
    }
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: var(--font-main);
    height: 100vh;
    height: 100dvh; /* Dynamic viewport height - respeita barras do sistema */
    overflow: hidden;
    display: flex;
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}