:root {
    --maxim-navy: #02245c;
    --maxim-blue: #045f93;
    --maxim-blue-2: #0878a2;
    --maxim-cyan: #0d99b3;
    --maxim-turquoise: #47bdc1;
    --maxim-orange: #ffa62b;
    --text: #17324a;
    --muted: #718397;
    --line: #dbe5ee;
    --surface: rgba(255,255,255,.96);
    --shadow: 0 24px 70px rgba(2,36,92,.18);
}

* { box-sizing: border-box; }

html, body {
    min-height: 100%;
    margin: 0;
}

body {
    font-family: "Segoe UI", Arial, sans-serif;
    color: var(--text);
    background: #edf4f8;
}

.portal-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(600px, 64fr) minmax(430px, 36fr);
}

.brand-panel {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 70px 60px 90px;
    background: #033b79 url("../img/maxim-wave.svg") center / cover no-repeat;
}

.brand-content {
    position: relative;
    z-index: 2;
    width: min(790px, 88%);
    margin-top: -20px;
    text-align: center;
    color: #fff;
    text-shadow: 0 2px 14px rgba(0,20,55,.18);
}

.brand-mark {
    display: block;
    width: 170px;
    height: auto;
    margin: 0 auto 14px;
    filter: drop-shadow(0 8px 18px rgba(0,25,65,.22));
}

.brand-title {
    margin: 0;
    color: #fff;
    font-size: clamp(54px, 5.2vw, 92px);
    font-weight: 760;
    line-height: .98;
    letter-spacing: -.045em;
}

.brand-subtitle {
    max-width: 780px;
    margin: 22px auto 0;
    color: rgba(255,255,255,.93);
    font-size: clamp(22px, 1.8vw, 32px);
    font-weight: 350;
    line-height: 1.45;
}

.brand-rule {
    width: min(610px, 78%);
    height: 1px;
    margin: 30px auto 24px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent);
}

.brand-credit {
    margin: 0;
    color: rgba(255,255,255,.88);
    font-size: clamp(17px, 1.25vw, 23px);
}

.brand-credit strong { color: #fff; }

.brand-bottom {
    position: absolute;
    z-index: 2;
    left: 58px;
    bottom: 54px;
    color: rgba(193,239,247,.72);
    font-size: 13px;
    letter-spacing: .28em;
    text-transform: uppercase;
}

.login-panel {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
    background:
      radial-gradient(circle at 25% 15%, rgba(71,189,193,.08), transparent 26%),
      linear-gradient(135deg, #f9fbfd 0%, #edf5f9 100%);
}

.login-card {
    width: min(100%, 470px);
    padding: 42px 42px 34px;
    border: 1px solid rgba(8,120,162,.14);
    border-radius: 24px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.product-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    color: var(--maxim-blue-2);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.product-kicker::before {
    content: "";
    width: 34px;
    height: 4px;
    border-radius: 99px;
    background: linear-gradient(90deg, var(--maxim-blue), var(--maxim-turquoise), var(--maxim-orange));
}

h1 {
    margin: 0 0 8px;
    color: var(--maxim-navy);
    font-size: 36px;
    line-height: 1.08;
    letter-spacing: -.035em;
}

.subtitle {
    margin: 0 0 32px;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.55;
}

label {
    display: block;
    margin: 0 0 8px;
    color: #35546d;
    font-size: 13px;
    font-weight: 650;
}

.field {
    width: 100%;
    height: 50px;
    margin-bottom: 18px;
    padding: 0 15px;
    border: 1px solid #cfdce8;
    border-radius: 12px;
    background: #fff;
    color: var(--text);
    font: inherit;
    outline: none;
    transition: .18s ease;
}

.field:focus {
    border-color: var(--maxim-cyan);
    box-shadow: 0 0 0 4px rgba(13,153,179,.11);
}

.primary-button {
    width: 100%;
    height: 52px;
    margin-top: 5px;
    border: 0;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(100deg, var(--maxim-navy), var(--maxim-blue-2), var(--maxim-cyan));
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(4,95,147,.22);
}

.primary-button:hover { filter: brightness(1.04); }
.primary-button:disabled { cursor: not-allowed; opacity: .78; }

.status {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    margin-top: 24px;
    padding: 13px 14px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.4;
}

.status.ok {
    color: #176046;
    background: #edf9f5;
    border: 1px solid #ccecdf;
}

.status.error {
    color: #8a3441;
    background: #fff2f3;
    border: 1px solid #f2d5d9;
}

.status-dot {
    flex: 0 0 auto;
    width: 9px;
    height: 9px;
    margin-top: 4px;
    border-radius: 50%;
    background: currentColor;
}

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

.footer {
    margin-top: 26px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    color: #8a99a7;
    font-size: 12px;
    text-align: center;
}

@media (max-width: 1100px) {
    .portal-shell {
        grid-template-columns: minmax(470px, 58fr) minmax(410px, 42fr);
    }
    .brand-title { font-size: 58px; }
    .brand-subtitle { font-size: 22px; }
    .brand-bottom { display: none; }
}

@media (max-width: 850px) {
    .portal-shell {
        display: block;
        min-height: 100vh;
        background: #033b79 url("../img/maxim-wave.svg") center / cover fixed no-repeat;
    }

    .brand-panel { display: none; }

    .login-panel {
        min-height: 100vh;
        padding: 24px;
        background: rgba(240,247,251,.86);
        backdrop-filter: blur(10px);
    }

    .login-card { padding: 34px 26px 28px; }
}


/* ===== MAXim Portal 0004: authentication + application shell ===== */

.alert {
    margin: 0 0 18px;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.45;
}
.alert.error {
    color: #8a3441;
    background: #fff2f3;
    border: 1px solid #f2d5d9;
}
.alert.success {
    color: #176046;
    background: #edf9f5;
    border: 1px solid #ccecdf;
}

.setup-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 30px;
    background:
        linear-gradient(rgba(3,59,121,.80), rgba(2,36,92,.84)),
        url("../img/maxim-wave.svg") center/cover fixed no-repeat;
}
.setup-wrap { width: min(100%, 520px); }
.setup-card {
    padding: 38px;
    border-radius: 24px;
    background: rgba(255,255,255,.97);
    box-shadow: 0 28px 80px rgba(0,22,60,.30);
}
.setup-card h1 { margin-bottom: 24px; }
.setup-card p { color: var(--muted); line-height: 1.55; }
.primary-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 11px;
    color: #fff;
    background: linear-gradient(100deg, var(--maxim-navy), var(--maxim-blue-2), var(--maxim-cyan));
    font-weight: 700;
    text-decoration: none;
}

/* App */
.app-page {
    min-height: 100vh;
    margin: 0;
    background: #f3f7fa;
}
.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
}
.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 24px 18px 20px;
    color: #fff;
    background:
        linear-gradient(180deg, rgba(2,36,92,.96), rgba(3,91,139,.94)),
        url("../img/maxim-wave.svg") 35% center/cover no-repeat;
    box-shadow: 10px 0 30px rgba(2,36,92,.08);
}
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 8px 24px;
}
.sidebar-brand img {
    width: 45px;
    height: auto;
}
.sidebar-brand strong {
    display: block;
    font-size: 25px;
    letter-spacing: -.04em;
}
.sidebar-brand span {
    display: block;
    margin-top: -2px;
    color: rgba(255,255,255,.70);
    font-size: 13px;
}
.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.nav-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 46px;
    padding: 0 13px;
    border-radius: 11px;
    color: rgba(255,255,255,.80);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: .16s ease;
}
.nav-menu a:hover,
.nav-menu a.active {
    color: #fff;
    background: rgba(255,255,255,.13);
}
.nav-menu a.active {
    box-shadow: inset 3px 0 0 #45dfe0;
}
.nav-icon {
    width: 24px;
    text-align: center;
    color: #63eced;
    font-size: 16px;
    font-weight: 700;
}
.nav-divider {
    height: 1px;
    margin: 11px 8px;
    background: rgba(255,255,255,.14);
}
.sidebar-foot {
    margin-top: auto;
    padding: 18px 9px 0;
    border-top: 1px solid rgba(255,255,255,.14);
    color: rgba(255,255,255,.72);
    font-size: 12px;
}
.sidebar-foot small {
    display: block;
    margin-top: 5px;
    color: rgba(255,255,255,.48);
}

.app-main { min-width: 0; }
.topbar {
    min-height: 88px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    padding: 17px 34px;
    border-bottom: 1px solid #dce6ed;
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(8px);
}
.topbar h2 {
    margin: 2px 0 0;
    color: var(--maxim-navy);
    font-size: 27px;
    letter-spacing: -.03em;
}
.eyebrow {
    color: var(--maxim-cyan);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .13em;
    text-transform: uppercase;
}
.topbar-actions {
    display: flex;
    align-items: center;
    gap: 18px;
}
.company-switch select,
.company-chip {
    min-height: 40px;
    padding: 0 13px;
    border: 1px solid #d5e2eb;
    border-radius: 10px;
    background: #fff;
    color: #37536b;
    font: inherit;
    font-size: 13px;
}
.company-chip {
    display: flex;
    align-items: center;
}
.user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
}
.avatar {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, var(--maxim-navy), var(--maxim-cyan));
    font-weight: 800;
}
.user-meta strong,
.user-meta span {
    display: block;
}
.user-meta strong {
    color: #263f55;
    font-size: 13px;
}
.user-meta span {
    margin-top: 2px;
    color: #8998a6;
    font-size: 11px;
}
.logout-link {
    margin-left: 5px;
    color: #718397;
    font-size: 12px;
    text-decoration: none;
}
.logout-link:hover { color: var(--maxim-blue); }

.content {
    width: min(1460px, 100%);
    margin: 0 auto;
    padding: 34px;
}
.welcome-panel {
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 155px;
    padding: 28px 32px;
    border: 1px solid #d6e4ec;
    border-radius: 20px;
    background:
        linear-gradient(105deg, rgba(255,255,255,.98), rgba(237,250,251,.94)),
        url("../img/maxim-wave.svg") right center/auto 250% no-repeat;
    box-shadow: 0 10px 32px rgba(2,36,92,.06);
}
.welcome-panel::after {
    content: "";
    position: absolute;
    right: -120px;
    bottom: -120px;
    width: 360px;
    height: 240px;
    border-radius: 50%;
    background: rgba(71,189,193,.10);
}
.welcome-panel h3 {
    position: relative;
    z-index: 1;
    margin: 6px 0 7px;
    color: var(--maxim-navy);
    font-size: 28px;
    letter-spacing: -.03em;
}
.welcome-panel p {
    position: relative;
    z-index: 1;
    max-width: 760px;
    margin: 0;
    color: #6f8293;
    font-size: 14px;
    line-height: 1.55;
}
.welcome-badge {
    position: relative;
    z-index: 1;
    padding-right: 20px;
    color: rgba(2,36,92,.07);
    font-size: 78px;
    font-weight: 850;
    letter-spacing: -.08em;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-top: 22px;
}
.stat-card {
    min-height: 115px;
    padding: 23px;
    border: 1px solid #dce7ee;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 26px rgba(2,36,92,.04);
}
.stat-value {
    color: var(--maxim-navy);
    font-size: 31px;
    font-weight: 800;
    letter-spacing: -.04em;
}
.stat-label {
    margin-top: 8px;
    color: #7b8c9a;
    font-size: 13px;
}
.module-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 26px;
}
.module-card {
    position: relative;
    padding: 25px;
    border: 1px solid #dce7ee;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 28px rgba(2,36,92,.04);
}
.module-card h4 {
    margin: 17px 0 8px;
    color: var(--maxim-navy);
    font-size: 17px;
}
.module-card p {
    min-height: 63px;
    margin: 0;
    color: #768999;
    font-size: 13px;
    line-height: 1.58;
}
.module-icon {
    width: 45px;
    height: 45px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    font-size: 18px;
    font-weight: 800;
}
.module-icon.ai {
    color: #026995;
    background: #e6f7fa;
}
.module-icon.service {
    color: #277050;
    background: #eaf7f1;
}
.module-icon.license {
    color: #a66b12;
    background: #fff5de;
}
.coming {
    display: inline-flex;
    margin-top: 15px;
    padding: 5px 9px;
    border-radius: 999px;
    color: #738595;
    background: #f1f5f8;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

@media (max-width: 1100px) {
    .app-shell { grid-template-columns: 215px minmax(0,1fr); }
    .stat-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .module-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
    .app-shell { display: block; }
    .sidebar {
        position: static;
        width: 100%;
        height: auto;
    }
    .nav-menu { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
    .sidebar-foot { display: none; }
    .topbar {
        align-items: flex-start;
        flex-direction: column;
        padding: 20px;
    }
    .topbar-actions {
        width: 100%;
        align-items: stretch;
        flex-direction: column;
    }
    .content { padding: 20px; }
    .stat-grid { grid-template-columns: 1fr 1fr; }
    .user-menu { justify-content: space-between; }
}
@media (max-width: 480px) {
    .stat-grid { grid-template-columns: 1fr; }
    .nav-menu { grid-template-columns: 1fr; }
}


/* ===== MAXim Portal 0005: Správa firem ===== */

.page-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}
.search-form,
.toolbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}
.search-form { flex: 1; }
.search-input {
    width: min(100%, 440px);
    min-height: 43px;
    padding: 0 14px;
    border: 1px solid #d3e0e9;
    border-radius: 11px;
    background: #fff;
    color: var(--text);
    font: inherit;
    outline: none;
}
.search-input:focus {
    border-color: var(--maxim-cyan);
    box-shadow: 0 0 0 4px rgba(13,153,179,.10);
}
.secondary-button,
.secondary-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 43px;
    padding: 0 15px;
    border: 1px solid #d2dfe8;
    border-radius: 10px;
    color: #526d82;
    background: #fff;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}
.secondary-button:hover,
.secondary-link:hover {
    color: var(--maxim-blue);
    border-color: #abcbd9;
    background: #f8fcfd;
}
.table-card {
    overflow: hidden;
    border: 1px solid #dce7ee;
    border-radius: 17px;
    background: #fff;
    box-shadow: 0 8px 28px rgba(2,36,92,.04);
}
.data-table {
    width: 100%;
    border-collapse: collapse;
}
.data-table th,
.data-table td {
    padding: 15px 17px;
    border-bottom: 1px solid #edf2f5;
    text-align: left;
    vertical-align: middle;
}
.data-table th {
    color: #7a8b99;
    background: #f8fafc;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}
.data-table tbody tr:hover { background: #fbfdfe; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table td {
    color: #486276;
    font-size: 13px;
}
.data-table td strong {
    display: block;
    color: #173d60;
    font-size: 14px;
}
.data-table td small {
    display: block;
    margin-top: 3px;
    color: #91a0ad;
    font-size: 11px;
}
.align-right { text-align: right !important; }
.table-action {
    color: var(--maxim-blue-2);
    font-weight: 700;
    text-decoration: none;
}
.table-action:hover { text-decoration: underline; }

.status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 25px;
    padding: 0 9px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.status-pill.active {
    color: #277050;
    background: #eaf7f1;
}
.status-pill.inactive {
    color: #7f8992;
    background: #eef1f4;
}

.empty-state {
    padding: 70px 30px;
    border: 1px dashed #cbdce6;
    border-radius: 20px;
    background: rgba(255,255,255,.68);
    text-align: center;
}
.empty-icon {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    margin: 0 auto 17px;
    border-radius: 15px;
    color: #067e9c;
    background: #e6f7fa;
    font-size: 20px;
}
.empty-state h3 {
    margin: 0 0 8px;
    color: var(--maxim-navy);
}
.empty-state p {
    margin: 0 0 20px;
    color: #7c8e9c;
}

.form-heading {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}
.form-heading h3 {
    margin: 8px 0 3px;
    color: var(--maxim-navy);
    font-size: 27px;
}
.form-heading p {
    margin: 0;
    color: #8494a2;
    font-size: 13px;
}
.back-link {
    color: #5d7d92;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}
.back-link:hover { color: var(--maxim-blue); }

.entity-form {
    width: min(100%, 980px);
}
.form-card {
    margin-bottom: 17px;
    padding: 25px;
    border: 1px solid #dce7ee;
    border-radius: 17px;
    background: #fff;
    box-shadow: 0 7px 25px rgba(2,36,92,.035);
}
.form-section-title {
    margin-bottom: 18px;
    color: var(--maxim-navy);
    font-size: 15px;
    font-weight: 800;
}
.form-grid {
    display: grid;
    gap: 0 18px;
}
.form-grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.span-2 { grid-column: span 2; }
.field-wrap label {
    display: block;
    margin-bottom: 7px;
}
.field-wrap .field {
    margin-bottom: 17px;
}
.textarea {
    width: 100%;
    min-height: 150px;
    padding: 13px 14px;
    border: 1px solid #cfdce8;
    border-radius: 12px;
    background: #fff;
    color: var(--text);
    font: inherit;
    line-height: 1.55;
    resize: vertical;
    outline: none;
}
.textarea:focus {
    border-color: var(--maxim-cyan);
    box-shadow: 0 0 0 4px rgba(13,153,179,.11);
}
.field-help {
    margin-top: 7px;
    color: #94a2ae;
    font-size: 11px;
}
.toggle-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 23px;
    padding-top: 20px;
    border-top: 1px solid #edf1f4;
    cursor: pointer;
}
.toggle-row input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--maxim-cyan);
}
.toggle-row strong,
.toggle-row small { display: block; }
.toggle-row strong {
    color: #36546b;
    font-size: 13px;
}
.toggle-row small {
    margin-top: 3px;
    color: #8d9ba7;
    font-size: 11px;
}
.form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 5px 0 30px;
}
.primary-button.fit {
    width: auto;
    min-width: 160px;
    padding: 0 24px;
}
.welcome-action { margin-top: 16px !important; }

