
/* ===== ZÁKLADNÉ OVERRIDES ===== */

html, body {
    font-family: 'Inter', sans-serif;
}

/* ===== VÝBER TYPU FAKTÚRY ===== */

.invoice-select-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 24px 15rem 36px;
}

.invoice-select-card {
    background: #fff;
    border: 1px solid #E5E5E8;
    border-radius: 20px;
    padding: 40px 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    transition: all 0.18s;
    text-align: center;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    font-family: inherit;
}

.invoice-select-card:hover {
    border-color: #8B9EE8;
    box-shadow: 0 4px 20px rgba(139,158,232,0.18);
    transform: translateY(-2px);
}

.invoice-select-icon {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background: #EAF1FF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #8B9EE8;
}

.invoice-select-icon--alt {
    background: #FFF4EC;
    color: #E8825A;
}

.invoice-select-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #111111;
}

.invoice-select-desc {
    font-size: 0.85rem;
    color: #9CA3AF;
}

/* ===== FADE PRECHOD ===== */

.form-fade-in {
    animation: formFadeIn 0.25s ease;
}

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

/* ===== STEPPER ===== */

.stepper-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 16px 15rem 16px;
    padding: 14px 20px;
    background: #fff;
    border-radius: 20px;
    border: 1px solid #E5E5E8;
    border-top: 3px solid #8B9EE8;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.step {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: #9CA3AF;
}

.step-label {
    font-size: 0.82rem;
    font-weight: 500;
    white-space: nowrap;
}

.step-icon {
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 700;
    background: #F4F4F6;
    color: #9CA3AF;
    border: 1.5px solid #E5E5E8;
}

.step.active .step-icon {
    border-color: #8B9EE8;
    color: black;
    background: #EAF1FF;
}

.step.active .step-label {
    color: #111111;
    font-weight: 700;
}

.step.completed .step-icon {
    background: #E8F5EE;
    color: #1A9E5C;
    border-color: #1A9E5C;
}

.step.completed .step-label {
    color: #6B7280;
}

.step-line {
    flex: 0 1 40px;
    height: 2px;
    background: #E5E5E8;
    margin: 0 6px;
    border-radius: 2px;
}

/* ===== HLAVNÁ KARTA ===== */

.boxpozadie {
    margin: 0 15rem 36px;
    padding: 28px 32px;
    background: #fff;
    border-radius: 20px;
    border: 1px solid #E5E5E8;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

/* ===== TEXTY A LABELY ===== */

.obyctext {
    display: block;
    margin-bottom: 4px;
    margin-top: 10px;
    color: #6B7280;
    font-size: 0.88rem;
    font-weight: 500;
}

.sekcia-hlavicka {
    font-weight: 700;
    color: #474570;
    margin-bottom: 16px;
    font-size: 1.05rem;
}

/* ===== VSTUPY ===== */

.box,
select.box {
    width: 100%;
    padding: 8px 12px;
    border-radius: 14px;
    border: 1.5px solid #E5E5E8;
    font-size: 0.9rem;
    font-family: inherit;
    background: #fff;
    color: #111111;
    transition: border-color 0.18s, box-shadow 0.18s;
    appearance: none;
    box-sizing: border-box;
}

.box:focus {
    outline: none;
    border-color: #8B9EE8;
    box-shadow: 0 0 0 2px rgba(139,158,232,0.25);
}

.box.invalid,
.box.input-validation-error {
    border-color: #F58789;
}

.box.invalid:focus,
.box.input-validation-error:focus {
    outline: none;
    border-color: #F58789;
    box-shadow: 0 0 0 2px rgba(245,135,137,0.20);
}

.minibox {
    width: 120px !important;
    flex-shrink: 0;
    padding: 8px 12px;
    border: 1.5px solid #E5E5E8;
    border-radius: 14px;
    background: #fff;
    color: #111111;
    font-family: inherit;
    font-size: 0.9rem;
}

.minibox:focus {
    outline: none;
    border-color: #8B9EE8;
    box-shadow: 0 0 0 2px rgba(139,158,232,0.25);
}

/*ABY SA MI NEZAFARBOVALO DOPĹŇANIE AUTOMATICKY*/
input:-webkit-autofill,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
select:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px #fff inset;
    -webkit-text-fill-color: #111111;
    border: 1.5px solid #E5E5E8;
}

