/* Shared CSS Variables and Base Styles
   Used by all static pages (keyboard.html, design-guide.html, etc.)
   Ámos palette (ADR 0007), with ICT Pro login colors on asistent.virtualpro.cz (ADR 0001). */

:root {
    /* Default application palette */
    --navy: #172747;
    --navy-2: #20365f;
    --orange: #c76f2a;
    --orange-soft: #e59a58;
    --paper: #f7f4ee;
    --paper-2: #eeebe4;
    --warm-white: #fffefa;
    --ink: #1f2423;

    /* Primary colors */
    --bg-primary: var(--warm-white);
    --bg-secondary: var(--paper);
    --bg-tertiary: var(--paper-2);
    --bg-cream: var(--paper);

    /* Text colors */
    --text-primary: var(--navy);
    --text-secondary: #505a63;
    --text-muted: #70777d;

    /* Accent colors */
    --accent: var(--orange-soft);
    --accent-hover: var(--orange);
    --accent-dark: #a8531e;

    /* Semantic colors */
    --success: #22c55e;
    --success-strong: #15803d;
    --error: #ef4444;
    --error-strong: #b91c1c;
    --warning: #e5ae24;
    --focus-ring: var(--orange);

    /* Borders */
    --border: #d7d1c7;
    --border-light: var(--paper-2);
    /* Okraj vstupních polí: kontrast aspoň 3:1 na bílé i papíře (WCAG 1.4.11), --border má 1,5:1 */
    --border-input: #857d72;

    /* Login brand panel text */
    --login-intro: #d9dce2;
    --login-principle: #bfc5cf;

    /* Application surfaces */
    --user-bubble: var(--navy-2);
    --assistant-bubble: var(--paper-2);

    /* Radius */
    --radius: 8px;
    --radius-sm: 8px;
    --radius-lg: 16px;

    /* Shadows */
    --shadow: 0 2px 8px rgba(23, 39, 71, 0.08);
    --shadow-lg: 0 4px 12px rgba(23, 39, 71, 0.12);

    /* Typography */
    --font-sans: 'Plus Jakarta Sans', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

/* ICT Pro login; scoped so the shared application keeps its existing palette. */
html[data-brand="presah"] .login-container {
    --navy: #381a0c;
    --orange: #89701d;
    --orange-soft: #ecac00;
    --paper: #f5f0e8;
    --text-primary: var(--navy);
    --text-secondary: #66564c;
    --text-muted: #756458;
    --accent: var(--orange-soft);
    --accent-hover: #fab90f;
    --focus-ring: var(--orange);
    --border: #d8cbbd;
    --login-intro: #f5f0e8;
    --login-principle: #d8cbbd;
}

/* Base reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Body base styles */
body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-weight: 600;
    line-height: 1.3;
}

h1 { font-size: 1.75rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.1rem; }

/* Links */
a {
    color: var(--accent-dark);
    text-decoration: none;
}

a:hover {
    color: var(--accent);
}

/* Code */
code {
    font-family: var(--font-mono);
    font-size: 0.9em;
    background: var(--bg-secondary);
    padding: 2px 6px;
    border-radius: 4px;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

th, td {
    border: 1px solid var(--border);
    padding: 10px 12px;
    text-align: left;
}

th {
    background: var(--text-primary);
    color: white;
    font-weight: 600;
}

tr:nth-child(even) {
    background: var(--bg-cream);
}

tr:hover td {
    background: var(--bg-secondary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: var(--font-sans);
    background: var(--accent);
    color: var(--text-primary);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
}

.btn:hover {
    background: var(--accent-hover);
}

/* Cards/Sections */
.card {
    background: var(--bg-primary);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
}

/* Tips/Notes */
.tip {
    background: var(--bg-cream);
    border-left: 4px solid var(--accent);
    padding: 12px 16px;
    margin: 16px 0;
    font-size: 0.9rem;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.tip strong {
    color: var(--text-primary);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Focus states */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* Print */
@media print {
    body {
        background: white;
    }

    .card {
        box-shadow: none;
        border: 1px solid var(--border);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 20px 16px;
    }

    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.15rem; }
}
