.expenses-summary {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

.expenses-summary-item {
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 9px;
    background: #f9fafb;
}

.expenses-summary-label {
    display: block;
    margin-bottom: 3px;
    color: #6b7280;
    font-size: 0.78rem;
}

#expenses-list {
    display: grid;
    gap: 10px;
}

.expense-card {
    padding: 14px;
    border: 1px solid #99f6e4;
    border-left: 5px solid #0f766e;
    border-radius: 10px;
    background:
        linear-gradient(
            90deg,
            #f0fdfa 0%,
            #ffffff 50%
        );
}

.expense-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.expense-date {
    margin-right: 7px;
    color: #6b7280;
    font-size: 0.82rem;
}

.expense-category {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 999px;
    background: #99f6e4;
    color: #115e59;
    font-size: 0.76rem;
    font-weight: 600;
}

.expense-price {
    color: #115e59;
    white-space: nowrap;
}

.expense-title {
    margin: 9px 0 0;
    font-size: 1rem;
}

.expense-czk {
    margin-top: 3px;
    color: #6b7280;
    font-size: 0.82rem;
}

.expense-notes {
    margin-top: 10px;
    padding: 9px 10px;
    border-radius: 7px;
    background: rgb(255 255 255 / 70%);
    color: #4b5563;
    white-space: pre-line;
}

.expense-actions {
    display: flex;
    justify-content: flex-end;
    gap: 7px;
    margin-top: 10px;
}

.expense-money-field {
    min-width: 0;
}

.expense-field-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
}

.expense-money-row {
    display: flex;
    gap: 7px;
}

.expense-money-row input {
    min-width: 0;
    flex: 1 1 auto;
}

.expense-money-row select {
    width: 104px;
    min-width: 104px;
    flex: 0 0 104px;
}

#expense-category {
    width: 100%;
}

.expense-rate-info {
    padding: 9px 11px;
    border: 1px solid #99f6e4;
    border-radius: 8px;
    background: #f0fdfa;
    color: #115e59;
    font-size: 0.86rem;
    line-height: 1.35;
}

.expense-rate-info.loading {
    border-color: #e5e7eb;
    background: #f9fafb;
    color: #6b7280;
}

.expense-rate-info.error {
    border-color: #fecaca;
    background: #fef2f2;
    color: #991b1b;
}

/* aktivní záložka Náklady */
.nav-button[data-section="expenses"].active {
    background: #0f766e;
    color: white;
}


@media (max-width: 700px) {
    .expenses-summary {
        gap: 7px;
    }

    .expenses-summary-item {
        padding: 9px;
    }

    .expense-card {
        padding: 11px;
    }

    .expense-card-header {
        gap: 7px;
    }

    .expense-money-row select {
        width: 96px;
        min-width: 96px;
        flex-basis: 96px;
    }
}


/* === NAV ACTIVE STRIP CONSISTENCY START === */

/* Přehled – stejný styl aktivní záložky jako Tankování */
.navigation .nav-button[data-section="overview"].active {
    background: #f3f4f6 !important;
    color: #111827 !important;
    border-radius: 10px !important;
    box-shadow: inset 0 -3px 0 #9ca3af !important;
}

/* Náklady */
.navigation .nav-button[data-section="expenses"].active {
    background: #f0fdfa !important;
    color: #115e59 !important;
    border-radius: 10px !important;
    box-shadow: inset 0 -3px 0 #0f766e !important;
}

/* Dokumenty */
.navigation .nav-button[data-section="documents"].active {
    background: #f8fafc !important;
    color: #475569 !important;
    border-radius: 10px !important;
    box-shadow: inset 0 -3px 0 #64748b !important;
}

/* === NAV ACTIVE STRIP CONSISTENCY END === */




/* Expense attachments */

.expense-attachment-field {
    min-width: 0;
}

.expense-attachment-select {
    display: flex;
    align-items: center;
    gap: 8px;
}

.expense-attachment-select input[type="file"] {
    min-width: 0;
    flex: 1 1 auto;
}

.expense-attachments {
    display: grid;
    gap: 6px;
    margin-top: 9px;
}

.expense-attachment-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 9px;
    border: 1px solid #99f6e4;
    border-radius: 7px;
    background: #f0fdfa;
}

.expense-attachment-name {
    min-width: 0;
    flex: 1 1 auto;
    padding: 0;
    border: 0;
    background: transparent;
    color: #115e59;
    font: inherit;
    text-align: left;
    text-decoration: underline;
    cursor: pointer;
    overflow-wrap: anywhere;
}

.expense-attachment-size {
    flex: 0 0 auto;
    color: #6b7280;
    font-size: 0.78rem;
    white-space: nowrap;
}

.expense-attachment-remove {
    width: 27px;
    height: 27px;
    flex: 0 0 27px;
    padding: 0;
    border: 1px solid #99f6e4;
    border-radius: 6px;
    background: #ffffff;
    color: #115e59;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
}

.expense-card-header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
}

.expense-attachment-count {
    color: #0f766e;
    font-size: 0.76rem;
    font-weight: 600;
    white-space: nowrap;
}