/* ===== DVA BOXY VEDĽA SEBA ===== */

.dvaboxy {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 0 20px;
}

/* ===== VNÚTORNÉ BOXY ===== */

.boxvnutro {
    background: #FAFAFA;
    border: 1px solid #E5E5E8;
    border-radius: 16px;
    padding: 16px;
    margin-top: 14px;
    width: 100%;
    box-sizing: border-box;
}

.boxpridavaci {
    background: #fff;
    border: 1px solid #E5E5E8;
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 12px;
    display: block;
}

/* ===== REKAPITULACIA FORMULARA ===== */

.rekapitulacia-formulara {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.rekapitulacia-hlavicka {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    padding-bottom: 16px;
    border-bottom: 1px solid #E5E5E8;
}

.rekapitulacia-eyebrow,
.rekapitulacia-panel-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #9CA3AF;
}

.rekapitulacia-hlavicka h3 {
    margin: 3px 0 0;
    color: #111111;
    font-size: 1.2rem;
    font-weight: 800;
}

.rekapitulacia-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.rekapitulacia-party-grid,
.rekapitulacia-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.rekapitulacia-wide-panel {
    grid-column: span 2;
}

.rekapitulacia-panel {
    border: 1px solid #E5E5E8;
    border-radius: 14px;
    padding: 14px 16px;
    background: #fff;
}

.rekapitulacia-panel-title {
    margin-bottom: 10px;
}

.rekapitulacia-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
    border-bottom: 1px solid #F4F4F6;
    color: #6B7280;
    font-size: 0.86rem;
}

.rekapitulacia-row:last-child {
    border-bottom: none;
}

.rekapitulacia-row strong {
    color: #374151;
    font-weight: 700;
    text-align: right;
}

.rekapitulacia-facts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    align-items: start;
    justify-items: stretch;
}

.rekapitulacia-facts div {
    min-width: 0;
    padding: 0 18px;
    border-right: 1px solid #F4F4F6;
}

.rekapitulacia-facts div:first-child {
    padding-left: 0;
}

.rekapitulacia-facts div:last-child {
    padding-right: 0;
    border-right: none;
}

.rekapitulacia-facts span {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #9CA3AF;
    margin-bottom: 4px;
}

.rekapitulacia-facts strong {
    display: block;
    color: #6B7280;
    font-size: 0.95rem;
    font-weight: 400;
}

.rekapitulacia-payment-facts {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.rekapitulacia-party-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: #111111;
    margin-bottom: 8px;
}

.rekapitulacia-party-line,
.rekapitulacia-muted {
    color: #6B7280;
    font-size: 0.86rem;
    margin-top: 3px;
    font-weight: 400;
}

.rekapitulacia-polozky {
    padding: 0;
    overflow: hidden;
}

.rekapitulacia-polozky .rekapitulacia-panel-title {
    padding: 14px 16px 0;
}

.rekapitulacia-table-wrap {
    overflow-x: auto;
}

.rekapitulacia-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.rekapitulacia-table th {
    background: #FAFAFA;
    color: #9CA3AF;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 11px 14px;
    text-align: left;
    white-space: nowrap;
}

.rekapitulacia-table td {
    padding: 12px 14px;
    color: #374151;
    font-size: 0.85rem;
    border-top: 1px solid #F4F4F6;
    vertical-align: middle;
}

.rekapitulacia-dph-panel {
    padding: 0;
    overflow: hidden;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

.rekapitulacia-dph-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0;
}

.rekapitulacia-dph-table th {
    background: #FAFAFA;
    color: #9CA3AF;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 11px 14px;
    text-align: left;
    white-space: nowrap;
}

.rekapitulacia-dph-table td {
    padding: 12px 14px;
    color: #374151;
    font-size: 0.85rem;
    border-top: 1px solid #F4F4F6;
    vertical-align: middle;
}

.rekapitulacia-dph-table th:nth-child(n+2),
.rekapitulacia-dph-table td:nth-child(n+2) {
    text-align: right;
}

.rekapitulacia-spodok {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
    gap: 0;
    align-items: stretch;
    border: 1px solid #E5E5E8;
    border-radius: 14px;
    overflow: hidden;
    background: #FFFFFF;
}

