/* ============================================
   Daniel Ilek Office · Styles
   ============================================ */

/* Reset a základní nastavení */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Brand – Daniel Ilek Office (champagne × private banking) */
    --brand-primary: #d4bc82;
    --brand-primary-hover: #e8d5a8;
    --brand-secondary: #8e9199;

    --brand-gold: #d4bc82;
    --brand-gold-bright: #f0e8d0;
    --brand-gold-soft: rgba(212, 188, 130, 0.14);
    --brand-gold-border: rgba(212, 188, 130, 0.32);
    --office-accent-rgb: 212, 188, 130;

    /* Office – chladný grafit, ne hnědá */
    --office-bg-deep: #07090e;
    --office-bg-mid: #0e1118;
    --office-bg-card: #12161f;
    --office-canvas:
        radial-gradient(ellipse 90% 60% at 50% -15%, rgba(212, 188, 130, 0.14) 0%, transparent 55%),
        radial-gradient(ellipse 45% 40% at 100% 0%, rgba(100, 140, 220, 0.07) 0%, transparent 50%),
        radial-gradient(ellipse 40% 35% at 0% 80%, rgba(212, 188, 130, 0.05) 0%, transparent 48%),
        linear-gradient(180deg, #0c0f16 0%, #090b10 45%, #07090e 100%);
    --office-glass: linear-gradient(155deg, rgba(255, 255, 255, 0.09) 0%, rgba(255, 255, 255, 0.02) 48%, rgba(255, 255, 255, 0.01) 100%);
    --office-glass-border: rgba(255, 255, 255, 0.11);
    --office-glass-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.1);
    --office-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.04);
    --office-glow: 0 0 80px rgba(212, 188, 130, 0.06);
    --office-text: #f5f5f7;
    --office-text-secondary: #86868b;
    --office-text-muted: #636366;
    --office-label: #8e8e93;
    --ui-label: #9a9488;
    --office-brand: #d4bc82;
    --office-brand-bright: #f0e8d0;
    --office-brand-soft: rgba(212, 188, 130, 0.14);
    --office-brand-border: rgba(212, 188, 130, 0.32);
    --office-table-bg: rgba(0, 0, 0, 0.2);
    --office-pin-bg: rgba(7, 9, 14, 0.82);
    --office-earnings-bg: linear-gradient(160deg, rgba(28, 32, 42, 0.96) 0%, rgba(14, 16, 22, 0.98) 100%);

    /* Barvy */
    --primary-color: var(--brand-primary);
    --primary-hover: var(--brand-primary-hover);
    --secondary-color: var(--brand-secondary);
    --success-color: #4ade80;
    --danger-color: #f87171;

    /* Background */
    --bg-main: #0a0c12;
    --bg-card: #11151d;
    --bg-card-elevated: #161b26;
    --bg-input: rgba(255, 255, 255, 0.04);
    --bg-hover: rgba(255, 255, 255, 0.06);

    /* Text */
    --text-primary: #f4f4f5;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;

    /* Borders & lines */
    --border-color: rgba(255, 255, 255, 0.08);
    --card-border-color: rgba(255, 255, 255, 0.06);
    --ui-line: rgba(255, 255, 255, 0.1);
    --ui-line-focus: var(--brand-primary);
    --ui-glow-focus: rgba(212, 188, 130, 0.22);

    /* Service Selector Active */
    --service-active-bg: rgba(212, 188, 130, 0.1);
    --service-active-border: rgba(212, 188, 130, 0.26);
    --service-active-text: var(--brand-gold);

    /* Typography – moderní prémiové (Manrope + Outfit) */
    --font-family-base: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-family-display: 'Outfit', 'Manrope', sans-serif;

    /* Layout — 8 · 12 · 16 · 24 px systém */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-card: 14px;
    --border-radius: var(--radius-md);
    --shadow-soft: 0 2px 8px rgba(15, 23, 42, 0.04), 0 12px 32px rgba(15, 23, 42, 0.06);
    --shadow-soft-hover: 0 4px 12px rgba(15, 23, 42, 0.06), 0 20px 44px rgba(15, 23, 42, 0.08);
    --shadow-soft-inset-focus: inset 0 -1px 0 0 var(--brand-primary);

    --shadow-sm: var(--shadow-soft);
    --shadow-md: var(--shadow-soft-hover);
    --shadow-lg: 0 24px 64px rgba(15, 23, 42, 0.1);

    /* Spacing (rem ~ 16px root) */
    --space-u1: 0.5rem; /* 8 */
    --space-u2: 0.75rem; /* 12 */
    --space-u3: 1rem; /* 16 */
    --space-u4: 1.5rem; /* 24 */

    --space-xs: var(--space-u1);
    --space-sm: var(--space-u2);
    --space-md: var(--space-u3);
    --space-lg: var(--space-u4);
    --space-xl: 2rem;

    /* Vstupní pole ve službách – výrazný „zápisový blok“ */
    --field-well-bg: rgba(255, 255, 255, 0.03);
    --field-well-border: rgba(255, 255, 255, 0.12);
    --field-well-accent: rgba(212, 188, 130, 0.5);
    --field-well-inset: rgba(0, 0, 0, 0.2);
    --field-well-focus-ring: rgba(212, 188, 130, 0.32);

    /* Spodní dok: druhá lišta s rozdechem služeb (0 = skryto) */
    --app-commission-strip-stack: 0rem;
}

/* Denní režim – kalkulačka + celé Office */
html[data-theme='light'] {
    --brand-primary: #0f6b4e;
    --brand-primary-hover: #0c5a41;
    --brand-gold: #c7a35a;
    --primary-color: var(--brand-primary);
    --primary-hover: var(--brand-primary-hover);
    --bg-main: #f3f5f9;
    --bg-card: #fafbfc;
    --bg-card-elevated: #ffffff;
    --bg-input: transparent;
    --bg-hover: rgba(15, 23, 42, 0.04);
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border-color: #e8ecf1;
    --card-border-color: rgba(15, 23, 42, 0.06);
    --ui-line: rgba(15, 23, 42, 0.12);
    --ui-glow-focus: rgba(15, 107, 78, 0.2);
    --service-active-bg: rgba(15, 107, 78, 0.08);
    --service-active-border: rgba(15, 107, 78, 0.22);
    --service-active-text: var(--brand-primary);
    --field-well-bg: rgba(241, 245, 249, 0.995);
    --field-well-border: rgba(15, 23, 42, 0.18);
    --field-well-accent: rgba(15, 107, 78, 0.68);
    --field-well-inset: rgba(15, 23, 42, 0.06);
    --field-well-focus-ring: rgba(15, 107, 78, 0.32);

    /* Office – denní vzhled (teplý kámen, ne čistá bíl) */
    --office-bg-deep: #e8e4dc;
    --office-bg-mid: #f5f2ec;
    --office-bg-card: #faf8f4;
    --office-canvas:
        radial-gradient(ellipse 95% 65% at 50% -12%, rgba(201, 169, 98, 0.38) 0%, transparent 55%),
        radial-gradient(ellipse 50% 45% at 95% 15%, rgba(120, 150, 210, 0.18) 0%, transparent 50%),
        radial-gradient(ellipse 45% 40% at 5% 85%, rgba(180, 150, 90, 0.15) 0%, transparent 48%),
        linear-gradient(175deg, #f3f0e8 0%, #e6e1d6 42%, #d9d4c8 100%);
    --office-glass: linear-gradient(155deg, rgba(255, 252, 246, 0.92) 0%, rgba(245, 240, 230, 0.78) 100%);
    --office-glass-border: rgba(120, 95, 55, 0.18);
    --office-shadow: 0 10px 36px rgba(80, 60, 30, 0.12), 0 0 0 1px rgba(120, 95, 55, 0.1);
    --office-glow: 0 0 70px rgba(201, 169, 98, 0.15);
    --office-text: #1a1714;
    --office-text-secondary: #5c574f;
    --office-text-muted: #7a746a;
    --office-label: #6b6458;
    --ui-label: #6b6458;
    --office-brand: #7a6232;
    --office-brand-bright: #5c4720;
    --office-brand-soft: rgba(138, 115, 72, 0.16);
    --office-brand-border: rgba(120, 95, 55, 0.32);
    --office-table-bg: rgba(255, 255, 255, 0.45);
    --office-pin-bg: rgba(250, 247, 240, 0.94);
    --office-earnings-bg: linear-gradient(160deg, rgba(255, 250, 238, 0.98) 0%, rgba(245, 235, 210, 0.95) 100%);
}

body {
    font-family: var(--font-family-base);
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.55;
    letter-spacing: 0.01em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding: var(--space-sm);
    min-height: 100vh;
}

/* Přihlášení – vždy Office brand (nezávisle na přepínači v kalkulačce) */
body.auth-required {
    padding: 0;
    background-color: var(--office-bg-deep);
    background-image: var(--office-canvas);
    background-attachment: fixed;
    color: var(--office-text);
    position: relative;
}

/* Jemná animace pozadí – viditelná vrstva nad podkladem */
@keyframes office-ambient-drift {
    0%,
    100% {
        transform: translate3d(0, 0, 0) scale(1);
        opacity: 0.85;
    }
    50% {
        transform: translate3d(2%, -1.5%, 0) scale(1.04);
        opacity: 1;
    }
}

@keyframes office-ambient-shimmer {
    0%,
    100% {
        opacity: 0.55;
    }
    50% {
        opacity: 0.9;
    }
}

.office-ambient-layer {
    display: none;
    position: fixed;
    inset: -20%;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 45% 40% at 15% 25%, rgba(212, 188, 130, 0.28) 0%, transparent 58%),
        radial-gradient(ellipse 40% 36% at 85% 70%, rgba(100, 140, 220, 0.18) 0%, transparent 55%),
        radial-gradient(ellipse 60% 50% at 50% 105%, rgba(212, 188, 130, 0.14) 0%, transparent 52%);
    animation: office-ambient-drift 22s ease-in-out infinite;
}

.office-ambient-layer::after {
    content: '';
    position: absolute;
    inset: 15%;
    background: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(240, 220, 170, 0.2) 0%, transparent 65%);
    animation: office-ambient-shimmer 14s ease-in-out infinite;
}

body.auth-required .office-ambient-layer,
body.authenticated.crm-on-dashboard .office-ambient-layer,
body.authenticated.crm-on-section:not(.crm-on-kalkulacka) .office-ambient-layer {
    display: block;
}

html[data-theme='light'] .office-ambient-layer {
    background:
        radial-gradient(ellipse 45% 40% at 15% 25%, rgba(201, 169, 98, 0.45) 0%, transparent 58%),
        radial-gradient(ellipse 40% 36% at 85% 70%, rgba(100, 140, 220, 0.22) 0%, transparent 55%),
        radial-gradient(ellipse 60% 50% at 50% 105%, rgba(180, 150, 90, 0.25) 0%, transparent 52%);
}

@media (prefers-reduced-motion: reduce) {
    .office-ambient-layer,
    .office-ambient-layer::after {
        animation: none;
    }
}

body.auth-required #loginGateModal,
body.authenticated.crm-on-dashboard #crmShell,
body.authenticated.crm-on-section:not(.crm-on-kalkulacka) #crmShell {
    position: relative;
    z-index: 1;
}

body.authenticated.crm-on-kalkulacka:not(.auth-required) {
    padding-bottom: calc(4.75rem + var(--app-commission-strip-stack) + env(safe-area-inset-bottom, 0px));
}

body.authenticated.crm-on-kalkulacka.commission-strip-on:not(.auth-required) {
    --app-commission-strip-stack: 3rem;
}

body.auth-required .container,
body.auth-required #crmShell {
    display: none !important;
}

.login-gate-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    padding: var(--space-lg);
    color: var(--office-text);
}

.login-gate-overlay > .app-theme-toggle {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    z-index: 2;
}

.app-theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    flex-shrink: 0;
    border-radius: 50%;
    border: 1px solid var(--office-glass-border);
    background: var(--office-brand-soft);
    color: var(--office-text);
    cursor: pointer;
    font-family: inherit;
    transition:
        background 0.18s ease,
        border-color 0.18s ease,
        transform 0.12s ease,
        box-shadow 0.18s ease;
}

.app-theme-toggle:hover {
    border-color: var(--office-brand-border);
    background: rgba(212, 188, 130, 0.2);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.app-theme-toggle:active {
    transform: scale(0.94);
}

.app-theme-toggle-icon {
    font-size: 1.1rem;
    line-height: 1;
}

.login-gate-overlay.hidden {
    display: none !important;
}

.login-gate-panel {
    width: 100%;
    max-width: 420px;
    background: var(--office-glass);
    border: 1px solid var(--office-glass-border);
    border-radius: 20px;
    padding: var(--space-xl);
    box-shadow: var(--office-shadow), var(--office-glow);
    backdrop-filter: blur(24px) saturate(1.2);
    -webkit-backdrop-filter: blur(24px) saturate(1.2);
}

.login-gate-eyebrow {
    font-family: var(--font-family-base);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--brand-gold);
    margin-bottom: var(--space-u2);
}

.login-gate-brand {
    font-family: var(--font-family-display);
    font-size: 2.15rem;
    font-weight: 600;
    line-height: 1.12;
    letter-spacing: -0.03em;
    margin-bottom: var(--space-u2);
    background: linear-gradient(135deg, #ffffff 0%, #f0e8d0 55%, #d4bc82 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.login-gate-tagline {
    font-size: 0.95rem;
    color: #a1a1aa;
    margin-bottom: var(--space-lg);
    letter-spacing: 0.02em;
}

.login-gate-hint {
    font-size: 0.875rem;
    color: #a1a1aa;
    margin-bottom: var(--space-md);
    line-height: 1.55;
}

/* Přihlášení – vstupy a tlačítka (nezávislé na globálním .form-input) */
.login-gate-overlay .form-group label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #a1a1aa;
    margin-bottom: 0.35rem;
}

.login-gate-overlay .form-input {
    width: 100%;
    padding: 0.7rem 0.9rem !important;
    margin: 0;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 10px !important;
    background: rgba(255, 255, 255, 0.04) !important;
    color: #f5f5f7 !important;
    font-size: 0.9375rem;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.login-gate-overlay .form-input:hover {
    border-color: rgba(212, 188, 130, 0.35) !important;
    background: rgba(255, 255, 255, 0.06) !important;
}

.login-gate-overlay .form-input:focus {
    outline: none;
    border-color: rgba(212, 188, 130, 0.5) !important;
    box-shadow:
        inset 0 1px 2px rgba(0, 0, 0, 0.2),
        0 0 0 3px rgba(212, 188, 130, 0.15) !important;
    background: rgba(255, 255, 255, 0.07) !important;
}

.login-gate-overlay .form-input::placeholder {
    color: #71717a;
    opacity: 1;
}

.login-gate-overlay .btn-primary {
    margin-top: var(--space-md);
    padding: 0.8rem 1rem;
    border-radius: 10px;
    background: linear-gradient(135deg, #f5ecd8 0%, #d4bc82 42%, #a88b4a 100%);
    color: #0a0c10;
    font-weight: 700;
    letter-spacing: 0.03em;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow:
        0 4px 24px rgba(212, 188, 130, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.login-gate-overlay .btn-primary:hover {
    background: linear-gradient(135deg, #fff8eb 0%, #e8d5a8 45%, #d4bc82 100%);
    color: #0a0c10;
}

.login-gate-overlay .btn-primary:active {
    transform: translateY(1px);
    box-shadow: 0 2px 14px rgba(212, 188, 130, 0.2);
}

.login-gate-overlay .login-error {
    color: #fca5a5;
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid rgba(248, 113, 113, 0.25);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
}

.login-gate-overlay .login-must-change-title {
    font-family: var(--font-family-display);
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: #f4f4f5;
}

.login-gate-fields {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.login-gate-fields .form-group {
    margin-bottom: var(--space-md);
}

.login-gate-fields .form-group:last-of-type {
    margin-bottom: 0;
}

.login-error {
    color: var(--danger-color);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.login-gate-links {
    margin-top: var(--space-md);
    text-align: center;
}

.login-link-btn {
    background: none;
    border: none;
    color: var(--accent-color, #d4bc82);
    font-size: 0.875rem;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
}

.login-link-btn:hover {
    color: #fff8eb;
}

.login-mfa-qr {
    display: flex;
    justify-content: center;
    margin: var(--space-md) 0;
    padding: var(--space-sm);
    background: #fff;
    border-radius: 8px;
}

.login-recovery-list {
    list-style: none;
    padding: 0;
    margin: var(--space-md) 0;
    display: grid;
    gap: 0.5rem;
}

.login-recovery-list code {
    display: block;
    padding: 0.5rem 0.75rem;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 6px;
    font-size: 1rem;
    letter-spacing: 0.08em;
    text-align: center;
}

.btn-block {
    width: 100%;
    margin-top: var(--space-sm);
}

/* Legacy – #headerUserRow používá nový strip */
.header-user-row.hidden {
    display: none !important;
}

.container.app-shell {
    max-width: 1460px;
    margin: 0 auto;
    display: block;
}

.workspace-header {
    position: sticky;
    top: 0;
    z-index: 400;
    margin-bottom: var(--space-sm);
}

.workspace-header-card {
    background:
        radial-gradient(120% 100% at 12% 0%, rgba(199, 163, 90, 0.22) 0%, transparent 52%),
        radial-gradient(80% 70% at 100% 100%, rgba(199, 163, 90, 0.08) 0%, transparent 50%),
        linear-gradient(155deg, #2a2520 0%, #1e1b17 48%, #16130f 100%);
    border: 1px solid rgba(199, 163, 90, 0.22);
    border-radius: 16px;
    padding: 0.55rem 1rem 0.6rem;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.08) inset,
        0 20px 50px -24px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(199, 163, 90, 0.06);
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* ── Řádka účtu: logo | přihlášení + role | mikro nástroje */
.workspace-header-r1 {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem 0.95rem;
    min-height: 2.55rem;
}

.workspace-brand {
    display: flex;
    flex-direction: column;
    line-height: 1.35;
    min-width: 0;
    flex: 0 0 auto;
    padding-right: 0.15rem;
}

.workspace-brand-title {
    font-family: var(--font-family-display);
    font-weight: 600;
    font-size: 0.92rem;
    color: #f4f0e8;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.workspace-header-session {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.62rem;
    flex: 1 1 12rem;
    min-width: 0;
    padding: 0.36rem 0.62rem;
    border-radius: 11px;
    background: rgba(0, 0, 0, 0.16);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.09),
        0 0 0 1px rgba(255, 255, 255, 0.08);
}

.workspace-header-session.hidden {
    display: none !important;
}

.workspace-session-user {
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.94);
    line-height: 1.35;
    min-width: 0;
    flex: 1 1 9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.workspace-session-fields {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.38rem;
    flex: 0 1 auto;
}

.workspace-select-session {
    padding: 0.34rem 1.45rem 0.34rem 0.62rem !important;
    margin: 0 !important;
    border: 1px solid rgba(255, 255, 255, 0.22) !important;
    border-radius: 999px !important;
    background-color: rgba(255, 255, 255, 0.1) !important;
    font-size: 0.7rem !important;
    font-weight: 650 !important;
    line-height: 1.25;
    box-shadow: none !important;
    min-width: 4.85rem;
    max-width: 9.75rem;
    color: #fff !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.22) !important;
}

.workspace-select-session:focus {
    outline: none;
    border-color: rgba(255, 220, 150, 0.55) !important;
}

.workspace-session-logout {
    margin-left: 0.1rem;
    padding: 0.32rem 0.72rem !important;
    border-radius: 999px !important;
    border: none !important;
    font-size: 0.665rem !important;
    font-weight: 650 !important;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.12) !important;
    color: rgba(255, 255, 255, 0.95) !important;
    cursor: pointer;
    font-family: inherit;
    transition:
        background 0.18s ease,
        transform 0.12s ease;
}

.workspace-session-logout:hover {
    background: rgba(255, 255, 255, 0.2) !important;
}

.workspace-session-extra.hidden {
    display: none !important;
}

.workspace-session-extra {
    margin-left: 0.1rem;
    padding: 0.32rem 0.72rem !important;
    border-radius: 999px !important;
    border: none !important;
    font-size: 0.665rem !important;
    font-weight: 650 !important;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: rgba(251, 191, 36, 0.22) !important;
    color: rgba(255, 255, 255, 0.98) !important;
    cursor: pointer;
    font-family: inherit;
    transition:
        background 0.18s ease,
        transform 0.12s ease;
}

.workspace-session-extra:hover {
    background: rgba(251, 191, 36, 0.35) !important;
}

.login-must-change-title {
    font-size: 1.05rem;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.login-must-change-block {
    margin-top: var(--space-sm);
}

.users-overview-hint {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
}

.users-overview-table-wrap {
    overflow: auto;
    max-height: min(62vh, 520px);
}

.users-overview-modal-inner.modal {
    max-width: 980px;
}

.workspace-header-quick-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.32rem;
    margin-left: auto;
    flex: 0 0 auto;
}

.workspace-icon-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.125rem;
    height: 2.125rem;
    padding: 0;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.95);
    cursor: pointer;
    font-family: inherit;
    transition:
        background 0.18s ease,
        border-color 0.18s ease,
        transform 0.12s ease;
}

.workspace-icon-circle:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.52);
}

.workspace-icon-circle:active {
    transform: scale(0.94);
}

.workspace-icon-circle[aria-pressed='true'] {
    background: rgba(255, 255, 255, 0.26);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        0 0 0 1px rgba(0, 0, 0, 0.12);
}

.workspace-theme-toggle-icon {
    font-size: 1.1rem;
    line-height: 1;
}

.workspace-pill-toggle {
    position: relative;
    cursor: pointer;
    user-select: none;
}

.workspace-pill-toggle input {
    position: absolute;
    opacity: 0;
    inset: 0;
    cursor: pointer;
    margin: 0;
}

.workspace-pill-toggle-face {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.34rem 0.62rem;
    min-height: 2.125rem;
    box-sizing: border-box;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.78);
    transition:
        background 0.16s ease,
        color 0.16s ease,
        border-color 0.16s ease,
        box-shadow 0.16s ease;
}

.workspace-pill-toggle:hover .workspace-pill-toggle-face {
    border-color: rgba(255, 255, 255, 0.45);
}

.workspace-pill-toggle:has(input:checked) .workspace-pill-toggle-face {
    background: linear-gradient(135deg, var(--brand-gold-soft) 0%, #e8cf7a 100%);
    border-color: rgba(212, 175, 55, 0.45);
    color: #173020;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.workspace-pill-toggle:has(input:focus-visible) .workspace-pill-toggle-face {
    outline: 2px solid rgba(255, 255, 255, 0.55);
    outline-offset: 2px;
}

.workspace-pill-wrap.hidden {
    display: none !important;
}

.workspace-header-trade {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.62rem 1rem;
    margin-top: 0.52rem;
    padding-top: 0.52rem;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
}

/* Datum + akce vpravo — nedělí řádek na „klient | datum | tlačítka“ */
.workspace-trade-end {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: flex-end;
    gap: 0.45rem 0.75rem;
    margin-left: auto;
    flex: 0 1 auto;
}

.workspace-field-date--compact {
    flex-direction: row;
    align-items: baseline;
    gap: 0.45rem 0.65rem;
}

.workspace-field-date--compact label {
    font-size: 0.58rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.55);
    margin: 0;
    padding-bottom: 0.15rem;
    white-space: nowrap;
}

.workspace-input-date {
    width: auto;
    min-width: 8.75rem;
    max-width: 10.25rem;
    padding: 0.3rem 0 0.28rem;
    font-size: 0.78rem;
    opacity: 0.92;
    border-bottom-color: rgba(255, 255, 255, 0.28);
}

.workspace-input-date:focus {
    opacity: 1;
    border-bottom-color: rgba(255, 255, 255, 0.75);
}

.workspace-field--inline-tight {
    flex-direction: column;
}

.workspace-field-client-search {
    position: relative;
    flex: 1 1 min(18rem, 100%);
    min-width: 0;
    width: 100%;
}

.workspace-trade-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    flex: 0 0 auto;
}

.btn-trade {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.48rem 0.92rem !important;
    border-radius: 999px !important;
    font-size: 0.735rem !important;
    font-weight: 650 !important;
    font-family: inherit;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.38) !important;
    transition:
        transform 0.14s ease,
        box-shadow 0.14s ease;
}

