/* ==========================================================================
   Aiviro Design System — tokeny a komponenty
   Hodnoty pocházejí z design handoffu (design_handoff_certifikace/README.md).
   Používá rozcestník (index.html) a konzultantská větev (konzultant.html).
   Obchodní větev (obchodni.html) má vlastní starší style.css a tenhle soubor
   nepoužívá.
   ========================================================================== */

:root {
    /* Barvy značky */
    --aiviro-dark-blue: #24224E;
    --aiviro-blue: #332383;
    --aiviro-medium-blue: #4F4696;
    --aiviro-light-blue: #7274B5;
    --aiviro-ice-blue: #55C3EB;
    --aiviro-sky: #96D4E6;

    /* Odvozené odstíny */
    --indigo-50: #F7F6FA;
    --indigo-100: #EFEDF5;
    --indigo-200: #DEDCEB;
    --indigo-700: #2B1E6C;
    --ice-100: #DFF6FC;
    --ice-600: #1B7FA5;

    /* Text */
    --text-strong: #24224E;
    --text-body: #333333;
    --text-muted: #666666;
    --text-subtle: #999999;
    --text-link: #332383;
    --text-link-hover: #4F4696;

    /* Rámečky */
    --border-subtle: #E6E6E6;
    --border-default: #CCCCCC;
    --border-brand: #332383;

    /* Stavy */
    --success-500: #12946B;
    --success-100: #DDF3EA;
    --danger-500: #D7443E;
    --danger-100: #FAE3E2;
    --warning-500: #E2A036;
    --warning-100: #FBF0DC;
    --info-500: #2FA6D1;
    --info-100: #DFF6FC;

    /* Gradienty */
    --gradient-brand: linear-gradient(135deg, #24224E 0%, #332383 48%, #4F4696 100%);
    --gradient-ice: linear-gradient(135deg, #332383 0%, #4F4696 42%, #55C3EB 100%);

    /* Stíny — tónované DarkBlue, nikdy černé */
    --shadow-sm: 0 1px 2px rgba(36, 34, 78, .05), 0 2px 6px rgba(36, 34, 78, .05);
    --shadow-md: 0 2px 4px rgba(36, 34, 78, .04), 0 6px 16px rgba(36, 34, 78, .08);
    --shadow-lg: 0 4px 8px rgba(36, 34, 78, .05), 0 16px 40px rgba(36, 34, 78, .11);

    /* Pohyb */
    --ease-out: cubic-bezier(.16, 1, .3, 1);
    --press-scale: .98;
    --focus-ring: 0 0 0 3px rgba(85, 195, 235, .55);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Komponenty níž nastavují display (flex, inline-flex), což by přebilo
   atribut hidden — proto ho vynucujeme. */
[hidden] {
    display: none !important;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Roboto', Arial, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-body);
    background: #fff;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    margin: 0;
    color: var(--text-strong);
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.15;
}

p {
    margin: 0;
}

/* --------------------------------------------------------------------------
   Eyebrow — jediný proložený styl v systému
   -------------------------------------------------------------------------- */
.ds-eyebrow {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.ds-eyebrow--sm {
    font-size: 11px;
}

.ds-eyebrow--ice {
    color: var(--aiviro-ice-blue);
}

/* --------------------------------------------------------------------------
   Button
   -------------------------------------------------------------------------- */
.ds-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 42px;
    padding: 0 22px;
    border: none;
    border-radius: 999px;
    background: var(--aiviro-blue);
    color: #fff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: background .2s var(--ease-out), transform .2s var(--ease-out),
                box-shadow .2s var(--ease-out);
}

.ds-btn:hover:not(:disabled) {
    background: var(--indigo-700);
}

.ds-btn:active:not(:disabled) {
    transform: scale(var(--press-scale));
}

.ds-btn:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
}

.ds-btn:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.ds-btn--lg {
    height: 52px;
    padding: 0 28px;
    gap: 10px;
    font-size: 16px;
}

.ds-btn--sm {
    height: 34px;
    padding: 0 16px;
    font-size: 13px;
}

.ds-btn--full {
    width: 100%;
}

.ds-btn--ghost {
    background: transparent;
    color: var(--text-link);
    box-shadow: none;
}

.ds-btn--ghost:hover:not(:disabled) {
    background: var(--indigo-50);
    color: var(--text-link);
}

.ds-btn--accent {
    background: var(--aiviro-ice-blue);
    color: var(--aiviro-dark-blue);
}

.ds-btn--accent:hover:not(:disabled) {
    background: #3FB4DF;
}

.ds-btn__icon {
    flex: 0 0 auto;
}

/* --------------------------------------------------------------------------
   Badge
   -------------------------------------------------------------------------- */
.ds-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--indigo-100);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
    white-space: nowrap;
}