.rekapitulacia-sumy {
    border: none;
    border-left: 1px solid #E5E5E8;
    border-radius: 0;
    padding: 14px 16px;
    background: #FAFAFA;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-sizing: border-box;
}

.rekapitulacia-suma-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 7px 0;
    color: #6B7280;
    font-size: 0.9rem;
}

.rekapitulacia-suma-row strong {
    color: #374151;
}

.rekapitulacia-suma-final {
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid #E5E5E8;
    color: #111111;
    font-weight: 800;
}

.rekapitulacia-suma-final strong {
    color: #111111;
    font-size: 1.1rem;
}

@media (max-width: 900px) {
    .rekapitulacia-spodok {
        grid-template-columns: 1fr;
    }

    .rekapitulacia-sumy {
        border-left: none;
        border-top: 1px solid #E5E5E8;
    }
}

.hlavickaboxpridavaci {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #E5E5E8;
    color: #374151;
    font-weight: 600;
    font-size: 0.9rem;
}

/* ===== TLAČIDLÁ ===== */

.btn-dalej {
    padding: 8px 20px;
    border-radius: 20px;
    border: 1.5px solid #8A8A8A;
    background: #E9ECF2;
    cursor: pointer;
    color: #374151;
    font-size: 0.9rem;
    font-family: inherit;
    font-weight: 500;
    transition: all 0.15s;
}

.btn-dalej:hover {
    border-color: #8B9EE8;
    color: #474570;
    background: #EAF1FF;
}

.btn-spat {
    padding: 8px 20px;
    border-radius: 20px;
    border: 1.5px solid #E5E5E8;
    background: #fff;
    cursor: pointer;
    color: #374151;
    font-size: 0.9rem;
    font-family: inherit;
    font-weight: 500;
    transition: all 0.15s;
}

.btn-spat:hover {
    border-color: #8B9EE8;
    color: #474570;
    background: #EAF1FF;
}

.tlacidlo-ulozit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 20px;
    border-radius: 20px;
    border: 1.5px solid #1A9E5C;
    background: #E8F5EE;
    cursor: pointer;
    color: #1A9E5C;
    font-size: 0.9rem;
    font-family: inherit;
    font-weight: 500;
    transition: all 0.15s;
}

.tlacidlo-ulozit:hover:not(:disabled) {
    background: #DDF0E7;
    border-color: #168C51;
    color: #168C51;
    box-shadow: 0 4px 12px rgba(26, 158, 92, 0.12);
}




.tlacidlo-ulozit:disabled {
    opacity: 0.6;
    cursor: default;
}

/* ===== PRIDAŤ / ZMAZAŤ ===== */

.pridat {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 14px;
    border-radius: 20px;
    background: #EAF1FF;
    border: 1.5px solid #8B9EE8;
    color: #474570;
    font-weight: 600;
    font-size: 0.82rem;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s;
}

.pridat:hover {
    background: #d6e4ff;
    border-color: #474570;
}

.zarovnaniepridat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 14px;
}


.zarovnaniepridat-vpravo {
    display: flex;
    justify-content: flex-end;
    width: 100%;
    margin-bottom: 14px;
}
.zmazat {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 6px;
    min-width: 30px;
    height: 30px;
    border-radius: 999px;
    background: #F4F4F6;
    border: 1.5px solid #E5E5E8;
    color: #9CA3AF;
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s;
}

.zmazat:hover {
    background: #FFF0EE;
    border-color: #ef4444;
    color: #dc2626;
}

/* ===== NAVIGÁCIA DOLE ===== */

.form-navigacia {
    display: flex;
    justify-content: space-between;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid #E5E5E8;
}

/* ===== ZVÝRAZNENÝ TEXT ===== */

.zvyraznenytext {
    font-weight: 700;
    color: #374151;
    font-size: 0.95rem;
}

/* ===== ROZBAĽOVACIA TRIEDA ===== */

.rozbalovaciatrieda {
    margin-top: 16px;
    margin-bottom: 4px;
    color: #374151;
}

summary.detailtext,
.detailtext {
    font-weight: 700;
    cursor: pointer;
    color: #474570;
    font-size: 0.9rem;
    margin-bottom: 4px;
    margin-top: 2px;
    user-select: none;
}

/* ===== UPLOAD ===== */