.btn-trade:active {
    transform: scale(0.98);
}

.btn-trade-primary {
    background: linear-gradient(135deg, #fae8a9 0%, var(--brand-gold-soft) 45%, #c9ab4e 130%) !important;
    border-color: rgba(212, 175, 55, 0.4) !important;
    color: #153423 !important;
    font-weight: 750 !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.btn-trade-ghost {
    background: rgba(255, 255, 255, 0.1) !important;
    color: rgba(255, 255, 255, 0.95) !important;
}

.btn-trade-ghost:hover {
    border-color: rgba(255, 255, 255, 0.55) !important;
    background: rgba(255, 255, 255, 0.16) !important;
}

.workspace-field {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
    min-width: 0;
}

.workspace-field label,
.workspace-field-label {
    font-size: 0.62rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.7);
}

.workspace-input,
.workspace-select {
    padding: 0.4rem 0;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.38);
    background: transparent;
    color: #fff;
    font-size: 0.8125rem;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.workspace-input:focus,
.workspace-select:focus {
    outline: none;
    border-bottom-color: rgba(255, 255, 255, 0.92);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.workspace-input::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

.workspace-select {
    cursor: pointer;
    min-height: unset;
    appearance: none;
    padding-right: 1.35rem;
    background-color: transparent;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' viewBox='0 0 14 14'%3E%3Cpath stroke='%23ffffff' stroke-opacity='0.65' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m3.5 5.25 3.5 3.5 3.5-3.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0 center;
}

.workspace-select option {
    background: var(--bg-card);
    color: var(--text-primary);
}

.workspace-field-inline {
    flex-direction: row;
    align-items: center;
    gap: var(--space-xs);
}

.workspace-field-inline label {
    margin: 0;
    white-space: nowrap;
}

.app-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(272px, 320px);
    gap: var(--space-u4);
    align-items: start;
}

.app-main-column {
    min-width: 0;
}

.app-sidebar {
    min-width: 0;
}

.app-sidebar .summary-box {
    position: sticky;
    top: 7.25rem;
}

.service-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-u2);
    margin-bottom: var(--space-u2);
    background: var(--bg-card-elevated);
    border: none;
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-soft);
}

.service-nav-item {
    padding: 0.38rem 0.82rem;
    font-size: 0.76rem;
    font-weight: 600;
    border-radius: 999px;
    border: none;
    background: rgba(15, 23, 42, 0.04);
    color: var(--text-secondary);
    cursor: pointer;
    font-family: inherit;
    transition:
        background 0.18s ease,
        color 0.18s ease,
        box-shadow 0.18s ease,
        transform 0.18s ease;
}

.service-nav-item:hover {
    background: rgba(15, 23, 42, 0.07);
    color: var(--brand-primary);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.service-nav-item.active {
    background: var(--service-active-bg);
    border: none;
    color: var(--brand-primary);
    box-shadow: inset 0 0 0 1px rgba(199, 163, 90, 0.22);
}

.service-nav-item-secondary {
    font-size: 0.72rem;
}

.service-nav-divider {
    width: 1px;
    height: 1.2rem;
    background: var(--border-color);
    margin: 0 0.1rem;
}

.sidebar-selected-block {
    padding: var(--space-u3) 0;
    margin-bottom: 0;
    border-bottom: none;
}

.sidebar-selected-title {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: var(--space-u1);
}

.sidebar-selected-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-selected-list li {
    font-size: 0.76rem;
    color: var(--text-primary);
    padding: 0.2rem 0;
    line-height: 1.35;
}

.sidebar-selected-list li.sidebar-selected-item {
    cursor: pointer;
    padding: 0.3rem 0.45rem;
    margin: 0 -0.45rem;
    border-radius: 8px;
    transition: background 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem;
}

.sidebar-selected-list li.sidebar-selected-item:hover {
    background: rgba(15, 107, 78, 0.09);
}

.sidebar-selected-list li.sidebar-selected-item:focus {
    outline: 2px solid rgba(199, 163, 90, 0.85);
    outline-offset: 1px;
}

.sidebar-selected-empty {
    color: var(--text-muted) !important;
    font-style: italic;
}

.sidebar-selected-hint {
    font-size: 0.72rem;
    line-height: 1.45;
    color: var(--text-secondary);
    margin: var(--space-u2) 0 0;
    padding: var(--space-u2) 0 0;
    border-top: 1px solid rgba(251, 146, 60, 0.2);
}

.sidebar-selected-item-label {
    flex: 1;
    min-width: 0;
}

.sidebar-selected-status {
    flex-shrink: 0;
    font-size: 0.7rem;
    line-height: 1;
}

.sidebar-selected-status--complete {
    color: #15803d;
    filter: none;
}

.sidebar-selected-status--incomplete {
    color: #c2410c;
}

.sidebar-selected-item--needs-data {
    background: linear-gradient(
        180deg,
        rgba(255, 237, 213, 0.45) 0%,
        rgba(255, 250, 245, 0.35) 100%
    );
    border-radius: 8px;
}

.app-main-column .finance-subcategories,
.app-main-column .realty-subcategories,
.app-main-column .packages-subcategories {
    margin-bottom: var(--space-u2);
    padding: var(--space-u3);
}

.app-main-column .finance-subcategories h3,
.app-main-column .realty-subcategories h3,
.app-main-column .packages-subcategories h3 {
    font-size: 0.78rem;
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

/* ============================================
   SERVICE SELECTOR (legacy – pro balíčkové panely)
   ============================================ */

.service-selector {
    grid-column: 1 / -1;
    background: var(--bg-card);
    padding: var(--space-lg);
    border-radius: var(--border-radius);
    border: 1px solid var(--card-border-color);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--space-lg);
}

.service-selector h2 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-lg);
}

.service-blocks {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: var(--space-sm);
}

.service-block {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-md);
    background: var(--bg-main);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
    min-height: 80px;
}

.service-block:hover {
    border-color: var(--brand-primary);
}

.service-block.active {
    background: var(--service-active-bg);
    border-color: var(--service-active-border);
}

.service-emoji {
    font-size: 1.5rem;
    margin-bottom: var(--space-xs);
}

.service-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    line-height: 1.2;
}

.service-block.active .service-label {
    color: var(--service-active-text);
}

.service-checkmark {
    position: absolute;
    top: var(--space-xs);
    right: var(--space-xs);
    font-size: 1.125rem;
    color: var(--service-active-text);
    display: none;
}

.service-block.active .service-checkmark {
    display: block;
}

/* ============================================
   FINANCE SUBCATEGORIES
   ============================================ */

.finance-subcategories {
    grid-column: 1 / -1;
    background: var(--bg-card-elevated);
    padding: var(--space-u3);
    border-radius: var(--radius-card);
    border: none;
    box-shadow: var(--shadow-soft);
    margin-bottom: var(--space-u3);
    margin-top: calc(-1 * var(--space-lg));
}

.finance-subcategories.hidden {
    display: none;
}

.finance-subcategories h3 {
    font-size: 0.6875rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: var(--space-u3);
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.finance-subcategories-blocks {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
    gap: var(--space-u2);
}

.finance-subcategory-block {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-u2) var(--space-xs);
    background: rgba(255, 255, 255, 0.65);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        background 0.18s ease;
    min-height: 72px;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.05);
}

.finance-subcategory-block:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft-hover);
}

.finance-subcategory-block.active {
    background: rgba(15, 107, 78, 0.1);
    box-shadow:
        inset 0 0 0 2px rgba(15, 107, 78, 0.2),
        0 4px 16px rgba(15, 23, 42, 0.06);
}

.subcategory-emoji {
    font-size: 1.25rem;
    margin-bottom: var(--space-xs);
}

.subcategory-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    line-height: 1.2;
    margin-bottom: 2px;
}

.finance-subcategory-block.active .subcategory-label {
    color: var(--service-active-text);
}

.subcategory-note {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 2px;
}

.finance-subcategory-block.active .subcategory-note {
    color: var(--service-active-text);
    opacity: 0.8;
}

.finance-subcategory-block .service-checkmark {
    position: absolute;
    top: var(--space-xs);
    right: var(--space-xs);
    font-size: 1rem;
    color: var(--service-active-text);
    display: none;
}

.finance-subcategory-block.active .service-checkmark {
    display: block;
}

/* ============================================
   REALTY SUBCATEGORIES
   ============================================ */

.realty-subcategories {
    grid-column: 1 / -1;
    background: var(--bg-card-elevated);
    padding: var(--space-u3);
    border-radius: var(--radius-card);
    border: none;
    box-shadow: var(--shadow-soft);
    margin-bottom: var(--space-u3);
    margin-top: calc(-1 * var(--space-lg));
}

.realty-subcategories.hidden {
    display: none;
}

.realty-subcategories h3 {
    font-size: 0.6875rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: var(--space-u3);
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.realty-subcategories-blocks {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: var(--space-u2);
}

.realty-subcategory-block {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-u2) var(--space-xs);
    background: rgba(255, 255, 255, 0.65);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease;
    min-height: 72px;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.05);
}

.realty-subcategory-block:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft-hover);
}

.realty-subcategory-block.active {
    background: rgba(15, 107, 78, 0.1);
    box-shadow:
        inset 0 0 0 2px rgba(15, 107, 78, 0.2),
        0 4px 16px rgba(15, 23, 42, 0.06);
}

.realty-subcategory-block.active .subcategory-label {
    color: var(--service-active-text);
}

.realty-subcategory-block .service-checkmark {
    position: absolute;
    top: var(--space-xs);
    right: var(--space-xs);
    font-size: 1rem;
    color: var(--service-active-text);
    display: none;
}

.realty-subcategory-block.active .service-checkmark {
    display: block;
}

/* ============================================
   PACKAGES SUBCATEGORIES
   ============================================ */

.packages-subcategories {
    grid-column: 1 / -1;
    background: var(--bg-card-elevated);
    padding: var(--space-u3);
    border-radius: var(--radius-card);
    border: none;
    box-shadow: var(--shadow-soft);
    margin-bottom: var(--space-u3);
    margin-top: calc(-1 * var(--space-lg));
}

.packages-subcategories.hidden {
    display: none;
}

.packages-subcategories h3 {
    font-size: 0.6875rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: var(--space-u3);
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.packages-blocks {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: var(--space-u2);
}

.package-block {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-u3) var(--space-u2);
    background: rgba(255, 255, 255, 0.65);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease;
    min-height: 92px;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.05);
}

.package-block:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft-hover);
}

.package-block.active {
    background: rgba(15, 107, 78, 0.1);
    box-shadow:
        inset 0 0 0 2px rgba(15, 107, 78, 0.2),
        0 4px 16px rgba(15, 23, 42, 0.06);
}

.package-emoji {
    font-size: 1.5rem;
    margin-bottom: var(--space-xs);
}

.package-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    line-height: 1.2;
    margin-bottom: 4px;
}

.package-block.active .package-label {
    color: var(--service-active-text);
}

.package-note {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: 500;
    font-style: italic;
    margin-top: 2px;
}

.package-block.active .package-note {
    color: var(--service-active-text);
    opacity: 0.8;
}

.package-block .service-checkmark {
    position: absolute;
    top: var(--space-xs);
    right: var(--space-xs);
    font-size: 1rem;
    color: var(--service-active-text);
    display: none;
}

.package-block.active .service-checkmark {
    display: block;
}

/* ============================================
   FINANCE – dílčí oblasti = samostatné minikarty
   ============================================ */

.finance-category-card {
    --fin-accent: #0f766e;
    position: relative;
    margin: 0;
    padding: var(--space-u3) var(--space-u4) calc(var(--space-u3) + 2px);
    border-radius: 14px;
    border: 1px solid color-mix(in srgb, var(--fin-accent) 18%, transparent);
    background:
        linear-gradient(165deg, color-mix(in srgb, var(--fin-accent) 9%, #ffffff) 0%, #ffffff 55%);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.82) inset,
        0 10px 32px -16px rgba(15, 23, 42, 0.2);
}

.finance-category-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    bottom: 10px;
    width: 4px;
    border-radius: 4px;
    background: linear-gradient(
        180deg,
        var(--fin-accent),
        color-mix(in srgb, var(--fin-accent) 45%, white)
    );
    opacity: 0.95;
}

.finance-category-card[data-finance-category-card='lifeInsurance'] {
    --fin-accent: #0d9488;
}

.finance-category-card[data-finance-category-card='nonLife'] {
    --fin-accent: #d97706;
}

.finance-category-card[data-finance-category-card='pension'] {
    --fin-accent: #059669;
}

.finance-category-card[data-finance-category-card='buildingSavings'] {
    --fin-accent: #2563eb;
}

.finance-category-card[data-finance-category-card='investment'] {
    --fin-accent: #7c3aed;
}

/* Investice – přepínač Standardní výpočet / Human Investice */
.investment-mode-switch {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: var(--space-u4);
    padding: 0.2rem;
    border-radius: 12px;
    background: color-mix(in srgb, var(--bg-hover) 85%, transparent);
    border: 1px solid color-mix(in srgb, var(--border-subtle) 70%, transparent);
}

.investment-mode-pill {
    flex: 1 1 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.42rem 0.65rem;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition:
        background 0.15s ease,
        color 0.15s ease,
        box-shadow 0.15s ease;
}

.investment-mode-pill input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.investment-mode-pill:has(input:checked) {
    background: var(--surface-elevated);
    color: var(--text-primary);
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}

.investment-mode-pill--human:has(input:checked) {
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--brand-primary) 35%, transparent);
}

.investment-human-intro {
    margin: 0 0 var(--space-u3);
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.investment-calc-box {
    margin-bottom: var(--space-u4);
    padding: var(--space-u3) var(--space-u4);
    border-radius: 12px;
    border: 1px solid color-mix(in srgb, var(--border-subtle) 80%, transparent);
    background: color-mix(in srgb, var(--bg-hover) 40%, var(--surface-elevated));
}

.investment-calc-box-title {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 0 0 var(--space-u3);
}

.investment-calc-lines-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: var(--space-u3);
}

.investment-calc-lines-empty {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.investment-calc-line-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
    text-align: left;
    padding: 0.55rem 0.65rem;
    border-radius: 10px;
    border: 1px solid color-mix(in srgb, var(--border-subtle) 75%, transparent);
    background: var(--surface-elevated);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition:
        border-color 0.15s ease,
        background 0.15s ease;
}

.investment-calc-line-row:hover {
    border-color: color-mix(in srgb, var(--brand-primary) 40%, transparent);
}

.investment-calc-line-row--active {
    border-color: color-mix(in srgb, var(--brand-primary) 55%, transparent);
    background: color-mix(in srgb, var(--brand-primary) 10%, var(--surface-elevated));
}

.investment-calc-line-row-main {
    flex: 1;
    min-width: 0;
}

.investment-calc-line-row-commission {
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
    color: var(--text-secondary);
}

.investment-calc-line-detail {
    padding: var(--space-u3);
    border-radius: 10px;
    border: 1px dashed color-mix(in srgb, var(--border-subtle) 70%, transparent);
    background: color-mix(in srgb, var(--bg-hover) 50%, var(--surface-elevated));
}

.investment-calc-detail-row {
    margin: 0 0 0.4rem;
    font-size: 0.82rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.65rem;
}

.investment-calc-detail-row--strong .investment-calc-detail-v {
    font-weight: 700;
    color: var(--text-primary);
}

.investment-calc-detail-k {
    flex: 0 0 7.5rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ui-label, var(--text-muted));
}

.investment-calc-detail-v {
    flex: 1 1 12rem;
    font-weight: 600;
    color: var(--text-primary);
}

.investment-calc-detail-actions {
    margin-top: var(--space-u3);
}

.investment-add-to-calc-row {
    margin: var(--space-u4) 0;
}

.investment-lane {
    margin-top: var(--space-u4);
    padding-top: var(--space-u4);
    border-top: 1px solid color-mix(in srgb, var(--border-subtle) 70%, transparent);
}

.investment-lane:first-of-type {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.investment-standard-panel.investment-lane--standard {
    border-top: none;
    margin-top: 0;
    padding-top: 0;
}

.human-inv-subsection {
    padding-bottom: var(--space-u4);
    margin-bottom: var(--space-u3);
    border-bottom: 1px dashed color-mix(in srgb, var(--border-subtle) 65%, transparent);
}

.human-inv-subsection:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.human-inv-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: var(--space-u4);
}

.human-inv-chip {
    appearance: none;
    border: 1px solid color-mix(in srgb, var(--border-subtle) 80%, transparent);
    background: var(--surface-elevated);
    color: var(--text-secondary);
    font-size: 0.76rem;
    font-weight: 600;
    padding: 0.38rem 0.72rem;
    border-radius: 999px;
    cursor: pointer;
    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease;
}

.human-inv-chip:hover {
    border-color: color-mix(in srgb, var(--brand-primary) 45%, transparent);
    color: var(--text-primary);
}

.human-inv-chip.active {
    border-color: color-mix(in srgb, var(--brand-primary) 55%, transparent);
    background: color-mix(in srgb, var(--brand-primary) 12%, var(--surface-elevated));
    color: var(--text-primary);
}

.human-inv-detail-heading {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 0 0 var(--space-u3);
}

.human-inv-bond-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.human-inv-bond-btn {
    width: 100%;
    text-align: left;
    appearance: none;
    border: 1px solid color-mix(in srgb, var(--border-subtle) 75%, transparent);
    background: var(--surface-elevated);
    color: var(--text-primary);
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.55rem 0.75rem;
    border-radius: 10px;
    cursor: pointer;
    transition:
        border-color 0.15s ease,
        background 0.15s ease;
}

.human-inv-bond-btn:hover {
    border-color: color-mix(in srgb, var(--brand-primary) 40%, transparent);
}

.human-inv-bond-btn.active {
    border-color: color-mix(in srgb, var(--brand-primary) 55%, transparent);
    background: color-mix(in srgb, var(--brand-primary) 10%, var(--surface-elevated));
}

.human-inv-bond-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.human-inv-bond-detail {
    margin: 0;
    padding: 0 0 0.15rem;
}

.human-inv-detail-heading--sub {
    margin-top: var(--space-u4);
    margin-bottom: var(--space-u2);
    font-size: 0.68rem;
}

.human-bond-sheet {
    padding: 0.65rem 0.72rem 0.85rem;
    border-radius: 12px;
    border: 1px solid color-mix(in srgb, var(--border-subtle) 75%, transparent);
    background: color-mix(in srgb, var(--bg-hover) 55%, var(--surface-elevated));
}

.human-bond-meta {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    font-size: 0.8rem;
}

.human-bond-meta > div {
    margin: 0;
}

.human-bond-meta dt {
    font-weight: 700;
    color: var(--text-muted);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 0.15rem;
}

.human-bond-meta dd {
    margin: 0;
    color: var(--text-primary);
    line-height: 1.35;
}

.human-bond-meta-note {
    color: var(--text-secondary);
    font-weight: 500;
}

.human-bond-commission-note {
    margin: 0.55rem 0 0 !important;
    font-size: 0.74rem !important;
}

.human-bond-doc-grid {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.human-bond-doc-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--brand-primary);
    text-decoration: none;
    padding: 0.38rem 0.5rem;
    border-radius: 8px;
    border: 1px solid color-mix(in srgb, var(--brand-primary) 28%, transparent);
    background: color-mix(in srgb, var(--brand-primary) 6%, transparent);
    transition:
        background 0.15s ease,
        border-color 0.15s ease;
}

.human-bond-doc-link:hover {
    background: color-mix(in srgb, var(--brand-primary) 12%, transparent);
    border-color: color-mix(in srgb, var(--brand-primary) 42%, transparent);
}

.human-bond-doc-link--advisory {
    font-weight: 600;
    border-style: dashed;
    color: var(--text-secondary);
    border-color: color-mix(in srgb, var(--border-subtle) 90%, transparent);
    background: color-mix(in srgb, var(--bg-hover) 70%, transparent);
}

.human-bond-doc-link--advisory:hover {
    color: var(--text-primary);
    border-color: color-mix(in srgb, var(--text-muted) 55%, transparent);
}

.human-bond-advisory-block {
    margin-top: var(--space-u4);
    padding: 0.55rem 0.62rem;
    border-radius: 10px;
    border: 1px dashed color-mix(in srgb, var(--text-muted) 35%, transparent);
    background: color-mix(in srgb, var(--bg-hover) 40%, transparent);
}

.human-bond-advisory-hint {
    margin: 0 0 var(--space-u3);
    font-size: 0.72rem;
    color: var(--text-muted);
    line-height: 1.35;
}

.human-bond-table-wrap {
    overflow-x: auto;
    margin: 0.25rem 0 0;
    border-radius: 10px;
    border: 1px solid color-mix(in srgb, var(--border-subtle) 65%, transparent);
}

.human-bond-variant-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.76rem;
}

.human-bond-variant-table th,
.human-bond-variant-table td {
    padding: 0.42rem 0.55rem;
    text-align: left;
    border-bottom: 1px solid color-mix(in srgb, var(--border-subtle) 55%, transparent);
}

.human-bond-variant-table th {
    font-weight: 700;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    background: color-mix(in srgb, var(--bg-hover) 80%, transparent);
}

.human-bond-variant-table tbody tr:last-child td {
    border-bottom: none;
}

.human-bond-variant-extra {
    margin: 0.35rem 0 0;
    font-size: 0.74rem;
    color: var(--text-secondary);
    line-height: 1.35;
}

.human-progresus-simple {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin-top: 0.35rem;
    max-width: 38rem;
}

.human-progresus-subhead {
    margin: 0 0 0.45rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.human-progresus-panel {
    padding: 0.72rem 0.78rem;
    border-radius: 12px;
    border: 1px solid color-mix(in srgb, var(--border-subtle) 85%, transparent);
    background: var(--surface-elevated);
    position: relative;
    z-index: 0;
}

.human-progresus-panel--form .human-progresus-subhead {
    margin-bottom: 0.55rem;
}

.human-progresus-form-actions {
    margin-top: 0.35rem;
}

.human-progresus-form-actions .btn-primary {
    width: 100%;
    max-width: 18rem;
}

.human-progresus-form-hint {
    margin: 0.5rem 0 0 !important;
    font-size: 0.72rem !important;
    line-height: 1.4;
}

.human-progresus-panel--list {
    background: color-mix(in srgb, var(--bg-hover) 55%, var(--surface-elevated));
}

.human-progresus-panel--client {
    background: color-mix(in srgb, var(--bg-hover) 35%, var(--surface-elevated));
}

.human-progresus-panel--docs {
    padding-bottom: 0.85rem;
}

.human-progresus-interest-actions {
    margin-top: 0;
}

.human-progresus-interest-empty {
    margin: 0 0 0.35rem !important;
}

.human-progresus-interest-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.human-progresus-interest-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.65rem;
    padding: 0.58rem 0.72rem;
    border-radius: 10px;
    border: 1px solid color-mix(in srgb, var(--border-subtle) 85%, transparent);
    background: var(--bg-hover);
}

.human-progresus-interest-row-main {
    flex: 1;
    font-size: 0.82rem;
    line-height: 1.4;
}

.human-bond-doc-path-hint {
    margin: -0.25rem 0 0 !important;
    font-size: 0.68rem !important;
}

.human-delphic-product-meta {
    margin: -0.2rem 0 0;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.human-delphic-disclaimer {
    margin: 0 !important;
    padding: 0.55rem 0.72rem !important;
    border-radius: 12px;
    border: 1px solid color-mix(in srgb, var(--brand-primary) 26%, transparent);
    background: color-mix(in srgb, var(--brand-primary) 7%, var(--surface-elevated));
    font-weight: 600;
    line-height: 1.4;
}

.human-delphic-period-fieldset {
    border: none;
    padding: 0;
    margin: 0;
}

.human-delphic-period-legend {
    padding: 0;
    margin: 0 0 0.35rem;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-primary);
}

.radio-group--delphic-period {
    flex-wrap: wrap;
    gap: 0.65rem 1rem;
}