.ds-badge--brand {
    background: var(--indigo-100);
    color: var(--aiviro-blue);
}

.ds-badge--success {
    background: var(--success-100);
    color: var(--success-500);
}

.ds-badge--danger {
    background: var(--danger-100);
    color: var(--danger-500);
}

/* --------------------------------------------------------------------------
   Card
   -------------------------------------------------------------------------- */
.ds-card {
    background: #fff;
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 20px;
}

.ds-card--raised {
    border: none;
    box-shadow: var(--shadow-lg);
    border-radius: 24px;
}

.ds-card--interactive {
    cursor: pointer;
    transition: transform .2s var(--ease-out), box-shadow .2s var(--ease-out),
                border-color .2s var(--ease-out);
}

.ds-card--interactive:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.ds-card--interactive:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
}

/* --------------------------------------------------------------------------
   Ikonová dlaždice
   -------------------------------------------------------------------------- */
.ds-tile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--indigo-50);
    color: var(--aiviro-blue);
}

.ds-tile--sm {
    width: 36px;
    height: 36px;
}

.ds-tile--ice {
    background: var(--ice-100);
    color: var(--ice-600);
}

.ds-tile--success {
    background: var(--success-100);
    color: var(--success-500);
}

/* --------------------------------------------------------------------------
   Formulářová pole
   -------------------------------------------------------------------------- */
.ds-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ds-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-strong);
}

.ds-input {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    border: 1px solid var(--border-default);
    border-radius: 10px;
    background: #fff;
    color: var(--text-body);
    font-family: inherit;
    font-size: 15px;
    transition: border-color .2s var(--ease-out), box-shadow .2s var(--ease-out);
}

.ds-input::placeholder {
    color: var(--text-subtle);
}

.ds-input:focus {
    outline: none;
    border-color: var(--border-brand);
    box-shadow: var(--focus-ring);
}

.ds-hint {
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-subtle);
}

.ds-error {
    font-size: 13px;
    line-height: 1.5;
    color: var(--danger-500);
}

/* --------------------------------------------------------------------------
   Horní lišta
   -------------------------------------------------------------------------- */
.ds-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 36px;
    border-bottom: 1px solid var(--border-subtle);
    background: #fff;
}

.ds-topbar__left,
.ds-topbar__right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.ds-topbar__logo {
    height: 22px;
    display: block;
}

.ds-topbar__program {
    padding-left: 14px;
    border-left: 1px solid var(--border-subtle);
    font-size: 13px;
    color: var(--text-muted);
    white-space: nowrap;
}

.ds-topbar__user {
    font-size: 13px;
    color: var(--text-body);
}

.ds-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--indigo-100);
    color: var(--indigo-700);
    font-size: 12px;
    font-weight: 500;
    flex: 0 0 auto;
}

/* --------------------------------------------------------------------------
   Odkazy
   -------------------------------------------------------------------------- */
.ds-link {
    color: var(--text-link);
    text-decoration: none;
    transition: color .2s var(--ease-out);
}

.ds-link:hover {
    color: var(--text-link-hover);
    text-decoration: underline;
}

.ds-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    border: none;
    background: none;
    color: var(--text-link);
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
}

.ds-link-btn:hover {
    color: var(--text-link-hover);
}

.ds-link-btn:focus-visible {
    outline: none;
    border-radius: 6px;
    box-shadow: var(--focus-ring);
}

/* --------------------------------------------------------------------------
   Přechody obrazovek — fade + posun ≤ 10px, bez scale a pružin
   -------------------------------------------------------------------------- */
.ds-screen {
    display: none;
}

.ds-screen.is-active {
    display: flex;
    flex-direction: column;
    animation: ds-enter .28s var(--ease-out) both;
}

@keyframes ds-enter {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .001ms !important;
        transition-duration: .001ms !important;
    }
}