@media (max-width: 900px) {
    .page-toolbar {
        align-items: stretch;
        flex-direction: column;
    }
    .toolbar-actions { justify-content: space-between; }
    .table-card { overflow-x: auto; }
    .data-table { min-width: 900px; }
}
@media (max-width: 650px) {
    .form-grid.two { grid-template-columns: 1fr; }
    .span-2 { grid-column: auto; }
}


/* ===== MAXim Portal 0006: Uživatelé + přístupy ===== */

.admin-tabs {
    display: inline-flex;
    gap: 5px;
    margin-bottom: 22px;
    padding: 4px;
    border: 1px solid #d8e4eb;
    border-radius: 12px;
    background: #fff;
}
.admin-tabs a {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    padding: 0 15px;
    border-radius: 9px;
    color: #6e8291;
    font-size: 12px;
    font-weight: 750;
    text-decoration: none;
}
.admin-tabs a:hover {
    color: var(--maxim-blue);
    background: #f5fafc;
}
.admin-tabs a.active {
    color: #fff;
    background: linear-gradient(100deg, var(--maxim-navy), var(--maxim-blue-2));
}

.users-table td:nth-child(2) {
    max-width: 330px;
}
.role-pill {
    display: inline-flex;
    align-items: center;
    min-height: 25px;
    padding: 0 9px;
    border-radius: 999px;
    color: #506c82;
    background: #eef3f6;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}
.role-pill.super {
    color: #086c82;
    background: #e5f8fa;
}
.muted-dash {
    color: #a0adb7;
    font-size: 12px;
}

.wide-form {
    width: min(100%, 1100px);
}
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 15px;
    margin-top: 5px;
}
.toggle-row.compact {
    margin-top: 0;
    padding: 16px;
    border: 1px solid #e0e8ee;
    border-radius: 13px;
    background: #fafcfd;
}
.password-help {
    margin: -5px 0 16px;
}

.company-access-list {
    overflow: hidden;
    border: 1px solid #dde7ed;
    border-radius: 14px;
}
.company-access-row {
    display: grid;
    grid-template-columns: minmax(230px, .9fr) minmax(420px, 1.1fr);
    align-items: center;
    gap: 18px;
    padding: 17px 19px;
    border-bottom: 1px solid #edf2f5;
}
.company-access-row:last-child {
    border-bottom: 0;
}
.company-access-row:nth-child(even) {
    background: #fbfdfe;
}
.company-check {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    cursor: pointer;
}
.company-check input {
    width: 18px;
    height: 18px;
    accent-color: var(--maxim-cyan);
}
.company-check strong,
.company-check small {
    display: block;
}
.company-check strong {
    color: #294b65;
    font-size: 13px;
}
.company-check small {
    margin-top: 3px;
    color: #92a0ab;
    font-size: 11px;
}
.company-access-controls {
    display: grid;
    grid-template-columns: minmax(180px,1fr) minmax(190px,.8fr);
    align-items: end;
    gap: 15px;
    transition: opacity .15s ease;
}
.company-access-controls.disabled {
    opacity: .38;
}
.company-access-controls > label {
    margin: 0;
}
.company-access-controls > label > span:first-child {
    display: block;
    margin-bottom: 6px;
    color: #60778a;
    font-size: 11px;
    font-weight: 700;
}
.company-access-controls select {
    width: 100%;
    min-height: 40px;
    padding: 0 11px;
    border: 1px solid #d1dfe8;
    border-radius: 9px;
    background: #fff;
    color: #39566c;
    font: inherit;
    font-size: 12px;
}
.switch-company-check {
    min-height: 40px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 11px;
    border: 1px solid #e1e8ed;
    border-radius: 9px;
    background: #fafcfd;
}
.switch-company-check input {
    width: 16px;
    height: 16px;
    accent-color: var(--maxim-cyan);
}
.switch-company-check span {
    color: #61788a !important;
    font-size: 11px !important;
    font-weight: 650 !important;
}
.access-help {
    margin-top: 13px;
}

@media (max-width: 850px) {
    .company-access-row {
        grid-template-columns: 1fr;
    }
    .company-access-controls {
        grid-template-columns: 1fr;
        padding-left: 30px;
    }
    .checkbox-grid {
        grid-template-columns: 1fr;
    }
}


/* ===== MAXim Portal 0006.1: první heslo ===== */

.temporary-password-card {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto;
    gap: 8px 24px;
    align-items: center;
    margin-bottom: 20px;
    padding: 18px 20px;
    border: 1px solid #b9e2dc;
    border-radius: 14px;
    background: linear-gradient(110deg, #eefaf7, #f7fcfc);
}
.temporary-password-card strong {
    color: #176046;
    font-size: 14px;
}
.temporary-password-card p {
    margin: 5px 0 0;
    color: #5d7b76;
    font-size: 12px;
    line-height: 1.5;
}
.temporary-password-value code {
    display: inline-block;
    padding: 10px 14px;
    border: 1px solid #9ed7ce;
    border-radius: 9px;
    background: #fff;
    color: #123f48;
    font-family: Consolas, "Courier New", monospace;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: .04em;
    user-select: all;
}
.temporary-password-note {
    grid-column: 1 / -1;
    color: #7e918d;
    font-size: 10px;
}
.role-pill.password-pending {
    margin-left: 5px;
    color: #a06512;
    background: #fff3d9;
}
.password-intro {
    margin: 0 0 24px;
    color: #708497;
    line-height: 1.55;
}
.password-rule {
    margin: -7px 0 17px;
}
.setup-card .footer a {
    color: var(--maxim-blue-2);
    text-decoration: none;
}
.setup-card .footer a:hover {
    text-decoration: underline;
}

@media (max-width: 700px) {
    .temporary-password-card {
        grid-template-columns: 1fr;
    }
}


/* ===== MAXim Portal 0007: AI objednávky ===== */

.module-card-live {
    border-color: #bfe3e8;
    background: linear-gradient(145deg, #fff, #f3fcfc);
}
.module-link {
    display: inline-flex;
    margin-top: 14px;
    color: var(--maxim-blue-2);
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
}
.module-link:hover { text-decoration: underline; }

.ai-page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}
.ai-page-head h3 {
    margin: 5px 0 5px;
    color: var(--maxim-navy);
    font-size: 27px;
    letter-spacing: -.03em;
}
.ai-page-head p {
    margin: 0;
    color: #7d8f9d;
    font-size: 13px;
}

.ai-status-tabs {
    display: flex;
    gap: 7px;
    margin-bottom: 18px;
    overflow-x: auto;
}
.ai-status-tabs a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 39px;
    padding: 0 13px;
    border: 1px solid #d7e3ea;
    border-radius: 10px;
    color: #60798b;
    background: #fff;
    font-size: 12px;
    font-weight: 750;
    text-decoration: none;
    white-space: nowrap;
}
.ai-status-tabs a span {
    min-width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    padding: 0 5px;
    border-radius: 999px;
    color: #768994;
    background: #eef3f6;
    font-size: 10px;
}
.ai-status-tabs a.active {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(100deg, var(--maxim-navy), var(--maxim-blue-2));
}
.ai-status-tabs a.active span {
    color: var(--maxim-navy);
    background: #fff;
}

