﻿@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');

html, body {
    margin: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

canvas {
    background-color: lightblue;
    border: 1px solid black;
    width: 100%;
    height: 100%;
}
a, .btn-link {
    color: #0366d6;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

app {
    /*position: relative;*/
    display: flex;
    flex-direction: column;
}

.top-row {
    height: 3.5rem;
    display: flex;
    align-items: center;
}

.main {
    flex: 1;
}

    .main .top-row {
        background-color: #f7f7f7;
        border-bottom: 1px solid #d6d5d5;
        justify-content: flex-end;
    }

        .main .top-row > a, .main .top-row .btn-link {
            white-space: nowrap;
            margin-left: 1.5rem;
        }

.main .top-row a:first-child {
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar {
    background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%);
}

    .sidebar .top-row {
        background-color: rgba(0,0,0,0.4);
    }

    .sidebar .navbar-brand {
        font-size: 1.1rem;
    }

    .sidebar .oi {
        width: 2rem;
        font-size: 1.1rem;
        vertical-align: text-top;
        top: -2px;
    }

    .sidebar .nav-item {
        font-size: 0.9rem;
        padding-bottom: 0.5rem;
    }

        .sidebar .nav-item:first-of-type {
            padding-top: 1rem;
        }

        .sidebar .nav-item:last-of-type {
            padding-bottom: 1rem;
        }

        .sidebar .nav-item a {
            color: #d7d7d7;
            border-radius: 4px;
            height: 3rem;
            display: flex;
            align-items: center;
            line-height: 3rem;
        }

            .sidebar .nav-item a.active {
                background-color: rgba(255,255,255,0.25);
                color: white;
            }

            .sidebar .nav-item a:hover {
                background-color: rgba(255,255,255,0.1);
                color: white;
            }

.content {
    padding-top: 1.1rem;
}

.navbar-toggler {
    background-color: rgba(255, 255, 255, 0.1);
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

@media (max-width: 767.98px) {
    .main .top-row:not(.auth) {
        display: none;
    }

    .main .top-row.auth {
        justify-content: space-between;
    }

    .main .top-row a, .main .top-row .btn-link {
        margin-left: 0;
    }
}

@media (min-width: 768px) {
    app {
        flex-direction: row;
    }

    .sidebar {
        width: 250px;
        height: 100vh;
        position: sticky;
        top: 0;
    }

    .main .top-row {
        position: sticky;
        top: 0;
    }

    .main > div {
        padding-left: 2rem !important;
        padding-right: 1.5rem !important;
    }

    .navbar-toggler {
        display: none;
    }

    .sidebar .collapse {
        /* Never collapse the sidebar for wide screens */
        display: block;
    }
}


.dialogV2-container {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0,0,0,0.5);
    z-index: 500;
    display: flex;
    animation: dialog-container-entry 0.2s;
}

@keyframes dialog-container-entry {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

.dialogV2 {
    background-color: white;
    box-shadow: 0 0 12px rgba(0,0,0,0.6);
    display: flex;
    flex-direction: column;
    z-index: 500;
    align-self: center;
    margin: auto;
    width: 1250px;
    min-height: 550px;
    max-height: calc(100% - 3rem);
    /*animation: dialog-entry 0.2s;
    animation-timing-function: cubic-bezier(0.075, 0.820, 0.165, 1.000);
        */
    border-top-left-radius: 0.42rem;
    border-top-right-radius: 0.42rem;
}
/*
@keyframes dialog-entry {
    0% {
        transform: translateY(30px) scale(0.95);
    }

    100% {
        transform: translateX(0px) scale(1.0);
    }
}
    */
.dialogV2-title {
    background-color: #f0f0f0;
    color: #808080;
    padding: 1.3rem 2rem;
    border-radius: 0.42rem;
}

    .dialogV2-title h2 {
        color: black;
        font-size: 1.4rem;
        margin: 0;
        font-family: 'Bahnschrift', Arial, Helvetica, sans-serif;
        text-transform: uppercase;
        line-height: 1.3rem;
    }

.dialogV2-body {
    flex-grow: 1;
    padding: 0.5rem 3rem 1rem 0;
}

.dialogV2-buttons {
    height: 4rem;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    background-color: #eee;
    padding: 0 1rem;
    border-bottom-left-radius: 0.42rem;
    border-bottom-right-radius: 0.42rem;
}

.dialogV2-body > div {
    display: flex;
    margin-top: 1rem;
    align-items: center;
}

.dialogV2-body label {
    /*    text-align: right;
    width: 200px;
    margin: 0 1.5rem;
    */
}

.dialogV2-body input, .dialogV2-body select {
    flex-grow: 1;
    width: unset;
}

.dialogV2-body .size-label {
    min-width: 110px;
    /*text-align: right;*/
}

.dialogV2_Usuario {
    background-color: white;
    box-shadow: 0 0 12px rgba(0,0,0,0.6);
    display: flex;
    flex-direction: column;
    z-index: 500;
    align-self: center;
    margin: auto;
    width: 1050px;
    min-height: 550px;
    max-height: calc(100% - 3rem);
    /*animation: dialog-entry 0.2s;
    animation-timing-function: cubic-bezier(0.075, 0.820, 0.165, 1.000);
        */
    border-top-left-radius: 0.42rem;
    border-top-right-radius: 0.42rem;
}

.dialogV2_ProximoPaso {
    background-color: white;
    box-shadow: 0 0 12px rgba(0,0,0,0.6);
    display: flex;
    flex-direction: column;
    z-index: 500;
    align-self: center;
    margin: auto;
    width: 500px;
    min-height: 300px;
    max-height: calc(100% - 3rem);
    /*animation: dialog-entry 0.2s;
    animation-timing-function: cubic-bezier(0.075, 0.820, 0.165, 1.000);
        */
    border-top-left-radius: 0.42rem;
    border-top-right-radius: 0.42rem;
}


.dialogV2_workflowLog {
    background-color: white;
    box-shadow: 0 0 12px rgba(0,0,0,0.6);
    display: flex;
    flex-direction: column;
    z-index: 500;
    align-self: center;
    margin: auto;
    width: 900px;
    min-height: 500px;
    max-height: calc(100% - 3rem);
    /*animation: dialog-entry 0.2s;
    animation-timing-function: cubic-bezier(0.075, 0.820, 0.165, 1.000);
        */
    border-top-left-radius: 0.42rem;
    border-top-right-radius: 0.42rem;
}

/*THIS GOES INTO THE OTHER CSS FILE*/
/*i {
    font-size: 20px;
    color: black;
    margin-right: 10px;
    padding: 3px;
    background-color: white;
}*/

/* ============================================================
   Payment Components — ServicePaymentModal & ServicePaymentList
   ============================================================ */

/* ── Payment type toggle (ServicePaymentModal) ────────────── */
.payment-type-toggle {
    display: inline-flex;
    gap: 10px;
    align-items: center;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
}

.payment-type-btn {
    min-width: 180px;
    border: 1px solid #d1d5db;
    background: #fff;
    border-radius: 6px;
    padding: 10px 20px;
    cursor: pointer;
    text-align: center;
    font-weight: 600;
    font-size: 0.85rem;
    color: #374151;
    transition: border-color 0.15s, background 0.15s;
}

.payment-type-btn.active {
    border-color: #2563eb;
    background: #eff6ff;
}

.payment-type-btn:hover:not(.active) {
    border-color: #9ca3af;
    background: #f9fafb;
}

.payment-type-btn-title {
    font-weight: 600;
    font-size: 0.88rem;
    color: #1f2937;
}

.payment-type-btn-subtitle {
    font-size: 0.76rem;
    color: #6b7280;
    margin-top: 2px;
}

.custom-textarea {
    min-height: 80px;
    resize: vertical;
}

.payment-modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 14px;
    border-top: 1px solid #e5e7eb;
}

/* ── Payment history collapsible (ServicePaymentList) ─────── */
.payment-history-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    padding: 8px 0;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 12px;
    user-select: none;
}

.payment-history-toggle:hover .payment-history-label {
    color: #2563eb;
}

.payment-history-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: color 0.15s;
}