.human-delphic-calc-note {
    margin: 0.5rem 0 0;
    font-size: 0.72rem;
    color: var(--text-muted);
    line-height: 1.35;
}

.human-delphic-calc-metrics {
    margin-top: 0.35rem;
}

.human-progresus-lead {
    margin: 0 0 0.15rem;
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.human-progresus-lead code {
    font-size: 0.78em;
    padding: 0.08rem 0.28rem;
    border-radius: 4px;
    background: color-mix(in srgb, var(--bg-hover) 90%, transparent);
}

.human-bond-meta--inline > div {
    display: grid;
    grid-template-columns: 6.2rem minmax(0, 1fr);
    gap: 0.35rem 0.65rem;
    align-items: baseline;
}

.human-bond-doc-links-simple {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.human-bond-doc-links-simple a {
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--brand-primary);
    text-decoration: none;
}

.human-bond-doc-links-simple a:hover {
    text-decoration: underline;
}

.human-bond-doc-links-simple--muted a {
    color: var(--text-secondary);
    font-weight: 600;
}

.human-bond-doc-advisory-label {
    margin: 0.5rem 0 0;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.human-progresus-layout {
    display: flex;
    flex-direction: column;
    gap: var(--space-u4);
    margin-top: 0.35rem;
}

.human-progresus-two-col {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--space-u4);
    align-items: start;
}

@media (max-width: 840px) {
    .human-progresus-two-col {
        grid-template-columns: 1fr;
    }
}

.human-progresus-compare-toggle {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: var(--space-u3);
    cursor: pointer;
    user-select: none;
}

.human-progresus-compare-toggle input {
    accent-color: var(--brand-primary);
}

.human-progresus-compare-hint {
    margin: -0.35rem 0 var(--space-u3);
    font-size: 0.72rem !important;
}

.human-progresus-variant-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
    gap: 0.45rem;
}

.human-progresus-variant-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.22rem;
    text-align: left;
    appearance: none;
    border: 1px solid color-mix(in srgb, var(--border-subtle) 78%, transparent);
    border-radius: 12px;
    padding: 0.55rem 0.62rem;
    background: var(--surface-elevated);
    cursor: pointer;
    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        background 0.15s ease;
}

.human-progresus-variant-card-title {
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--text-primary);
}

.human-progresus-variant-card-rate {
    font-size: 0.88rem;
    font-weight: 800;
    color: var(--brand-primary);
    letter-spacing: -0.02em;
}

.human-progresus-variant-card-meta {
    font-size: 0.68rem;
    color: var(--text-muted);
    line-height: 1.3;
}

.human-progresus-variant-card:hover {
    border-color: color-mix(in srgb, var(--brand-primary) 42%, transparent);
}

.human-progresus-variant-card--active {
    border: 2px solid var(--brand-primary);
    box-shadow:
        0 0 0 1px color-mix(in srgb, var(--brand-primary) 25%, transparent),
        0 6px 18px -8px color-mix(in srgb, var(--brand-primary) 45%, transparent);
    background: color-mix(in srgb, var(--brand-primary) 8%, var(--surface-elevated));
}

.human-progresus-variant-card--compare-on {
    border: 2px dashed color-mix(in srgb, var(--brand-primary) 55%, transparent);
    background: color-mix(in srgb, var(--brand-primary) 6%, var(--surface-elevated));
}

.human-bond-sheet--compact {
    padding: 0.5rem 0.58rem;
}

.human-bond-doc-rows {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.human-bond-doc-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem;
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--text-primary);
}

.human-bond-doc-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.btn-compact {
    padding: 0.28rem 0.5rem !important;
    font-size: 0.72rem !important;
    min-height: 0 !important;
}

.btn-compact--ghost {
    border-style: dashed !important;
    background: transparent !important;
}

.human-progresus-calc-block {
    padding-top: 0.25rem;
    border-top: 1px solid color-mix(in srgb, var(--border-subtle) 65%, transparent);
}

.human-progresus-invest-row {
    max-width: 22rem;
}

.human-progresus-calc-intro {
    margin-top: 0.35rem !important;
    font-size: 0.72rem !important;
}

.human-progresus-calc-output {
    margin-top: var(--space-u3);
    padding: 0.65rem 0.72rem;
    border-radius: 12px;
    border: 1px solid color-mix(in srgb, var(--brand-primary) 22%, transparent);
    background: color-mix(in srgb, var(--brand-primary) 6%, var(--surface-elevated));
}

.human-progresus-calc-output--in-panel {
    margin-top: 0.5rem;
    background: var(--surface-elevated);
    border-color: color-mix(in srgb, var(--border-subtle) 80%, transparent);
    isolation: isolate;
}

.human-progresus-panel--client .human-progresus-calc-intro {
    margin-top: 0 !important;
    margin-bottom: 0.35rem !important;
}

.human-progresus-calc-metrics {
    display: flex;
    flex-direction: column;
    gap: 0.38rem;
    font-size: 0.78rem;
}

.human-progresus-calc-metrics > div {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.human-progresus-calc-k {
    color: var(--text-muted);
    font-weight: 600;
}

.human-progresus-calc-v {
    font-weight: 700;
    color: var(--text-primary);
    text-align: right;
}

.human-progresus-calc-v--strong {
    color: var(--brand-primary);
    font-size: 0.92rem;
}

.human-progresus-calc-principle {
    margin: 0.5rem 0 0;
    font-size: 0.7rem;
    color: var(--text-muted);
    line-height: 1.35;
}

.human-progresus-calc-note {
    margin: 0.35rem 0 0 !important;
    font-size: 0.72rem !important;
}

.human-progresus-compare-wrap {
    margin-top: var(--space-u3);
}

.human-progresus-compare-empty {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.78rem;
}

.bond-pdf-modal-shell {
    max-width: min(960px, 96vw);
}

.bond-pdf-modal-body iframe {
    width: 100%;
    min-height: min(72vh, 640px);
    border: 1px solid color-mix(in srgb, var(--border-subtle) 70%, transparent);
    border-radius: 10px;
    background: var(--surface-elevated);
}

.bond-pdf-modal-hint {
    margin: 0.55rem 0 !important;
}

.investment-human-footnote {
    margin-top: var(--space-u3);
    font-size: 0.75rem !important;
}

.investment-human-panel {
    padding-top: 0.15rem;
}

.finance-category-card[data-finance-category-card='loan'] {
    --fin-accent: #475569;
}

.finance-category-card:has(+ .service-result.finance-total) {
    padding-bottom: var(--space-u3);
}

.finance-category-title {
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 var(--space-u4);
    padding: 0.28rem 0 0;
    letter-spacing: -0.028em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    line-height: 1.2;
}

.finance-category-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(
        90deg,
        color-mix(in srgb, var(--fin-accent) 35%, transparent),
        transparent
    );
}

.service-result.finance-total {
    margin-top: var(--space-u3);
    padding: var(--space-u4) var(--space-u4) calc(var(--space-u4) + 4px);
    border-radius: 14px;
    border-top: none;
    background:
        radial-gradient(
            ellipse 140% 80% at 10% -20%,
            rgba(5, 150, 105, 0.18),
            transparent 55%
        ),
        linear-gradient(180deg, #f0fdf4 0%, #ffffff 100%);
    border: 1px solid rgba(5, 150, 105, 0.22);
    box-shadow: 0 12px 36px -20px rgba(5, 150, 105, 0.35);
}

.service-result.finance-total .label {
    color: var(--text-secondary);
    letter-spacing: 0.08em;
    font-size: 0.6875rem;
}

.service-result.finance-total .value {
    color: var(--brand-primary);
    font-size: 1.52rem;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
}

/* --- Metriky uvnitř minikaret finance (oddelené jemným „strip“ dělením nic neřeší) --- */

.service-card[data-service-card='finance'] .finance-category-card .service-metric-grid {
    padding: var(--space-u2);
    margin-top: var(--space-u2);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(15, 23, 42, 0.05);
}

.finance-category-card > .service-result {
    margin-top: var(--space-u3);
    padding: var(--space-u3) var(--space-u4);
    background: rgba(255, 255, 255, 0.82);
    border-radius: 12px;
    border: none;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.95),
        0 0 0 1px color-mix(in srgb, var(--fin-accent) 22%, transparent),
        0 10px 28px -14px rgba(15, 23, 42, 0.18);
}

.finance-category-card > .service-result .value {
    font-size: 1.3rem;
}

/* Řádky metrik uvnitř služby (label | hodnota) */
.service-metric-grid {
    display: flex;
    flex-direction: column;
    gap: var(--space-u2);
    margin-top: var(--space-u1);
}

.service-metric-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: var(--space-u3);
}

.service-metric-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    line-height: 1.35;
}

.service-metric-value {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: right;
    letter-spacing: -0.02em;
}

.service-metric-row--soft .service-metric-label {
    color: var(--text-muted);
    opacity: 0.92;
}

.service-metric-row--soft .service-metric-value,
.service-metric-value--soft {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.service-metric-hint {
    display: inline;
    margin-left: 0.35rem;
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    opacity: 0.85;
}

.service-metric-label--multiline .service-metric-hint {
    display: block;
    margin-left: 0;
    margin-top: 0.12rem;
}

.coefficient-note {
    font-size: 0.6875rem;
    color: var(--text-muted);
    font-style: normal;
    font-weight: 500;
    margin-top: 0.25rem;
    display: block;
}

.service-card .info-note {
    margin: 0;
    padding: 0;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: var(--text-secondary);
}

/* ============================================
   SERVICE DETAILS
   ============================================ */

.service-details-title {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: var(--space-u2);
}

.empty-state {
    text-align: center;
    padding: 2rem var(--space-sm);
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 500;
}

.empty-state.hidden {
    display: none;
}

/* ============================================
   SLUŽBY - CARDS
   ============================================ */

.services-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(1.15rem, 2.5vw, 1.85rem);
    row-gap: clamp(1.25rem, 2.8vw, 2rem);
    align-items: start;
}

.services-container > .service-details-title,
.services-container > #emptyState {
    grid-column: 1 / -1;
}

@media (min-width: 768px) {
    .services-container {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.service-card[data-service-card='finance'] {
    --svc-chrome: #0f766e;
}

.service-card[data-service-card='realty'] {
    --svc-chrome: #1d4ed8;
}

.service-card[data-service-card='pension'] {
    --svc-chrome: #7c3aed;
}

.service-card[data-service-card='propertyMgmt'] {
    --svc-chrome: #c2410c;
}

.service-card[data-service-card='legal'] {
    --svc-chrome: #0e7490;
}

.service-card[data-service-card='accounting'] {
    --svc-chrome: #4b5563;
}

.service-card {
    position: relative;
    background: linear-gradient(160deg, #ffffff 0%, #f8fafc 92%);
    border-radius: 16px;
    border: 1px solid rgba(15, 23, 42, 0.095);
    padding: 0;
    overflow: hidden;
    box-shadow:
        0 1px 3px rgba(15, 23, 42, 0.05),
        0 22px 50px -30px rgba(15, 23, 42, 0.4);
    transition:
        transform 0.22s cubic-bezier(0.32, 0.72, 0.24, 1),
        box-shadow 0.25s ease,
        border-color 0.22s ease;
}

.service-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    background: linear-gradient(
        180deg,
        var(--svc-chrome, #64748b) 0%,
        color-mix(in srgb, var(--svc-chrome, #64748b) 55%, #ffffff) 100%
    );
    border-radius: 16px 0 0 16px;
}

.service-card:hover {
    border-color: rgba(15, 23, 42, 0.14);
    box-shadow:
        0 2px 10px rgba(15, 23, 42, 0.08),
        0 28px 60px -32px rgba(15, 23, 42, 0.45);
}

.service-card.collapsed:hover {
    transform: translateY(-3px);
}

.service-card.collapsed {
    opacity: 1;
    background: linear-gradient(180deg, #fcfdfe 0%, #f1f5f9 96%);
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.05),
        0 14px 36px -24px rgba(15, 23, 42, 0.32);
}

.service-card.collapsed::before {
    opacity: 0.62;
}

.service-card:not(.collapsed) {
    background: #ffffff;
    transform: translateY(-4px);
    box-shadow:
        0 4px 12px rgba(15, 23, 42, 0.08),
        0 32px 64px -36px rgba(15, 23, 42, 0.5);
}

.service-card:not(.collapsed)::before {
    opacity: 1;
}

.service-card-fill-badge {
    flex-shrink: 0;
    width: 1.38rem;
    height: 1.38rem;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1;
    background: rgba(251, 191, 36, 0.22);
    color: #c2410c;
    border: none;
}

.service-card-fill-badge.hidden {
    display: none !important;
}

.service-card--incomplete {
    border-color: rgba(251, 146, 60, 0.45);
    box-shadow:
        0 0 0 1px rgba(251, 146, 60, 0.25),
        0 18px 40px -24px rgba(251, 146, 60, 0.2);
}

/* Accordion header */
.service-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-u2);
    cursor: pointer;
    padding: 1rem 1.15rem 1rem calc(1.05rem + 10px);
    margin: 0;
    border-radius: 0;
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease;
    user-select: none;
}

.service-card.collapsed .service-card-header {
    border-bottom: 1px solid rgba(15, 23, 42, 0.07);
}

.service-card:not(.collapsed) .service-card-header {
    border-bottom: 1px solid rgba(15, 23, 42, 0.1);
    margin-bottom: 0;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 1) 0%,
        color-mix(in srgb, var(--svc-chrome, #94a3b8) 7%, white) 100%
    );
}

.service-card-header-left {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-u2);
    min-width: 0;
    flex: 1;
}

.service-card-header-commission {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--brand-primary);
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-left: auto;
}

.service-card.collapsed .service-card-header-commission {
    margin-left: auto;
}

.service-card.collapsed .service-card-header:hover {
    background: rgba(15, 23, 42, 0.03);
}

.service-card:not(.collapsed) .service-card-header:hover {
    filter: brightness(0.995);
}

.service-card h2 {
    font-size: 1.0625rem;
    font-weight: 700;
    letter-spacing: -0.022em;
    color: var(--text-primary);
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

/* Accordion arrow */
.accordion-arrow {
    font-size: 0.7rem;
    color: var(--text-muted);
    opacity: 0.75;
    transition: transform 0.22s ease;
    display: inline-block;
}

.service-card.collapsed .accordion-arrow {
    transform: rotate(-90deg);
}

.realty-mode-fieldset {
    border: none;
    padding: 0;
    margin: var(--space-md) 0 0;
}

.realty-mode-legend {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--text-primary);
    padding: 0;
    margin-bottom: var(--space-sm);
}

.radio-group-vertical {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-sm);
}

.realty-mode-option {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    cursor: pointer;
    font-size: 0.875rem;
}

.realty-mode-own-row {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.realty-inline-info-btn {
    flex-shrink: 0;
    width: 1.375rem;
    height: 1.375rem;
    border-radius: 50%;
    border: 1px solid var(--brand-primary);
    background: var(--bg-main);
    color: var(--brand-primary);
    font-size: 0.75rem;
    font-weight: 700;
    font-style: italic;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.realty-inline-info-btn:hover:not(:disabled) {
    background: var(--brand-primary);
    color: #fff;
}

.realty-inline-info-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* Accordion body */
.service-card-body {
    transition: opacity 0.2s ease;
    padding: var(--space-u4) calc(1rem + 10px) var(--space-u4) calc(1.05rem + 10px);
}

.service-card.collapsed .service-card-body {
    display: none;
}

@keyframes serviceCardPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(199, 163, 90, 0.75);
    }
    100% {
        box-shadow: 0 0 0 12px rgba(199, 163, 90, 0);
    }
}

.service-card--pulse {
    animation: serviceCardPulse 1s ease-out 1;
}

.packages-subcategories.packages-panel--pulse {
    outline: 2px solid var(--brand-gold);
    outline-offset: 3px;
    border-radius: var(--border-radius);
    animation: serviceCardPulse 1s ease-out 1;
}

.service-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-u3);
}

.service-card[data-service-card='finance'] .service-content {
    gap: clamp(1rem, 3vw, 1.45rem);
}

/* ============================================
   INPUTS & FORMS (underline / „fintech“)
   ============================================ */

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.3125rem;
}

.input-group > label:first-child:not(:has(input)) {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Vstupy na kartách služeb – výrazné „pole“ pro zápis */
.service-card input[type='number'],
.service-card input[type='text']:not(.no-underline-field) {
    width: 100%;
    min-height: 3rem;
    padding: 0.7rem 0.95rem;
    margin: 0;
    border-radius: 10px;
    border: 1px solid var(--field-well-border);
    border-bottom: 4px solid var(--field-well-accent);
    background: var(--field-well-bg) !important;
    color: var(--text-primary);
    font-size: 1.02rem;
    font-weight: 600;
    line-height: 1.45;
    font-family: inherit;
    box-shadow: inset 0 1px 3px var(--field-well-inset);
    transition:
        border-color 0.18s ease,
        box-shadow 0.2s ease,
        background 0.18s ease;
}

.service-card input[type='number']:hover,
.service-card input[type='text']:hover {
    border-color: color-mix(in srgb, var(--field-well-accent) 35%, var(--field-well-border));
    border-bottom-color: var(--field-well-accent);
}

.service-card input[type='number']:focus,
.service-card input[type='text']:focus {
    outline: none;
    border-color: var(--field-well-focus-ring);
    border-bottom-color: var(--brand-primary);
    box-shadow:
        inset 0 1px 3px var(--field-well-inset),
        0 0 0 3px var(--ui-glow-focus);
}

.service-card input[type='number']::placeholder,
.service-card input[type='text']::placeholder {
    color: var(--text-muted);
    opacity: 0.75;
    font-weight: 500;
}

/* Selecty na kartách */
.service-card .form-select,
.service-card select {
    width: 100%;
    min-height: 3rem;
    padding: 0.7rem 2.25rem 0.7rem 0.95rem;
    margin: 0;
    border-radius: 10px;
    border: 1px solid var(--field-well-border);
    border-bottom: 4px solid var(--field-well-accent);
    background-color: var(--field-well-bg);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' viewBox='0 0 14 14'%3E%3Cpath stroke='%2394a3b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m3.5 5.25 3.5 3.5 3.5-3.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    color: var(--text-primary);
    font-size: 1.02rem;
    font-weight: 600;
    line-height: 1.45;
    font-family: inherit;
    cursor: pointer;
    appearance: none;
    box-shadow: inset 0 1px 3px var(--field-well-inset);
    transition:
        border-color 0.18s ease,
        box-shadow 0.2s ease;
}

.service-card .form-select:hover,
.service-card select:hover {
    border-color: color-mix(in srgb, var(--field-well-accent) 35%, var(--field-well-border));
    border-bottom-color: var(--field-well-accent);
}

.service-card .form-select:focus,
.service-card select:focus {
    outline: none;
    border-color: var(--field-well-focus-ring);
    border-bottom-color: var(--brand-primary);
    box-shadow:
        inset 0 1px 3px var(--field-well-inset),
        0 0 0 3px var(--ui-glow-focus);
}

/* Odstranit starý plný rámeček u čísel (globální pravidlo nahrazeno výše) */

.radio-group {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-u2) var(--space-u3);
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow:
        inset 0 0 0 1px rgba(15, 23, 42, 0.06),
        0 2px 6px rgba(15, 23, 42, 0.04);
    cursor: pointer;
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        background 0.18s ease;
    font-size: 0.8125rem;
    font-weight: 500;
}

.radio-group label:hover {
    transform: translateY(-1px);
    box-shadow:
        inset 0 0 0 1px rgba(15, 107, 78, 0.15),
        0 4px 14px rgba(15, 23, 42, 0.07);
}

.radio-group input[type='radio'] {
    cursor: pointer;
    accent-color: var(--brand-primary);
}

.radio-group input[type='radio']:checked + span {
    color: var(--brand-primary);
    font-weight: 700;
}

/* Checkbox group (pro právní služby) */
.checkbox-group {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-u2) var(--space-u3);
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow:
        inset 0 0 0 1px rgba(15, 23, 42, 0.06),
        0 2px 6px rgba(15, 23, 42, 0.04);
    cursor: pointer;
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease;
    font-size: 0.8125rem;
    font-weight: 500;
}

.checkbox-group label:hover {
    transform: translateY(-1px);
    box-shadow:
        inset 0 0 0 1px rgba(15, 107, 78, 0.12),
        0 4px 14px rgba(15, 23, 42, 0.07);
}

.checkbox-group input[type='checkbox'] {
    cursor: pointer;
    accent-color: var(--brand-primary);
}

.checkbox-group input[type='checkbox']:checked + span {
    color: var(--brand-primary);
    font-weight: 700;
}

/* Checkbox styling */
.input-group label:has(input[type="checkbox"]) {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    cursor: pointer;
    padding: var(--space-sm);
    border-radius: 8px;
    transition: background 0.2s;
    font-weight: 500;
}

.input-group label:has(input[type="checkbox"]):hover {
    background: var(--bg-hover);
}

input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--brand-primary);
}

/* Service options (hidden by default) */
.service-options {
    padding: var(--space-u2) 0 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-u2);
    border-left: none;
    margin-left: 0;
    border-radius: 0;
    background: transparent;
}

.service-options.hidden {
    display: none;
}

/* Hlavní řádek výsledku ve službě (bez boxu) */
.service-result {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    padding: var(--space-u3) 0 0;
    margin-top: var(--space-u3);
    background: none;
    border-radius: 0;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.service-result .label {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.service-result .value {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--brand-primary);
    letter-spacing: -0.035em;
    line-height: 1.15;
}

.service-result--dense {
    padding-top: var(--space-u2);
    margin-top: var(--space-u2);
}

/* Reality, audit, právo… — jeden výrazný výsledkový panel v barvě dané služby */
.service-card:not([data-service-card='finance']) .service-result:not(.finance-total) {
    margin-top: var(--space-u4);
    padding: var(--space-u3) var(--space-u4);
    border-radius: 13px;
    border: none;
    background:
        radial-gradient(
            ellipse 90% 80% at 0% 0%,
            color-mix(in srgb, var(--svc-chrome, #059669) 18%, transparent) 0%,
            transparent 70%
        ),
        linear-gradient(180deg, #ffffff 35%, rgba(248, 250, 252, 0.95) 100%);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-left: 4px solid var(--svc-chrome, #059669);
    box-shadow: 0 8px 28px -16px rgba(15, 23, 42, 0.26);
}

.service-card:not([data-service-card='finance']) .service-result:not(.finance-total) .value {
    font-size: 1.32rem;
}

/* ============================================
   SUMMARY BOX (STICKY)
   ============================================ */

.summary-box {
    position: sticky;
    top: var(--space-lg);
    background: transparent;
    border-radius: var(--radius-card);
    border: none;
    padding: var(--space-u2) var(--space-u1);
    box-shadow: none;
    height: fit-content;
    max-height: calc(100vh - 2 * var(--space-lg));
    overflow-y: auto;
}

.summary-box h3.summary-box-title {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: var(--space-u2);
    text-align: left;
}

.summary-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-u4);
}

.total-commission {
    display: flex;
    flex-direction: column;
    gap: var(--space-u1);
    padding: var(--space-u4) var(--space-u3);
    background: rgba(255, 255, 255, 0.75);
    border: none;
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-soft);
    text-align: center;
    color: var(--text-primary);
}

.total-commission .label {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.55;
    color: var(--text-secondary);
}

.total-commission .value {
    font-family: var(--font-family-display);
    font-size: clamp(1.45rem, 4vw, 1.85rem);
    font-weight: 600;
    color: var(--brand-primary);
    letter-spacing: -0.03em;
}

.summary-motivation-text {
    font-size: 0.8125rem;
    line-height: 1.45;
    color: var(--text-secondary);
    margin: calc(-1 * var(--space-sm)) 0 0;
    padding: 0 var(--space-xs);
    text-align: center;
}

.recommended-services-section {
    padding: var(--space-u1) 0 0;
    border-top: none;
}

.recommended-services-title {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: var(--space-xs);
}

.recommended-services-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin-bottom: var(--space-sm);
}

.recommended-services-chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
}