.skryty-vstup {
    display: none !important;
}

.uploadbox {
    width: 100%;
    padding: 6px 12px;
    border: 1.5px solid #E5E5E8;
    border-radius: 14px;
    background: #fff;
    font-size: 0.9rem;
    color: #111111;
    transition: border-color 0.18s;
    display: flex;
    align-items: center;
    gap: 10px;
    box-sizing: border-box;
}

.uploadtlacidlo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 999px;
    background: #EAF1FF;
    border: 1.5px solid #8B9EE8;
    color: #474570;
    font-weight: 600;
    font-size: 0.8rem;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s;
    flex-shrink: 0;
}

.uploadtlacidlo:hover {
    background: #d6e4ff;
    border-color: #474570;
}

.uploadnazovsuboru {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #9CA3AF;
    font-size: 0.85rem;
    display: block;
}

/* ===== SÚČET FAKTÚRY ===== */

.spolutext {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    color: #374151;
    width: 100%;
    margin-top: 0;
    font-size: 0.88rem;
}

.suma {
    margin-left: 12px;
}

.faktura-suma {
    display: grid !important;
    grid-template-columns: 1fr 120px;
    max-width: 320px;
    color: #374151 !important;
    margin-top: 2px;
    margin-bottom: 2px;
    font-size: 0.9rem;
}

.faktura-suma:nth-of-type(2) {
    border-bottom: 1.5px dotted #E5E5E8 !important;
    padding-bottom: 4px !important;
    margin-bottom: 6px !important;
}

.faktura-suma.zvyraznenytext {
    font-weight: 700 !important;
    color: #111111 !important;
}

.faktura-suma.zvyraznenytext span {
    font-weight: inherit;
}

.faktura-suma-hodnota {
    text-align: right;
}

.ciara-hore {
    border-top: 1.5px dotted #E5E5E8 !important;
    padding-top: 8px !important;
    margin-top: 8px !important;
}

/* ===== VALIDÁCIA ===== */

.input-validation-error {
    border-color: #F58789 !important;
}

.input-validation-error:focus {
    outline: none;
    border-color: #F58789;
    box-shadow: 0 0 0 2px rgba(245,135,137,0.20);
}

.validation-message {
    display: block;
    margin-top: 6px;
    color: #E8635A;
    font-size: 0.82rem;
    font-weight: 500;
}

/* ===== LOADING ===== */

.loading-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px 20px;
    text-align: center;
}

.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #EAF1FF;
    border-top: 3px solid #8B9EE8;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== TOOLTIP ===== */

.label-with-tooltip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
}

.info-tooltip-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.info-tooltip-trigger {
    width: 18px;
    height: 18px;
    min-width: 18px;
    min-height: 18px;
    margin-left: 4px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #EAF1FF;
    border: 1.5px solid #8B9EE8;
    border-radius: 50%;
    color: #474570;
    font-size: 10px;
    font-weight: 700;
    font-style: normal;
    line-height: 1;
    box-sizing: border-box;
    cursor: pointer;
    user-select: none;
    transition: all 0.15s;
}

.info-tooltip-trigger:hover {
    background: #d6e4ff;
    border-color: #474570;
}

.custom-tooltip {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    left: auto;
    z-index: 1000;
    width: 240px;
    max-width: 80vw;
    padding: 8px 12px;
    background: #fff;
    border: 1px solid #E5E5E8;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.10);
    color: #374151;
    font-size: 12px;
    line-height: 1.4;
    white-space: normal;
    opacity: 0;
    visibility: hidden;
    transform: translateY(4px);
    transition: all 0.18s;
}

.info-tooltip-wrapper:hover .custom-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* ===== ZAROVNANIE STRED ===== */

.zarovnanie-stred {
    display: flex;
    justify-content: center;
    margin-top: 24px;
    margin-bottom: 8px;
    width: 100%;
}

/* ===== TOOLTIP BOX (starý) ===== */

.tooltip-box {
    position: absolute;
    top: 120%;
    right: 0;
    background: #fff;
    color: #111;
    padding: 10px 12px;
    border-radius: 14px;
    font-size: 12px;
    width: 200px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.10);
    border: 1px solid #E5E5E8;
    opacity: 0;
    transform: translateY(5px);
    transition: all 0.18s;
    pointer-events: none;
}