.payment-history-chevron {
    font-size: 0.75rem;
    color: #9ca3af;
    display: inline-block;
    transition: transform 0.2s;
}

.payment-history-chevron.expanded {
    transform: rotate(180deg);
}

.payment-history-empty {
    font-size: 0.85rem;
    color: #9ca3af;
    padding: 12px 0;
}

.payment-history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    margin-top: 4px;
}

.payment-history-table th,
.payment-history-table td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid #f3f4f6;
}

.payment-history-table th {
    font-size: 0.76rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: #f9fafb;
}

.payment-history-table tbody tr:hover {
    background: #f9fafb;
}

/* ── Status badges ────────────────────────────────────────── */
.badge-status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.badge-completed {
    background: #dcfce7;
    color: #16a34a;
}

.badge-scheduled {
    background: #fef9c3;
    color: #b45309;
}

/* ── Confirm payment row button ───────────────────────────── */
.btn-confirm-payment {
    padding: 4px 12px;
    font-size: 0.8rem;
    border: 1px solid #2563eb;
    border-radius: 4px;
    background: #eff6ff;
    color: #2563eb;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.15s;
    white-space: nowrap;
}

.btn-confirm-payment:hover {
    background: #dbeafe;
}

/* ── Confirm scheduled payment modal ─────────────────────── */
.confirm-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.confirm-modal-content {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 680px;
    max-height: 90vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.confirm-modal-body {
    padding: 20px 24px;
    flex: 1;
}

.confirm-modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 24px;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
    border-radius: 0 0 10px 10px;
    gap: 10px;
}