.rec-chip {
    padding: 0.38rem 0.72rem !important;
    font-size: 0.7375rem !important;
    font-weight: 600 !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, 0.85) !important;
    color: var(--brand-primary) !important;
    border: none !important;
    box-shadow:
        inset 0 0 0 1px rgba(15, 23, 42, 0.07),
        0 2px 10px rgba(15, 23, 42, 0.05) !important;
    cursor: pointer;
    line-height: 1.2;
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        background 0.18s ease !important;
}

.rec-chip:hover {
    transform: translateY(-1px);
    background: rgba(15, 107, 78, 0.08) !important;
    color: var(--text-primary) !important;
    box-shadow:
        inset 0 0 0 1px rgba(15, 107, 78, 0.18),
        0 6px 16px rgba(15, 23, 42, 0.08) !important;
}

.rec-chip:active {
    transform: scale(0.98);
}

.ai-assistant-box {
    padding: var(--space-u3) var(--space-u2);
    padding-top: var(--space-u4);
    border-top: 1px solid rgba(15, 23, 42, 0.06);
    background: transparent;
    border-radius: var(--radius-md);
}

.ai-assistant-box.hidden {
    display: none !important;
}

.ai-assistant-title {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: var(--space-xs);
    text-align: left;
}

.ai-assistant-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.5;
    text-align: left;
    margin-bottom: var(--space-u3);
}

.ai-assistant-placeholder {
    font-size: 0.8125rem;
    line-height: 1.45;
    color: var(--text-secondary);
    text-align: center;
}

.ai-assistant-rules {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.ai-assistant-rule {
    padding: var(--space-u2);
    background: rgba(255, 255, 255, 0.7);
    border: none;
    border-radius: var(--radius-md);
    box-shadow: 0 1px 5px rgba(15, 23, 42, 0.04);
}

.ai-assistant-context {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.35rem;
    line-height: 1.42;
}

.ai-assistant-intro {
    font-size: 0.78rem;
    line-height: 1.48;
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
}

.ai-assistant-chip-row {
    margin-top: 0;
}

.ai-assistant-suggest-row {
    margin-bottom: var(--space-sm);
}

.ai-assistant-suggest-row:last-child {
    margin-bottom: 0;
}

.ai-assistant-explain {
    font-size: 0.72rem;
    line-height: 1.45;
    color: var(--text-muted);
    margin: 0.28rem 0 0;
    padding-left: 0.08rem;
}

/* Obchodní kouč (pravý panel) */
.ai-coach-steps-title {
    margin: 0.75rem 0 0.5rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-heading, inherit);
}

.ai-coach-commission-estimate {
    margin: 0.35rem 0 0.5rem;
    padding: 0.4rem 0.55rem;
    font-size: 0.82rem;
    line-height: 1.35;
    border-radius: 0.5rem;
    background: color-mix(in srgb, var(--accent-soft, #e8f4fc) 88%, transparent);
    color: var(--text-muted-strong, #334155);
}

.ai-coach-intro {
    margin-bottom: var(--space-md);
}

.ai-coach-situation {
    font-size: 0.8125rem;
    line-height: 1.42;
    color: var(--text-primary);
    margin: 0 0 var(--space-xs);
}

.ai-coach-situation strong {
    font-weight: 700;
}

.ai-coach-situation-hint {
    font-size: 0.72rem;
    line-height: 1.42;
    color: var(--text-muted);
    margin: 0;
}

.ai-coach-empty {
    font-size: 0.78rem;
    line-height: 1.45;
    color: var(--text-secondary);
    margin: 0;
    padding: var(--space-sm) 0;
}

.ai-coach-cards {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.ai-coach-card {
    padding: var(--space-u2);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(15, 23, 42, 0.07);
    box-shadow: 0 1px 6px rgba(15, 23, 42, 0.04);
}

.ai-coach-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-sm);
    margin-bottom: var(--space-xs);
}

.ai-coach-card-title {
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: -0.018em;
    color: var(--text-primary);
    margin: 0;
    flex: 1;
    line-height: 1.35;
}

.ai-coach-prio {
    flex-shrink: 0;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.18rem 0.45rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.06);
    color: var(--text-secondary);
}

.ai-coach-prio[data-prio='high'] {
    background: rgba(15, 107, 78, 0.12);
    color: var(--brand-primary);
}

.ai-coach-prio[data-prio='medium'] {
    background: rgba(251, 191, 36, 0.18);
    color: #92400e;
}

.ai-coach-prio[data-prio='low'] {
    background: rgba(148, 163, 184, 0.2);
    color: #475569;
}

.ai-coach-goal-badge {
    flex-shrink: 0;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    border: 1px solid transparent;
}

.ai-coach-goal-badge[data-goal='commission'] {
    background: rgba(79, 70, 229, 0.1);
    border-color: rgba(79, 70, 229, 0.25);
    color: #4338ca;
}

.ai-coach-goal-badge[data-goal='recurring'] {
    background: rgba(15, 107, 78, 0.12);
    border-color: rgba(15, 107, 78, 0.22);
    color: var(--brand-primary);
}

.ai-coach-say-label {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
    margin: 0.35rem 0 0.15rem;
}

.ai-coach-phrase-text--prominent {
    font-size: 0.8rem;
    font-style: italic;
    color: var(--text-primary);
    margin: 0 0 0.45rem;
    padding: 0.45rem 0.5rem;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.04);
    border-left: 3px solid rgba(15, 107, 78, 0.35);
}

.ai-coach-impact-line {
    font-size: 0.74rem;
    font-weight: 600;
    line-height: 1.42;
    margin: 0 0 0.4rem;
    color: var(--text-primary);
}

.ai-coach-card-line {
    font-size: 0.75rem;
    line-height: 1.45;
    margin: 0 0 0.32rem;
    color: var(--text-secondary);
}

.ai-coach-card-line:last-of-type {
    margin-bottom: var(--space-sm);
}

.ai-coach-role-line {
    font-size: 0.74rem;
    font-weight: 600;
    line-height: 1.42;
    color: var(--text-primary);
    margin: 0 0 0.38rem;
    padding: 0.38rem 0.45rem;
    border-radius: 8px;
    background: rgba(15, 107, 78, 0.06);
    border-left: 3px solid rgba(15, 107, 78, 0.35);
}

.ai-coach-handoff-line {
    font-size: 0.71rem;
    line-height: 1.42;
    color: var(--text-secondary);
    margin: 0 0 var(--space-sm);
    padding: 0 0 0 0.08rem;
}

.ai-coach-add-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.4rem 0.65rem;
    margin-bottom: var(--space-xs);
    font-size: 0.7375rem;
    font-weight: 700;
    font-family: inherit;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    background: var(--brand-primary);
    color: #fff;
    transition:
        transform 0.14s ease,
        background 0.18s ease,
        box-shadow 0.18s ease;
}

.ai-coach-add-btn:hover {
    background: var(--brand-primary-hover);
    box-shadow: 0 4px 14px rgba(15, 107, 78, 0.2);
}

.ai-coach-add-btn:active {
    transform: scale(0.985);
}

.ai-coach-details {
    margin-top: 0.15rem;
    border-radius: 8px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(248, 250, 252, 0.65);
}

.ai-coach-details-summary {
    list-style: none;
    cursor: pointer;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.45rem 0.52rem;
    color: var(--brand-primary);
    user-select: none;
}

.ai-coach-details-summary::-webkit-details-marker {
    display: none;
}

.ai-coach-details-summary::after {
    content: ' ›';
    display: inline-block;
    transition: transform 0.18s ease;
    font-weight: 700;
    opacity: 0.65;
}

.ai-coach-details[open] .ai-coach-details-summary::after {
    transform: rotate(90deg);
}

.ai-coach-details-body {
    padding: 0 0.52rem 0.55rem;
    border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.ai-coach-why {
    font-size: 0.72rem;
    line-height: 1.42;
    color: var(--text-muted);
    margin: 0.45rem 0 0.35rem;
}

.ai-coach-phrase-text {
    font-size: 0.815rem;
    line-height: 1.46;
    color: var(--text-primary);
    font-style: italic;
    margin: 0;
}

/* Manager view */
.manager-view {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    padding: var(--space-md);
    background: var(--bg-hover);
    border-radius: var(--border-radius);
}

.manager-view h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-xs);
}

.commission-breakdown {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    padding: var(--space-sm);
    background: var(--bg-card);
    border-radius: 6px;
    font-size: 0.875rem;
}

.breakdown-item span:first-child {
    color: var(--text-secondary);
    font-weight: 500;
}

.breakdown-item span:last-child {
    color: var(--text-primary);
    font-weight: 700;
}

.breakdown-item.highlight {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
}

.breakdown-item.highlight span {
    color: white !important;
}

.hidden {
    display: none !important;
}

/* ============================================
   BUTTONS
   ============================================ */

.summary-actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    margin-top: var(--space-md);
}

button {
    padding: var(--space-md);
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
}

.btn-primary {
    background: var(--brand-primary);
    color: #ffffff;
}

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

.btn-primary:active {
    background: var(--brand-primary-hover);
}

.btn-secondary {
    background: var(--bg-hover);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--border-color);
    color: var(--text-primary);
    border-color: var(--brand-gold);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
    .app-body {
        grid-template-columns: 1fr;
    }

    .app-sidebar .summary-box {
        position: relative;
        top: 0;
        max-height: none;
    }

    .finance-subcategories-blocks {
        grid-template-columns: repeat(4, 1fr);
    }

    .packages-blocks {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 960px) {
    .workspace-header-r1 {
        flex-wrap: nowrap;
    }

    .workspace-header-session {
        flex: 1 1 auto;
        min-width: 0;
    }

    .workspace-header-quick-tools {
        flex-shrink: 0;
    }

    .workspace-header-trade {
        flex-wrap: nowrap;
        align-items: flex-end;
    }

    .workspace-field-client-search {
        flex: 1 1 auto;
        max-width: none;
        min-width: 0;
    }

    .workspace-trade-end {
        flex-shrink: 0;
        margin-left: auto;
    }

    .workspace-trade-actions {
        flex-shrink: 0;
    }
}

@media (max-width: 768px) {
    body {
        padding: var(--space-sm);
    }

    body:not(.auth-required) {
        padding-bottom: calc(var(--space-sm) + 4.85rem + var(--app-commission-strip-stack) + env(safe-area-inset-bottom, 0px));
    }

    .workspace-header-r1 {
        flex-direction: column;
        align-items: stretch;
    }

    .workspace-header-session {
        flex: 1 1 auto;
        order: 2;
    }

    .workspace-brand {
        order: 1;
        flex-direction: row;
        align-items: baseline;
        gap: 0.55rem;
        flex-wrap: wrap;
    }

    .workspace-header-quick-tools {
        order: 3;
        width: 100%;
        margin-left: 0;
        justify-content: flex-start;
    }

    .workspace-header-trade {
        flex-direction: column;
        align-items: stretch;
    }

    .workspace-field-client-search {
        flex-basis: auto;
    }

    .workspace-trade-end {
        width: 100%;
        margin-left: 0;
        justify-content: space-between;
        align-items: flex-end;
    }

    .workspace-field-date--compact {
        flex: 1 1 auto;
        min-width: 0;
        max-width: 12rem;
    }

    .workspace-trade-actions {
        flex: 0 0 auto;
    }

    .workspace-trade-actions .btn-trade {
        flex: 1;
        justify-content: center;
    }

    .workspace-session-user {
        flex-basis: 100%;
    }

    .service-nav {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: var(--space-xs);
    }

    .service-selector {
        padding: var(--space-md);
    }

    .finance-subcategories {
        padding: var(--space-md);
    }

    .finance-subcategories-blocks {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-xs);
    }

    .finance-subcategory-block {
        min-height: 65px;
        padding: var(--space-xs);
    }

    .packages-blocks {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-xs);
    }

    .package-block {
        min-height: 75px;
        padding: var(--space-sm);
    }

    .subcategory-emoji {
        font-size: 1.125rem;
    }

    .subcategory-label {
        font-size: 0.65rem;
    }

    .subcategory-note {
        font-size: 0.6rem;
    }

    .service-card h2 {
        font-size: 1rem;
    }

    .service-card-header {
        padding: 0.85rem 1rem 0.85rem calc(0.75rem + 8px);
        margin: 0;
    }

    .service-card-body {
        padding: var(--space-u3) var(--space-u2) var(--space-u3) calc(0.65rem + 8px);
    }

    .total-commission .value {
        font-size: 1.75rem;
    }

    .summary-box {
        padding: var(--space-md);
    }
}

@media (max-width: 480px) {
    .service-blocks {
        grid-template-columns: repeat(2, 1fr);
    }

    .service-block {
        min-height: 75px;
        padding: var(--space-xs) var(--space-sm);
    }

    .service-emoji {
        font-size: 1.125rem;
    }

    .service-label {
        font-size: 0.65rem;
    }

    .finance-subcategories-blocks {
        grid-template-columns: repeat(2, 1fr);
    }

    .finance-subcategory-block {
        min-height: 60px;
    }

    .packages-blocks {
        grid-template-columns: repeat(1, 1fr);
    }

    .package-block {
        min-height: 70px;
    }

    .subcategory-emoji {
        font-size: 1rem;
    }

    .subcategory-label {
        font-size: 0.6rem;
    }

    .subcategory-note {
        font-size: 0.55rem;
    }

    .radio-group {
        flex-direction: column;
    }

    .radio-group label {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================
   MODAL & CONTACTS
   ============================================ */

/* Modal overlay */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 9999;
}

.modal-overlay.hidden {
    display: none;
}

/* Modal container */
.modal {
    width: 100%;
    max-width: 720px;
    background: var(--bg-card-elevated);
    border-radius: var(--radius-card);
    padding: var(--space-u4);
    border: none;
    box-shadow: var(--shadow-lg);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-large {
    max-width: 900px;
}

/* Modal header */
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

/* Modal actions bar */
.modal-actions-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.modal-actions-bar button {
    flex: 1;
    min-width: 200px;
}

/* Modal body */
.modal-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 16px;
}

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--brand-primary);
    margin: 0;
}

/* Icon button for close */
.icon-btn {
    background: transparent;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s;
    line-height: 1;
}

.icon-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

/* Contacts list */
.contacts-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.contacts-list:empty {
    padding: 2rem 1rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.contacts-list:empty::after {
    content: 'Nejdřív vyber službu v menu.';
}

/* Contact card */
.contact-card {
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 16px;
    background: var(--bg-card);
    transition: box-shadow 0.2s;
}

.contact-card:hover {
    box-shadow: var(--shadow-sm);
}

.contact-title {
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--brand-primary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.contact-item {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.contact-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.contact-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-start;
    justify-content: space-between;
}

.contact-info {
    flex: 1;
    min-width: 200px;
}

.contact-role {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.contact-name {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.8125rem;
}

.contact-details a {
    color: var(--brand-primary);
    text-decoration: none;
    transition: color 0.2s;
}

.contact-details a:hover {
    color: var(--brand-primary-hover);
    text-decoration: underline;
}

.contact-note {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-style: italic;
    margin-top: 6px;
}

.contact-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.contact-actions button {
    font-size: 0.75rem;
    padding: 6px 12px;
}

/* Modal footer */
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border-color);
}

.deal-detail-footer {
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
}

.deal-detail-footer .modal-footer-spacer {
    flex: 1;
    min-width: 8px;
}

/* Form elements */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ui-label, var(--text-muted));
}

.crm-money-input {
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.03em;
}

.form-select,
.form-input,
.form-textarea {
    width: 100%;
    padding: 0.55rem 0;
    margin: 0;
    border: none;
    border-radius: 0;
    border-bottom: 1px solid var(--ui-line);
    background: transparent !important;
    color: var(--text-primary);
    font-size: 0.9375rem;
    font-family: var(--font-family-base);
    line-height: 1.55;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.form-select {
    cursor: pointer;
    appearance: none;
    padding-right: 1.65rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' viewBox='0 0 14 14'%3E%3Cpath stroke='%2394a3b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m3.5 5.25 3.5 3.5 3.5-3.5'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.1rem center !important;
}

.form-select:hover,
.form-input:hover,
.form-textarea:hover {
    border-bottom-color: rgba(15, 23, 42, 0.22);
}

.form-select:focus,
.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-bottom-color: var(--ui-line-focus);
    box-shadow: 0 6px 18px rgba(15, 107, 78, 0.1);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-muted);
    opacity: 0.65;
}

.form-textarea {
    resize: vertical;
    line-height: 1.5;
    font-family: var(--font-family-base);
    font-size: 0.875rem;
}

.input-with-button {
    display: flex;
    gap: 8px;
    align-items: center;
}

.input-with-button .form-input {
    flex: 1;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.75rem;
    white-space: nowrap;
}

/* ============================================
   V1.6 - NEW FEATURES
   ============================================ */

/* Action row for two-button layout */
.action-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-sm);
}

/* Button variants */
.btn-success {
    background: var(--success-color);
    color: #ffffff;
}

.btn-success:hover {
    background: #16a34a;
}

.btn-warning {
    background: #f59e0b;
    color: #ffffff;
}

.btn-warning:hover {
    background: #d97706;
}

/* Breakdown sections */
.breakdown-section {
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--border-color);
}

.breakdown-section:last-child {
    border-bottom: none;
}

.breakdown-section h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--brand-primary);
    margin-bottom: var(--space-md);
}

/* Breakdown table */
.breakdown-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: var(--space-md);
}

.breakdown-table th,
.breakdown-table td {
    padding: var(--space-sm) var(--space-md);
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.breakdown-table th {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-hover);
}

.breakdown-table td {
    font-size: 0.875rem;
    color: var(--text-primary);
}

.breakdown-table td:nth-child(2),
.breakdown-table td:nth-child(3) {
    text-align: right;
}

.breakdown-table th:nth-child(2),
.breakdown-table th:nth-child(3) {
    text-align: right;
}

.breakdown-total {
    font-weight: 700;
    background: var(--bg-hover);
}

.breakdown-total td {
    font-weight: 700;
    color: var(--brand-primary);
}

/* Service breakdown card */
.service-breakdown-card {
    background: var(--bg-hover);
    border-radius: 8px;
    padding: var(--space-md);
    margin-bottom: var(--space-md);
}

.service-breakdown-card h5 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--brand-primary);
    margin-bottom: var(--space-sm);
}

/* Breakdown config */
.breakdown-config {
    background: var(--bg-hover);
    border-radius: 8px;
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.breakdown-config.hidden {
    display: none;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    cursor: pointer;
    user-select: none;
}

.toggle-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
}

.field-note {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-style: italic;
    margin-top: 4px;
    display: block;
}

.validation-message {
    padding: var(--space-sm) var(--space-md);
    border-radius: 8px;
    font-size: 0.875rem;
    background: #fee;
    color: var(--danger-color);
    border: 1px solid var(--danger-color);
}

.validation-message.hidden {
    display: none;
}

/* Required field marker */
.required {
    color: var(--danger-color);
    font-weight: 700;
}

/* Reports filters */
.reports-filters {
    display: flex;
    gap: var(--space-lg);
    flex-wrap: wrap;
    margin-bottom: var(--space-lg);
    padding: var(--space-md);
    background: var(--bg-hover);
    border-radius: 8px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    flex: 1;
    min-width: 200px;
}

.filter-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
}

/* Reports summary */
.reports-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.summary-card {
    background: var(--bg-hover);
    border-radius: 8px;
    padding: var(--space-md);
    text-align: center;
}

.summary-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-xs);
}

.summary-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--brand-primary);
}

/* Reports table */
.reports-table-wrap {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.reports-table {
    width: 100%;
    border-collapse: collapse;
}

.reports-table th,
.reports-table td {
    padding: var(--space-sm) var(--space-md);
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.reports-table th {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-hover);
    position: sticky;
    top: 0;
}

.reports-table td {
    font-size: 0.875rem;
    color: var(--text-primary);
}

.reports-table tbody tr:hover {
    background: var(--bg-hover);
}

.reports-table tbody tr:last-child td {
    border-bottom: none;
}

.deal-status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.deal-status-sold {
    background: #dcfce7;
    color: #166534;
}

.deal-status-pipeline {
    background: #fef3c7;
    color: #92400e;
}

.deal-actions {
    display: flex;
    gap: var(--space-xs);
}

.deal-actions button {
    padding: 4px 8px;
    font-size: 0.75rem;
}

.empty-state-small {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.empty-state-small.hidden {
    display: none;
}

/* Deal detail content */
.deal-detail-header {
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 2px solid var(--border-color);
}

.deal-detail-header h4 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--brand-primary);
    margin-bottom: var(--space-sm);
}

.deal-detail-client-name .crm-client-name-link {
    font-size: inherit;
    font-weight: inherit;
}

.deal-meta {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
    font-size: 0.875rem;
}

.deal-meta-item {
    display: flex;
    gap: var(--space-xs);
}

.deal-meta-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--ui-label, var(--text-secondary));
}

.deal-meta-value {
    color: var(--text-primary);
    font-weight: 600;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .action-row {
        grid-template-columns: 1fr;
    }

    .reports-summary {
        grid-template-columns: 1fr;
    }

    .reports-filters {
        flex-direction: column;
    }
}

/* ============================================
   UTILITIES
   ============================================ */

.text-muted {
    color: var(--text-muted);
}

.text-center {
    text-align: center;
}

.mt-sm {
    margin-top: var(--space-sm);
}

.mt-md {
    margin-top: var(--space-md);
}

.mt-lg {
    margin-top: var(--space-lg);
}

/* Scrollbar styling */
.summary-box::-webkit-scrollbar {
    width: 8px;
}

.summary-box::-webkit-scrollbar-track {
    background: var(--bg-hover);
    border-radius: 4px;
}

.summary-box::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.summary-box::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ============================================
   REALITY - PROJEKTY
   ============================================ */

/* Segmented radio group pro typ obchodu */
.radio-group-segmented {
    display: flex;
    gap: 0;
    background: var(--bg-main);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 4px;
}

.radio-group-segmented label {
    flex: 1;
    margin: 0;
    padding: var(--space-sm) var(--space-md);
    border-radius: 6px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: transparent;
}

.radio-group-segmented label:hover {
    background: var(--bg-hover);
}

.radio-group-segmented input[type="radio"] {
    display: none;
}

.radio-group-segmented input[type="radio"]:checked + span {
    font-weight: 600;
}

.radio-group-segmented label:has(input:checked) {
    background: var(--brand-primary);
    color: #ffffff;
}

/* Info button */
.btn-info {
    margin-top: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-hover);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-info:hover {
    background: var(--border-color);
    border-color: var(--brand-primary);
    color: var(--brand-primary);
}

/* Info note */
.info-note {
    margin-top: var(--space-xs);
    padding: var(--space-sm);
    background: var(--bg-hover);
    border-left: 3px solid var(--brand-primary);
    border-radius: 4px;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Checkbox label styling */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    cursor: pointer;
    font-weight: 500;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--brand-primary);
}

/* Project Info Modal */
.project-info {
    padding: var(--space-md);
}

.project-hero {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-lg);
    line-height: 1.5;
}

.project-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.project-image {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.project-section {
    margin-bottom: var(--space-lg);
}

.project-section h5 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

.project-bullets {
    list-style: none;
    padding-left: 0;
}

.project-bullets li {
    padding: var(--space-sm) 0;
    padding-left: var(--space-lg);
    position: relative;
    line-height: 1.6;
}

.project-bullets li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--brand-primary);
    font-weight: 700;
}

.project-contact {
    padding: var(--space-md);
    background: var(--bg-hover);
    border-radius: 8px;
}

.project-contact p {
    margin: var(--space-xs) 0;
}

/* Contact card pro garanta */
.contact-card-guarantor {
    background: linear-gradient(135deg, var(--bg-hover) 0%, var(--bg-card) 100%);
    border: 2px solid var(--brand-primary);
}

.contact-card-guarantor .contact-title {
    color: var(--brand-primary);
    font-weight: 700;
}

/* ============================================
   V1.7 - FINANCE PRICING MODE
   ============================================ */

/* Finance mode toggle */
.finance-mode-toggle {
    margin-bottom: var(--space-lg);
    padding: var(--space-u3);
    background: rgba(255, 255, 255, 0.8);
    border-radius: var(--radius-md);
    border: none;
    box-shadow: var(--shadow-soft);
}

.finance-mode-toggle > label {
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: var(--space-sm);
    color: var(--text-primary);
}