.ai-toolbar {
    padding: 12px 14px;
    border: 1px solid #dce7ed;
    border-radius: 13px;
    background: rgba(255,255,255,.72);
}
.permission-note {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #708494;
    font-size: 11px;
    white-space: nowrap;
}
.permission-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
.permission-dot.approve { background: #2da878; }
.permission-dot.edit { background: #e2a028; }
.permission-dot.view { background: #8b9aa6; }

.ai-order-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.ai-order-card {
    display: grid;
    grid-template-columns: minmax(310px, 1.25fr) minmax(480px, 1.4fr) 28px;
    align-items: center;
    gap: 22px;
    min-height: 115px;
    padding: 19px 21px;
    border: 1px solid #dce6ed;
    border-radius: 16px;
    color: inherit;
    background: #fff;
    text-decoration: none;
    box-shadow: 0 6px 22px rgba(2,36,92,.035);
    transition: .16s ease;
}
.ai-order-card:hover {
    transform: translateY(-1px);
    border-color: #b9dbe4;
    box-shadow: 0 11px 30px rgba(2,36,92,.07);
}
.order-number-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.order-number-row > strong {
    color: var(--maxim-navy);
    font-size: 17px;
}
.order-customer {
    margin-top: 7px;
    color: #426078;
    font-size: 13px;
    font-weight: 700;
}
.order-source {
    max-width: 530px;
    margin-top: 4px;
    overflow: hidden;
    color: #94a0aa;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.order-meta {
    display: grid;
    grid-template-columns: repeat(5, minmax(75px, 1fr));
    gap: 14px;
}
.order-meta > div {
    min-width: 0;
}
.order-meta span,
.order-meta strong,
.order-meta small {
    display: block;
}
.order-meta span {
    color: #9aa6af;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.order-meta strong {
    margin-top: 4px;
    overflow: hidden;
    color: #3d596d;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.order-meta small {
    margin-top: 2px;
    color: #c07c18;
    font-size: 9px;
}
.order-arrow {
    color: #9eb0bc;
    font-size: 30px;
    font-weight: 300;
}

.workflow-status {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 9px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 850;
    letter-spacing: .05em;
    text-transform: uppercase;
}
.workflow-status.large {
    min-height: 29px;
    padding: 0 12px;
    font-size: 10px;
}
.workflow-status.received { color: #50677a; background: #eef2f5; }
.workflow-status.processing { color: #176c87; background: #e7f6fa; }
.workflow-status.review { color: #9c6515; background: #fff2d7; }
.workflow-status.approved { color: #23704f; background: #e7f7ef; }
.workflow-status.imported { color: #174f84; background: #e6f0fa; }
.workflow-status.error { color: #9b3842; background: #fdebed; }
.workflow-status.rejected { color: #86505a; background: #f4e9ec; }

.warning-badge,
.review-badge,
.mapping-badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
}
.warning-badge,
.mapping-badge {
    color: #a26712;
    background: #fff3dc;
}
.review-badge {
    color: #0a7387;
    background: #e7f8fa;
}

.ai-empty { margin-top: 10px; }

/* detail */
.ai-detail-content { max-width: 1680px; }
.ai-detail-topbar { position: sticky; top: 0; z-index: 20; }
.detail-breadcrumb {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 15px;
    color: #91a0ab;
    font-size: 11px;
}
.detail-breadcrumb a {
    color: #58768b;
    font-weight: 700;
    text-decoration: none;
}
.detail-breadcrumb a:hover { color: var(--maxim-blue); }

.ai-detail-grid {
    display: grid;
    grid-template-columns: minmax(320px, .72fr) minmax(620px, 1.28fr);
    gap: 19px;
    align-items: start;
}
.source-panel,
.review-panel {
    min-width: 0;
}
.source-panel {
    position: sticky;
    top: 108px;
    max-height: calc(100vh - 135px);
    overflow-y: auto;
    padding-right: 3px;
}
.panel-title {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 13px;
}
.panel-title h3 {
    margin: 4px 0 0;
    color: var(--maxim-navy);
    font-size: 20px;
}
.confidence-chip {
    padding: 7px 9px;
    border-radius: 999px;
    color: #087285;
    background: #e7f8fa;
    font-size: 10px;
    font-weight: 800;
}

.source-email-card,
.source-placeholder,
.warning-panel,
.history-panel,
.review-card {
    margin-bottom: 14px;
    border: 1px solid #dce6ed;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 6px 22px rgba(2,36,92,.03);
}
.source-email-card {
    padding: 16px;
}
.source-email-card > div {
    display: grid;
    grid-template-columns: 65px 1fr;
    gap: 9px;
    padding: 6px 0;
    border-bottom: 1px solid #f0f3f5;
}
.source-email-card > div:last-child { border-bottom: 0; }
.source-email-card span {
    color: #9aa6af;
    font-size: 10px;
    text-transform: uppercase;
}
.source-email-card strong {
    overflow-wrap: anywhere;
    color: #4e687c;
    font-size: 11px;
    font-weight: 650;
}

.source-placeholder {
    min-height: 260px;
    display: grid;
    place-items: center;
    align-content: center;
    padding: 30px;
    text-align: center;
    background:
        linear-gradient(rgba(250,253,254,.93), rgba(250,253,254,.93)),
        url("../img/maxim-wave.svg") center/cover no-repeat;
}
.source-placeholder-icon {
    width: 55px;
    height: 55px;
    display: grid;
    place-items: center;
    margin-bottom: 12px;
    border-radius: 15px;
    color: #0a8198;
    background: #e5f7f9;
    font-size: 22px;
}
.source-placeholder strong {
    color: #3f5e75;
    font-size: 13px;
}
.source-placeholder p {
    max-width: 330px;
    margin: 7px 0 0;
    color: #8b9aa6;
    font-size: 11px;
    line-height: 1.5;
}

.attachment-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
}
.attachment-list a {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 12px;
    border: 1px solid #dce6ed;
    border-radius: 11px;
    color: inherit;
    background: #fff;
    text-decoration: none;
}
.attachment-list a:hover { border-color: #b6dbe4; }
.attachment-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    color: #a84b52;
    background: #fdebed;
    font-size: 9px;
    font-weight: 850;
}
.attachment-list strong,
.attachment-list small { display: block; }
.attachment-list strong {
    color: #4a6376;
    font-size: 11px;
}
.attachment-list small {
    margin-top: 2px;
    color: #9aa6af;
    font-size: 9px;
}

.warning-panel,
.history-panel { padding: 15px; }
.warning-panel h4,
.history-panel h4 {
    margin: 0 0 11px;
    color: #466176;
    font-size: 12px;
}
.warning-row {
    display: flex;
    gap: 9px;
    padding: 10px;
    border-radius: 10px;
    background: #fff8ea;
}
.warning-row > span {
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 50%;
    color: #a66a12;
    background: #ffe8b7;
    font-size: 11px;
    font-weight: 900;
}
.warning-row strong {
    color: #8c641f;
    font-size: 10px;
}
.warning-row p {
    margin: 2px 0 0;
    color: #866f48;
    font-size: 10px;
    line-height: 1.45;
}

.history-row {
    position: relative;
    display: flex;
    gap: 10px;
    padding: 7px 0;
}
.history-dot {
    width: 9px;
    height: 9px;
    margin-top: 4px;
    flex: 0 0 auto;
    border: 2px solid #8bd2d8;
    border-radius: 50%;
    background: #fff;
}
.history-row strong,
.history-row small { display: block; }
.history-row strong {
    color: #526d80;
    font-size: 10px;
}
.history-row small {
    margin-top: 2px;
    color: #9ba7b0;
    font-size: 9px;
}
.history-empty {
    color: #9aa6af;
    font-size: 10px;
}

.review-title {
    min-height: 48px;
    align-items: center;
}
.review-flags {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.review-card {
    padding: 20px;
}
.review-section-title {
    margin-bottom: 15px;
    color: #294d69;
    font-size: 13px;
    font-weight: 850;
}
.review-card .field {
    height: 43px;
    margin-bottom: 4px;
    font-size: 12px;
}
.review-card .field[readonly],
.review-card .textarea[readonly] {
    color: #596f80;
    background: #f7f9fa;
}
.ai-original {
    min-height: 15px;
    margin-bottom: 12px;
    color: #9ba8b2;
    font-size: 9px;
}
.text-original { margin-top: 6px; }
.readonly-box {
    min-height: 60px;
    padding: 12px 13px;
    border: 1px solid #dbe5ec;
    border-radius: 11px;
    background: #f8fafb;
}
.readonly-box strong,
.readonly-box span { display: block; }
.readonly-box strong {
    color: #415e73;
    font-size: 12px;
}
.readonly-box span {
    margin-top: 4px;
    color: #8d9ca8;
    font-size: 10px;
}

.items-card { padding-bottom: 15px; }
.order-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.order-item {
    padding: 14px;
    border: 1px solid #e0e8ed;
    border-radius: 12px;
    background: #fcfdfe;
}
.item-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 11px;
}
.item-head > div:first-child {
    display: flex;
    align-items: center;
    gap: 8px;
}
.item-line {
    display: inline-grid;
    place-items: center;
    min-width: 25px;
    height: 22px;
    padding: 0 6px;
    border-radius: 7px;
    color: #678092;
    background: #edf3f6;
    font-size: 9px;
    font-weight: 800;
}
.item-head strong {
    color: #36556c;
    font-size: 12px;
}
.mapping-state {
    display: inline-flex;
    align-items: center;
    min-height: 23px;
    padding: 0 8px;
    border-radius: 999px;
    color: #a36913;
    background: #fff3da;
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
}
.mapping-state.mapped {
    color: #267250;
    background: #e8f7ef;
}
.item-form-grid {
    display: grid;
    grid-template-columns: minmax(220px, 2fr) 90px 75px 110px 135px;
    gap: 9px;
}
.item-description { grid-column: span 1; }
.item-note { grid-column: 1 / -1; }
.item-form-grid label {
    font-size: 9px;
}
.item-form-grid .field {
    height: 38px;
    padding: 0 10px;
    font-size: 11px;
}
.mapping-next {
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px dashed #bcd9df;
    border-radius: 11px;
    background: #f6fbfc;
}
.mapping-next strong {
    color: #3d6976;
    font-size: 10px;
}
.mapping-next p {
    margin: 3px 0 0;
    color: #7d949c;
    font-size: 9px;
    line-height: 1.5;
}

.review-actions {
    display: flex;
    justify-content: flex-end;
    gap: 9px;
    padding: 4px 0 8px;
}
.secondary-button.strong {
    font-weight: 800;
}
.approve-button,
.danger-button {
    min-height: 45px;
    padding: 0 18px;
    border: 0;
    border-radius: 10px;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}
.approve-button {
    color: #fff;
    background: linear-gradient(100deg, #16724e, #2aa674);
    box-shadow: 0 8px 20px rgba(42,166,116,.18);
}
.approve-button:disabled {
    cursor: not-allowed;
    opacity: .42;
}
.danger-button {
    color: #9a4048;
    border: 1px solid #ecced2;
    background: #fff3f4;
}
.approval-block-note {
    margin-top: 5px;
    padding: 11px 13px;
    border-radius: 10px;
    color: #986315;
    background: #fff4df;
    font-size: 10px;
    text-align: right;
}
.approval-block-note.info {
    color: #537387;
    background: #eef6f8;
}

@media (max-width: 1250px) {
    .ai-order-card {
        grid-template-columns: 1fr 1.15fr 25px;
    }
    .order-meta {
        grid-template-columns: repeat(3, minmax(80px,1fr));
    }
    .ai-detail-grid {
        grid-template-columns: 1fr;
    }
    .source-panel {
        position: static;
        max-height: none;
    }
}
@media (max-width: 900px) {
    .ai-order-card {
        grid-template-columns: 1fr 24px;
    }
    .order-meta {
        grid-column: 1;
        grid-row: 2;
    }
    .order-arrow {
        grid-column: 2;
        grid-row: 1 / span 2;
    }
    .item-form-grid {
        grid-template-columns: 1fr 1fr;
    }
    .item-description,
    .item-note {
        grid-column: 1 / -1;
    }
}
@media (max-width: 650px) {
    .ai-page-head {
        align-items: flex-start;
        flex-direction: column;
    }
    .ai-toolbar {
        align-items: stretch;
        flex-direction: column;
    }
    .order-meta {
        grid-template-columns: 1fr 1fr;
    }
    .ai-order-card {
        padding: 15px;
    }
    .item-form-grid {
        grid-template-columns: 1fr;
    }
    .item-description,
    .item-note {
        grid-column: auto;
    }
    .review-actions {
        flex-direction: column;
    }
    .approve-button,
    .danger-button,
    .secondary-button.strong {
        width: 100%;
    }
}


/* ===== MAXim Portal 0008: mapování položek ===== */

.partner-card {
    margin-bottom: 14px;
    padding: 14px 15px;
    border: 1px solid #dce6ed;
    border-radius: 13px;
    background: #fff;
}
.partner-card.linked {
    border-color: #cde7dc;
    background: #f7fcf9;
}
.partner-card.unlinked {
    border-color: #eed9b5;
    background: #fffaf0;
}
.partner-card-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}
.partner-card-head span {
    color: #8d9ca7;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}
.partner-card-head strong {
    color: #2b7454;
    font-size: 9px;
    text-transform: uppercase;
}
.partner-card.unlinked .partner-card-head strong { color: #a46a15; }
.partner-card-name {
    color: #3f5d72;
    font-size: 12px;
    font-weight: 800;
}
.partner-card-meta {
    margin-top: 3px;
    color: #8c9aa5;
    font-size: 9px;
}

.items-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.cache-info {
    color: #8fa0aa;
    font-size: 9px;
    font-weight: 600;
}
.mapping-cache-warning {
    margin-bottom: 13px;
    padding: 10px 12px;
    border: 1px solid #efd8b2;
    border-radius: 9px;
    color: #90651f;
    background: #fff9ed;
    font-size: 10px;
    line-height: 1.45;
}
.mapped-all-badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    color: #267250;
    background: #e8f7ef;
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
}

.order-item.needs-mapping {
    border-color: #ead9b9;
}
.order-item.is-mapped {
    border-color: #cae4d9;
}

.card-mapping-box {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e7edf1;
}
.card-mapping-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 7px;
}
.card-mapping-label > span {
    color: #45667c;
    font-size: 10px;
    font-weight: 850;
}
.card-mapping-label small {
    color: #34805f;
    font-size: 8px;
    font-weight: 700;
}
.unmapped-card,
.mapped-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 11px 12px;
    border-radius: 10px;
}
.unmapped-card {
    border: 1px dashed #dfc99f;
    background: #fffbf2;
}
.unmapped-card strong,
.unmapped-card span {
    display: block;
}
.unmapped-card strong {
    color: #7c611f;
    font-size: 10px;
}
.unmapped-card span {
    margin-top: 3px;
    color: #9a875e;
    font-size: 9px;
}
.map-button {
    flex: 0 0 auto;
    min-height: 34px;
    padding: 0 12px;
    border: 0;
    border-radius: 8px;
    color: #fff;
    background: linear-gradient(100deg, #0a7694, #16a6bb);
    font: inherit;
    font-size: 9px;
    font-weight: 850;
    cursor: pointer;
}
.map-button:disabled {
    cursor: not-allowed;
    opacity: .4;
}
.mapping-hint {
    margin-top: 6px;
    color: #8c9aa4;
    font-size: 8px;
}
.mapping-hint.error { color: #a8656d; }

.mapped-card {
    flex-wrap: wrap;
    border: 1px solid #cde7dc;
    background: #f5fbf8;
}
.mapped-card-main {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 230px;
}
.mapped-check {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 8px;
    color: #277554;
    background: #dff2e8;
    font-size: 12px;
    font-weight: 900;
}
.mapped-card-main strong,
.mapped-card-main span {
    display: block;
}
.mapped-card-main strong {
    color: #2e5e49;
    font-size: 11px;
}
.mapped-card-main span {
    margin-top: 2px;
    color: #799082;
    font-size: 9px;
}
.mapped-card-meta {
    color: #7d9287;
    font-size: 9px;
}
.mapped-card-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}
.link-button {
    padding: 0;
    border: 0;
    color: #39758b;
    background: transparent;
    font: inherit;
    font-size: 9px;
    font-weight: 750;
    cursor: pointer;
}
.link-button:hover { text-decoration: underline; }
.link-button.danger-text { color: #a5555e; }

/* modal */
body.modal-open { overflow: hidden; }
.mapping-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
}
.mapping-modal.open { display: block; }
.mapping-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(6,28,55,.48);
    backdrop-filter: blur(2px);
}
.mapping-modal-dialog {
    position: absolute;
    left: 50%;
    top: 50%;
    width: min(720px, calc(100vw - 34px));
    max-height: min(720px, calc(100vh - 40px));
    display: flex;
    flex-direction: column;
    transform: translate(-50%, -50%);
    border: 1px solid #d6e4eb;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 30px 80px rgba(2,36,92,.25);
    overflow: hidden;
}
.mapping-modal-head {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 20px 22px 15px;
    border-bottom: 1px solid #e8eef2;
}
.mapping-modal-head h3 {
    margin: 4px 0 2px;
    color: var(--maxim-navy);
    font-size: 21px;
}
.mapping-modal-head p {
    margin: 0;
    color: #8496a3;
    font-size: 10px;
}
.modal-close {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border: 0;
    border-radius: 9px;
    color: #698093;
    background: #eef3f6;
    font-size: 21px;
    cursor: pointer;
}
.mapping-search-wrap {
    position: relative;
    padding: 17px 22px 6px;
}
.mapping-search-wrap .field {
    height: 45px;
    margin: 0;
    padding-right: 44px;
}
.mapping-search-spinner {
    position: absolute;
    right: 36px;
    top: 30px;
    width: 16px;
    height: 16px;
    display: none;
    border: 2px solid #d5e5eb;
    border-top-color: #1598ad;
    border-radius: 50%;
    animation: mapping-spin .7s linear infinite;
}
.mapping-search-spinner.visible { display: block; }
@keyframes mapping-spin { to { transform: rotate(360deg); } }

.mapping-search-help {
    padding: 0 22px 12px;
    color: #8c9aa5;
    font-size: 9px;
    line-height: 1.45;
}
.mapping-results {
    min-height: 240px;
    max-height: 430px;
    overflow-y: auto;
    padding: 0 22px 16px;
}
.mapping-results-empty {
    display: grid;
    min-height: 220px;
    place-items: center;
    color: #9aa7b0;
    font-size: 11px;
}
.mapping-results-empty.error { color: #aa5b63; }
.mapping-result {
    width: 100%;
    display: grid;
    grid-template-columns: 145px 1fr;
    gap: 3px 12px;
    padding: 11px 12px;
    border: 1px solid transparent;
    border-bottom-color: #edf1f4;
    color: inherit;
    background: #fff;
    text-align: left;
    cursor: pointer;
}
.mapping-result:hover {
    border-color: #d3e5eb;
    border-radius: 9px;
    background: #f8fcfd;
}
.mapping-result.selected {
    border-color: #8ccfd8;
    border-radius: 9px;
    background: #edf9fa;
}
.mapping-result-code {
    grid-row: 1 / span 2;
    align-self: center;
    color: #214f6d;
    font-size: 11px;
    font-weight: 850;
}
.mapping-result-name {
    color: #4d687b;
    font-size: 10px;
    font-weight: 700;
}
.mapping-result-meta {
    color: #94a1ab;
    font-size: 8px;
}
.mapping-modal-foot {
    display: flex;
    justify-content: flex-end;
    gap: 9px;
    padding: 13px 22px;
    border-top: 1px solid #e8eef2;
    background: #fbfcfd;
}
.mapping-modal-foot .approve-button {
    min-height: 39px;
}
.mapping-modal-foot .secondary-button {
    min-height: 39px;
}

@media (max-width: 700px) {
    .unmapped-card,
    .mapped-card {
        align-items: stretch;
        flex-direction: column;
    }
    .map-button { width: 100%; }
    .mapping-result {
        grid-template-columns: 1fr;
    }
    .mapping-result-code {
        grid-row: auto;
    }
}

/* 0009.2 – API klienti a skupiny firem */
.scope-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 18px;margin-top:12px}.scope-grid .check-line{display:flex;gap:9px;align-items:flex-start;padding:8px 10px;border:1px solid #e4eaf3;border-radius:8px}.scope-grid small{display:block;color:#6b778c;font-weight:400;margin-top:2px}.api-client-summary{display:flex;gap:18px;flex-wrap:wrap;margin:-4px 0 14px;color:#59677c}.api-key-actions{display:flex;gap:16px;align-items:flex-start;flex-wrap:wrap;margin-top:16px}.inline-import-form{display:flex;gap:8px;align-items:center;margin-top:10px}.inline-import-form .field{min-width:320px}@media(max-width:800px){.scope-grid{grid-template-columns:1fr}.inline-import-form{display:block}.inline-import-form .field{min-width:0;width:100%;margin-bottom:8px}}

/* 0017 – ruční AI zpracování + interní náklady */
.ai-head-actions{display:flex;gap:9px;align-items:center;flex-wrap:wrap;justify-content:flex-end}.inline-action-form{margin:0}.ai-cost-cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:0 0 18px}.ai-cost-card{padding:16px 18px;border:1px solid #dce7ee;border-radius:14px;background:#fff;box-shadow:0 6px 22px rgba(2,36,92,.04)}.ai-cost-card span{display:block;color:#82909c;font-size:11px;margin-bottom:5px}.ai-cost-card strong{display:block;color:#214f6d;font-size:22px}.ai-cost-filter{display:flex;gap:9px;align-items:end;flex-wrap:wrap;margin-bottom:18px}.ai-cost-filter label{display:grid;gap:5px;color:#667788;font-size:11px;font-weight:700}.ai-cost-filter select,.ai-cost-filter input{min-height:40px;padding:0 10px;border:1px solid #d3e0e9;border-radius:9px;background:#fff}.cost-ok{color:#176046}.cost-error{color:#8a3441}@media(max-width:900px){.ai-cost-cards{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:600px){.ai-cost-cards{grid-template-columns:1fr}.ai-page-head{align-items:stretch}.ai-head-actions{justify-content:flex-start}}

/* 0017.2 - vizualni prubeh rucniho AI zpracovani */
.ai-process-overlay{position:fixed;inset:0;z-index:5000;display:none;align-items:center;justify-content:center;padding:24px;background:rgba(9,35,72,.18);backdrop-filter:blur(2px)}
.ai-process-overlay.visible{display:flex}
.ai-process-panel{display:flex;align-items:center;gap:16px;max-width:520px;padding:20px 24px;border:1px solid #d8e6ee;border-radius:16px;background:#fff;box-shadow:0 18px 55px rgba(2,36,92,.18);color:#123b61}
.ai-process-panel strong{display:block;margin-bottom:4px;font-size:16px}
.ai-process-panel span{display:block;color:#6f8190;font-size:13px;line-height:1.45}
.ai-process-spinner{width:30px;height:30px;flex:0 0 30px;border:3px solid #d9e8ef;border-top-color:#1a7897;border-radius:50%;animation:ai-process-spin .8s linear infinite}
.inline-action-form button:disabled{cursor:wait;opacity:.72}
@keyframes ai-process-spin{to{transform:rotate(360deg)}}

/* 0018 - zakaznicky Portal / Muj MAXim */
.customer-hero{display:flex;align-items:center;justify-content:space-between;gap:24px;margin-bottom:22px;padding:25px 28px;border:1px solid #d9e6ed;border-radius:18px;background:linear-gradient(120deg,#fff,#f3fafc);box-shadow:0 8px 28px rgba(2,36,92,.05)}
.customer-hero h3{margin:4px 0 8px;color:var(--maxim-navy);font-size:28px}.customer-meta{display:flex;gap:8px 18px;flex-wrap:wrap;color:#718397;font-size:12px}.maxim-pill{display:grid;place-items:center;min-width:94px;height:52px;padding:0 20px;border-radius:14px;color:#fff;background:linear-gradient(110deg,var(--maxim-navy),var(--maxim-blue-2),var(--maxim-cyan));font-size:21px;font-weight:800;box-shadow:0 10px 25px rgba(4,95,147,.18)}
.portal-section-head{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin:28px 0 14px}.portal-section-head.compact{margin-top:34px}.portal-section-head h3,.portal-home-head h3{margin:3px 0 4px;color:var(--maxim-navy);font-size:22px}.portal-section-head p,.portal-home-head p{margin:0;color:#778997;font-size:12px;line-height:1.55}.portal-home-head{margin:30px 0 14px}
.maxim-info-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.maxim-info-card{min-height:118px;padding:18px;border:1px solid #dce7ee;border-radius:14px;background:#fff;box-shadow:0 6px 22px rgba(2,36,92,.04)}.maxim-info-card>span{display:block;color:#82909c;font-size:11px;font-weight:650}.maxim-info-card strong{display:block;margin:6px 0 4px;color:#214f6d;font-size:28px}.maxim-info-card small{display:block;color:#7d8e9a;font-size:10px;line-height:1.45}
.catalog-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.catalog-card{display:flex;gap:13px;min-height:120px;padding:17px;border:1px solid #dbe7ed;border-radius:14px;background:#fff;transition:.15s ease}.catalog-card.active{border-color:#bfe3dc;background:linear-gradient(135deg,#fff,#f2fbf8)}.catalog-card.inactive{border-color:#e4e8eb;background:#f5f7f8;filter:saturate(.25)}.catalog-card.inactive:hover{filter:saturate(.55);background:#f8fafb}.catalog-state{display:grid;place-items:center;width:31px;height:31px;flex:0 0 31px;border-radius:9px;color:#fff;background:#2b8d72;font-size:15px;font-weight:850}.catalog-card.inactive .catalog-state{color:#8c9aa4;background:#e3e8eb}.catalog-card h4{margin:1px 0 5px;color:#244b67;font-size:14px}.catalog-card p{min-height:34px;margin:0 0 8px;color:#788b98;font-size:10px;line-height:1.5}.catalog-card span{color:#2d846c;font-size:9px;font-weight:800;text-transform:uppercase;letter-spacing:.05em}.catalog-card.inactive span{color:#8d9aa3}.soft-empty{padding:22px;border:1px dashed #d7e1e7;border-radius:13px;color:#8a99a4;background:#f8fafb;font-size:12px;text-align:center}
@media(max-width:1050px){.maxim-info-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.catalog-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:650px){.customer-hero{align-items:flex-start;flex-direction:column}.maxim-info-grid,.catalog-grid{grid-template-columns:1fr}.maxim-pill{min-width:0}.customer-meta{flex-direction:column;gap:5px}}

/* 0018.1 - katalog MAXim a prirazeni firme */
.admin-catalog-list,.company-catalog-list{display:grid;gap:8px}.admin-catalog-row,.company-catalog-row{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;padding:13px 15px;border:1px solid #dfe8ee;border-radius:11px;background:#fff}.admin-catalog-row.child,.company-catalog-row.child{margin-left:30px;border-left:3px solid #cfe5ec}.admin-catalog-row strong,.company-catalog-row strong{color:#244b67;font-size:13px}.admin-catalog-row small{display:block;margin-top:2px;color:#8998a4;font-size:9px}.admin-catalog-row p,.company-catalog-row p{margin:4px 0 0;color:#7b8c98;font-size:10px;line-height:1.45}.catalog-visibility{display:inline-flex;align-items:center;min-height:22px;padding:0 8px;border-radius:999px;font-size:8px;font-weight:850;letter-spacing:.05em}.catalog-visibility.public{color:#246c59;background:#e8f7f1}.catalog-visibility.selected{color:#735b24;background:#fbf2d9}.company-catalog-row{justify-content:flex-start;cursor:pointer}.company-catalog-row>input[type=checkbox]{width:18px;height:18px;margin:2px 0 0;flex:0 0 18px}.company-catalog-text{width:100%}.company-catalog-text strong{margin-right:8px}.company-catalog-text .catalog-visibility{vertical-align:middle}.compact-field{max-width:460px;margin-top:8px;min-height:35px!important}.catalog-card.catalog-child{margin-left:18px;min-height:105px;border-style:dashed}.catalog-card.catalog-child h4:before{content:'↳ ';color:#7aa8b6}.catalog-variant{display:block;margin:-3px 0 7px;color:#587486!important;font-size:9px!important;text-transform:none!important;letter-spacing:0!important}@media(max-width:650px){.admin-catalog-row.child,.company-catalog-row.child,.catalog-card.catalog-child{margin-left:0}}


/* 0018.2 - sprava licenci firmy */
.company-admin-actions{display:flex;gap:9px;align-items:center;flex-wrap:wrap}.inline-delete-form{display:inline;margin-left:10px}.danger-link{border:0;background:none;color:#a34752!important;cursor:pointer}.license-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:12px}.license-card{padding:17px 18px;border:1px solid #dce7ee;border-radius:14px;background:#fff;box-shadow:0 6px 22px rgba(2,36,92,.04)}.license-card>div>span{display:block;color:#82909c;font-size:10px}.license-card>div>strong{display:block;margin-top:4px;color:#214f6d;font-size:16px}.license-card dl{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:15px 0 0;padding-top:12px;border-top:1px solid #edf1f4}.license-card dl div{min-width:0}.license-card dt{color:#8a99a5;font-size:9px}.license-card dd{margin:3px 0 0;color:#385c73;font-size:12px;font-weight:750}@media(max-width:850px){.license-cards{grid-template-columns:1fr}}

/* 0019 - pozadavky + doladeni karet licenci */
.license-card-polished{position:relative;overflow:hidden;padding:19px 20px}.license-card-polished:before{content:'';position:absolute;inset:0 auto 0 0;width:4px;background:#2b9a7d}.license-card-head{display:flex;justify-content:space-between;gap:15px;align-items:flex-start}.license-card-head>div>span{display:block;color:#82909c;font-size:10px}.license-card-head>div>strong{display:block;margin-top:4px;color:#173f61;font-size:17px}.license-active-badge{padding:5px 8px;border-radius:999px;background:#e8f7f1;color:#23765f;font-size:8px;font-weight:850;letter-spacing:.05em}.license-number{margin-top:17px;padding-top:13px;border-top:1px solid #edf1f4;color:#315a74;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:13px;font-weight:750}.license-user-count{display:flex;justify-content:space-between;align-items:end;margin-top:11px}.license-user-count span{color:#8a99a5;font-size:9px}.license-user-count strong{color:#214f6d;font-size:22px}
.request-filter{display:grid;grid-template-columns:220px minmax(240px,1fr) auto;gap:9px;margin-bottom:18px;padding:13px;border:1px solid #dce7ee;border-radius:13px;background:#fff}.request-list{display:grid;gap:10px}.request-card{display:flex;justify-content:space-between;gap:22px;padding:17px 19px;border:1px solid #dce7ee;border-left:4px solid #86a6b9;border-radius:13px;background:#fff;color:inherit;text-decoration:none;box-shadow:0 5px 18px rgba(2,36,92,.035);transition:.15s}.request-card:hover{transform:translateY(-1px);border-color:#c8dce6;box-shadow:0 8px 24px rgba(2,36,92,.07)}.request-card.priority-high{border-left-color:#c45d62}.request-card.priority-normal{border-left-color:#3b8ba7}.request-card.priority-low{border-left-color:#a7b4bc}.request-main{min-width:0}.request-main h4{margin:7px 0 5px;color:#173f61;font-size:16px}.request-main p{margin:0;color:#778997;font-size:11px;line-height:1.5}.request-badges{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.request-type,.request-status,.request-publish{display:inline-flex;align-items:center;min-height:22px;padding:0 8px;border-radius:999px;font-size:8px;font-weight:850;letter-spacing:.04em;text-transform:uppercase}.request-type{background:#eaf3f7;color:#2d6e89}.type-error{background:#fbe8e9;color:#a2444c}.type-service{background:#e9f6f1;color:#24735d}.type-version{background:#eeeafb;color:#66529b}.type-job{background:#e7f0fb;color:#315f91}.request-status{background:#eef1f3;color:#65737d}.status-in_progress{background:#e6f3fa;color:#28728e}.status-waiting_customer{background:#fff2d9;color:#8b681e}.status-done,.status-invoiced{background:#e7f6ee;color:#267159}.request-publish{background:#f2ebfb;color:#72519a}.request-meta{display:flex;min-width:180px;flex-direction:column;gap:4px;align-items:flex-end;color:#83929e;font-size:9px}.request-detail-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:15px}.request-detail-head .request-badges{margin-top:12px}.request-summary-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:14px}.request-summary-grid article{padding:13px 15px;border:1px solid #dce7ee;border-radius:12px;background:#fff}.request-summary-grid span{display:block;color:#8796a1;font-size:9px}.request-summary-grid strong{display:block;margin-top:4px;color:#315a74;font-size:12px}.request-columns{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(300px,.8fr);gap:12px}.request-columns .form-card{margin-bottom:12px}.request-note{color:#49677b;font-size:12px;line-height:1.65;white-space:normal}.request-textarea{height:auto;min-height:132px;padding:12px 15px;resize:vertical;line-height:1.55;overflow-y:hidden}.internal-card{border-color:#eadfca!important;background:#fffdf8!important}.request-textarea{width:100%}.attachment-list{display:grid;gap:6px}.attachment-list a{display:flex;flex-direction:column;gap:2px;padding:9px 10px;border:1px solid #e3eaee;border-radius:9px;color:#315a74;text-decoration:none;background:#fbfcfd}.attachment-list a span{color:#8a98a3;font-size:8px}.attachment-upload{display:grid;gap:8px;margin-top:12px}.work-entry-list{display:grid;gap:7px;margin-bottom:13px}.work-entry{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:14px;align-items:center;padding:10px 12px;border:1px solid #e1e9ed;border-radius:9px}.work-entry>div:first-child{display:flex;flex-direction:column}.work-entry>div:first-child span{color:#83929d;font-size:9px}.work-entry-form{display:grid;grid-template-columns:180px minmax(180px,1fr) 110px 130px 130px auto;gap:8px;align-items:end}.request-form .form-card{margin-bottom:12px}
@media(max-width:950px){.request-columns{grid-template-columns:1fr}.request-summary-grid{grid-template-columns:repeat(2,1fr)}.work-entry-form{grid-template-columns:1fr 1fr}.request-filter{grid-template-columns:1fr}.request-card{flex-direction:column}.request-meta{align-items:flex-start;flex-direction:row;flex-wrap:wrap}}
@media(max-width:600px){.request-summary-grid{grid-template-columns:1fr}.work-entry-form{grid-template-columns:1fr}}


/* 0019.8 - kontrola a mazani e-mailovych navrhu */
.request-mail-review-form{max-width:1180px;margin-left:auto;margin-right:auto;padding:26px 28px}
.request-mail-review-form .field-wrap{min-width:0}
.request-mail-review-form .field{margin-bottom:17px}
.request-mail-textarea{min-height:132px;margin-bottom:17px}
.request-mail-bulletin{grid-column:1/-1;margin-top:2px}
.request-mail-review-actions{justify-content:space-between;padding:10px 0 0;border-top:1px solid #edf1f4;margin-top:6px}
.request-mail-action-group{display:flex;align-items:center;justify-content:flex-end;gap:10px}
.request-mail-review-actions .primary-button{height:45px;margin-top:0}.request-mail-action-group .secondary-button{min-height:45px}
.request-mail-card-actions{display:flex;align-items:center;justify-content:flex-end;gap:12px;margin-top:4px}
.request-mail-delete-form{display:inline;margin:0}
.request-mail-delete-link{padding:0;font:inherit;font-size:9px;font-weight:800}
@media(max-width:700px){.request-mail-review-form{padding:20px}.request-mail-review-actions{align-items:stretch;flex-direction:column-reverse}.request-mail-action-group{align-items:stretch;flex-direction:column}.request-mail-review-actions .danger-button,.request-mail-action-group .secondary-button,.request-mail-action-group .primary-button{width:100%}.request-mail-card-actions{justify-content:flex-start}}


/* 0019.9 - nastaveni e-mailovych pozadavku + navrat po schvaleni */
.request-mail-settings-form{max-width:1180px;padding:27px 28px}
.request-mail-settings-form .field-wrap{min-width:0}
.request-mail-settings-form .field{margin-bottom:4px}
.request-mail-settings-form .field-wrap{margin-bottom:18px}
.request-mail-settings-form .field-help{display:block;margin:7px 2px 0;line-height:1.45}
.request-mail-settings-textarea{min-height:92px;margin-bottom:0}
.request-mail-settings-toggle{grid-column:1/-1;margin-top:2px}
.request-mail-settings-actions{justify-content:flex-end;padding:18px 0 0;margin-top:6px;border-top:1px solid #edf1f4}
.request-mail-settings-actions .secondary-button{min-height:46px;padding:0 20px}
.request-mail-settings-actions .primary-button{height:46px;margin-top:0}
.request-mail-last-scan{margin-top:14px!important}
@media(max-width:650px){.request-mail-settings-form{padding:20px}.request-mail-settings-actions{align-items:stretch;flex-direction:column-reverse}.request-mail-settings-actions .secondary-button,.request-mail-settings-actions .primary-button{width:100%}}

/* 0019.10 – stabilní navigace */
.nav-menu a.nav-subitem{padding-left:42px;font-size:12px;opacity:.92}
.nav-menu a.nav-subitem .nav-icon{font-size:12px}

/* 0019.10 – správa katalogu */
.admin-catalog-main{min-width:0;flex:1}
.admin-catalog-titleline{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.admin-catalog-actions{display:flex;align-items:center;gap:12px;flex:0 0 auto}
.admin-catalog-row.catalog-inactive{opacity:.62;background:#f8fafb}
.catalog-state{display:inline-flex;align-items:center;min-height:20px;padding:0 7px;border-radius:999px;font-size:8px;font-weight:850;letter-spacing:.04em}
.catalog-state.inactive{color:#7e5a5e;background:#f4e8ea}
.catalog-code{margin-top:6px!important;color:#9aa7b1!important;font-family:ui-monospace,SFMono-Regular,Consolas,monospace}
.catalog-edit-form{max-width:1050px}
@media(max-width:700px){.admin-catalog-row{align-items:stretch;flex-direction:column}.admin-catalog-actions{justify-content:space-between}}

/* 0019.11 – compact company module selection */
.company-catalog-modules-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.company-catalog-two-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.company-catalog-modules-grid .company-catalog-row,.company-catalog-two-grid .company-catalog-row{height:100%;min-height:78px;padding:11px 13px}
.company-catalog-modules-grid .company-catalog-row.child,.company-catalog-two-grid .company-catalog-row.child{margin-left:0}
.company-catalog-modules-grid .company-catalog-text,.company-catalog-two-grid .company-catalog-text{min-width:0}
.company-catalog-modules-grid .company-catalog-text strong,.company-catalog-modules-grid .company-catalog-text p,.company-catalog-two-grid .company-catalog-text strong,.company-catalog-two-grid .company-catalog-text p{overflow-wrap:anywhere}
@media(max-width:1150px){.company-catalog-modules-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:850px){.company-catalog-two-grid{grid-template-columns:1fr}}
@media(max-width:720px){.company-catalog-modules-grid{grid-template-columns:1fr}}

/* ===== MAXim Portal 0019.13: Centrální komunikace ===== */
.communication-page-title{margin:0 0 4px;color:var(--maxim-navy);font-size:24px}.communication-page-subtitle{margin:0;color:#8494a2;font-size:12px}.communication-filter{display:flex;gap:7px;flex-wrap:wrap;margin:-5px 0 18px}.communication-filter a{display:inline-flex;align-items:center;min-height:34px;padding:0 12px;border:1px solid #d6e2e9;border-radius:999px;background:#fff;color:#678095;font-size:11px;font-weight:800;text-decoration:none}.communication-filter a.active,.communication-filter a:hover{border-color:#9ed3df;background:#edf9fb;color:#087f9b}.communication-card .status-pill{min-height:22px;font-size:8px}.communication-card .status-pill.password-pending,.status-pill.communication-ready{color:#7a611d;background:#fff3d8}.communication-list{margin-top:8px}.communication-form{width:min(100%,1180px)}.communication-body{min-height:260px}.communication-audience-modes{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:18px}.communication-audience-modes label,.communication-role-grid label,.communication-company-option{display:flex;align-items:flex-start;gap:10px;padding:13px 14px;border:1px solid #dce7ee;border-radius:11px;background:#fbfdfe;cursor:pointer}.communication-audience-modes input,.communication-role-grid input,.communication-company-option input,.communication-confirm input{width:17px;height:17px;margin-top:1px;accent-color:var(--maxim-cyan)}.communication-audience-modes span,.communication-role-grid span{color:#35556d;font-size:12px;font-weight:750}.communication-group-select{max-width:520px;margin-bottom:18px}.communication-group-select label{display:block;margin-bottom:7px}.communication-company-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;max-height:460px;overflow:auto;padding-right:4px}.communication-company-option span{min-width:0}.communication-company-option strong,.communication-company-option small{display:block}.communication-company-option strong{color:#173f61;font-size:12px}.communication-company-option small{margin-top:3px;color:#8a9aa6;font-size:10px}.communication-role-help{margin:-7px 0 14px;color:#8494a2;font-size:11px}.communication-role-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.communication-actions{padding-bottom:20px}.communication-detail-subject{margin:10px 0 0;color:var(--maxim-navy);font-size:24px}.communication-preview{color:#49677b;font-size:13px;line-height:1.7;white-space:normal}.communication-preview>strong{display:block;margin-bottom:14px;color:#173f61;font-size:16px}.communication-preview>div{white-space:normal}.communication-recipient-table{overflow:auto}.communication-recipient-table .data-table{min-width:850px}.communication-recipient-table small{max-width:280px;color:#a24d52}.communication-send-card{max-width:720px;text-align:center;padding:40px}.communication-send-card h3{margin:12px 0 8px;color:var(--maxim-navy);font-size:24px}.communication-send-card p{color:#647f91;line-height:1.6}.communication-send-icon{display:grid;place-items:center;width:58px;height:58px;margin:0 auto;border-radius:17px;background:#e7f7fa;color:#087f9b;font-size:24px}.communication-confirm{display:flex;align-items:flex-start;gap:10px;max-width:560px;margin:24px auto 18px;padding:14px 16px;border:1px solid #dbe8ee;border-radius:12px;background:#f8fbfc;text-align:left;color:#48677b;font-size:12px}.communication-send-card .primary-button{margin:0 auto}.company-communication-link{display:inline-flex}
@media(max-width:900px){.communication-audience-modes,.communication-role-grid{grid-template-columns:1fr 1fr}.communication-company-grid{grid-template-columns:1fr}}
@media(max-width:620px){.communication-audience-modes,.communication-role-grid{grid-template-columns:1fr}.communication-send-card{padding:26px 20px}.communication-actions{align-items:stretch;flex-direction:column-reverse}.communication-actions .secondary-link,.communication-actions .secondary-button,.communication-actions .primary-button{width:100%}}


/* 0019.14 - kontakty firmy přímo na kartě */
.company-contact-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:15px}
.company-contact-heading .form-section-title{margin-bottom:4px}
.company-contact-heading .field-help{margin:0;max-width:760px}
.company-contact-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:8px}
.company-contact-card{display:block;min-width:0;padding:14px 15px;border:1px solid #dce7ee;border-radius:12px;background:#fbfdfe;color:inherit;text-decoration:none;transition:border-color .15s ease,box-shadow .15s ease,transform .15s ease}
.company-contact-card:hover{border-color:#9fd5df;box-shadow:0 7px 22px rgba(2,36,92,.06);transform:translateY(-1px)}
.company-contact-card.is-inactive{opacity:.64}
.company-contact-card-top{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.company-contact-card-top>div{min-width:0}
.company-contact-card strong{display:block;color:#173f61;font-size:12px}
.company-contact-card small{display:block;margin-top:2px;color:#8a9aa6;font-size:10px}
.company-contact-email,.company-contact-phone{margin-top:7px;overflow-wrap:anywhere;color:#4e6e82;font-size:11px}
.company-contact-phone{margin-top:3px;color:#7e919f}
.company-contact-roles{display:flex;flex-wrap:wrap;gap:5px;margin-top:10px}
.company-contact-roles span{display:inline-flex;align-items:center;min-height:22px;padding:2px 8px;border-radius:999px;background:#e9f7f4;color:#28745f;font-size:9px;font-weight:800}
.company-contact-empty{padding:20px;border:1px dashed #cedde5;border-radius:12px;background:#fbfdfe;color:#7f929f;text-align:center;font-size:12px}
.company-contact-summary{margin-top:11px}
@media(max-width:850px){.company-contact-heading{flex-direction:column}.company-contact-grid{grid-template-columns:1fr}}

/* 0019.15 - rejected e-mail request proposals */
.request-mail-rejected-heading {
    margin-top: 34px;
    padding-top: 24px;
    border-top: 1px solid #dbe7ef;
}
.request-mail-rejected-list { opacity: .96; }
.request-mail-rejected-card { background: #fbfcfd; }
.request-mail-error-reason { color: #8b4c57; font-weight: 600; }
.request-mail-retry-button { min-height: 38px; padding: 8px 14px; }

/* 0019.16 - centralni karta firmy */
.company-hub-head{display:flex;justify-content:space-between;gap:24px;align-items:flex-end;margin-bottom:22px}.company-hub-head h3{font-size:30px;margin:6px 0}.company-hub-head p{margin:0;color:#73849a}.company-hub-actions{display:flex;gap:10px;flex-wrap:wrap}.company-hub-stat-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:16px}.company-hub-stat{display:flex;flex-direction:column;min-height:118px;padding:20px;border:1px solid #d8e3ee;background:#fff;border-radius:18px;text-decoration:none;color:#08285d;box-shadow:0 8px 24px rgba(23,50,82,.04)}.company-hub-stat:hover{border-color:#7fc7d7;transform:translateY(-1px)}.company-hub-stat strong{font-size:28px;line-height:1}.company-hub-stat span{font-weight:800;margin-top:12px}.company-hub-stat small{color:#7b899a;margin-top:5px}.company-hub-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-bottom:16px}.company-hub-card{margin:0}.company-hub-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:14px}.company-hub-card-head .form-section-title{margin-bottom:2px}.company-hub-card-head p{margin:0}.company-hub-empty{padding:22px;border:1px dashed #cbd9e7;border-radius:14px;color:#7b899a;text-align:center}.company-hub-contact-list,.company-hub-list{display:grid;gap:8px}.company-hub-contact-list>a,.company-hub-list>a{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px 14px;border:1px solid #e0e8ef;border-radius:13px;text-decoration:none;color:#0a2c60;background:#fbfdff}.company-hub-contact-list>a:hover,.company-hub-list>a:hover{border-color:#9bd1dc;background:#fff}.company-hub-contact-list strong,.company-hub-list strong{display:block}.company-hub-contact-list span,.company-hub-list a>div>span{display:block;font-size:12px;color:#7b899a;margin-top:3px}.company-hub-tags{display:flex!important;gap:5px;flex-wrap:wrap;justify-content:flex-end}.company-hub-tags span{background:#edf5f3;color:#176650!important;border-radius:999px;padding:4px 7px;font-size:10px!important;font-weight:700;margin:0!important}.company-hub-tags span.ok{background:#e6f6ee}.company-hub-catalog{display:flex;flex-wrap:wrap;gap:8px}.company-hub-catalog>div{display:flex;align-items:center;gap:7px;padding:9px 11px;background:#f7fafc;border:1px solid #e1e9f0;border-radius:12px;max-width:100%}.company-hub-catalog strong{font-size:13px}.company-hub-catalog small{color:#7a8999;white-space:normal}.company-hub-catalog .catalog-visibility{font-size:9px;min-width:auto}.company-hub-inline-action{margin-top:12px}.company-hub-tech-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.company-hub-tech-grid>a{display:flex;flex-direction:column;padding:15px;border:1px solid #e0e8ef;border-radius:13px;text-decoration:none;color:#0a2c60;background:#fbfdff}.company-hub-tech-grid strong{font-size:22px}.company-hub-tech-grid span{font-weight:800;margin-top:5px}.company-hub-tech-grid small{color:#7b899a;margin-top:3px}.company-hub-note{white-space:normal;color:#536579;line-height:1.6}.company-hub-technical{margin-bottom:16px}@media(max-width:1050px){.company-hub-stat-grid,.company-hub-tech-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:760px){.company-hub-head{align-items:flex-start;flex-direction:column}.company-hub-grid,.company-hub-stat-grid,.company-hub-tech-grid{grid-template-columns:1fr}.company-hub-contact-list>a,.company-hub-list>a{align-items:flex-start;flex-direction:column}.company-hub-tags{justify-content:flex-start}}

/* 0019.18 - pracovní tok požadavků */
.request-workflow-tabs{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px;margin-bottom:12px}.request-workflow-tabs a{display:flex;align-items:center;gap:9px;min-height:54px;padding:10px 12px;border:1px solid #dce7ee;border-radius:12px;background:#fff;color:#607b8f;text-decoration:none}.request-workflow-tabs a strong{color:#173f61;font-size:19px}.request-workflow-tabs a span{font-size:10px;font-weight:750}.request-workflow-tabs a.active{border-color:#91d2df;background:#edf9fb;box-shadow:0 5px 18px rgba(2,36,92,.04)}.request-workflow-tabs a.active strong,.request-workflow-tabs a.active span{color:#087f9b}
.request-billing{display:inline-flex;align-items:center;min-height:22px;padding:0 8px;border-radius:999px;font-size:8px;font-weight:850;letter-spacing:.04em;text-transform:uppercase}.billing-undecided{color:#806b39;background:#f4f0e5}.billing-to_bill{color:#8a6118;background:#fff1d2}.billing-no_bill{color:#66727a;background:#eef1f3}.billing-invoiced{color:#267159;background:#e7f6ee}
.request-summary-six{grid-template-columns:repeat(6,minmax(0,1fr))}.request-workflow-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px;margin-bottom:12px}.request-workflow-card{margin:0}.request-flow-buttons{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;margin-top:14px}.request-flow-buttons form{margin:0}.request-flow-button{width:100%;min-height:42px;padding:0 9px;border:1px solid #d7e3ea;border-radius:10px;background:#fff;color:#526f83;font:inherit;font-size:10px;font-weight:800;cursor:pointer}.request-flow-button:hover{border-color:#99c9d7;background:#f6fbfc}.request-flow-button.current{border-color:#8ecfdd;background:#eaf8fa;color:#087f9b;cursor:default}.request-flow-dates{display:flex;gap:14px;flex-wrap:wrap;margin-top:13px;color:#8494a0;font-size:9px}.request-flow-dates strong{color:#4d6c81}.request-billing-form{display:grid;grid-template-columns:1fr 1fr;gap:8px 10px;margin-top:10px}.request-billing-form .field-wrap{min-width:0}.request-billing-form .field-wrap label{display:block;margin-bottom:5px;color:#667d8e;font-size:9px;font-weight:750}.request-billing-form .field{height:40px;margin:0;padding:0 11px;border-radius:9px;font-size:11px}.request-billing-save{grid-column:1/-1;justify-self:end;min-height:39px}.request-work-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:12px}.request-work-head .field-help{margin-top:4px}.request-work-total{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end}.request-work-total span{padding:7px 10px;border-radius:9px;background:#f3f8fa;color:#78909e;font-size:9px}.request-work-total strong{margin-left:4px;color:#315a74}.request-event-list{display:grid;gap:0;margin-top:8px}.request-event{display:grid;grid-template-columns:18px 1fr;gap:9px;position:relative;padding:8px 0}.request-event:not(:last-child):before{content:'';position:absolute;left:6px;top:22px;bottom:-7px;width:1px;background:#dce7ec}.request-event-dot{width:13px;height:13px;margin-top:2px;border:3px solid #dff2f5;border-radius:50%;background:#1591aa}.request-event strong,.request-event span,.request-event small{display:block}.request-event strong{color:#315a74;font-size:10px}.request-event span{margin-top:2px;color:#617b8d;font-size:10px}.request-event small{margin-top:2px;color:#95a3ad;font-size:8px}
@media(max-width:1150px){.request-workflow-tabs{grid-template-columns:repeat(3,minmax(0,1fr))}.request-summary-six{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:850px){.request-workflow-grid{grid-template-columns:1fr}.request-flow-buttons{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:650px){.request-workflow-tabs{grid-template-columns:repeat(2,minmax(0,1fr))}.request-summary-six{grid-template-columns:1fr}.request-billing-form{grid-template-columns:1fr}.request-work-head{flex-direction:column}.request-work-total{justify-content:flex-start}}


/* 0019.19 - pracovní fronta: návrat do seznamu a moderní přílohy */
.request-edit-toolbar{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:14px}.request-edit-toolbar .back-link{margin:0}.request-edit-save-top{min-height:42px;margin:0}.request-edit-actions{display:flex;align-items:center;justify-content:flex-end;gap:12px;padding-top:4px}.request-edit-actions .primary-button{margin:0}.attachment-file-input{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}.attachment-file-picker{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;min-height:44px;overflow:hidden;border:1px solid #d6e2e9;border-radius:10px;background:#fff;cursor:pointer;transition:.15s ease}.attachment-file-picker:hover{border-color:#9bcbd7;box-shadow:0 0 0 3px rgba(20,151,177,.06)}.attachment-file-button{display:flex;align-items:center;align-self:stretch;padding:0 14px;border-right:1px solid #dce7ed;background:#f2f8fa;color:#176a82;font-size:10px;font-weight:850}.attachment-file-name{min-width:0;padding:0 12px;color:#7a8e9c;font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.attachment-submit{width:100%;min-height:42px}.attachment-upload{position:relative}
@media(max-width:650px){.request-edit-toolbar{align-items:stretch;flex-direction:column}.request-edit-save-top{width:100%}.request-edit-actions{align-items:stretch;flex-direction:column-reverse}.request-edit-actions .primary-button,.request-edit-actions .secondary-link{width:100%}.attachment-file-picker{grid-template-columns:1fr}.attachment-file-button{min-height:40px;justify-content:center;border-right:0;border-bottom:1px solid #dce7ed}.attachment-file-name{padding:10px 12px;text-align:center}}

/* 0019.20 – inline editace detailu požadavku */
.request-inline-edit-card{margin-bottom:12px}.request-publish-field{display:flex;align-items:flex-end}.request-publish-field .check-line{min-height:44px;display:flex;align-items:center}.request-inline-save-bar{display:flex;align-items:center;justify-content:flex-end;gap:12px;margin:14px 0 4px;padding:14px 16px;border:1px solid #dce7ee;border-radius:12px;background:#fff}.request-inline-save-bar .primary-button{min-width:250px;margin:0}.request-edit-toolbar-simple{justify-content:flex-start}
@media(max-width:650px){.request-inline-save-bar{align-items:stretch;flex-direction:column-reverse}.request-inline-save-bar .primary-button,.request-inline-save-bar .secondary-link{width:100%;min-width:0}.request-publish-field{align-items:flex-start}}

/* 0019.21 – zákaznické zadání požadavků */
.customer-request-intro{display:flex;align-items:center;justify-content:space-between;gap:22px;margin-bottom:14px;padding:20px 22px;border:1px solid #d9e6ed;border-radius:16px;background:linear-gradient(120deg,#fff,#f2fafc)}
.customer-request-intro h3{margin:3px 0 6px;color:var(--maxim-navy);font-size:22px}.customer-request-intro p{margin:0;color:#718596;font-size:11px;line-height:1.55}.customer-request-company{min-width:220px;padding:12px 14px;border:1px solid #dce7ed;border-radius:12px;background:#fff;color:#7a8c99;font-size:9px;text-transform:uppercase;letter-spacing:.04em}.customer-request-company strong{display:block;margin-top:4px;color:#173f61;font-size:12px;text-transform:none;letter-spacing:0}
.customer-request-form{max-width:100%}.customer-request-main-grid{align-items:end}.customer-request-priority-help{display:flex;align-items:center;min-height:44px;padding:0 2px;color:#8494a0;font-size:9px;line-height:1.45}.customer-request-attachments-card{position:relative}.customer-request-actions .primary-button{min-width:220px}.request-source-customer{display:inline-flex;align-items:center;min-height:22px;padding:0 8px;border-radius:999px;background:#e8f7f1;color:#246c59;font-size:8px;font-weight:850;letter-spacing:.04em;text-transform:uppercase}.request-summary-customer{grid-template-columns:repeat(2,minmax(0,1fr));max-width:640px}
@media(max-width:760px){.customer-request-intro{align-items:flex-start;flex-direction:column}.customer-request-company{min-width:0;width:100%}.customer-request-main-grid{grid-template-columns:1fr!important}.customer-request-main-grid .span-2{grid-column:auto}.customer-request-priority-help{min-height:0}.request-summary-customer{grid-template-columns:1fr;max-width:none}}

/* 0019.22 - request company selection and delete action */
.request-inline-save-actions{display:flex;align-items:center;gap:12px;margin-left:auto}
.request-inline-save-bar>form{margin:0}
@media(max-width:700px){.request-inline-save-bar{align-items:stretch;flex-direction:column}.request-inline-save-actions{width:100%;margin-left:0;flex-direction:column-reverse;align-items:stretch}.request-inline-save-bar>form,.request-inline-save-bar .danger-button,.request-inline-save-actions .primary-button,.request-inline-save-actions .secondary-link{width:100%;text-align:center}}

/* 0019.24 - pracovní přehled a pravidelná fakturace */
.catalog-billing-grid{display:grid;grid-template-columns:1.1fr .8fr 1fr 1.4fr;gap:8px;margin-top:9px}.work-summary-head{display:flex;align-items:end;justify-content:space-between;gap:18px;margin:18px 0 12px}.work-summary-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.work-summary-stat{display:block;background:#fff;border:1px solid #d7e3ef;border-radius:16px;padding:15px 16px;text-decoration:none;color:inherit}.work-summary-stat strong{display:block;font-size:26px;color:#062b61}.work-summary-stat span{font-weight:800}.work-summary-stat small{display:block;color:#7890a9;margin-top:4px}.work-attention-list{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:14px}.work-attention-card{background:#fff;border:1px solid #d7e3ef;border-radius:16px;padding:16px}.work-attention-card h4{margin:0 0 8px}.work-attention-card ul{list-style:none;padding:0;margin:0}.work-attention-card li{padding:8px 0;border-top:1px solid #edf2f7}.work-attention-card li:first-child{border-top:0}.work-attention-card a{text-decoration:none;color:#0b5f90;font-weight:700}.work-attention-card small{display:block;color:#7890a9;margin-top:2px}.work-attention-empty{color:#7890a9}.work-summary-actions{display:flex;gap:8px;flex-wrap:wrap}.billing-due{color:#9a3f16;font-weight:800}.billing-soon{color:#356878;font-weight:700}@media(max-width:1050px){.work-summary-grid{grid-template-columns:repeat(2,1fr)}.catalog-billing-grid{grid-template-columns:1fr 1fr}}@media(max-width:700px){.work-summary-grid,.work-attention-list,.catalog-billing-grid{grid-template-columns:1fr}}

/* 0019.25 – podklady k fakturaci */
.billing-page{max-width:1280px}.billing-head{display:flex;align-items:end;justify-content:space-between;gap:18px;margin-bottom:14px}.billing-head h3{margin:2px 0 4px;color:var(--maxim-navy);font-size:24px}.billing-head p{margin:0;color:#7890a3;font-size:12px}.billing-summary-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:16px}.billing-summary-grid article{padding:16px;border:1px solid #d8e4ec;border-radius:15px;background:#fff}.billing-summary-grid strong,.billing-summary-grid span,.billing-summary-grid small{display:block}.billing-summary-grid strong{color:var(--maxim-navy);font-size:25px;line-height:1.05}.billing-summary-grid span{margin-top:7px;color:#254c68;font-size:12px;font-weight:850}.billing-summary-grid small{margin-top:4px;color:#8295a4;font-size:9px;line-height:1.4}.billing-toolbar{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:2px 0 16px}.billing-tabs{display:flex;gap:7px;flex-wrap:wrap}.billing-tabs a{display:inline-flex;align-items:center;gap:7px;min-height:36px;padding:0 13px;border:1px solid #d5e2e9;border-radius:999px;background:#fff;color:#5d7689;font-size:10px;font-weight:850;text-decoration:none}.billing-tabs a span{display:inline-grid;place-items:center;min-width:20px;height:20px;padding:0 6px;border-radius:999px;background:#edf4f7;color:#617a8c;font-size:9px}.billing-tabs a.active,.billing-tabs a:hover{border-color:#8bcbd8;background:#eaf8fa;color:#087f9b}.billing-tabs a.active span{background:#d5f0f5;color:#087f9b}.billing-company-filter select{min-width:260px;height:38px;padding:0 34px 0 12px;border:1px solid #d5e2e9;border-radius:10px;background:#fff;color:#36566e;font:inherit;font-size:10px;font-weight:750}.billing-company-list{display:grid;gap:14px}.billing-company-card{overflow:hidden;border:1px solid #d5e2e9;border-radius:17px;background:#fff;box-shadow:0 10px 28px rgba(4,42,77,.035)}.billing-company-card>header{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;padding:16px 18px;border-bottom:1px solid #e8eff3;background:#fbfdfe}.billing-company-card>header h3{margin:2px 0 3px;color:var(--maxim-navy);font-size:18px}.billing-company-card>header p{margin:0;color:#7b8f9e;font-size:10px}.billing-company-card>header p strong{color:#2d5c76}.billing-lines{display:grid}.billing-line{display:grid;grid-template-columns:22px minmax(0,1fr) 160px 130px;gap:12px;align-items:center;padding:13px 18px;border-top:1px solid #edf2f5;cursor:pointer}.billing-line:first-child{border-top:0}.billing-line:hover{background:#fbfdfe}.billing-line>input{width:17px;height:17px;margin:0;accent-color:var(--maxim-cyan)}.billing-line-main{min-width:0}.billing-line-title{display:flex;align-items:center;gap:8px;min-width:0}.billing-line-title a{overflow:hidden;color:#17466a;font-size:12px;font-weight:850;text-decoration:none;text-overflow:ellipsis;white-space:nowrap}.billing-line-title a:hover{color:#0589a7}.billing-line-detail{margin-top:4px;color:#8296a4;font-size:9px;line-height:1.45}.billing-line-date{text-align:right;font-size:9px}.billing-line-amount{text-align:right;color:#244f6a;font-size:12px;font-weight:850}.billing-source{display:inline-flex;align-items:center;min-height:22px;padding:0 8px;border-radius:999px;font-size:8px;font-weight:900;letter-spacing:.035em;text-transform:uppercase;white-space:nowrap}.billing-source.source-request{background:#e9f3ff;color:#2e6490}.billing-source.source-license{background:#edf0fb;color:#535e99}.billing-source.source-catalog{background:#e8f7f1;color:#25705b}.billing-invoice-bar{display:grid;grid-template-columns:220px 180px minmax(280px,1fr);gap:10px;align-items:end;padding:14px 18px 17px;border-top:1px solid #e6eef2;background:#f8fbfc}.billing-invoice-bar .field-wrap label{display:block;margin-bottom:5px;color:#657e90;font-size:9px;font-weight:800}.billing-invoice-bar .field{height:40px;margin:0;padding:0 11px;border-radius:9px;font-size:11px}.billing-invoice-action{display:flex;align-items:center;justify-content:flex-end;gap:12px}.billing-invoice-action small{max-width:300px;color:#8a9ba7;font-size:8px;line-height:1.35}.billing-invoice-action .primary-button{min-height:40px;white-space:nowrap}.billing-history-card{overflow:auto}.billing-history-card .data-table{min-width:900px}.billing-history-card td small{display:block;margin-top:3px;color:#8798a4;font-size:9px}.catalog-billing-caption{margin:10px 0 2px;color:#7690a0;font-size:9px;font-weight:850;text-transform:uppercase;letter-spacing:.04em}
@media(max-width:1100px){.billing-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.billing-line{grid-template-columns:22px minmax(0,1fr) 130px 110px}.billing-invoice-bar{grid-template-columns:1fr 1fr}.billing-invoice-action{grid-column:1/-1;justify-content:flex-start}}
@media(max-width:760px){.billing-summary-grid{grid-template-columns:1fr}.billing-toolbar{align-items:stretch;flex-direction:column}.billing-company-filter select{width:100%;min-width:0}.billing-line{grid-template-columns:22px minmax(0,1fr);align-items:start}.billing-line-date,.billing-line-amount{grid-column:2;text-align:left}.billing-invoice-bar{grid-template-columns:1fr}.billing-invoice-action{grid-column:auto;align-items:stretch;flex-direction:column}.billing-invoice-action .primary-button{width:100%}.billing-company-card>header{flex-direction:column}}
/* 0019.26 - vrácení jednotlivé položky z historie fakturace */
.billing-history-card .data-table{min-width:1040px}.billing-history-reverted{opacity:.62;background:#fafcfd}.billing-reverted-badge{display:inline-flex;align-items:center;min-height:25px;padding:0 9px;border-radius:999px;background:#eef2f4;color:#6f7d86;font-size:8px;font-weight:850;white-space:nowrap}.billing-history-locked{color:#98a5ad;font-size:9px;white-space:nowrap}.billing-revert-form{margin:0}.billing-revert-button{min-height:32px;padding:0 11px;font-size:9px;white-space:nowrap}

/* 0019.27 – Výhled příjmů / cash-flow */
.billing-history-card .data-table{min-width:1220px}.billing-paid-form{display:flex;align-items:center;gap:6px;margin:0}.billing-paid-form input[type=date]{width:126px;height:32px;padding:0 7px;border:1px solid #d7e3ea;border-radius:8px;background:#fff;color:#476477;font:inherit;font-size:9px}.billing-paid-button{min-height:32px;padding:0 9px;font-size:9px;white-space:nowrap}.billing-paid-cell{display:flex;align-items:center;gap:7px}.billing-paid-cell form{margin:0}.billing-paid-badge{display:inline-flex;align-items:center;min-height:25px;padding:0 9px;border-radius:999px;background:#e8f7ef;color:#277350;font-size:8px;font-weight:850;white-space:nowrap}.billing-paid-cell .link-button{font-size:8px;color:#80919d}
.cashflow-page{max-width:1280px}.cashflow-head{margin-bottom:14px}.cashflow-head h3{margin:2px 0 4px;color:var(--maxim-navy);font-size:24px}.cashflow-head p{max-width:900px;margin:0;color:#7890a3;font-size:12px;line-height:1.5}.cashflow-filter{display:grid;grid-template-columns:auto minmax(260px,1fr) 260px;gap:12px;align-items:center;margin-bottom:16px}.cashflow-period-tabs{display:flex;gap:6px}.cashflow-period-tabs a{display:inline-flex;align-items:center;justify-content:center;min-height:37px;padding:0 13px;border:1px solid #d5e2e9;border-radius:999px;background:#fff;color:#5d7689;font-size:10px;font-weight:850;text-decoration:none}.cashflow-period-tabs a.active,.cashflow-period-tabs a:hover{border-color:#8bcbd8;background:#eaf8fa;color:#087f9b}.cashflow-period-nav{display:flex;align-items:center;justify-content:center;gap:10px}.cashflow-period-nav strong{min-width:150px;text-align:center;color:#244c69;font-size:13px}.secondary-button.compact{min-width:36px;min-height:36px;padding:0 10px}.cashflow-filter select{height:38px;padding:0 34px 0 12px;border:1px solid #d5e2e9;border-radius:10px;background:#fff;color:#36566e;font:inherit;font-size:10px;font-weight:750}.cashflow-summary-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:12px}.cashflow-summary-grid article{padding:16px;border:1px solid #d8e4ec;border-radius:15px;background:#fff}.cashflow-summary-grid strong,.cashflow-summary-grid span,.cashflow-summary-grid small{display:block}.cashflow-summary-grid strong{color:var(--maxim-navy);font-size:24px;line-height:1.05}.cashflow-summary-grid span{margin-top:7px;color:#254c68;font-size:12px;font-weight:850}.cashflow-summary-grid small{margin-top:4px;color:#8295a4;font-size:9px;line-height:1.4}.cashflow-summary-grid .cashflow-actual-card{border-color:#cfe7d9;background:#fbfefc}.cashflow-summary-grid .cashflow-actual-card strong{color:#26724f}.cashflow-summary-grid .cashflow-forecast-card{border-color:#f0dec8;background:#fffdf9}.cashflow-summary-grid .cashflow-forecast-card strong{color:#a96322}.cashflow-secondary-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:14px}.cashflow-secondary-grid>div{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:11px 14px;border:1px solid #e0e9ee;border-radius:12px;background:#f9fbfc}.cashflow-secondary-grid span{color:#6f8797;font-size:9px;font-weight:750}.cashflow-secondary-grid strong{color:#315a74;font-size:12px;white-space:nowrap}.cashflow-chart-card,.cashflow-detail-card{margin-top:14px;padding:17px 18px;border:1px solid #d7e3eb;border-radius:17px;background:#fff}.cashflow-chart-card>header,.cashflow-detail-card>header{display:flex;align-items:flex-start;justify-content:space-between;gap:18px}.cashflow-chart-card h3,.cashflow-detail-card h3{margin:0;color:var(--maxim-navy);font-size:16px}.cashflow-chart-card p,.cashflow-detail-card p{margin:4px 0 0;color:#8194a2;font-size:9px}.cashflow-legend{display:flex;align-items:center;gap:12px;color:#6c8494;font-size:9px;font-weight:800}.cashflow-legend span{display:inline-flex;align-items:center;gap:6px}.cashflow-legend span:before{content:'';width:10px;height:10px;border-radius:3px}.cashflow-legend .actual:before{background:#4fa879}.cashflow-legend .forecast:before{background:#e49a4b}.cashflow-chart{display:grid;grid-template-columns:repeat(var(--cash-cols,12),minmax(48px,1fr));gap:8px;min-height:280px;margin-top:18px;padding:10px 2px 2px;border-bottom:1px solid #e4ecef;overflow-x:auto}.cashflow-month{display:grid;grid-template-rows:220px auto auto;gap:5px;min-width:48px;text-align:center}.cashflow-bars{display:flex;align-items:flex-end;justify-content:center;gap:4px;padding:0 5px;border-bottom:1px solid #eef3f5;background:linear-gradient(to top,rgba(226,235,240,.38) 1px,transparent 1px);background-size:100% 25%}.cashflow-bar{width:min(18px,38%);min-height:0;border-radius:5px 5px 1px 1px;transition:opacity .15s}.cashflow-bar:hover{opacity:.76}.cashflow-bar.actual{background:#4fa879}.cashflow-bar.forecast{background:#e49a4b}.cashflow-month>strong{color:#526f83;font-size:9px}.cashflow-month>small{color:#91a0aa;font-size:8px;white-space:nowrap}.cashflow-table{margin-top:14px;overflow:auto}.cashflow-table .data-table{min-width:1040px}.cashflow-table a{color:#0b668d;font-weight:750;text-decoration:none}.cashflow-table a:hover{text-decoration:underline}.cashflow-status{display:inline-flex;align-items:center;min-height:24px;padding:0 8px;border-radius:999px;font-size:8px;font-weight:850;white-space:nowrap}.cashflow-status.actual{background:#e8f7ef;color:#26724f}.cashflow-status.forecast{background:#fff3e5;color:#a96322}
@media(max-width:1150px){.cashflow-filter{grid-template-columns:1fr 1fr}.cashflow-filter select{grid-column:1/-1}.cashflow-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.cashflow-chart{grid-template-columns:repeat(var(--cash-cols,12),minmax(58px,1fr))}}
@media(max-width:720px){.cashflow-filter{grid-template-columns:1fr}.cashflow-period-tabs,.cashflow-period-nav{justify-content:flex-start}.cashflow-filter select{grid-column:auto;width:100%}.cashflow-summary-grid,.cashflow-secondary-grid{grid-template-columns:1fr}.cashflow-chart-card>header,.cashflow-detail-card>header{flex-direction:column}.cashflow-chart{grid-template-columns:repeat(var(--cash-cols,12),58px)}.billing-paid-form{align-items:flex-start;flex-direction:column}}

/* 0019.28 – komunikace přímo u požadavku */
.request-conversation-card{margin-top:14px;padding:18px}.request-conversation-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:14px}.request-conversation-head .field-help{margin:4px 0 0}.request-conversation-count{display:inline-flex;align-items:center;justify-content:center;min-height:28px;padding:0 10px;border-radius:999px;background:#eef6f9;color:#587587;font-size:9px;font-weight:850;white-space:nowrap}.request-message-thread{display:flex;flex-direction:column;gap:10px;padding:12px;border:1px solid #e0e9ee;border-radius:14px;background:#f8fbfc}.request-message-empty{padding:24px;text-align:center;color:#8798a4;font-size:11px}.request-message{width:min(82%,850px);padding:12px 14px;border:1px solid #dce7ed;border-radius:14px;background:#fff;box-shadow:0 3px 10px rgba(28,66,91,.035)}.request-message.mine{align-self:flex-end;border-color:#b9dce5;background:#f1fbfc}.request-message.other{align-self:flex-start}.request-message.admin:not(.mine){border-color:#cbddea;background:#f7fbfe}.request-message-meta{display:flex;align-items:center;gap:7px;flex-wrap:wrap}.request-message-meta strong{color:#173f61;font-size:11px}.request-message-meta span{color:#8698a5;font-size:9px}.request-message-meta em{display:inline-flex;align-items:center;min-height:19px;padding:0 7px;border-radius:999px;background:#eaf5f9;color:#337189;font-style:normal;font-size:7px;font-weight:900;text-transform:uppercase;letter-spacing:.035em}.request-message.customer .request-message-meta em{background:#eef6ec;color:#4a7842}.request-message-body{margin-top:8px;color:#35576e;font-size:12px;line-height:1.58;overflow-wrap:anywhere}.request-message-foot{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:9px;color:#94a2ac;font-size:8px}.request-message-mail-ok{color:#438064}.request-message-mail-error{color:#af664f;font-weight:750}.request-message-form{margin-top:14px;padding-top:14px;border-top:1px solid #e8eef2}.request-message-identity{margin-bottom:7px;color:#6e8798;font-size:9px}.request-message-identity strong{color:#315b75}.request-message-identity span{margin-left:4px}.request-message-textarea{min-height:105px;resize:vertical}.request-message-actions{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:10px}.request-message-actions small{max-width:720px;color:#8597a4;font-size:9px;line-height:1.4}.alert.warning{border-color:#ead8ad;background:#fff9e9;color:#7f641c}
@media(max-width:760px){.request-message{width:100%}.request-conversation-head,.request-message-actions{align-items:stretch;flex-direction:column}.request-message-actions .primary-button{width:100%}}

/* 0019.29 – detail požadavku: kompaktní workflow, sbalený základ, přílohy a sjednocená komunikace */
.request-flow-compact{margin-bottom:12px;padding:13px 16px}.request-flow-compact-head{display:flex;align-items:center;justify-content:space-between;gap:16px}.request-flow-compact-head .field-help{margin:3px 0 0}.request-flow-compact-body{display:grid;grid-template-columns:minmax(420px,1fr) auto;gap:18px;align-items:center;margin-top:10px}.request-flow-buttons.compact{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;margin:0}.request-flow-buttons.compact .request-flow-button{min-height:34px}.request-flow-dates.compact{justify-content:flex-end;margin:0;white-space:nowrap}.request-base-details{padding:0!important;margin-bottom:12px;overflow:hidden}.request-base-details summary{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 16px;cursor:pointer;list-style:none}.request-base-details summary::-webkit-details-marker{display:none}.request-base-details summary>span:first-child{display:flex;flex-direction:column;gap:3px}.request-base-details summary strong{color:#173f61;font-size:14px}.request-base-details summary small{color:#7f929f;font-size:9px;font-weight:500}.request-details-toggle{display:inline-flex;align-items:center;padding:6px 9px;border:1px solid #dce7ed;border-radius:8px;color:#557488;font-size:9px;font-weight:800;background:#f8fbfc}.request-base-details[open] .request-details-toggle{background:#eef7f9}.request-base-content{padding:0 16px 16px;border-top:1px solid #e6edf1}.request-base-content .form-grid{padding-top:14px}.request-billing-late{margin-top:12px}.request-billing-late .request-billing-form{grid-template-columns:repeat(4,minmax(0,1fr)) auto;align-items:end}.request-billing-late .request-billing-save{grid-column:auto;justify-self:stretch;min-height:40px}.request-message{width:100%;max-width:none;align-self:stretch!important}.request-message.mine{align-self:stretch}.request-message-thread{padding:10px}.request-message-mail-error{max-width:100%;overflow-wrap:anywhere}.request-message-mail-ok{overflow-wrap:anywhere}.attachment-list{gap:8px}.attachment-item{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 11px;border:1px solid #e3eaee;border-radius:10px;background:#fbfcfd}.attachment-info{display:flex;min-width:0;flex-direction:column;gap:2px}.attachment-info strong{color:#315a74;font-size:10px;overflow-wrap:anywhere}.attachment-info span{color:#8a98a3;font-size:8px}.attachment-actions{display:flex;align-items:center;gap:6px;flex:0 0 auto}.attachment-list .attachment-action{display:inline-flex!important;flex-direction:row!important;align-items:center;justify-content:center;gap:4px;padding:6px 8px!important;border:1px solid #dce7ed!important;border-radius:8px!important;background:#fff!important;color:#477087!important;font-size:8px!important;font-weight:800;text-decoration:none!important;box-shadow:none!important}.attachment-list .attachment-action.preview{border-color:#b8dce5!important;background:#f0fafc!important;color:#187d96!important}.attachment-list .attachment-action:hover{border-color:#99c9d7!important;background:#f6fbfc!important}.request-event.message-event .request-event-dot{background:#5b8da8;border-color:#e2eef3}.request-event.message-event strong{color:#2d637e}
@media(max-width:1000px){.request-flow-compact-body{grid-template-columns:1fr}.request-flow-dates.compact{justify-content:flex-start;white-space:normal}.request-billing-late .request-billing-form{grid-template-columns:1fr 1fr}.request-billing-late .request-billing-save{grid-column:1/-1;justify-self:end}.attachment-item{align-items:flex-start;flex-direction:column}.attachment-actions{width:100%;justify-content:flex-end}}
@media(max-width:700px){.request-flow-buttons.compact{grid-template-columns:repeat(2,minmax(0,1fr))}.request-base-details summary{align-items:flex-start;flex-direction:column}.request-billing-late .request-billing-form{grid-template-columns:1fr}.request-message-actions{align-items:stretch;flex-direction:column}.request-message-actions .primary-button{width:100%;justify-content:center}}

/* 0019.32 – provozní log Scheduleru */
.scheduler-summary-grid{grid-template-columns:repeat(4,minmax(0,1fr));}
.scheduler-filter{grid-template-columns:220px 220px auto;max-width:720px;}
.scheduler-log-table{overflow:auto;}
.scheduler-log-table .data-table{min-width:1180px;}
.scheduler-error{margin-top:5px;max-width:260px;color:#a54d52;font-size:9px;line-height:1.35;overflow-wrap:anywhere;}
.scheduler-details{min-width:90px;}
.scheduler-details summary{cursor:pointer;color:#187d96;font-size:10px;font-weight:800;}
.scheduler-details div{margin:8px 0;color:#617b8d;font-size:9px;overflow-wrap:anywhere;}
.scheduler-details pre{max-width:480px;max-height:260px;margin:8px 0 0;padding:10px;overflow:auto;border:1px solid #e1e9ed;border-radius:8px;background:#f8fbfc;color:#315a74;font-size:9px;line-height:1.45;white-space:pre-wrap;overflow-wrap:anywhere;}
.scheduler-pagination{display:flex;align-items:center;justify-content:center;gap:14px;margin-top:16px;color:#738697;font-size:11px;}
.status-pill.cron{background:#eaf6fb;color:#2b728e;}
.status-pill.automat{background:#eeeafb;color:#66529b;}
.status-pill.manual{background:#e9f6f1;color:#24735d;}
.status-pill.cli,.status-pill.internal{background:#eef1f3;color:#65737d;}
@media(max-width:900px){.scheduler-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr));}.scheduler-filter{grid-template-columns:1fr;max-width:none;}}
@media(max-width:560px){.scheduler-summary-grid{grid-template-columns:1fr;}}

/* 0019.33 – časované interní poznámky + e-mail UPDATE */
.request-internal-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:10px}
.request-internal-note-list{display:grid;gap:8px;margin-top:10px}
.request-internal-note{padding:10px 12px;border:1px solid #eadfca;border-radius:10px;background:#fff;color:#49677b;font-size:11px;line-height:1.55}
.request-internal-note-meta{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:5px;color:#8b7960;font-size:8px}
.request-internal-note-meta strong{color:#6d5a40;font-size:9px}
.request-internal-note-form{margin-top:11px;padding-top:11px;border-top:1px solid #eee3d2}
.request-event.internal-note-event .request-event-dot{background:#c4934b;border-color:#f5ead8}
.request-event.internal-note-event strong{color:#8b642f}
.request-update-review-list{display:grid;gap:10px}
.request-update-row{display:grid;grid-template-columns:minmax(180px,.7fr) minmax(0,1.3fr);gap:18px;align-items:center;padding:12px 14px;border:1px solid #e0e8ed;border-radius:11px;background:#fbfcfd}
.request-update-row>div:first-child{display:flex;flex-direction:column;gap:3px}
.request-update-row>div:first-child span{color:#173f61;font-size:11px;font-weight:850}
.request-update-row>div:first-child small{color:#8798a4;font-size:9px;line-height:1.4}
.request-update-row.text{align-items:start}
.request-update-row .field,.request-update-row .textarea{margin:0}
@media(max-width:760px){.request-internal-head{flex-direction:column}.request-update-row{grid-template-columns:1fr}}

/* 0019.34 – dlouhodobé přihlášení */
.remember-login {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: -2px 0 14px;
    color: #49677d;
    cursor: pointer;
}
.remember-login input {
    width: 18px;
    height: 18px;
    margin: 2px 0 0;
    flex: 0 0 auto;
    accent-color: var(--maxim-cyan);
}
.remember-login span { min-width: 0; }
.remember-login strong {
    display: block;
    color: #36546b;
    font-size: 12px;
    font-weight: 750;
}
.remember-login small {
    display: block;
    margin-top: 3px;
    color: #8d9ba7;
    font-size: 10px;
    font-weight: 500;
    line-height: 1.35;
}

/* 2026-09-21: pricing / stronger request section headers */
.request-section-card{overflow:hidden}
.request-section-card>.request-section-head,
.request-section-card>.request-work-head.request-section-head{
    margin:-25px -25px 18px;
    padding:15px 25px 14px;
    border-bottom:1px solid #c7d9e3;
    background:linear-gradient(180deg,#e3edf2 0%,#dbe8ee 100%);
    border-radius:16px 16px 0 0;
}
.request-section-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px}
.request-section-head .form-section-title{margin:0;color:#173f61;font-size:15px;font-weight:850}
.request-section-head .field-help{margin:4px 0 0;color:#6f8796}
.request-section-head .secondary-link.compact{white-space:nowrap;align-self:center}

.request-price-form{display:grid;grid-template-columns:150px 160px 160px 160px minmax(220px,1fr) auto;gap:10px;align-items:end}
.request-price-form .field-wrap{min-width:0}
.request-price-form .field-wrap label,.work-entry-form.pricing-form .field-wrap label,.work-price-form .field-wrap label{display:block;margin-bottom:5px;color:#667d8e;font-size:9px;font-weight:750}
.request-price-dates{display:flex;gap:18px;flex-wrap:wrap;margin-top:12px;padding-top:10px;border-top:1px solid #e5edf1;color:#8294a0;font-size:9px}
.request-price-dates strong{color:#49697c}

.work-entry-form.pricing-form{display:grid;grid-template-columns:160px minmax(220px,1.5fr) 145px 95px 95px 120px 95px 120px 125px;gap:8px;align-items:end}
.work-entry-form.pricing-form .field-wrap{min-width:0}
.work-entry-form.pricing-form .field{width:100%;min-width:0}
.work-entry-actions{grid-column:1/-1;display:flex;justify-content:flex-end;gap:8px;flex-wrap:wrap;margin-top:2px}
.readonly-price{background:#f4f7f9!important;color:#677d8a!important}
.unit-pricing.is-disabled{opacity:.45}
.work-price-help{margin-top:10px;color:#7c8f9c;font-size:9px}
.work-price-help a{color:#2f718d;font-weight:750;text-decoration:none}
.work-entry-price{display:flex;align-items:center;justify-content:flex-end;gap:6px;flex-wrap:wrap;color:#637b8b;font-size:10px}
.work-entry-price strong{color:#173f61;font-size:11px}
.work-entry-discount{padding:3px 6px;border-radius:999px;background:#fff0dc;color:#93631e;font-size:8px;font-weight:800}

.work-price-form{display:grid;grid-template-columns:170px 1fr 100px 140px 150px 1.5fr auto;gap:10px;align-items:end}
.work-price-form .field-wrap{min-width:0}

@media(max-width:1250px){
  .work-entry-form.pricing-form{grid-template-columns:repeat(4,minmax(0,1fr))}
  .work-entry-form.pricing-form .work-desc{grid-column:span 2}
  .request-price-form{grid-template-columns:repeat(3,minmax(0,1fr))}
  .request-price-form .price-note{grid-column:span 2}
  .work-price-form{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:760px){
  .request-section-head{flex-direction:column}
  .request-section-card>.request-section-head,.request-section-card>.request-work-head.request-section-head{margin:-25px -25px 16px;padding:14px 18px}
  .work-entry-form.pricing-form,.request-price-form,.work-price-form{grid-template-columns:1fr 1fr}
  .work-entry-form.pricing-form .work-desc,.request-price-form .price-note{grid-column:1/-1}
  .work-entry-actions{justify-content:stretch}
  .work-entry-actions .secondary-button{flex:1}
}
@media(max-width:520px){
  .work-entry-form.pricing-form,.request-price-form,.work-price-form{grid-template-columns:1fr}
  .work-entry-form.pricing-form .work-desc,.request-price-form .price-note{grid-column:auto}
}

/* 2026-09-21b: sjednocené a o něco výraznější hlavičky detailu požadavku */
.request-anchor{scroll-margin-top:24px}
.request-flow-compact.request-section-card>.request-flow-compact-head.request-section-head,
.request-conversation-card.request-section-card>.request-conversation-head.request-section-head,
.internal-card.request-section-card>.request-internal-head.request-section-head{
    margin:-25px -25px 18px;
    padding:15px 25px 14px;
    border-bottom:1px solid #c7d9e3;
    background:linear-gradient(180deg,#e3edf2 0%,#dbe8ee 100%);
    border-radius:16px 16px 0 0;
}
.request-base-details.request-section-card{overflow:hidden}
.request-base-details.request-section-card>summary{
    margin:-25px -25px;
    padding:15px 25px;
    background:linear-gradient(180deg,#e3edf2 0%,#dbe8ee 100%);
    border-bottom:1px solid #c7d9e3;
}
.request-base-details.request-section-card[open]>summary{margin-bottom:25px}
.request-base-details.request-section-card>summary strong{color:#173f61}
@media(max-width:760px){
  .request-flow-compact.request-section-card>.request-flow-compact-head.request-section-head,
  .request-conversation-card.request-section-card>.request-conversation-head.request-section-head,
  .internal-card.request-section-card>.request-internal-head.request-section-head{margin:-25px -25px 16px;padding:14px 18px}
  .request-base-details.request-section-card>summary{margin:-25px -25px;padding:14px 18px}
  .request-base-details.request-section-card[open]>summary{margin-bottom:18px}
}

/* 2026-09-21c: editace a mazání interních poznámek */
.request-internal-note-text{white-space:normal}
.request-internal-note-toolbar{display:flex;align-items:flex-start;gap:14px;margin-top:9px;padding-top:8px;border-top:1px solid #f0e6d7}
.request-internal-note-edit{min-width:0}
.request-internal-note-edit>summary{list-style:none;cursor:pointer;color:#0b6797;font-weight:800;font-size:9px;user-select:none}
.request-internal-note-edit>summary::-webkit-details-marker{display:none}
.request-internal-note-edit[open]{flex:1}
.request-internal-note-edit-form{display:grid;gap:8px;margin-top:9px}
.request-internal-note-edit-form textarea{min-height:88px;background:#fff}
.request-internal-note-edit-actions{display:flex;justify-content:flex-end}
.request-internal-note-delete-form{margin:0}
.request-internal-note-toolbar .danger-link{font-size:9px}
@media(max-width:760px){.request-internal-note-toolbar{flex-wrap:wrap}.request-internal-note-edit[open]{flex-basis:100%;order:3}}

/* 2026-09-21d: oprava sbalovaciho zakladu + jednotkova nabidka */
.request-base-details.request-section-card{
    padding:0!important;
    overflow:hidden;
}
.request-base-details.request-section-card>summary{
    margin:0!important;
    padding:15px 25px!important;
    border-bottom:0;
    background:linear-gradient(180deg,#dbe8ef 0%,#d1e1e9 100%);
    border-radius:16px;
    box-sizing:border-box;
    width:100%;
}
.request-base-details.request-section-card[open]>summary{
    margin:0!important;
    border-bottom:1px solid #bfd2dd;
    border-radius:16px 16px 0 0;
}
.request-base-details.request-section-card .request-base-content{
    padding:18px 25px 25px;
    border-top:0;
}
.request-base-details.request-section-card .request-base-content .form-grid{padding-top:0}

.request-price-form.enhanced{
    display:grid;
    grid-template-columns:145px 155px 165px 100px 95px 125px 90px 125px 145px 145px minmax(220px,1fr) auto;
    gap:9px;
    align-items:end;
}
.request-price-form.enhanced .field-wrap{min-width:0}
.request-price-form.enhanced .field{width:100%;min-width:0}
.request-price-form.enhanced .price-note{min-width:220px}
.request-price-form.enhanced .request-price-save{min-height:40px;white-space:nowrap}
.quote-unit-only.is-hidden{display:none!important}
.request-price-migration-warning{margin-top:12px}

@media(max-width:1500px){
  .request-price-form.enhanced{grid-template-columns:repeat(6,minmax(0,1fr))}
  .request-price-form.enhanced .price-note{grid-column:span 2}
}
@media(max-width:1050px){
  .request-price-form.enhanced{grid-template-columns:repeat(3,minmax(0,1fr))}
  .request-price-form.enhanced .price-note{grid-column:span 2}
}
@media(max-width:760px){
  .request-base-details.request-section-card>summary{padding:14px 18px!important}
  .request-base-details.request-section-card .request-base-content{padding:16px 18px 20px}
  .request-price-form.enhanced{grid-template-columns:1fr 1fr}
  .request-price-form.enhanced .price-note{grid-column:1/-1}
}
@media(max-width:520px){
  .request-price-form.enhanced{grid-template-columns:1fr}
  .request-price-form.enhanced .price-note{grid-column:auto}
}

/* 2026-09-21e: cena/nabidka presunuta do Zakladu pozadavku, zjednodusena jednotkova cena */
.request-base-subsection{
    margin-top:22px;
    padding-top:18px;
    border-top:1px solid #d9e5eb;
}
.request-base-subhead{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:16px;
    margin-bottom:14px;
}
.request-base-subhead .form-section-title{margin:0;color:#173f61;font-size:14px;font-weight:850}
.request-base-subhead .field-help{margin:4px 0 0;color:#6f8796}
.request-base-subhead .secondary-link.compact{white-space:nowrap;align-self:center}
.request-base-price-warning{margin-top:18px}
.request-price-inline .request-price-form.enhanced{
    grid-template-columns:130px 140px 155px 90px 85px 85px 120px 130px 130px;
    gap:8px;
}
.request-price-inline .request-price-form.enhanced .price-note{
    grid-column:1/-2;
    min-width:0;
}
.request-price-inline .request-price-form.enhanced .request-price-save{
    grid-column:-2/-1;
    justify-self:stretch;
}
@media(max-width:1400px){
  .request-price-inline .request-price-form.enhanced{grid-template-columns:repeat(5,minmax(0,1fr))}
  .request-price-inline .request-price-form.enhanced .price-note{grid-column:span 4}
  .request-price-inline .request-price-form.enhanced .request-price-save{grid-column:auto}
}
@media(max-width:1000px){
  .request-price-inline .request-price-form.enhanced{grid-template-columns:repeat(3,minmax(0,1fr))}
  .request-price-inline .request-price-form.enhanced .price-note{grid-column:span 2}
}
@media(max-width:760px){
  .request-base-subhead{flex-direction:column}
  .request-price-inline .request-price-form.enhanced{grid-template-columns:1fr 1fr}
  .request-price-inline .request-price-form.enhanced .price-note{grid-column:1/-1}
}
@media(max-width:520px){
  .request-price-inline .request-price-form.enhanced{grid-template-columns:1fr}
  .request-price-inline .request-price-form.enhanced .price-note,.request-price-inline .request-price-form.enhanced .request-price-save{grid-column:auto}
}

/* 2026-09-24: HTML editor a nahled pro hromadnou komunikaci */
.communication-rich-toolbar{display:flex;gap:6px;flex-wrap:wrap;margin:0 0 7px}.communication-rich-toolbar button{min-height:32px;padding:0 11px;border:1px solid #d6e2e9;border-radius:8px;background:#f8fbfc;color:#35556d;font:inherit;font-size:11px;font-weight:800;cursor:pointer}.communication-rich-toolbar button:hover{border-color:#9ed3df;background:#edf9fb;color:#087f9b}.communication-rich-editor{min-height:270px;padding:15px 16px;border:1px solid #d6e2e9;border-radius:10px;background:#fff;color:#294d67;font-size:13px;line-height:1.65;outline:none;overflow:auto}.communication-rich-editor:focus{border-color:#80c9d8;box-shadow:0 0 0 3px rgba(34,166,190,.10)}.communication-rich-editor p,.communication-preview-html p{margin:0 0 12px}.communication-rich-editor ul,.communication-rich-editor ol,.communication-preview-html ul,.communication-preview-html ol{margin:8px 0 14px;padding-left:24px}.communication-rich-editor li,.communication-preview-html li{margin:3px 0}.communication-rich-editor h1,.communication-rich-editor h2,.communication-rich-editor h3,.communication-rich-editor h4,.communication-preview-html h1,.communication-preview-html h2,.communication-preview-html h3,.communication-preview-html h4{margin:18px 0 9px;color:#173f61}.communication-preview-html a,.communication-rich-editor a{color:#087f9b}.communication-preview-html blockquote,.communication-rich-editor blockquote{margin:12px 0;padding:9px 14px;border-left:3px solid #b9dfe7;background:#f8fbfc}.communication-preview-html table,.communication-rich-editor table{border-collapse:collapse;max-width:100%}.communication-preview-html td,.communication-preview-html th,.communication-rich-editor td,.communication-rich-editor th{padding:6px 8px;border:1px solid #dce7ee;text-align:left}

/* Billing history 2026-10-09: search + grouping by invoice + invoice-level payment */
.billing-toolbar-history{align-items:flex-start}.billing-history-filter{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex:1;min-width:0}.billing-history-search{display:flex;align-items:center;gap:7px;min-width:280px;height:38px;padding:0 11px;border:1px solid #d5e2e9;border-radius:10px;background:#fff;color:#8aa0af}.billing-history-search:focus-within{border-color:#8bcbd8;box-shadow:0 0 0 3px rgba(15,153,184,.08)}.billing-history-search input{width:100%;min-width:0;border:0;outline:0;background:transparent;color:#36566e;font:inherit;font-size:10px;font-weight:700}.billing-history-search input::placeholder{color:#94a5b0;font-weight:600}.billing-history-filter select{min-width:220px;height:38px;padding:0 34px 0 12px;border:1px solid #d5e2e9;border-radius:10px;background:#fff;color:#36566e;font:inherit;font-size:10px;font-weight:750}.billing-history-filter .secondary-button{min-height:38px;padding:0 13px}.billing-history-clear{font-size:9px;white-space:nowrap}.billing-history-list{display:grid;gap:14px}.billing-history-invoice-card{overflow:hidden;border:1px solid #d5e2e9;border-radius:17px;background:#fff;box-shadow:0 10px 28px rgba(4,42,77,.035)}.billing-history-invoice-head{display:flex;align-items:center;justify-content:space-between;gap:22px;padding:15px 18px;border-bottom:1px solid #e8eff3;background:#fbfdfe}.billing-history-invoice-main{min-width:0}.billing-history-invoice-main h3{margin:2px 0 3px;color:var(--maxim-navy);font-size:18px}.billing-history-invoice-main p{margin:0;color:#7b8f9e;font-size:9px;line-height:1.45}.billing-history-invoice-summary{display:flex;align-items:center;justify-content:flex-end;gap:22px;min-width:0}.billing-history-total{text-align:right;min-width:120px}.billing-history-total span,.billing-history-total strong{display:block}.billing-history-total span{color:#8799a6;font-size:8px;font-weight:800;text-transform:uppercase;letter-spacing:.04em}.billing-history-total strong{margin-top:3px;color:#244f6a;font-size:15px}.billing-history-payment{display:flex;align-items:center;justify-content:flex-end;gap:8px;min-width:300px}.billing-paid-invoice{justify-content:flex-end}.billing-paid-invoice-form{flex-wrap:wrap;justify-content:flex-end}.billing-paid-whole-button{min-height:32px;padding:0 11px;font-size:9px;white-space:nowrap}.billing-part-paid-badge{display:inline-flex;align-items:center;min-height:25px;padding:0 9px;border-radius:999px;background:#fff6df;color:#8d681a;font-size:8px;font-weight:850;white-space:nowrap}.billing-history-invoice-card .billing-history-card{border:0;border-radius:0;box-shadow:none}.billing-history-invoice-card .billing-history-card .data-table{min-width:880px}.billing-history-row-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap}.billing-history-invoice-card .data-table th:first-child,.billing-history-invoice-card .data-table td:first-child{padding-left:18px}.billing-history-invoice-card .data-table th:last-child,.billing-history-invoice-card .data-table td:last-child{padding-right:18px}
@media(max-width:980px){.billing-toolbar-history{align-items:stretch;flex-direction:column}.billing-history-filter{justify-content:flex-start;flex-wrap:wrap}.billing-history-search{flex:1;min-width:240px}.billing-history-filter select{min-width:200px}.billing-history-invoice-head{align-items:flex-start;flex-direction:column}.billing-history-invoice-summary{width:100%;justify-content:space-between}.billing-history-payment{min-width:0}}
@media(max-width:650px){.billing-history-filter{display:grid;grid-template-columns:1fr}.billing-history-search,.billing-history-filter select,.billing-history-filter .secondary-button{width:100%;min-width:0}.billing-history-clear{justify-self:start}.billing-history-invoice-summary{align-items:flex-start;flex-direction:column;gap:10px}.billing-history-total{text-align:left}.billing-history-payment{width:100%;align-items:flex-start;justify-content:flex-start;flex-direction:column}.billing-paid-invoice-form{width:100%;align-items:stretch}.billing-paid-invoice-form input[type=date],.billing-paid-whole-button{width:100%}.billing-paid-invoice{align-items:flex-start;flex-direction:column}}

/* Historie fakturace: součet včetně 21 % DPH */
.billing-history-total .billing-history-vat-label{margin-top:8px;color:#577d90}.billing-history-total .billing-history-with-vat{color:#087e94;font-size:18px;font-weight:850}

/* Historie fakturace: zvětšený název firmy v hlavičce */
.billing-history-invoice-main .billing-history-invoice-company{margin:6px 0 4px;color:#123f61;font-size:15px;font-weight:850;line-height:1.35;overflow-wrap:anywhere}

/* Historie fakturace – oddělené hlavičky */
.billing-history-invoice-head{background:#e5f0f6;border-bottom:1px solid #c6dce9;box-shadow:inset 4px 0 0 #159bb4}
.billing-history-invoice-card{border-color:#c6dce9}
.billing-history-invoice-main h3{color:#082f5d}
.billing-history-invoice-main .billing-history-invoice-company{color:#0a4565}
.billing-history-total .billing-history-with-vat{color:#087e94;font-size:20px}

/* 2026-10-13 – výraznější hlavičky sekcí AI objednávky */
.ai-detail-content .review-card {
    overflow: hidden;
}
.ai-detail-content .review-card > .review-section-title {
    margin: -20px -20px 18px;
    padding: 14px 20px 13px;
    border-bottom: 1px solid #c7d9e3;
    border-radius: 14px 14px 0 0;
    color: #173f61;
    background: linear-gradient(180deg,#e3edf2 0%,#dbe8ee 100%);
    font-size: 14px;
    font-weight: 850;
}

/* AI došlé faktury – kompaktní kontroly */
.ai-checks-compact .request-section-head{margin-bottom:8px}
.ai-checks-compact .ai-checks-list{display:grid;gap:0}
.ai-checks-compact .ai-check-row{padding:9px 2px;line-height:1.45;font-size:12px;color:#24425a}
.ai-checks-compact .ai-check-row+.ai-check-row{border-top:1px solid #e7edf1}