.confirm-modal-subtitle {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 2px;
}

/* ── Original payment info card ───────────────────────────── */
.original-payment-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 20px;
}

.original-payment-card-label {
    font-size: 0.74rem;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 10px;
}

.original-payment-card-cols {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.original-payment-card-cols > div > label {
    font-size: 0.74rem;
    color: #9ca3af;
    display: block;
    margin-bottom: 2px;
}

.original-payment-card-cols > div > span {
    font-weight: 600;
    font-size: 0.88rem;
    color: #1f2937;
}

/* ── Confirm modal form elements ──────────────────────────── */
.confirm-section-title {
    font-size: 0.78rem;
    font-weight: 700;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 16px;
    margin-top: 20px;
}

.confirm-form-group {
    margin-bottom: 16px;
}

.confirm-form-group > label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 4px;
    display: block;
}

.hint-muted {
    font-size: 0.76rem;
    color: #9ca3af;
    margin-top: 3px;
}

.hint-amber {
    font-size: 0.76rem;
    color: #d97706;
    margin-top: 3px;
}

.confirm-validation-error {
    font-size: 0.76rem;
    color: #dc2626;
    margin-top: 3px;
}

/* ── Cashflow impact card ─────────────────────────────────── */
.cashflow-card {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 14px 16px;
    margin-top: 20px;
}

.cashflow-card-title {
    font-size: 0.76rem;
    font-weight: 700;
    color: #1d4ed8;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 10px;
}

.cashflow-cols {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
}

.cashflow-cols > div > label {
    font-size: 0.74rem;
    color: #3b82f6;
    display: block;
    margin-bottom: 2px;
}

.cashflow-cols > div > span {
    font-weight: 600;
    font-size: 0.88rem;
    color: #1e40af;
}

.cashflow-footer-note {
    font-size: 0.74rem;
    color: #3b82f6;
    margin-top: 10px;
    font-style: italic;
}

/* ── Confirm modal action buttons ─────────────────────────── */
.btn-reschedule {
    padding: 6px 14px;
    font-size: 0.82rem;
    border: 1px solid #6b7280;
    border-radius: 6px;
    background: #fff;
    color: #374151;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.15s, border-color 0.15s;
    white-space: nowrap;
}

.btn-reschedule:hover {
    background: #f3f4f6;
    border-color: #4b5563;
}

.btn-confirm-green {
    padding: 6px 16px;
    font-size: 0.82rem;
    border: none;
    border-radius: 6px;
    background: #16a34a;
    color: #fff;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.15s;
    white-space: nowrap;
}

.btn-confirm-green:hover {
    background: #15803d;
}

.btn-confirm-green:disabled {
    background: #86efac;
    cursor: not-allowed;
}

/* ── Modify / Delete action buttons (payment list rows) ───── */
.btn-action-modify {
    font-size: 0.78rem;
    font-weight: 600;
    padding: 4px 10px;
    border: 1px solid #3b82f6;
    color: #3b82f6;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s;
}

.btn-action-modify:hover {
    background-color: #3b82f6;
    color: #ffffff;
}

.btn-action-delete {
    font-size: 0.78rem;
    font-weight: 600;
    padding: 4px 10px;
    border: 1px solid #ef4444;
    color: #ef4444;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s;
}

.btn-action-delete:hover {
    background-color: #ef4444;
    color: #ffffff;
}

.btn-action-delete-confirm {
    background-color: #ef4444;
    border: none;
    border-radius: 6px;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 8px 20px;
    cursor: pointer;
    transition: background-color 0.15s;
}

.btn-action-delete-confirm:hover:not(:disabled) {
    background-color: #dc2626;
}

.btn-action-delete-confirm:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ── End Payment Components ───────────────────────────────── */