/* Segmented control */
.segmented-control {
    display: flex;
    gap: 0;
    background: rgba(15, 23, 42, 0.03);
    border: none;
    border-radius: var(--radius-md);
    padding: 4px;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
}

.segmented-option {
    flex: 1;
    margin: 0;
    padding: var(--space-sm) var(--space-md);
    border-radius: 6px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: transparent;
}

.segmented-option:hover {
    background: var(--bg-hover);
}

.segmented-option input[type="radio"] {
    display: none;
}

.segmented-option.active {
    background: var(--brand-primary);
    color: #ffffff;
}

.segmented-option.active span {
    font-weight: 600;
    color: #ffffff;
}

.segmented-option span {
    font-weight: 500;
    font-size: 0.9rem;
}

/* ============================================
   SPODNÍ DOK: rozpad služeb + lišta akcí
   ============================================ */

.app-bottom-dock {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 520;
    display: flex;
    flex-direction: column;
    pointer-events: none;
}

.app-bottom-dock > * {
    pointer-events: auto;
}

.app-commission-strip {
    border-top: 1px solid rgba(15, 23, 42, 0.07);
    border-bottom: 1px solid rgba(15, 23, 42, 0.04);
    background: rgba(248, 250, 252, 0.96);
    backdrop-filter: saturate(140%) blur(12px);
    box-shadow: 0 -4px 22px rgba(15, 23, 42, 0.05);
}

.app-commission-strip[hidden] {
    display: none !important;
}

.app-commission-strip-inner {
    max-width: 1460px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.42rem 0.8rem;
    padding: 0.4rem calc(var(--space-u3) + env(safe-area-inset-right, 0px)) 0.38rem
        calc(var(--space-u3) + env(safe-area-inset-left, 0px));
    min-height: 2.35rem;
}

.app-commission-strip-heading {
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    flex: 0 0 auto;
}

.app-commission-strip-chips {
    display: flex;
    flex-flow: row wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
    flex: 1 1 10rem;
    justify-content: flex-end;
}

.app-commission-chip {
    display: inline-flex;
    flex-direction: row;
    align-items: baseline;
    gap: 0.35rem;
    padding: 0.24rem 0.58rem;
    border-radius: 999px;
    background: var(--bg-card-elevated);
    box-shadow:
        inset 0 0 0 1px rgba(15, 23, 42, 0.08),
        0 1px 2px rgba(15, 23, 42, 0.05);
    font-size: 0.72rem;
    line-height: 1.22;
    white-space: nowrap;
}

.app-commission-chip-label {
    font-weight: 600;
    color: var(--text-secondary);
}

.app-commission-chip-value {
    font-weight: 800;
    color: var(--brand-primary);
    font-variant-numeric: tabular-nums;
}

@media (max-width: 560px) {
    .app-commission-strip-chips {
        justify-content: flex-start;
    }
}

.app-sticky-footer {
    position: relative;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: saturate(140%) blur(14px);
    border-top: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow:
        0 -1px 0 rgba(255, 255, 255, 0.8),
        0 -20px 50px rgba(15, 23, 42, 0.08);
    padding: 0.55rem calc(var(--space-u3) + env(safe-area-inset-right, 0px))
        calc(0.55rem + env(safe-area-inset-bottom, 0px))
        calc(var(--space-u3) + env(safe-area-inset-left, 0px));
}

.app-sticky-footer-inner {
    max-width: 1460px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.45rem 1rem;
    row-gap: 0.42rem;
}

.app-sticky-footer-value {
    font-size: 1.125rem;
    color: var(--brand-primary);
    font-weight: 800;
    letter-spacing: -0.025em;
}

.app-sticky-footer-total {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
    min-width: 0;
    flex: 1 1 10rem;
}

.app-sticky-footer-label {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    white-space: nowrap;
}

.app-sticky-footer-center {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    flex: 1 1 11rem;
    min-width: 0;
}

.app-sticky-footer-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 0.15rem;
    flex: 0 1 auto;
    min-width: 0;
}

.app-sticky-footer-btns {
    display: flex;
    gap: 0.4rem;
    flex-shrink: 0;
    flex-wrap: wrap;
    justify-content: flex-end;
    flex: 0 1 auto;
}

.app-version-footnote {
    font-size: 0.625rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: rgba(15, 23, 42, 0.38);
    line-height: 1.2;
    user-select: none;
    pointer-events: none;
    white-space: nowrap;
}

@media (min-width: 900px) {
    .app-sticky-footer-inner {
        flex-wrap: nowrap;
    }
}

@media (max-width: 680px) {
    .app-sticky-footer-inner {
        flex-direction: column;
        align-items: stretch;
    }

    .app-sticky-footer-total {
        justify-content: center;
        flex: 0 0 auto;
    }

    .app-sticky-footer-right {
        order: 2;
        align-items: center;
        width: 100%;
    }

    .app-sticky-footer-btns {
        justify-content: center;
    }

    .app-sticky-footer-center {
        order: 3;
        flex-basis: auto;
        justify-content: center;
    }
}

.btn-sticky {
    padding: 0.48rem 1rem !important;
    font-size: 0.75rem !important;
    border-radius: 999px !important;
    border: none;
    font-weight: 700 !important;
    font-family: inherit;
    cursor: pointer;
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease;
}

.btn-sticky:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.12);
}

.btn-sticky:active {
    transform: translateY(0);
}

.btn-sticky-warn {
    background: linear-gradient(135deg, #fde68a 0%, #fbbf24 50%, #f59e0b 100%);
    color: #1e293b !important;
    box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.35);
}

.btn-sticky-muted {
    background: rgba(15, 23, 42, 0.07);
    color: var(--text-primary, #1e293b) !important;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.1);
}

.btn-sticky-ok {
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 45%, #16a34a 100%);
    color: #fff !important;
    box-shadow: inset 0 0 0 1px rgba(22, 163, 74, 0.35);
}

/* ============================================
   KLIENT — autocomplete + panel
   ============================================ */

.client-autocomplete {
    position: relative;
}

.client-autocomplete-list {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    z-index: 600;
    list-style: none;
    margin: 0;
    padding: 0.28rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: var(--shadow-md);
    max-height: min(280px, 45vh);
    overflow-y: auto;
}

.client-autocomplete-item {
    padding: 0.45rem 0.52rem;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
    font-size: 0.76rem;
    line-height: 1.35;
}

.client-autocomplete-item:hover,
.client-autocomplete-item:focus {
    background: rgba(199, 163, 90, 0.1);
    outline: none;
}

.client-ac-name {
    font-weight: 700;
    color: var(--text-primary);
}

.client-ac-meta {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.client-autocomplete-item-create {
    margin-top: 0.22rem;
    border-top: 1px dashed var(--border-color);
    padding-top: 0.5rem;
}

.client-autocomplete-item-create .client-ac-name {
    color: var(--brand-primary);
}

.workspace-client-panel {
    margin-bottom: var(--space-u2);
    padding: var(--space-u3);
    background: var(--bg-card-elevated);
    border: none;
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-soft);
}

.workspace-textarea,
.workspace-client-note {
    width: 100%;
    font-family: inherit;
    font-size: 0.8125rem;
    padding: 0.5rem 0;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid var(--ui-line);
    background: transparent;
    resize: vertical;
    margin-bottom: var(--space-u2);
    min-height: 3.75rem;
    line-height: 1.55;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.workspace-textarea:focus,
.workspace-client-note:focus {
    outline: none;
    border-bottom-color: var(--ui-line-focus);
    box-shadow: 0 6px 16px rgba(199, 163, 90, 0.1);
}

.workspace-client-panel.hidden {
    display: none !important;
}

.workspace-client-panel-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.workspace-client-panel-title {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--brand-primary);
}

.workspace-client-panel-title span {
    font-weight: 800;
}

.workspace-client-panel-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.38rem;
}

.btn-client-panel {
    padding: 0.32rem 0.72rem !important;
    border-radius: 8px !important;
    font-size: 0.72rem !important;
    font-weight: 600 !important;
    font-family: inherit;
    cursor: pointer;
    border: 1px solid var(--border-color);
}

.btn-client-panel-warn {
    background: rgba(251, 191, 36, 0.25);
    color: var(--text-primary) !important;
    border-color: rgba(251, 146, 60, 0.55);
}

.btn-client-panel-ghost {
    background: var(--bg-hover);
    color: var(--text-secondary);
}

.workspace-client-note-label {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    display: block;
    margin-bottom: 0.35rem;
}

.workspace-client-deals-head {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
    margin-bottom: 0.42rem;
}

.workspace-client-empty {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
    margin: 0 0 var(--space-sm);
}

.workspace-client-empty.hidden {
    display: none !important;
}

.client-deals-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.client-deal-row {
    width: 100%;
    text-align: left;
    cursor: pointer;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.45rem 0.52rem;
    background: var(--bg-main);
    font-family: inherit;
    transition: border-color 0.15s, background 0.15s;
}

.client-deal-row:hover {
    border-color: var(--brand-gold);
    background: rgba(15, 107, 78, 0.05);
}

.client-deal-row-active {
    border-color: var(--brand-gold);
    box-shadow: 0 0 0 2px rgba(199, 163, 90, 0.35);
}

.client-deal-title {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
}

.client-deal-meta {
    display: block;
    margin-top: 0.22rem;
    font-size: 0.71rem;
    color: var(--text-muted);
}

/* ============================================
   TMAVÝ REŽIM · data-theme="dark" na <html>
   ============================================ */

html[data-theme='dark'] {
    color-scheme: dark;

    --brand-primary: #d4bc82;
    --brand-primary-hover: #e8d5a8;
    --brand-secondary: #8e9199;
    --brand-gold: #d4bc82;
    --brand-gold-bright: #f0e8d0;

    --accent-metric: #f0e8d0;

    --bg-main: #0a0c12;
    --bg-card: #11151d;
    --bg-card-elevated: #161b26;
    --bg-input: rgba(255, 255, 255, 0.05);
    --bg-hover: rgba(255, 255, 255, 0.07);

    --text-primary: #f5f5f7;
    --text-secondary: #86868b;
    --text-muted: #636366;

    --border-color: rgba(255, 255, 255, 0.1);
    --card-border-color: rgba(255, 255, 255, 0.07);
    --ui-line: rgba(255, 255, 255, 0.12);
    --ui-line-focus: var(--brand-gold);
    --ui-glow-focus: rgba(212, 188, 130, 0.22);

    --service-active-bg: rgba(212, 188, 130, 0.1);
    --service-active-border: rgba(212, 188, 130, 0.28);
    --service-active-text: #e8d5a8;

    --shadow-soft: 0 2px 12px rgba(0, 0, 0, 0.4), 0 16px 40px rgba(0, 0, 0, 0.3);
    --shadow-soft-hover: 0 4px 16px rgba(0, 0, 0, 0.45), 0 22px 50px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 28px 70px rgba(0, 0, 0, 0.5);

    --field-well-bg: rgba(255, 255, 255, 0.03);
    --field-well-border: rgba(255, 255, 255, 0.12);
    --field-well-accent: rgba(212, 188, 130, 0.45);
    --field-well-inset: rgba(0, 0, 0, 0.25);
    --field-well-focus-ring: rgba(212, 188, 130, 0.3);

    --brand-gold-border: rgba(212, 188, 130, 0.32);
    --brand-gold-soft: rgba(212, 188, 130, 0.12);
}

html[data-theme='dark'] .login-gate-panel {
    background: var(--office-glass);
    border: 1px solid var(--office-glass-border);
}

html[data-theme='dark'] .form-input {
    background: var(--bg-input);
    color: var(--text-primary);
    border-color: var(--border-color);
}

html[data-theme='dark'] .service-card {
    background:
        radial-gradient(100% 60% at 50% 0%, rgba(212, 188, 130, 0.06) 0%, transparent 55%),
        linear-gradient(160deg, #161b26 0%, #11151d 94%);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow:
        0 1px 4px rgba(0, 0, 0, 0.4),
        0 26px 55px -32px rgba(0, 0, 0, 0.72);
}

html[data-theme='dark'] .service-card::before {
    background: linear-gradient(
        180deg,
        var(--svc-chrome, #64748b) 0%,
        color-mix(in srgb, var(--svc-chrome, #64748b) 42%, #0b0f14) 100%
    );
}

html[data-theme='dark'] .service-card:hover {
    border-color: rgba(255, 255, 255, 0.14);
}

html[data-theme='dark'] .service-card.collapsed {
    background: linear-gradient(180deg, #151a24 0%, #0e1118 96%);
}

html[data-theme='dark'] .service-card:not(.collapsed) {
    background:
        radial-gradient(100% 55% at 50% 0%, rgba(212, 188, 130, 0.08) 0%, transparent 58%),
        linear-gradient(180deg, #1a2030 0%, #12161f 100%);
    border-color: rgba(212, 188, 130, 0.18);
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.45),
        0 36px 70px -40px rgba(0, 0, 0, 0.78),
        0 0 32px rgba(212, 188, 130, 0.05);
}

/* Rozbalená karta: hlavička bez „bílé desky“ z light theme (název služby zůstane čitelný) */
html[data-theme='dark'] .service-card:not(.collapsed) .service-card-header {
    background: linear-gradient(
        180deg,
        rgba(48, 42, 34, 0.98) 0%,
        color-mix(in srgb, var(--svc-chrome, #78716c) 18%, #221e19) 100%
    );
    border-bottom: 1px solid rgba(199, 163, 90, 0.12);
}

html[data-theme='dark'] .service-card.collapsed .service-card-header {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

html[data-theme='dark'] .service-card.collapsed .service-card-header:hover {
    background: rgba(255, 255, 255, 0.045);
}

html[data-theme='dark'] .service-card:not(.collapsed) .service-card-header:hover {
    filter: none;
    background: linear-gradient(
        180deg,
        rgba(54, 48, 38, 0.99) 0%,
        color-mix(in srgb, var(--svc-chrome, #78716c) 24%, #2a2520) 100%
    );
}

html[data-theme='dark'] .service-card-header h2 {
    color: var(--text-primary);
}

html[data-theme='dark'] .accordion-arrow {
    color: rgba(226, 232, 241, 0.55);
}

html[data-theme='dark'] .finance-category-card {
    background: linear-gradient(
        165deg,
        color-mix(in srgb, var(--fin-accent) 16%, var(--bg-card-elevated)) 0%,
        var(--bg-card-elevated) 58%
    );
    border-color: color-mix(in srgb, var(--fin-accent) 32%, transparent);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.045) inset,
        0 14px 36px -16px rgba(0, 0, 0, 0.62);
}

html[data-theme='dark'] .finance-category-card::before {
    background: linear-gradient(
        180deg,
        var(--fin-accent),
        color-mix(in srgb, var(--fin-accent) 40%, #0b0f14)
    );
}

html[data-theme='dark'] .service-card[data-service-card='finance'] .finance-category-card .service-metric-grid {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.08);
}

html[data-theme='dark'] .finance-category-card > .service-result {
    background: rgba(20, 28, 38, 0.92);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 0 0 1px color-mix(in srgb, var(--fin-accent) 34%, transparent),
        0 12px 32px -16px rgba(0, 0, 0, 0.55);
}

html[data-theme='dark'] .service-result.finance-total {
    background:
        radial-gradient(ellipse 140% 80% at 10% -20%, rgba(199, 163, 90, 0.18), transparent 55%),
        linear-gradient(180deg, rgba(42, 36, 28, 0.9) 0%, var(--bg-card-elevated) 100%);
    border-color: rgba(199, 163, 90, 0.28);
    box-shadow: 0 18px 50px -28px rgba(199, 163, 90, 0.15);
}

html[data-theme='dark'] .service-result.finance-total .value {
    color: var(--accent-metric);
    text-shadow: 0 1px 10px rgba(199, 163, 90, 0.2);
}

/* Částky uvnitř boxů služeb — stejný tlumený odstín */
html[data-theme='dark'] .service-result .value,
html[data-theme='dark'] .finance-category-card > .service-result .value,
html[data-theme='dark'] .service-card-header-commission,
html[data-theme='dark'] .total-commission .value,
html[data-theme='dark'] .app-sticky-footer-value,
html[data-theme='dark'] .summary-value {
    color: var(--accent-metric);
}

/* Výsledkové panely reality, právo… (v light theme bílý podklad) */
html[data-theme='dark'] .service-card:not([data-service-card='finance']) .service-result:not(.finance-total) {
    background:
        radial-gradient(
            ellipse 92% 82% at 0% 0%,
            color-mix(in srgb, var(--svc-chrome, #059669) 28%, transparent) 0%,
            transparent 72%
        ),
        linear-gradient(180deg, rgba(30, 40, 52, 0.99) 0%, rgba(22, 29, 38, 0.97) 100%);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-left: 4px solid var(--svc-chrome, #059669);
    box-shadow: 0 12px 38px -22px rgba(0, 0, 0, 0.62);
}

html[data-theme='dark'] .service-result {
    border-top-color: rgba(255, 255, 255, 0.09);
}

html[data-theme='dark'] .modal-header h3,
html[data-theme='dark'] .breakdown-section h4 {
    color: var(--accent-metric);
}

html[data-theme='dark'] .finance-subcategory-block {
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

html[data-theme='dark'] .finance-subcategory-block.active {
    background: rgba(199, 163, 90, 0.14);
    border-color: rgba(199, 163, 90, 0.28);
}

html[data-theme='dark'] .total-commission {
    background:
        radial-gradient(100% 80% at 50% 0%, rgba(199, 163, 90, 0.1) 0%, transparent 60%),
        linear-gradient(160deg, rgba(38, 34, 28, 0.95) 0%, rgba(26, 23, 19, 0.98) 100%);
    border: 1px solid rgba(199, 163, 90, 0.18);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.32);
}

html[data-theme='dark'] .btn-primary {
    background: linear-gradient(135deg, #d4b06a 0%, #c7a35a 45%, #b8924a 100%);
    color: #14120f;
    border: 1px solid rgba(199, 163, 90, 0.4);
    box-shadow: 0 6px 24px rgba(199, 163, 90, 0.22);
}

html[data-theme='dark'] .btn-primary:hover {
    background: linear-gradient(135deg, #e0bc78 0%, #d4b06a 50%, #c7a35a 100%);
    border-color: rgba(212, 176, 106, 0.55);
    color: #14120f;
}

html[data-theme='dark'] .btn-primary:active {
    background: linear-gradient(135deg, #c7a35a 0%, #b8924a 100%);
    border-color: rgba(199, 163, 90, 0.45);
    color: #14120f;
}

/* Manažerský řádek „Firma“ v pravém panelu */
html[data-theme='dark'] .breakdown-item.highlight {
    background:
        radial-gradient(ellipse 100% 62% at 10% -22%, rgba(62, 207, 154, 0.2), transparent 52%),
        linear-gradient(180deg, rgba(22, 50, 40, 0.78) 0%, rgba(26, 34, 44, 0.96) 100%);
    border: 1px solid rgba(62, 207, 154, 0.3);
    box-shadow: 0 10px 28px -18px rgba(62, 207, 154, 0.22);
    color: var(--brand-primary);
}

html[data-theme='dark'] .breakdown-item.highlight span {
    color: var(--brand-primary) !important;
}

html[data-theme='dark'] .sidebar-selected-list li.sidebar-selected-item:hover {
    background: rgba(62, 207, 154, 0.1);
}

html[data-theme='dark'] .sidebar-selected-status--complete {
    color: var(--brand-primary);
}

html[data-theme='dark'] .radio-group label,
html[data-theme='dark'] .checkbox-group label {
    background: rgba(255, 255, 255, 0.065);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.1),
        0 2px 10px rgba(0, 0, 0, 0.25);
}

html[data-theme='dark'] .rec-chip {
    background: rgba(255, 255, 255, 0.07) !important;
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.09),
        0 2px 14px rgba(0, 0, 0, 0.3) !important;
}

html[data-theme='dark'] .rec-chip:hover {
    background: rgba(62, 207, 154, 0.12) !important;
    box-shadow:
        inset 0 0 0 1px rgba(62, 207, 154, 0.22),
        0 8px 20px rgba(0, 0, 0, 0.35) !important;
}

html[data-theme='dark'] .ai-assistant-box {
    border-top-color: var(--border-color);
}

html[data-theme='dark'] .ai-assistant-rule {
    background: rgba(255, 255, 255, 0.045);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
}

html[data-theme='dark'] .ai-coach-commission-estimate {
    background: color-mix(in srgb, rgba(56, 189, 248, 0.15) 85%, transparent);
    color: var(--text-muted-strong, #cbd5e1);
}

html[data-theme='dark'] .ai-coach-steps-title {
    color: var(--text-heading, #f1f5f9);
}

html[data-theme='dark'] .ai-coach-card {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.09);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
}

html[data-theme='dark'] .ai-coach-details {
    background: rgba(0, 0, 0, 0.18);
    border-color: rgba(255, 255, 255, 0.09);
}

html[data-theme='dark'] .ai-coach-details-body {
    border-top-color: rgba(255, 255, 255, 0.08);
}

html[data-theme='dark'] .ai-coach-prio[data-prio='medium'] {
    color: #fcd34d;
    background: rgba(251, 191, 36, 0.12);
}

html[data-theme='dark'] .ai-coach-prio[data-prio='low'] {
    color: #94a3b8;
}

html[data-theme='dark'] .ai-coach-goal-badge[data-goal='commission'] {
    background: rgba(129, 140, 248, 0.12);
    border-color: rgba(129, 140, 248, 0.35);
    color: #c7d2fe;
}

html[data-theme='dark'] .ai-coach-goal-badge[data-goal='recurring'] {
    background: rgba(62, 207, 154, 0.1);
    border-color: rgba(62, 207, 154, 0.28);
    color: #6ee7b7;
}

html[data-theme='dark'] .ai-coach-phrase-text--prominent {
    background: rgba(0, 0, 0, 0.22);
    border-left-color: rgba(62, 207, 154, 0.45);
}

html[data-theme='dark'] .ai-coach-impact-line {
    color: var(--text-heading, #f1f5f9);
}

html[data-theme='dark'] .ai-coach-role-line {
    background: rgba(62, 207, 154, 0.09);
    border-left-color: rgba(62, 207, 154, 0.42);
}

html[data-theme='dark'] .realty-subcategories {
    border: 1px solid var(--border-color);
}

html[data-theme='dark'] .app-sticky-footer {
    background: rgba(22, 19, 15, 0.94);
    backdrop-filter: saturate(140%) blur(16px);
    border-top: 1px solid rgba(199, 163, 90, 0.16);
    box-shadow:
        0 -1px 0 rgba(199, 163, 90, 0.06),
        0 -26px 50px rgba(0, 0, 0, 0.45);
}

html[data-theme='dark'] .app-commission-strip {
    background: rgba(24, 21, 17, 0.96);
    border-top-color: rgba(199, 163, 90, 0.12);
    border-bottom-color: rgba(255, 255, 255, 0.05);
    box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.4);
}

html[data-theme='dark'] .app-commission-chip {
    background: rgba(255, 255, 255, 0.045);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.1),
        0 2px 8px rgba(0, 0, 0, 0.22);
}

html[data-theme='dark'] .app-commission-chip-value {
    color: #5ee9b5;
}

html[data-theme='dark'] .app-version-footnote {
    color: rgba(148, 163, 184, 0.42);
}

html[data-theme='dark'] .btn-sticky:hover {
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
}

html[data-theme='dark'] .btn-sticky-muted {
    background: rgba(255, 255, 255, 0.07);
    color: var(--text-primary) !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

html[data-theme='dark'] .empty-state {
    color: var(--text-muted);
}

html[data-theme='dark'] .client-deal-row:hover {
    background: rgba(199, 163, 90, 0.08);
}

html[data-theme='dark'] .segmented-control {
    background: rgba(255, 255, 255, 0.045);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.09);
}

html[data-theme='dark'] .segmented-option.active span {
    color: #0b0f14;
}

html[data-theme='dark'] .segmented-option.active {
    color: #0b0f14;
}

html[data-theme='dark'] .service-card .form-select,
html[data-theme='dark'] .service-card select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' viewBox='0 0 14 14'%3E%3Cpath stroke='%23aab8c9' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m3.5 5.25 3.5 3.5 3.5-3.5'/%3E%3C/svg%3E");
}

/* ============================================
   CRM – dashboard a sekce
   ============================================ */

.crm-shell {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-md) var(--space-sm) var(--space-xl);
}

.crm-shell.hidden {
    display: none !important;
}

.crm-app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--border-color);
}

body.authenticated.crm-on-dashboard .crm-app-header {
    margin-bottom: var(--space-sm);
    padding-bottom: var(--space-sm);
}

body.authenticated.crm-on-dashboard .crm-shell {
    padding-top: var(--space-sm);
    padding-bottom: var(--space-sm);
}

.crm-app-header-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.12rem;
    min-width: 0;
}

.crm-app-header-title {
    font-family: var(--font-family-display);
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.dio-demo-badge {
    display: none;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(212, 188, 130, 0.92);
    background: rgba(212, 188, 130, 0.1);
    border: 1px solid rgba(212, 188, 130, 0.28);
    line-height: 1.2;
    white-space: nowrap;
}

html[data-app-mode='demo'] .dio-demo-badge {
    display: inline-flex;
}

.dio-demo-badge--login {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

.dio-demo-badge--header {
    margin-top: 0.2rem;
}

html[data-app-mode='demo'] .login-gate-panel {
    position: relative;
}

.crm-app-header-date {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--brand-gold, #c7a35a);
    text-transform: capitalize;
    letter-spacing: 0.02em;
}

.crm-app-header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.crm-app-header-user {
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    color: var(--office-text-secondary);
    white-space: nowrap;
}

.crm-add-wrap {
    position: relative;
}

.crm-btn-add {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font: inherit;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #1a1714;
    background: linear-gradient(135deg, #e8d4a8 0%, #c7a35a 55%, #a8843f 100%);
    border: 1px solid rgba(199, 163, 90, 0.55);
    border-radius: 999px;
    padding: 0.42rem 1rem 0.42rem 0.75rem;
    cursor: pointer;
    box-shadow: 0 2px 12px rgba(199, 163, 90, 0.28);
    transition: transform 0.15s, box-shadow 0.15s, filter 0.15s;
}

.crm-btn-add:hover {
    filter: brightness(1.06);
    box-shadow: 0 4px 16px rgba(199, 163, 90, 0.38);
}

.crm-btn-add-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.15rem;
    height: 1.15rem;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
}

.crm-add-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 120;
    min-width: 220px;
    padding: 0.35rem;
    background: var(--office-glass, rgba(28, 26, 22, 0.96));
    border: 1px solid var(--office-glass-border, rgba(199, 163, 90, 0.22));
    border-radius: 12px;
    box-shadow: var(--office-shadow, 0 12px 40px rgba(0, 0, 0, 0.45));
    backdrop-filter: blur(16px);
}

.crm-add-menu.hidden {
    display: none;
}

.crm-add-menu-item {
    display: block;
    width: 100%;
    text-align: left;
    font: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--office-text-primary, #f4f0e8);
    background: transparent;
    border: none;
    border-radius: 8px;
    padding: 0.65rem 0.85rem;
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
}

.crm-add-menu-item:hover,
.crm-add-menu-item:focus-visible {
    background: rgba(199, 163, 90, 0.14);
    color: var(--office-brand-bright, #e8d4a8);
    outline: none;
}

.crm-add-menu-divider {
    height: 1px;
    margin: 0.3rem 0.5rem;
    background: rgba(199, 163, 90, 0.2);
}

.crm-add-menu-item--accent {
    font-weight: 600;
}

.crm-record-hint {
    margin: 0 0 1rem;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: var(--office-text-muted, #a8a29a);
}

.crm-contract-life-fields {
    margin: 0.25rem 0 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    border: 1px solid rgba(199, 163, 90, 0.22);
    background: rgba(199, 163, 90, 0.06);
}

.crm-contract-life-fields.hidden {
    display: none;
}

.crm-contract-life-intro {
    margin-top: 0;
}

.crm-insured-persons-group {
    margin-top: 0.35rem;
}

.crm-insured-persons-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.crm-insured-persons-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-primary, #f4f0e8);
}

.crm-insured-add-btn {
    padding: 0.25rem 0.65rem;
    font-size: 0.75rem;
}

.crm-insured-persons-hint {
    margin-bottom: 0.5rem;
}

.crm-insured-empty {
    margin: 0 0 0.5rem;
    font-size: 0.75rem;
    color: var(--office-text-muted, #a8a29a);
    font-style: italic;
}

.crm-insured-empty.hidden {
    display: none;
}

.crm-insured-persons-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.crm-insured-person-row {
    padding: 0.55rem 0.65rem;
    border-radius: 8px;
    border: 1px solid rgba(199, 163, 90, 0.2);
    background: rgba(0, 0, 0, 0.15);
}

.crm-insured-person-fields {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 0.9fr) auto;
    gap: 0.4rem;
    align-items: end;
}

.crm-insured-person-fields label {
    display: block;
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--office-text-muted, #a8a29a);
    margin-bottom: 0.2rem;
}

.crm-insured-remove-btn {
    align-self: end;
    padding: 0.35rem 0.5rem;
    font-size: 0.6875rem;
    color: #e57373;
    background: transparent;
    border: 1px solid rgba(229, 115, 115, 0.35);
    border-radius: 6px;
    cursor: pointer;
}

.crm-insured-remove-btn:hover {
    background: rgba(229, 115, 115, 0.12);
}

.crm-client-insured-match {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--brand-gold, #c7a35a);
    line-height: 1.35;
}

@media (max-width: 640px) {
    .crm-insured-person-fields {
        grid-template-columns: 1fr 1fr;
    }

    .crm-insured-remove-btn {
        grid-column: 1 / -1;
        justify-self: start;
    }
}

.crm-contract-amendments-panel {
    margin: 0.75rem 0;
    padding: 0.75rem 0.85rem;
    border-radius: 10px;
    border: 1px solid rgba(199, 163, 90, 0.28);
    background: rgba(199, 163, 90, 0.05);
}

.crm-contract-amendments-panel.hidden {
    display: none;
}

.crm-contract-amendments-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.crm-contract-amendments-title {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary, #f4f0e8);
}

.crm-contract-amendments-block {
    margin-top: 0.65rem;
}

.crm-contract-amendments-subtitle {
    margin: 0 0 0.35rem;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--office-text-muted, #a8a29a);
}

.crm-contract-amendments-list,
.crm-contract-documents-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.crm-contract-amendment-item,
.crm-contract-document-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem 0.65rem;
    padding: 0.45rem 0.55rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.12);
    font-size: 0.75rem;
}

.crm-contract-amendment-item-main {
    flex: 1 1 12rem;
    min-width: 0;
}

.crm-contract-amendment-item strong {
    display: block;
    color: var(--text-primary, #f4f0e8);
    font-weight: 600;
}

.crm-contract-amendment-item span {
    color: var(--office-text-muted, #a8a29a);
}

.crm-dash-panel--insurance {
    margin-top: 0.45rem;
}

.crm-dash-panel--insurance .crm-table-wrap--compact {
    max-height: 6.5rem;
    overflow-y: auto;
}

.crm-insurance-type-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    margin-bottom: 0.35rem;
    color: var(--text-primary, #f4f0e8);
}

.crm-insurance-type-picks {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.crm-insurance-type-pick {
    cursor: pointer;
}

.crm-insurance-type-pick input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.crm-insurance-type-chip {
    display: inline-block;
    padding: 0.35rem 0.65rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 999px;
    border: 1px solid rgba(199, 163, 90, 0.35);
    color: var(--office-text-muted, #a8a29a);
    background: rgba(0, 0, 0, 0.12);
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.crm-insurance-type-pick input:checked + .crm-insurance-type-chip {
    color: var(--brand-gold, #c7a35a);
    border-color: rgba(199, 163, 90, 0.55);
    background: rgba(199, 163, 90, 0.18);
}

.crm-insurance-detail-dl {
    display: grid;
    grid-template-columns: minmax(7rem, 9rem) minmax(0, 1fr);
    gap: 0.35rem 0.75rem;
    margin: 0 0 1rem;
    font-size: 0.8125rem;
}

.crm-insurance-detail-dl dt {
    margin: 0;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--office-label, var(--office-text-muted, #a8a29a));
}

.crm-insurance-detail-dl dd {
    margin: 0;
    font-weight: 600;
    color: var(--text-primary, #f4f0e8);
}

.crm-insurance-close-form {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(199, 163, 90, 0.2);
}

.crm-insurance-close-form.hidden {
    display: none;
}

.crm-insurance-close-title {
    margin: 0 0 0.65rem;
    font-size: 0.9375rem;
    font-weight: 600;
}

.crm-insurance-status--open {
    color: #e8a84a;
    font-weight: 600;
}

.crm-insurance-status--closed {
    color: #7dce9a;
    font-weight: 600;
}

.modal.modal--wide {
    max-width: 36rem;
}

.modal.modal--client-card {
    max-width: 42rem;
    max-height: min(92vh, 52rem);
    display: flex;
    flex-direction: column;
}

.modal.modal--client-card .modal-body {
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.crm-client-card-modal-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.crm-client-card-modal-head h3 {
    margin: 0;
}

.crm-client-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
    margin-bottom: 0.75rem;
    font-size: 0.8125rem;
    color: var(--office-text-muted, #a8a29a);
}

.crm-client-card-meta span strong {
    color: var(--text-primary, #f4f0e8);
    font-weight: 600;
}

.crm-client-card-pills-wrap {
    margin-bottom: 0.85rem;
}

.crm-client-card-pills-wrap .crm-client-pills {
    flex-wrap: wrap;
}

.crm-client-card-section {
    margin-bottom: 0.85rem;
    padding-top: 0.65rem;
    border-top: 1px solid rgba(199, 163, 90, 0.15);
}

.crm-client-card-section-title {
    margin: 0 0 0.4rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--brand-gold, #c7a35a);
}

.crm-client-card-count {
    font-weight: 500;
    color: var(--office-text-muted, #a8a29a);
}

.crm-client-card-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.crm-client-card-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem 0.5rem;
    padding: 0.45rem 0.55rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(0, 0, 0, 0.12);
    font-size: 0.8125rem;
}

.crm-client-card-item-main {
    flex: 1 1 12rem;
    min-width: 0;
}

.crm-client-card-item-main strong {
    display: block;
    color: var(--text-primary, #f4f0e8);
    font-weight: 600;
}

.crm-client-card-item-main span {
    display: block;
    margin-top: 0.15rem;
    color: var(--office-text-muted, #a8a29a);
    font-size: 0.75rem;
    line-height: 1.35;
}

.crm-client-card-item-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.crm-client-card-empty {
    margin: 0;
    font-size: 0.75rem;
    color: var(--office-text-muted, #a8a29a);
    font-style: italic;
}

.crm-client-card-empty.hidden {
    display: none;
}

.crm-client-card-footer {
    flex-wrap: wrap;
    gap: 0.4rem;
}

.crm-client-name-link {
    font: inherit;
    font-weight: 600;
    color: var(--brand-gold, #c7a35a);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    text-align: left;
    text-decoration: underline;
    text-decoration-color: rgba(199, 163, 90, 0.45);
    text-underline-offset: 2px;
}

.crm-client-name-link:hover {
    color: #e8d4a8;
}

.crm-contract-document-item-label {
    font-weight: 500;
    color: var(--text-primary, #f4f0e8);
}

.crm-contract-file-input {
    padding: 0.45rem 0.5rem;
    font-size: 0.8125rem;
}

.crm-contract-file-name {
    margin: 0.35rem 0 0;
    font-size: 0.8125rem;
    color: var(--office-brand-bright, #e8d4a8);
}

.crm-contract-file-name.hidden {
    display: none;
}

.crm-optional-label {
    font-weight: 400;
    font-size: 0.75rem;
    color: var(--office-text-muted, #a8a29a);
    text-transform: none;
    letter-spacing: 0;
}

.crm-form-error {
    margin: 0.5rem 0 0;
    font-size: 0.8125rem;
    color: #e57373;
}

.crm-form-error.hidden {
    display: none;
}

.crm-btn-ghost {
    font: inherit;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    padding: 0.4rem 1rem;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.crm-btn-ghost:hover {
    color: var(--text-primary);
    border-color: var(--brand-gold-border);
    background: var(--brand-gold-soft);
}

.crm-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--space-md);
}

.crm-tile {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    padding: var(--space-lg);
    font-family: var(--font-family-display);
    font-size: 1.05rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    color: var(--text-primary);
    text-align: center;
    background:
        radial-gradient(100% 70% at 50% 0%, rgba(199, 163, 90, 0.06) 0%, transparent 60%),
        linear-gradient(160deg, rgba(38, 34, 28, 0.92) 0%, rgba(26, 23, 19, 0.96) 100%);
    border: 1px solid rgba(199, 163, 90, 0.14);
    border-radius: var(--radius-card);
    box-shadow: 0 8px 32px rgba(20, 16, 10, 0.28);
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.crm-tile:hover {
    transform: translateY(-2px);
    border-color: var(--brand-gold-border);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(199, 163, 90, 0.08);
}

.crm-tile--accent {
    border-color: rgba(199, 163, 90, 0.32);
    background:
        radial-gradient(100% 80% at 50% 0%, rgba(199, 163, 90, 0.14) 0%, transparent 62%),
        linear-gradient(160deg, rgba(48, 42, 32, 0.95) 0%, rgba(28, 25, 20, 0.98) 100%);
    box-shadow: 0 8px 36px rgba(199, 163, 90, 0.08);
}

.crm-section {
    display: none !important;
}

.crm-section.is-active {
    display: block !important;
}

/* Přepínání dashboard ↔ celá sekce (kalkulačka, klienti, …) */
body.crm-on-dashboard #crmDashboard {
    display: flex !important;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow: hidden;
}

body.crm-on-dashboard .crm-section {
    display: none !important;
}

body.crm-on-section #crmDashboard {
    display: none !important;
}

body.crm-on-section .crm-section {
    display: none !important;
}

body.crm-on-section .crm-section.is-active {
    display: block !important;
}

body.crm-on-section .crm-section.is-active {
    min-height: calc(100dvh - 4rem);
}

.crm-section-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.crm-section-title {
    font-family: var(--font-family-display);
    font-size: 1.75rem;
    font-weight: 600;
    letter-spacing: -0.025em;
    color: var(--text-primary);
}

.crm-btn-back {
    font: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--brand-gold);
    background: transparent;
    border: none;
    padding: 0.5rem 0;
    cursor: pointer;
    transition: opacity 0.15s;
}

.crm-btn-back:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.crm-section-placeholder {
    color: var(--text-secondary);
    font-size: 1rem;
    max-width: 36rem;
    line-height: 1.6;
}

.crm-section--calc .crm-section-top--calc {
    margin-bottom: var(--space-md);
}

.crm-section-calc-wrap {
    margin-top: 0;
}

.crm-section--calc .container.app-shell {
    max-width: 1460px;
}

body.authenticated.crm-on-dashboard {
    padding-bottom: 0;
    overflow-x: hidden;
    height: 100dvh;
    overflow-y: hidden;
}

body.authenticated.crm-on-dashboard .crm-shell {
    display: flex;
    flex-direction: column;
    height: calc(100dvh - 2 * var(--space-sm));
    max-height: calc(100dvh - 2 * var(--space-sm));
    overflow: hidden;
}

body.authenticated.crm-on-dashboard .crm-app-header {
    flex-shrink: 0;
}

body.authenticated.crm-on-section:not(.crm-on-kalkulacka) {
    padding-bottom: var(--space-lg);
}

@media (min-width: 720px) {
    .crm-dashboard-grid:not(.crm-dashboard-grid--compact) {
        grid-template-columns: repeat(3, 1fr);
    }

    .crm-tile:not(.crm-tile--compact) {
        min-height: 140px;
        font-size: 1.125rem;
    }
}

/* CRM – pozadí podle globálního denního / nočního režimu */
body.authenticated.crm-on-dashboard,
body.authenticated.crm-on-section:not(.crm-on-kalkulacka) {
    background-color: var(--office-bg-deep);
    background-image: var(--office-canvas);
    background-attachment: fixed;
    color: var(--office-text);
}

body.authenticated.crm-on-dashboard .crm-shell,
body.authenticated.crm-on-section:not(.crm-on-kalkulacka) .crm-shell {
    background: transparent;
}

body.authenticated.crm-on-dashboard .crm-app-header,
body.authenticated.crm-on-section:not(.crm-on-kalkulacka) .crm-app-header {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

body.authenticated.crm-on-dashboard .crm-app-header-title,
body.authenticated.crm-on-section:not(.crm-on-kalkulacka) .crm-app-header-title {
    font-weight: 600;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #ffffff 0%, #f0e8d0 50%, #d4bc82 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

body.authenticated.crm-on-dashboard .crm-section-title,
body.authenticated.crm-on-section:not(.crm-on-kalkulacka) .crm-section-title {
    color: var(--office-text);
}

body.authenticated.crm-on-dashboard .crm-app-header-user,
body.authenticated.crm-on-section:not(.crm-on-kalkulacka) .crm-app-header-user,
body.authenticated.crm-on-dashboard .crm-section-placeholder,
body.authenticated.crm-on-section:not(.crm-on-kalkulacka) .crm-section-placeholder {
    color: var(--office-text-secondary);
}

body.authenticated.crm-on-dashboard .crm-btn-ghost,
body.authenticated.crm-on-section:not(.crm-on-kalkulacka) .crm-btn-ghost,
body.authenticated.crm-on-dashboard .crm-btn-back,
body.authenticated.crm-on-section:not(.crm-on-kalkulacka) .crm-btn-back {
    color: var(--office-brand);
    border-color: var(--office-brand-border);
}

body.authenticated.crm-on-dashboard .crm-btn-ghost:hover,
body.authenticated.crm-on-section:not(.crm-on-kalkulacka) .crm-btn-ghost:hover {
    color: var(--office-text);
    background: var(--office-brand-soft);
    border-color: var(--office-brand-border);
}

html[data-theme='light'] body.authenticated.crm-on-dashboard .crm-app-header-title,
html[data-theme='light'] body.authenticated.crm-on-section:not(.crm-on-kalkulacka) .crm-app-header-title {
    background: linear-gradient(135deg, #1a1714 0%, #5c4720 45%, #8a7348 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

html[data-theme='light'] .login-gate-brand {
    background: linear-gradient(135deg, #1a1714 0%, #5c4720 45%, #8a7348 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

html[data-theme='light'] .login-gate-eyebrow {
    color: var(--office-brand);
}

html[data-theme='light'] .login-gate-tagline,
html[data-theme='light'] .login-gate-hint,
html[data-theme='light'] .login-gate-overlay .form-group label {
    color: var(--office-text-secondary);
}

html[data-theme='light'] .login-gate-overlay .form-input {
    border-color: rgba(0, 0, 0, 0.12) !important;
    background: rgba(0, 0, 0, 0.03) !important;
    color: var(--office-text) !important;
}

html[data-theme='light'] .login-gate-overlay .form-input:hover {
    border-color: rgba(138, 115, 72, 0.35) !important;
    background: rgba(0, 0, 0, 0.04) !important;
}

html[data-theme='light'] .login-gate-overlay .form-input:focus {
    border-color: rgba(138, 115, 72, 0.5) !important;
    box-shadow:
        inset 0 1px 2px rgba(0, 0, 0, 0.06),
        0 0 0 3px rgba(138, 115, 72, 0.15) !important;
}

html[data-theme='light'] .login-gate-overlay .btn-primary {
    background: linear-gradient(135deg, #f5ecd8 0%, #c9a962 42%, #8a7348 100%);
    color: #1d1d1f;
    border-color: rgba(0, 0, 0, 0.08);
}

/* ============================================
   Kalkulačka – společné + tmavý / denní režim
   ============================================ */

body.authenticated.crm-on-kalkulacka {
    padding: var(--space-sm);
}

body.crm-on-kalkulacka .crm-section-top--calc {
    max-width: 1460px;
    margin: 0 auto var(--space-md);
    padding: 0 var(--space-xs);
}

body.crm-on-kalkulacka .crm-section-top--calc .crm-section-title {
    font-family: var(--font-family-display);
    font-weight: 600;
    letter-spacing: -0.02em;
}

body.crm-on-kalkulacka .crm-section-top--calc .crm-btn-back {
    font-weight: 500;
}

body.crm-on-kalkulacka .service-selector h2 {
    font-family: var(--font-family-display);
    font-weight: 600;
    letter-spacing: -0.02em;
}

body.crm-on-kalkulacka .service-card h2 {
    font-family: var(--font-family-display);
    font-weight: 600;
    letter-spacing: -0.015em;
}

body.crm-on-kalkulacka .service-card-header-commission {
    font-family: var(--font-family-display);
    font-weight: 600;
}

/* —— Kalkulačka · tmavý režim (výchozí) —— */
html[data-theme='dark'] body.authenticated.crm-on-kalkulacka {
    background-color: var(--office-bg-deep);
    background-image: var(--office-canvas);
    background-attachment: fixed;
    color: #f4f0e8;
}

html[data-theme='dark'] body.crm-on-kalkulacka .crm-section-top--calc .crm-section-title {
    color: #f4f0e8;
}

html[data-theme='dark'] body.crm-on-kalkulacka .service-nav,
html[data-theme='dark'] body.crm-on-kalkulacka .service-selector,
html[data-theme='dark'] body.crm-on-kalkulacka .workspace-client-panel {
    background:
        radial-gradient(100% 70% at 50% 0%, rgba(199, 163, 90, 0.04) 0%, transparent 55%),
        linear-gradient(160deg, rgba(38, 34, 28, 0.88) 0%, rgba(26, 23, 19, 0.94) 100%);
    border: 1px solid rgba(199, 163, 90, 0.12);
    box-shadow: 0 8px 32px rgba(20, 16, 10, 0.28);
}

html[data-theme='dark'] body.crm-on-kalkulacka .service-card-header-commission {
    color: var(--accent-metric, #e5c88a);
}

html[data-theme='dark'] body.crm-on-kalkulacka .workspace-select,
html[data-theme='dark'] body.crm-on-kalkulacka .workspace-input {
    border-radius: 8px;
    border: 1px solid rgba(199, 163, 90, 0.18) !important;
    background: rgba(0, 0, 0, 0.2) !important;
    color: #f4f0e8 !important;
}

html[data-theme='dark'] body.crm-on-kalkulacka .workspace-pill-toggle-face {
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

html[data-theme='dark'] body.crm-on-kalkulacka .app-version-footnote {
    color: rgba(199, 163, 90, 0.45);
}

/* —— Kalkulačka · denní režim (světlý, bílý) —— */
html[data-theme='light'] body.authenticated.crm-on-kalkulacka {
    --brand-primary: #9a7b3c;
    --brand-primary-hover: #826832;
    --accent-metric: #7a6428;
    --bg-main: #f7f6f3;
    --bg-card: #ffffff;
    --bg-card-elevated: #ffffff;
    --text-primary: #1c1917;
    --text-secondary: #57534e;
    --text-muted: #a8a29e;
    --border-color: #e7e5e0;
    --card-border-color: rgba(28, 25, 23, 0.08);
    --service-active-bg: rgba(199, 163, 90, 0.12);
    --service-active-border: rgba(199, 163, 90, 0.28);
    --service-active-text: #7a6428;

    background-color: #f7f6f3;
    background-image:
        radial-gradient(ellipse 100% 70% at 50% -8%, rgba(199, 163, 90, 0.09) 0%, transparent 55%),
        linear-gradient(180deg, #ffffff 0%, #f7f6f3 45%, #f3f1ec 100%);
    background-attachment: fixed;
    color: #1c1917;
}

html[data-theme='light'] body.crm-on-kalkulacka .crm-section-top--calc .crm-section-title {
    color: #1c1917;
}

html[data-theme='light'] body.crm-on-kalkulacka .crm-section-top--calc .crm-btn-back {
    color: #9a7b3c;
}

html[data-theme='light'] body.crm-on-kalkulacka .workspace-header-card {
    background:
        radial-gradient(120% 90% at 8% 0%, rgba(199, 163, 90, 0.12) 0%, transparent 50%),
        linear-gradient(155deg, #ffffff 0%, #faf9f7 55%, #f5f3ef 100%);
    border: 1px solid rgba(199, 163, 90, 0.22);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.9) inset,
        0 12px 40px -16px rgba(28, 25, 23, 0.12);
}

html[data-theme='light'] body.crm-on-kalkulacka .workspace-brand-title {
    color: #1c1917;
}

html[data-theme='light'] body.crm-on-kalkulacka .workspace-header-session {
    background: rgba(199, 163, 90, 0.08);
    box-shadow: inset 0 0 0 1px rgba(199, 163, 90, 0.15);
}

html[data-theme='light'] body.crm-on-kalkulacka .workspace-session-user {
    color: #44403c;
}

html[data-theme='light'] body.crm-on-kalkulacka .workspace-select,
html[data-theme='light'] body.crm-on-kalkulacka .workspace-input {
    border-radius: 8px;
    border: 1px solid #e7e5e0 !important;
    background: #ffffff !important;
    color: #1c1917 !important;
    box-shadow: 0 1px 2px rgba(28, 25, 23, 0.04);
}

html[data-theme='light'] body.crm-on-kalkulacka .workspace-field label {
    color: #78716c;
}

html[data-theme='light'] body.crm-on-kalkulacka .service-nav,
html[data-theme='light'] body.crm-on-kalkulacka .service-selector,
html[data-theme='light'] body.crm-on-kalkulacka .workspace-client-panel {
    background: #ffffff;
    border: 1px solid #e7e5e0;
    box-shadow: 0 4px 24px rgba(28, 25, 23, 0.06);
}

html[data-theme='light'] body.crm-on-kalkulacka .service-card {
    background: linear-gradient(180deg, #ffffff 0%, #fcfbfa 96%);
    border-color: rgba(28, 25, 23, 0.08);
    color: #1c1917;
    box-shadow:
        0 1px 3px rgba(28, 25, 23, 0.04),
        0 16px 40px -24px rgba(28, 25, 23, 0.1);
}

html[data-theme='light'] body.crm-on-kalkulacka .service-card.collapsed {
    background: linear-gradient(180deg, #ffffff 0%, #f5f4f1 96%);
}

html[data-theme='light'] body.crm-on-kalkulacka .service-card:not(.collapsed) {
    background: #ffffff;
    border-color: rgba(199, 163, 90, 0.2);
    box-shadow:
        0 4px 12px rgba(28, 25, 23, 0.06),
        0 24px 48px -28px rgba(28, 25, 23, 0.12);
}

html[data-theme='light'] body.crm-on-kalkulacka .service-card:not(.collapsed) .service-card-header {
    background: linear-gradient(180deg, #faf9f7 0%, #ffffff 100%);
    border-bottom: 1px solid #e7e5e0;
}

html[data-theme='light'] body.crm-on-kalkulacka .service-card-header-commission {
    color: #9a7b3c;
}

html[data-theme='light'] body.crm-on-kalkulacka .total-commission {
    background:
        radial-gradient(100% 80% at 50% 0%, rgba(199, 163, 90, 0.08) 0%, transparent 60%),
        #ffffff;
    border: 1px solid rgba(199, 163, 90, 0.2);
    box-shadow: 0 8px 28px rgba(28, 25, 23, 0.06);
    color: #1c1917;
}

html[data-theme='light'] body.crm-on-kalkulacka .total-commission .value {
    color: #9a7b3c;
}

html[data-theme='light'] body.crm-on-kalkulacka .app-sticky-footer {
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: saturate(140%) blur(14px);
    border-top: 1px solid #e7e5e0;
    box-shadow: 0 -12px 40px rgba(28, 25, 23, 0.06);
}

html[data-theme='light'] body.crm-on-kalkulacka .app-sticky-footer-value {
    color: #9a7b3c;
}

html[data-theme='light'] body.crm-on-kalkulacka .app-commission-strip {
    background: rgba(255, 255, 255, 0.96);
    border-color: #e7e5e0;
}

html[data-theme='light'] body.crm-on-kalkulacka .btn-primary {
    background: linear-gradient(135deg, #d4b06a 0%, #c7a35a 45%, #b8924a 100%);
    color: #14120f;
    border: 1px solid rgba(154, 123, 60, 0.35);
}

html[data-theme='light'] body.crm-on-kalkulacka .btn-secondary {
    background: #f5f4f1;
    color: #57534e;
    border-color: #e7e5e0;
}

html[data-theme='light'] body.crm-on-kalkulacka .service-nav-item {
    background: #f5f4f1;
    color: #78716c;
}

html[data-theme='light'] body.crm-on-kalkulacka .service-nav-item.active {
    background: rgba(199, 163, 90, 0.14);
    color: #7a6428;
}

html[data-theme='light'] body.crm-on-kalkulacka .workspace-pill-toggle-face {
    border: 1px solid #e7e5e0;
    background: #ffffff;
    color: #57534e;
}

html[data-theme='light'] body.crm-on-kalkulacka .app-version-footnote {
    color: rgba(120, 113, 108, 0.55);
}

html[data-theme='light'] body.crm-on-kalkulacka .workspace-client-panel-title {
    color: #9a7b3c;
}

html[data-theme='light'] body.crm-on-kalkulacka .service-card .form-input,
html[data-theme='light'] body.crm-on-kalkulacka .service-card .form-select,
html[data-theme='light'] body.crm-on-kalkulacka .service-card input[type='number'],
html[data-theme='light'] body.crm-on-kalkulacka .service-card input[type='text'] {
    background: #faf9f7 !important;
    border: 1px solid #e7e5e0 !important;
    border-radius: 8px !important;
    padding: 0.5rem 0.65rem !important;
    box-shadow: none;
}

html[data-theme='light'] body.crm-on-kalkulacka .service-result {
    background: #faf9f7;
    border: 1px solid #e7e5e0;
    border-radius: var(--radius-md);
}

html[data-theme='light'] body.crm-on-kalkulacka .service-result.finance-total {
    background:
        radial-gradient(100% 80% at 50% 0%, rgba(199, 163, 90, 0.1) 0%, transparent 60%),
        #ffffff;
    border-color: rgba(199, 163, 90, 0.25);
}

/* ============================================
   CRM – dashboard statistiky, tabulky, moduly
   ============================================ */

/* Dashboard – sticky navigace + obchody, scrollovatelné výročí/úkoly */
.crm-dashboard {
    display: flex;
    flex-direction: column;
    min-height: calc(100dvh - 4.25rem);
    max-height: calc(100dvh - 4.25rem);
    overflow: hidden;
    position: relative;
    z-index: 1;
}

body.crm-on-dashboard .crm-dashboard {
    min-height: 0;
    max-height: none;
    flex: 1 1 auto;
}

.crm-dashboard-main {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.crm-dashboard-pin {
    z-index: 40;
    background: var(--office-pin-bg);
    backdrop-filter: blur(20px) saturate(1.15);
    -webkit-backdrop-filter: blur(20px) saturate(1.15);
}

body.authenticated.crm-on-dashboard .crm-dashboard-pin {
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}

.crm-dashboard-pin--top {
    position: sticky;
    top: 0;
    padding-bottom: 0.35rem;
    margin: 0 calc(-1 * var(--space-sm));
    padding-left: var(--space-sm);
    padding-right: var(--space-sm);
    border-bottom: 1px solid rgba(199, 163, 90, 0.14);
}

.crm-dashboard-today-date {
    display: block;
    margin: 0 0 0.4rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--brand-gold, #c7a35a);
    text-transform: capitalize;
    letter-spacing: 0.03em;
}

/* Spodní lišta – výdělek vždy viditelná (sticky, ne fixed) */
.crm-dashboard-earnings {
    flex-shrink: 0;
    z-index: 45;
    padding: 0.5rem var(--space-sm) calc(0.55rem + env(safe-area-inset-bottom, 0px));
    background: var(--office-pin-bg);
    border-top: 1px solid var(--office-brand-border);
    backdrop-filter: blur(24px) saturate(1.2);
    -webkit-backdrop-filter: blur(24px) saturate(1.2);
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.35);
}

.crm-earnings-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

body.authenticated.crm-on-dashboard .crm-shell {
    position: relative;
}

.crm-quick-nav {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0.35rem;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.crm-dashboard-scroll {
    padding-top: 0.5rem;
    padding-bottom: 0.85rem;
}

.crm-dashboard-hero {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.crm-dashboard-hero-lead {
    margin: 0 0 0.25rem;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--brand-gold);
}

/* Výročí + Úkoly vždy vedle sebe (2 sloupce) */
.crm-dashboard-panels.crm-dashboard-panels--hero {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.65rem;
    margin-top: 0;
    align-items: stretch;
}

.crm-dash-panel--opps {
    margin-top: 0.45rem;
    padding: 0.45rem 0.55rem;
}

.crm-dash-panel--services-breakdown {
    margin-top: 0.45rem;
    padding: 0.5rem 0.55rem 0.55rem;
}

.crm-dash-panel-head--services {
    flex-wrap: wrap;
    gap: 0.35rem 0.5rem;
    align-items: center;
}

.crm-services-view-toggle {
    display: inline-flex;
    align-items: stretch;
    gap: 0;
    margin-left: auto;
    padding: 2px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(199, 163, 90, 0.2);
}

.crm-services-view-btn {
    padding: 0.2rem 0.55rem;
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted, #a8a29a);
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: color 0.15s, background 0.15s;
}

.crm-services-view-btn.is-active {
    color: var(--brand-gold, #c7a35a);
    background: rgba(199, 163, 90, 0.18);
}

.crm-services-breakdown-table-wrap {
    margin-top: 0.15rem;
}

.crm-services-breakdown-table .crm-services-swatch {
    display: inline-block;
    width: 0.65rem;
    height: 0.65rem;
    border-radius: 50%;
    margin-right: 0.4rem;
    vertical-align: middle;
    flex-shrink: 0;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.crm-services-breakdown-chart-wrap {
    display: grid;
    grid-template-columns: minmax(5.5rem, 6.5rem) minmax(0, 1fr);
    gap: 0.65rem;
    align-items: center;
    margin-top: 0.25rem;
}

.crm-services-pie-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
}

.crm-services-pie {
    width: 5.75rem;
    height: 5.75rem;
    border-radius: 50%;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 4px 16px rgba(0, 0, 0, 0.35);
}

.crm-services-legend {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.crm-services-legend li {
    display: grid;
    grid-template-columns: 0.5rem minmax(0, 1fr) auto;
    gap: 0.35rem;
    align-items: center;
    font-size: 0.6875rem;
    line-height: 1.3;
}

.crm-services-legend-swatch {
    width: 0.65rem;
    height: 0.65rem;
    border-radius: 50%;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.crm-services-legend-label {
    color: var(--text-primary, #f5f0e8);
    font-weight: 600;
}

.crm-services-legend-meta {
    color: var(--text-muted, #a8a29a);
    font-size: 0.625rem;
    white-space: nowrap;
}

.crm-dash-panel--services-breakdown.crm-dash-panel--empty .crm-services-breakdown-table-wrap,
.crm-dash-panel--services-breakdown.crm-dash-panel--empty .crm-services-breakdown-chart-wrap {
    display: none;
}

.crm-dash-panel--analytics {
    margin-top: 0.55rem;
    padding: 0.65rem 0.7rem 0.75rem;
}

.crm-analytics-root {
    margin-top: 0.35rem;
}

.crm-analytics-layout {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.crm-analytics-kpis {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.55rem;
}

.crm-analytics-kpi {
    padding: 0.75rem 0.85rem;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(199, 163, 90, 0.18);
    text-align: center;
}

.crm-analytics-kpi-value {
    display: block;
    font-family: var(--font-display, 'Outfit', sans-serif);
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--brand-gold-bright, #e8d4a8);
    line-height: 1.2;
}

.crm-analytics-kpi-label {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-muted, #a8a29a);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.crm-analytics-main {
    display: grid;
    grid-template-columns: 1.35fr 0.85fr;
    gap: 0.85rem;
    align-items: start;
}

.crm-analytics-subtitle {
    margin: 0 0 0.55rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--brand-gold, #c7a35a);
}

.crm-analytics-service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
    gap: 0.5rem;
}

.crm-analytics-service-card {
    padding: 0.65rem 0.7rem;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-top: 2px solid color-mix(in srgb, var(--svc-accent, #d4bc82) 55%, transparent);
}

.crm-analytics-service-top {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 0.45rem;
}

.crm-analytics-service-meta {
    min-width: 0;
    flex: 1;
}

.crm-analytics-service-name {
    margin: 0 0 0.15rem;
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--text-primary, #f5f0e8);
    line-height: 1.25;
}

.crm-analytics-service-count {
    margin: 0;
    font-size: 0.68rem;
    color: var(--text-muted, #a8a29a);
}

.crm-analytics-service-count strong {
    color: var(--text-primary, #f5f0e8);
    font-size: 0.9rem;
}

.crm-analytics-ring {
    flex-shrink: 0;
    display: block;
}

.crm-analytics-ring-track {
    stroke: rgba(255, 255, 255, 0.1);
}

.crm-analytics-ring-fill {
    transition: stroke-dashoffset 0.45s ease;
}

.crm-analytics-ring-value {
    fill: var(--text-primary, #f5f0e8);
    font-size: 11px;
    font-weight: 700;
    font-family: var(--font-family-display, 'Outfit', sans-serif);
}

.crm-analytics-ring-unit {
    fill: var(--text-muted, #a8a29a);
    font-size: 7px;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.crm-analytics-ring--gap .crm-analytics-ring-value {
    fill: #f0a8a0;
    font-size: 10px;
}

.crm-analytics-bar {
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.crm-analytics-bar-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(
        90deg,
        color-mix(in srgb, var(--svc-accent, #d4bc82) 45%, transparent),
        var(--svc-accent, #d4bc82)
    );
}

.crm-analytics-stack-wrap {
    margin-bottom: 0.55rem;
}

.crm-analytics-stack {
    display: flex;
    width: 100%;
    height: 10px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.06);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.crm-analytics-stack-seg {
    display: block;
    height: 100%;
    min-width: 2px;
    transition: width 0.4s ease;
}

.crm-analytics-stack-seg:first-child {
    border-radius: 999px 0 0 999px;
}

.crm-analytics-stack-seg:last-child {
    border-radius: 0 999px 999px 0;
}

.crm-analytics-stack-legend {
    list-style: none;
    margin: 0.35rem 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.65rem;
}

.crm-analytics-stack-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.62rem;
    color: var(--text-muted, #a8a29a);
}

.crm-analytics-stack-swatch {
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 2px;
    flex-shrink: 0;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.crm-analytics-stack-legend-label {
    font-weight: 600;
    color: var(--text-secondary, #d6d0c4);
}

.crm-analytics-stack-legend-meta {
    font-weight: 700;
    color: var(--text-primary, #f5f0e8);
}

.crm-analytics-dist-list {
    list-style: none;
    margin: 0;
    padding: 0.55rem 0.65rem;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.crm-analytics-dist-row {
    display: grid;
    grid-template-columns: 6.5rem minmax(0, 1fr) 4.5rem;
    gap: 0.45rem;
    align-items: center;
    font-size: 0.7rem;
}

.crm-analytics-dist-label {
    color: var(--text-secondary, #d6d0c4);
    font-weight: 600;
}

.crm-analytics-dist-bar-wrap {
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

.crm-analytics-dist-bar {
    display: block;
    height: 100%;
    border-radius: inherit;
    min-width: 2px;
    transition: width 0.35s ease;
}

.crm-analytics-dist-meta {
    text-align: right;
    color: var(--text-muted, #a8a29a);
    font-size: 0.65rem;
    white-space: nowrap;
}

.crm-analytics-potential {
    padding: 0.65rem 0.7rem;
    border-radius: 14px;
    background:
        radial-gradient(ellipse 80% 60% at 0% 0%, rgba(199, 163, 90, 0.1) 0%, transparent 55%),
        rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(199, 163, 90, 0.22);
}

.crm-analytics-potential-lead {
    margin: 0 0 0.55rem;
    font-size: 0.75rem;
    color: var(--text-muted, #a8a29a);
}

.crm-analytics-potential-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.crm-analytics-potential-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) 0.35rem;
    gap: 0.55rem;
    align-items: center;
    padding: 0.5rem 0.55rem;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.03);
    border-left: 2px solid color-mix(in srgb, var(--svc-accent, #d4bc82) 50%, transparent);
}

.crm-analytics-potential-body {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.crm-analytics-potential-name {
    font-size: 0.78rem;
    color: var(--text-primary, #f5f0e8);
}

.crm-analytics-potential-detail {
    font-size: 0.68rem;
    color: var(--text-muted, #a8a29a);
}

.crm-analytics-potential-bar-wrap {
    height: 5px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.crm-analytics-potential-bar {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, rgba(224, 122, 106, 0.45), rgba(224, 122, 106, 0.9));
    min-width: 2px;
    transition: width 0.4s ease;
}

.crm-analytics-potential-swatch {
    display: block;
    width: 0.35rem;
    height: 2rem;
    border-radius: 999px;
    opacity: 0.85;
    box-shadow: 0 0 8px color-mix(in srgb, var(--svc-accent, #d4bc82) 40%, transparent);
}

.crm-dash-panel--analytics.crm-dash-panel--empty .crm-analytics-root {
    display: none;
}

html[data-theme='light'] .crm-analytics-ring-track {
    stroke: rgba(0, 0, 0, 0.08);
}

html[data-theme='light'] .crm-analytics-service-card,
html[data-theme='light'] .crm-analytics-potential-row {
    background: rgba(255, 255, 255, 0.45);
    border-color: rgba(120, 95, 55, 0.1);
}

html[data-theme='light'] .crm-analytics-stack {
    background: rgba(0, 0, 0, 0.05);
}

@media (max-width: 900px) {
    .crm-analytics-kpis {
        grid-template-columns: 1fr;
    }

    .crm-analytics-main {
        grid-template-columns: 1fr;
    }

    .crm-analytics-dist-row {
        grid-template-columns: 5rem minmax(0, 1fr) 3.5rem;
    }
}

.crm-dash-panel--opps .crm-table-wrap--opps {
    max-height: 5.5rem;
    overflow-y: auto;
}

.crm-dash-panel--opps .crm-dash-panel-empty {
    margin: 0.25rem 0 0;
    font-size: 0.68rem;
}

.crm-dash-panel--hero {
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 0.55rem 0.65rem;
}

.crm-dash-panel--anniv {
    min-height: 13.5rem;
}

.crm-dash-panel-title--hero {
    font-size: 0.9375rem;
    font-weight: 600;
}

.crm-dash-panel--hero .crm-dash-panel-head {
    margin-bottom: 0.25rem;
}

.crm-dash-panel--hero .crm-dash-panel-hint {
    margin-bottom: 0.35rem;
    font-size: 0.6875rem;
    line-height: 1.4;
    min-height: 1.9em;
}

.crm-dash-panel--hero .crm-table-wrap--compact {
    max-height: 7.5rem;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.crm-dash-panel--anniv .crm-table-wrap--compact {
    min-height: 10.75rem;
    max-height: 11.5rem;
}

.crm-dash-panel--hero .crm-data-table--compact th,
.crm-dash-panel--hero .crm-data-table--compact td {
    padding: 0.38rem 0.5rem;
    font-size: 0.75rem;
    line-height: 1.35;
    vertical-align: middle;
}

.crm-dash-panel--anniv .crm-data-table--compact th,
.crm-dash-panel--anniv .crm-data-table--compact td {
    padding: 0.42rem 0.5rem;
    font-size: 0.78125rem;
}

.crm-dash-panel--hero .crm-data-table--compact th {
    font-size: 0.625rem;
    padding-top: 0.35rem;
    padding-bottom: 0.35rem;
}

.crm-dash-panel--hero .crm-dash-panel-more {
    font-size: 0.6875rem;
}

.crm-data-table--compact .crm-row--placeholder td {
    color: rgba(168, 162, 158, 0.35);
}

html[data-theme='light'] .crm-data-table--compact .crm-row--placeholder td {
    color: rgba(120, 113, 108, 0.35);
}

.crm-quick-nav-btn {
    flex: 1 1 0;
    min-width: 0;
    min-height: 2.125rem;
    max-height: 2.25rem;
    padding: 0.35rem 0.4rem;
    font-family: var(--font-family);
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.01em;
    color: #d6d3d1;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: rgba(199, 163, 90, 0.06);
    border: 1px solid rgba(199, 163, 90, 0.14);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    box-shadow: none;
}

@media (min-width: 900px) {
    .crm-quick-nav-btn {
        font-size: 0.75rem;
        padding: 0.4rem 0.5rem;
    }
}

.crm-quick-nav-btn:hover {
    color: #f4f0e8;
    border-color: rgba(199, 163, 90, 0.32);
    background: rgba(199, 163, 90, 0.12);
    transform: none;
}

.crm-quick-nav-btn--accent {
    color: var(--brand-gold-bright);
    border-color: rgba(212, 188, 130, 0.28);
    background: rgba(212, 188, 130, 0.1);
}

body.authenticated.crm-on-dashboard .crm-quick-nav-btn {
    box-shadow: none;
}

body.authenticated.crm-on-dashboard .crm-quick-nav-btn:hover {
    box-shadow: none;
    transform: none;
}

.crm-stat-mini {
    padding: 0.55rem 0.65rem;
    border-radius: 10px;
    border: 1px solid var(--office-glass-border);
    background: var(--office-glass);
    box-shadow: var(--office-shadow);
}

.crm-stat-mini--earnings {
    border-color: var(--office-brand-border);
    background: var(--office-earnings-bg);
    box-shadow: var(--office-shadow), var(--office-glow);
}

.crm-stat-mini-label {
    display: block;
    font-size: 0.58rem;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--office-text-muted);
    margin-bottom: 0.2rem;
    line-height: 1.2;
}

.crm-stat-mini-value {
    font-family: var(--font-family-display);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--office-brand-bright);
    line-height: 1.1;
}

.crm-stat-mini--earnings .crm-stat-mini-value {
    font-size: 1.35rem;
}

.crm-stat-mini-value--btn {
    font: inherit;
    color: inherit;
    background: none;
    border: none;
    padding: 0;
    cursor: help;
    text-align: left;
    border-bottom: 1px dashed rgba(199, 163, 90, 0.4);
}


.crm-dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-md);
}

.crm-stat-card {
    padding: var(--space-lg);
    border-radius: var(--radius-card);
    border: 1px solid rgba(199, 163, 90, 0.16);
    background:
        radial-gradient(100% 80% at 50% 0%, rgba(199, 163, 90, 0.08) 0%, transparent 58%),
        linear-gradient(160deg, rgba(38, 34, 28, 0.92) 0%, rgba(26, 23, 19, 0.96) 100%);
    box-shadow: 0 8px 28px rgba(20, 16, 10, 0.28);
}

.crm-stat-label {
    display: block;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #a8a29a;
    margin-bottom: 0.35rem;
}

.crm-stat-value {
    font-family: var(--font-family-display);
    font-size: 1.85rem;
    font-weight: 600;
    letter-spacing: -0.03em;
    color: #e5c88a;
    line-height: 1.1;
}

.crm-stat-value--btn {
    font: inherit;
    color: inherit;
    background: none;
    border: none;
    padding: 0;
    cursor: help;
    text-align: left;
    border-bottom: 1px dashed rgba(199, 163, 90, 0.45);
}

.crm-stat-earnings-wrap {
    position: relative;
}

.crm-earnings-popover {
    position: absolute;
    left: 0;
    top: calc(100% + 0.5rem);
    z-index: 200;
    min-width: 240px;
    max-width: 320px;
    padding: var(--space-md);
    border-radius: 12px;
    border: 1px solid rgba(199, 163, 90, 0.28);
    background: linear-gradient(160deg, #2a2520 0%, #1a1714 100%);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
}

.crm-earnings-popover.hidden {
    display: none !important;
}

.crm-earnings-popover--up {
    top: auto;
    bottom: calc(100% + 0.5rem);
}

.crm-earnings-popover h4 {
    margin: 0 0 0.5rem;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #c7a35a;
}

.crm-earnings-popover ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.crm-earnings-popover li {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 0.8125rem;
    padding: 0.28rem 0;
    color: #d6d3d1;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.crm-earnings-popover li:last-child {
    border-bottom: none;
}

.crm-earnings-popover li strong {
    color: #f4f0e8;
    font-weight: 600;
}

.crm-tile {
    position: relative;
    flex-direction: column;
    gap: 0.35rem;
}

.crm-tile-text {
    display: block;
}

.crm-tile-badge {
    position: absolute;
    top: 0.65rem;
    right: 0.65rem;
    min-width: 1.5rem;
    height: 1.5rem;
    padding: 0 0.4rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.5rem;
    text-align: center;
    background: linear-gradient(135deg, #d4b06a, #c7a35a);
    color: #14120f;
    box-shadow: 0 2px 8px rgba(199, 163, 90, 0.35);
}

.crm-tile-badge.hidden {
    display: none !important;
}

.crm-tile--live {
    border-color: rgba(199, 163, 90, 0.28);
}

.crm-section-hint {
    font-size: 0.875rem;
    color: #a8a29a;
    margin-bottom: var(--space-md);
    line-height: 1.5;
}

.crm-db-toolbar {
    margin-bottom: var(--space-md);
}

.crm-db-toolbar--clients {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-sm) var(--space-md);
}

.crm-db-filter-label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--office-text-muted, #a8a29a);
}

.crm-db-select {
    font: inherit;
    font-size: 0.875rem;
    min-width: 220px;
    padding: 0.55rem 0.85rem;
    border-radius: 10px;
    border: 1px solid rgba(199, 163, 90, 0.2);
    background: rgba(199, 163, 90, 0.06);
    color: inherit;
}

.crm-data-table--clients .crm-client-name-cell {
    font-weight: 600;
    white-space: nowrap;
}

.crm-client-pills-cell {
    min-width: 11rem;
}

.crm-client-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.crm-svc-pill {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.65rem;
    height: 1.65rem;
    padding: 0 0.3rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    border-radius: 6px;
    border: 1px solid transparent;
    cursor: default;
    user-select: none;
    font-family: inherit;
    appearance: none;
    -webkit-appearance: none;
    background-clip: padding-box;
}

.crm-svc-pill-short {
    line-height: 1;
}

/* Červená = dosud neřešeno (není v reportech) */
.crm-svc-pill--none {
    color: #fff;
    background: linear-gradient(145deg, #d65555 0%, #a83232 100%);
    border-color: rgba(185, 60, 60, 0.55);
    box-shadow: 0 2px 8px rgba(155, 47, 47, 0.28);
}

/* Žlutá = rozpracováno */
.crm-svc-pill--pipeline {
    color: #5c4a12;
    background: rgba(234, 179, 8, 0.35);
    border-color: rgba(202, 138, 4, 0.55);
    box-shadow: 0 0 0 1px rgba(234, 179, 8, 0.15);
}

/* Zelená = prodáno / aktivní služba */
.crm-svc-pill--active {
    color: #fff;
    background: linear-gradient(145deg, #3d9a5f 0%, #2a7a4a 100%);
    border-color: rgba(52, 168, 97, 0.55);
    box-shadow: 0 2px 8px rgba(42, 122, 74, 0.35);
}

.crm-svc-pill--clickable {
    cursor: pointer;
}

.crm-svc-pill--clickable:hover {
    filter: brightness(1.08);
}

.crm-svc-pill-tip {
    position: absolute;
    z-index: 50;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    min-width: 160px;
    max-width: 260px;
    padding: 0.55rem 0.7rem;
    font-size: 0.75rem;
    font-weight: 400;
    line-height: 1.4;
    text-align: left;
    color: #f4f0e8;
    background: rgba(22, 20, 17, 0.96);
    border: 1px solid rgba(199, 163, 90, 0.28);
    border-radius: 10px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
}

.crm-svc-pill-tip-title {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 600;
    color: #e8d4a8;
}

.crm-svc-pill-tip ul {
    margin: 0.2rem 0 0.5rem;
    padding-left: 1.1rem;
}

.crm-svc-pill-tip li {
    margin: 0.15rem 0;
}

.crm-svc-pill-tip-empty {
    display: block;
    color: #a8a29a;
    font-size: 0.7rem;
}

/* V tabulce klientů se nápověda zobrazuje v plovoucí vrstvě (#crmSvcPillTipFloating) */
.crm-data-table--clients .crm-svc-pill-tip {
    display: none !important;
}

.crm-svc-pill--tip-open {
    z-index: 2;
    outline: 2px solid rgba(232, 212, 168, 0.55);
    outline-offset: 2px;
}

.crm-svc-pill-tip-floating {
    position: fixed;
    z-index: 25000;
    min-width: 160px;
    max-width: 280px;
    padding: 0.6rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 400;
    line-height: 1.45;
    text-align: left;
    color: #f4f0e8;
    background: rgba(22, 20, 17, 0.98);
    border: 1px solid rgba(199, 163, 90, 0.4);
    border-radius: 12px;
    box-shadow:
        0 16px 48px rgba(0, 0, 0, 0.55),
        0 0 0 1px rgba(232, 212, 168, 0.12);
    pointer-events: auto;
}

.crm-svc-pill-tip-floating.hidden {
    display: none !important;
}

.crm-svc-pill-tip-floating .crm-svc-pill-tip-title {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 600;
    color: #e8d4a8;
}

.crm-svc-pill-tip-floating ul {
    margin: 0.2rem 0 0.5rem;
    padding-left: 1.1rem;
}

.crm-svc-pill-tip-floating li {
    margin: 0.15rem 0;
}

.crm-svc-pill-tip-floating .crm-svc-pill-tip-empty {
    display: block;
    color: #a8a29a;
    font-size: 0.7rem;
}

.crm-svc-pill-tip-hint {
    display: block;
    margin-top: 0.4rem;
    font-size: 0.65rem;
    color: #a8a29a;
    font-style: italic;
}

.crm-edit-pick-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.crm-edit-pick-btn {
    text-align: left;
    font: inherit;
    font-size: 0.875rem;
    padding: 0.65rem 0.85rem;
    border-radius: 10px;
    border: 1px solid rgba(199, 163, 90, 0.25);
    background: rgba(199, 163, 90, 0.08);
    color: inherit;
    cursor: pointer;
}

.crm-edit-pick-btn:hover {
    background: rgba(199, 163, 90, 0.16);
}

.crm-edit-lines-body {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-bottom: 0.75rem;
}

.crm-edit-line-row {
    display: grid;
    grid-template-columns: 1fr minmax(160px, 200px);
    gap: 0.65rem;
    align-items: center;
    padding: 0.65rem 0.75rem;
    border-radius: 10px;
    border: 1px solid rgba(199, 163, 90, 0.2);
    background: rgba(199, 163, 90, 0.06);
}

.crm-edit-line-label {
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.35;
}

.crm-edit-line-status {
    width: 100%;
    font-size: 0.8125rem;
}

@media (max-width: 520px) {
    .crm-edit-line-row {
        grid-template-columns: 1fr;
    }
}

.crm-edit-legend {
    margin-top: 0.75rem;
    font-size: 0.75rem;
}

.crm-legend-dot {
    display: inline-block;
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 3px;
    margin-right: 0.15rem;
    vertical-align: middle;
}

.crm-legend-dot--none {
    background: #a83232;
}

.crm-legend-dot--pipeline {
    background: #eab308;
}

.crm-legend-dot--active {
    background: #2a7a4a;
}

.crm-data-table--clients tbody tr:has(.crm-svc-pill--tip-open) {
    position: relative;
    z-index: 5;
}

.crm-table-wrap:has(.crm-data-table--clients) {
    overflow: visible;
}

html[data-theme='light'] .crm-svc-pill-tip-floating {
    color: #1a1714;
    background: rgba(255, 252, 246, 0.99);
    box-shadow: 0 16px 40px rgba(80, 60, 30, 0.22);
}

.crm-client-status {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.28rem 0.55rem;
    border-radius: 999px;
    white-space: nowrap;
}

.crm-client-status--active {
    color: #1a4d2e;
    background: rgba(52, 168, 97, 0.22);
    border: 1px solid rgba(52, 168, 97, 0.45);
}

.crm-client-status--pipeline {
    color: #5c4a12;
    background: rgba(234, 179, 8, 0.28);
    border: 1px solid rgba(202, 138, 4, 0.5);
}

.crm-client-status--none {
    color: #8b2e2e;
    background: rgba(214, 85, 85, 0.18);
    border: 1px solid rgba(185, 60, 60, 0.4);
}

html[data-theme='light'] .crm-svc-pill--none {
    color: #fff;
}

html[data-theme='light'] .crm-svc-pill-tip {
    color: #1a1714;
    background: rgba(255, 252, 246, 0.98);
    box-shadow: 0 10px 28px rgba(80, 60, 30, 0.18);
}

html[data-theme='light'] .crm-db-select {
    background: rgba(255, 255, 255, 0.7);
}

.crm-db-search {
    width: 100%;
    max-width: 360px;
    padding: 0.65rem 0.9rem;
    font: inherit;
    font-size: 0.875rem;
    border-radius: 10px;
    border: 1px solid rgba(199, 163, 90, 0.2);
    background: rgba(199, 163, 90, 0.06);
    color: #f4f0e8;
}

.crm-db-search::placeholder {
    color: #78716c;
}

.crm-table-wrap {
    overflow-x: auto;
    border-radius: var(--radius-card);
    border: 1px solid rgba(199, 163, 90, 0.12);
    background: rgba(20, 18, 15, 0.5);
}

.crm-data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.crm-data-table th {
    text-align: left;
    padding: 0.65rem 1rem;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #a8a29a;
    background: rgba(199, 163, 90, 0.08);
    border-bottom: 1px solid rgba(199, 163, 90, 0.12);
}

.crm-data-table td {
    padding: 0.75rem 1rem;
    color: #f4f0e8;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    vertical-align: top;
}

.crm-data-table tbody tr:last-child td {
    border-bottom: none;
}

.crm-data-table tbody tr:hover:not(.crm-row--demo) {
    background: rgba(199, 163, 90, 0.06);
}

.crm-data-table tbody tr.crm-row--anniv-soon td {
    background: rgba(199, 163, 90, 0.14);
}

.crm-data-table tbody tr.crm-row--anniv-soon {
    box-shadow: inset 3px 0 0 var(--brand-gold, #c7a35a);
}

.crm-data-table tbody tr.crm-row--anniv-soon td:last-child {
    color: var(--brand-gold, #c7a35a);
    font-weight: 600;
}

.crm-data-table tbody tr.crm-row--anniv-soon:hover td {
    background: rgba(199, 163, 90, 0.22);
}

.crm-row--demo td {
    color: #78716c !important;
    font-style: italic;
}

.crm-row--demo:hover {
    background: transparent !important;
}

.crm-empty-note {
    margin-top: var(--space-md);
    font-size: 0.875rem;
    color: #a8a29a;
    line-height: 1.55;
}

.crm-empty-note.hidden {
    display: none !important;
}

.crm-settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: var(--space-md);
}

.crm-settings-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    text-align: left;
    padding: var(--space-lg);
    border-radius: var(--radius-card);
    border: 1px solid rgba(199, 163, 90, 0.14);
    background:
        radial-gradient(100% 70% at 50% 0%, rgba(199, 163, 90, 0.05) 0%, transparent 55%),
        linear-gradient(160deg, rgba(38, 34, 28, 0.9) 0%, rgba(26, 23, 19, 0.95) 100%);
    cursor: pointer;
    transition: border-color 0.15s, transform 0.15s;
    font: inherit;
    color: inherit;
}

.crm-settings-card:hover:not(.crm-settings-card--static) {
    border-color: rgba(199, 163, 90, 0.32);
    transform: translateY(-2px);
}

.crm-settings-card--static {
    cursor: default;
}

.crm-settings-card-title {
    font-family: var(--font-family-display);
    font-size: 1.05rem;
    font-weight: 600;
    color: #f4f0e8;
}

.crm-settings-card-desc {
    font-size: 0.8125rem;
    color: #a8a29a;
    line-height: 1.45;
}

.crm-table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
}

.crm-contract-pdf-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 1px solid rgba(199, 163, 90, 0.4);
    border-radius: 8px;
    background: rgba(199, 163, 90, 0.12);
    color: var(--brand-gold, #c7a35a);
    cursor: pointer;
    flex-shrink: 0;
}

.crm-contract-pdf-btn:hover,
.crm-contract-pdf-btn:focus-visible {
    background: rgba(199, 163, 90, 0.22);
    color: var(--office-brand-bright, #e8d4a8);
    outline: none;
}

.crm-contract-pdf-icon {
    display: block;
}

.crm-contract-view-doc-btn {
    margin-top: 0.5rem;
    width: 100%;
    max-width: 16rem;
}

.crm-coverage-pick-label {
    display: block;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ui-label, var(--text-secondary, #a8a29a));
    margin-bottom: 0.35rem;
}

.crm-coverage-pick-hint {
    margin: 0 0 0.5rem;
}

.crm-coverage-pick {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.crm-coverage-pick-item {
    margin: 0;
    cursor: pointer;
}

.crm-coverage-pick-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.crm-coverage-pick-chip {
    display: inline-block;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    border: 1px solid rgba(199, 163, 90, 0.35);
    background: rgba(199, 163, 90, 0.08);
    color: var(--text-secondary, #d6d3d1);
    font-size: 0.8125rem;
    font-weight: 500;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.crm-coverage-pick-input:focus-visible + .crm-coverage-pick-chip {
    outline: 2px solid var(--brand-gold, #c7a35a);
    outline-offset: 2px;
}

.crm-coverage-pick-input:checked + .crm-coverage-pick-chip {
    border-color: var(--brand-gold, #c7a35a);
    background: rgba(199, 163, 90, 0.28);
    color: var(--office-brand-bright, #e8d4a8);
    font-weight: 600;
}

.crm-coverage-pick-item:hover .crm-coverage-pick-chip {
    border-color: rgba(199, 163, 90, 0.55);
}

.crm-table-actions .btn-secondary {
    padding: 0.3rem 0.6rem;
    font-size: 0.72rem;
}

.crm-dashboard-panels:not(.crm-dashboard-panels--hero) {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-lg);
    margin-top: var(--space-lg);
}

.crm-dash-panel:not(.crm-dash-panel--hero):not(.crm-dash-panel--opps) {
    display: flex;
    flex-direction: column;
    min-height: 200px;
    padding: var(--space-md);
    border-radius: var(--radius-card);
    border: 1px solid rgba(199, 163, 90, 0.14);
    background:
        radial-gradient(100% 70% at 50% 0%, rgba(199, 163, 90, 0.06) 0%, transparent 55%),
        linear-gradient(160deg, rgba(38, 34, 28, 0.88) 0%, rgba(26, 23, 19, 0.94) 100%);
    box-shadow: 0 8px 24px rgba(20, 16, 10, 0.22);
}

.crm-dash-panel--live {
    border-color: rgba(199, 163, 90, 0.26);
}

.crm-dash-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.crm-dash-panel-title {
    margin: 0;
    font-family: var(--font-family-display);
    font-size: 1rem;
    font-weight: 600;
    color: #f4f0e8;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.crm-dash-panel-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.35rem;
    height: 1.35rem;
    padding: 0 0.35rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    background: linear-gradient(135deg, #d4b06a, #c7a35a);
    color: #14120f;
}

.crm-dash-panel-badge.hidden {
    display: none !important;
}

.crm-dash-panel-more {
    flex-shrink: 0;
    font: inherit;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: #c7a35a;
    background: none;
    border: none;
    padding: 0.25rem 0;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.crm-dash-panel-more:hover {
    color: #e5c88a;
}

.crm-dash-panel-hint {
    font-size: 0.75rem;
    color: #78716c;
    margin: 0 0 0.5rem;
    line-height: 1.4;
    font-style: italic;
}

.crm-dash-panel-hint:empty {
    display: none;
}

.crm-dash-panel-empty {
    margin: 0.5rem 0 0;
    font-size: 0.8125rem;
    color: #a8a29a;
    line-height: 1.45;
}

.crm-dash-panel-empty.hidden {
    display: none !important;
}

.crm-table-wrap--compact .crm-data-table--compact th,
.crm-table-wrap--compact .crm-data-table--compact td {
    padding: 0.45rem 0.65rem;
    font-size: 0.8125rem;
}

.crm-table-wrap--compact .crm-data-table--compact th {
    font-size: 0.62rem;
}

.crm-dash-link {
    font: inherit;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--brand-gold);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.crm-dash-link:hover {
    color: var(--brand-primary-hover);
}

.crm-dash-link--danger {
    color: var(--danger-color, #f87171);
}

.crm-dash-link--danger:hover {
    color: #fca5a5;
}

/* ============================================
   Office – prémiový skin (glass, champagne, ne hnědá)
   ============================================ */

.crm-dashboard-pin--top {
    border-bottom-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}


.crm-dashboard-hero-lead {
    color: var(--office-brand);
    letter-spacing: 0.14em;
}

.crm-quick-nav-btn {
    color: var(--office-text-secondary);
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--office-glass-border);
    border-radius: 9px;
    transition:
        color 0.2s ease,
        background 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.crm-quick-nav-btn:hover {
    color: var(--office-text);
    background: var(--office-brand-soft);
    border-color: var(--office-brand-border);
    box-shadow: 0 0 20px rgba(212, 188, 130, 0.08);
}

.crm-quick-nav-btn--accent {
    color: var(--office-brand-bright);
    background: var(--office-brand-soft);
    border-color: var(--office-brand-border);
}

.crm-dash-panel--hero,
.crm-dash-panel--opps,
.crm-dash-panel:not(.crm-dash-panel--hero):not(.crm-dash-panel--opps) {
    background: var(--office-glass);
    border: 1px solid var(--office-glass-border);
    box-shadow: var(--office-shadow), var(--office-glow);
    backdrop-filter: blur(16px) saturate(1.1);
    -webkit-backdrop-filter: blur(16px) saturate(1.1);
}

.crm-dash-panel--hero,
.crm-dash-panel--opps {
    box-shadow:
        var(--office-shadow),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.crm-dash-panel-title,
.crm-dash-panel-title--hero {
    color: var(--office-text);
}

.crm-dash-panel-more,
.crm-dash-link {
    color: var(--office-brand);
}

.crm-dash-panel-more:hover,
.crm-dash-link:hover {
    color: var(--office-brand-bright);
}

.crm-table-wrap,
.crm-table-wrap--compact {
    background: var(--office-table-bg);
    border-color: var(--office-glass-border);
}

.crm-data-table th {
    color: var(--office-text-muted);
    background: rgba(255, 255, 255, 0.04);
    border-bottom-color: var(--office-glass-border);
}

.crm-data-table td {
    color: var(--office-text);
    border-bottom-color: var(--office-glass-border);
}

.crm-data-table tbody tr:hover:not(.crm-row--demo) {
    background: rgba(212, 188, 130, 0.06);
}

.crm-row--demo td {
    color: #636366 !important;
}

.crm-stat-mini--earnings {
    background: var(--office-earnings-bg);
    border-color: var(--office-brand-border);
    box-shadow: var(--office-shadow), var(--office-glow);
}

.crm-stat-mini-label {
    color: var(--office-text-muted);
}

.crm-stat-mini-value {
    color: var(--office-brand-bright);
}

.crm-stat-mini-value--btn {
    border-bottom-color: var(--office-brand-border);
}

.crm-stat-card {
    background: var(--office-glass);
    border: 1px solid var(--office-glass-border);
    box-shadow: var(--office-shadow);
}

.crm-stat-label {
    color: var(--office-text-muted);
}

.crm-stat-value {
    color: var(--office-brand-bright);
}

.crm-dash-panel-badge {
    background: linear-gradient(135deg, #f5ecd8, #d4bc82);
    color: #0a0c10;
    box-shadow: 0 2px 12px rgba(212, 188, 130, 0.35);
}

.crm-earnings-popover {
    background: linear-gradient(160deg, rgba(22, 26, 36, 0.98) 0%, rgba(12, 14, 20, 0.99) 100%);
    border-color: rgba(212, 188, 130, 0.25);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(20px);
}

.crm-earnings-popover h4 {
    color: var(--brand-gold);
}

.crm-earnings-popover li {
    color: #aeaeb2;
    border-bottom-color: rgba(255, 255, 255, 0.06);
}

.crm-earnings-popover li strong {
    color: #f5f5f7;
}

.crm-db-search {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
    color: #f5f5f7;
}

.crm-db-search:focus {
    border-color: rgba(212, 188, 130, 0.45);
    box-shadow: 0 0 0 3px rgba(212, 188, 130, 0.12);
}

.crm-settings-card {
    background: var(--office-glass);
    border-color: var(--office-glass-border);
    box-shadow: var(--office-shadow);
}

.crm-settings-card:hover:not(.crm-settings-card--static) {
    border-color: rgba(212, 188, 130, 0.35);
    box-shadow: var(--office-shadow), 0 0 40px rgba(212, 188, 130, 0.06);
}

.crm-settings-card-title {
    color: var(--office-text);
}

.crm-settings-card-desc,
.crm-section-hint,
.crm-empty-note,
.crm-dash-panel-hint {
    color: var(--office-text-secondary);
}

/* Denní režim – Office panely a navigace */
html[data-theme='light'] .crm-quick-nav-btn {
    background: rgba(255, 255, 255, 0.55);
    color: var(--office-text-secondary);
    box-shadow: 0 1px 4px rgba(80, 60, 30, 0.08);
}

html[data-theme='light'] .crm-dash-panel--hero,
html[data-theme='light'] .crm-dash-panel--opps {
    box-shadow: var(--office-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

html[data-theme='light'] .crm-dashboard-earnings {
    box-shadow: 0 -10px 32px rgba(80, 60, 30, 0.14);
}

html[data-theme='light'] .crm-add-menu {
    background: rgba(255, 252, 246, 0.98);
    box-shadow: 0 10px 32px rgba(80, 60, 30, 0.16);
}

html[data-theme='light'] .crm-btn-add {
    color: #1a1714;
}

html[data-theme='light'] .crm-quick-nav-btn:hover {
    background: var(--office-brand-soft);
    color: var(--office-text);
}

html[data-theme='light'] .crm-data-table th {
    background: rgba(0, 0, 0, 0.03);
}

html[data-theme='light'] .crm-data-table tbody tr:hover:not(.crm-row--demo) {
    background: var(--office-brand-soft);
}

html[data-theme='light'] .crm-data-table tbody tr.crm-row--anniv-soon td {
    background: rgba(184, 134, 11, 0.12);
}

html[data-theme='light'] .crm-data-table tbody tr.crm-row--anniv-soon td:last-child {
    color: #9a7b2e;
}

html[data-theme='light'] .crm-earnings-popover {
    background: linear-gradient(160deg, #ffffff 0%, #f5f5f7 100%);
    border-color: var(--office-glass-border);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
}

html[data-theme='light'] .crm-earnings-popover li {
    color: var(--office-text-secondary);
}

html[data-theme='light'] .crm-earnings-popover li strong {
    color: var(--office-text);
}

html[data-theme='light'] .crm-db-search {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.1);
    color: var(--office-text);
}

html[data-theme='light'] .app-theme-toggle:hover {
    background: var(--office-brand-soft);
}

/* Jemný vstup panelů na dashboardu */
@keyframes office-panel-in {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.crm-dashboard-scroll {
    animation: office-panel-in 0.55s ease-out both;
}

.crm-dashboard-earnings {
    opacity: 1;
}

.crm-dash-panel--hero,
.crm-dash-panel--opps {
    animation: office-panel-in 0.5s ease-out both;
}

.crm-dashboard-panels--hero .crm-dash-panel--hero:nth-child(1) {
    animation-delay: 0.05s;
}

.crm-dashboard-panels--hero .crm-dash-panel--hero:nth-child(2) {
    animation-delay: 0.1s;
}

.crm-dash-panel--opps {
    animation-delay: 0.15s;
}

@media (prefers-reduced-motion: reduce) {
    .crm-dashboard-scroll,
    .crm-dash-panel--hero,
    .crm-dash-panel--opps {
        animation: none;
    }
}

.crm-dash-panel--live {
    border-color: rgba(212, 188, 130, 0.22);
}
