html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0071c1;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    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;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5I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I2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }


    .photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.photo-card {
    background: #fff;
    border-radius: 14px;
    padding: 14px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
}

.photo-thumb {
    width: 100%;
    height: 190px;
    object-fit: cover;
    border-radius: 12px;
    cursor: pointer;
    margin: 10px 0;
}

.photo-placeholder {
    height: 190px;
    background: #eef1f5;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #667;
    margin: 10px 0;
}

.photo-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 999px;
    color: white;
    font-size: 13px;
    font-weight: 700;
}

.photo-before {
    background: #1f5eff;
}

.photo-after {
    background: #0f9f6e;
}

.photo-special {
    background: #8b5cf6;
}

.photo-default {
    background: #64748b;
}
.checkbox-line {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 12px 0;
    font-weight: 600;
}
.photo-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.photo-preview-modal {
    max-width: 900px;
}

.photo-preview-img {
    width: 100%;
    max-height: 75vh;
    object-fit: contain;
    border-radius: 14px;
}


.loading-progress {
    position: absolute;
    display: block;
    width: 8rem;
    height: 8rem;
    inset: 20vh 0 auto 0;
    margin: 0 auto 0 auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

code {
    color: #c02d76;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

.admin-card {
    background: white;
    padding: 24px;
    border-radius: 18px;
    box-shadow: 0 8px 25px rgba(0,0,0,.08);
    margin-bottom: 25px;
}

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

.finance-toggle-bar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin: 20px 0 14px;
}

.dynamic-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 20px;
    align-items: start;
}



   .modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.modal-card {
    width: 600px;
    max-width: 90vw;
    background: white;
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 20px 50px rgba(0,0,0,.25);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.btn-secondary {
    background: #e5e7eb !important;
    color: #061735 !important;
}

.btn-danger {
    background: #dc2626 !important;
    color: white !important;
}

.admin-card input,
.admin-card textarea {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #ccc;
    margin-bottom: 12px;
}

.admin-card button {
    background: #061735;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 999px;
    cursor: pointer;
    font-weight: bold;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 18px;
    overflow: hidden;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.modal-card {
    width: 600px;
    max-width: 90vw;

    background: white;

    border-radius: 18px;

    padding: 24px;

    box-shadow:
        0 20px 50px rgba(0,0,0,.25);

    animation: modalIn .15s ease;
}

@keyframes modalIn {
    from {
        opacity:0;
        transform:translateY(-10px);
    }
    to {
        opacity:1;
        transform:translateY(0);
    }
}

.modal-card h2 {
    margin-bottom: 16px;
    color: #061735;
}

.modal-card p {
    margin-bottom: 16px;
    color: #374151;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 20px;
}

.admin-table th,
.admin-table td {
    padding: 14px;
    border-bottom: 1px solid #eee;
    text-align: left;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.dash-card {
    background: #061735;
    color: white;
    padding: 30px;
    border-radius: 18px;
    text-decoration: none;
    font-size: 22px;
    font-weight: bold;
}
.invoice-item-grid {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 90px 120px 110px 48px;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

.invoice-item-grid input:first-child {
    min-width: 260px;
}

.save-btn {
    background: #f5a400 !important;
    color: #061735 !important;
}

.success-message {
    margin-top: 15px;
    font-weight: bold;
    color: #0b7a28;
}
.invoice-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.invoice-editor-layout {
    display: grid;
    grid-template-columns: minmax(640px, 58%) minmax(700px, 80%);
    gap: 20px;
    align-items: start;
}

.invoice-editor-left {
    min-width: 0;
}

.invoice-editor-right {
    background: #d9dee8;
    padding: 16px;
    border-radius: 20px;
    height: calc(100vh - 120px);
    position: sticky;
    top: 90px;
}
.settings-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}

.settings-tab {
    border: none;
    padding: 12px 20px;
    border-radius: 999px;
    background: #e5e7eb;
    color: #061735;
    font-weight: 700;
    cursor: pointer;
}

.settings-tab.active {
    background: #f5a400;
    color: #061735;
}

.full-width-card {
    width: 100%;
}

.danger-btn {
    background: #9b1c1c !important;
    margin-left: 10px;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 18px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 18px;
    box-shadow: 0 8px 25px rgba(0,0,0,.08);
    border-top: 5px solid #f5a400;
}

.stat-card span {
    font-size: 34px;
}

.stat-card strong {
    font-size: 30px;
    color: #061735;
}

.stat-card p {
    margin: 0;
    color: #555;
    font-weight: 600;
}

.stat-card.warning {
    border-top-color: #9b1c1c;
}

.service-create-box {
    background: #f7f7f7;
    padding: 18px;
    border-radius: 16px;
    margin-bottom: 20px;
}
.invoice-item-grid-template {
    grid-template-columns: 220px minmax(280px, 1fr) 90px 120px 110px 48px;
}

.invoice-item-grid-template select {
    width: 100%;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid #ccc;
}

.invoice-item-card {
    background: #fff;
    border: 1px solid #dcdcdc;
    border-radius: 14px;
    padding: 14px;
    margin-bottom: 14px;
}

.invoice-item-card select {
    width: 100%;
    margin-bottom: 10px;
}

.invoice-description {
    width: 100%;
    min-height: 80px;
    resize: vertical;
    margin-bottom: 12px;
}

.invoice-item-bottom {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 90px;
    gap: 10px;
    align-items: end;
}

.invoice-item-bottom label {
    display: block;
    font-size: 12px;
    margin-bottom: 4px;
    font-weight: 600;
}

.invoice-item-bottom input {
    width: 100%;
}

@media(max-width:900px) {
    .invoice-item-bottom {
        grid-template-columns: 1fr 1fr;
    }
}

@media(max-width:1100px) {
    .invoice-item-grid-template {
        grid-template-columns: 1fr;
    }
}

.service-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1.5fr 120px 130px 140px;
    gap: 10px;
    align-items: center;
}

.service-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.service-table {
    min-width: 1000px;
}

.service-table input {
    width: 100%;
    padding: 9px 10px;
    border-radius: 10px;
    border: 1px solid #ccc;
}

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

.small-btn {
    padding: 8px 12px !important;
    font-size: 13px;
    white-space: nowrap;
}

@media(max-width:1100px) {
    .service-form-grid {
        grid-template-columns: 1fr;
    }
}

.invoice-editor-right iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 12px;
    background: white;
    box-shadow: 0 10px 30px rgba(0,0,0,.18);
}
.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 22px;
    align-items: start;
}

@media(max-width:1100px) {
    .settings-grid {
        grid-template-columns: 1fr;
    }
}

@media(max-width:1100px) {
    .invoice-editor-layout {
        grid-template-columns: 1fr;
    }

    .invoice-editor-right {
        height: 75vh;
        position: static;
    }
}

.action-btn {
    padding: 8px 12px;
    border-radius: 999px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    display: inline-block;
}

.action-btn.edit {
    background: #061735;
    color: white;
}

.action-btn.preview {
    background: #f5a400;
    color: #061735;
}

.action-btn.download {
    background: #e5e7eb;
    color: #061735;
}

@media(max-width:800px) {
    .invoice-item-grid {
        grid-template-columns: 1fr;
    }
}


@media(max-width:800px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}
@media(max-width:800px) {
    .form-grid,
    .dashboard-grid,
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .admin-table {
        font-size: 14px;
    }
}



/* =========================
   FINANZEN
========================= */

.finance-toolbar {
    display: flex;
    gap: 14px;
    align-items: end;
    margin-bottom: 24px;
    flex-wrap: wrap;
    background: white;
    padding: 18px;
    border-radius: 18px;
    box-shadow: 0 8px 25px rgba(0,0,0,.08);
}

.finance-toolbar label {
    display: block;
    font-weight: 800;
    color: #061735;
    margin-bottom: 6px;
}

.finance-toolbar input[type="month"] {
    min-width: 190px;
    padding: 12px 14px;
    border-radius: 999px;
    border: 1px solid #d1d5db;
    font-weight: 700;
}

.finance-toolbar button {
    border: none;
    border-radius: 999px;
    padding: 12px 18px;
    font-weight: 800;
    cursor: pointer;
}

.finance-toolbar .save-btn {
    background: #061735 !important;
    color: white !important;
}

.finance-toolbar .preview-btn {
    background: #f5a400 !important;
    color: #061735 !important;
}

.finance-summary-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
    margin-bottom: 20px;
}

.finance-card {
    border-radius: 18px;
    padding: 18px;
    color: white;
    box-shadow: 0 8px 25px rgba(0,0,0,.08);
}

.finance-card span {
    display: block;
    opacity: .85;
    margin-bottom: 8px;
}

.finance-card strong {
    font-size: 1.6rem;
}

.finance-card.income {
    background: #16a34a;
}

.finance-card.expense {
    background: #dc2626;
}

.finance-card.profit {
    background: #2563eb;
}

.finance-card.open {
    background: #ca8a04;
}

.finance-card.overdue {
    background: #991b1b;
}

.finance-layout {
    display: grid;
    grid-template-columns: 1.4fr .8fr;
    gap: 20px;
    margin-bottom: 20px;
}
.finance-columns {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    align-items: start;
}

.finance-side-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}


.invoice-action-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 22px;
}

.invoice-action-group {
    border: 1px solid #e5e7eb;
    background: #f8fafc;
    border-radius: 16px;
    padding: 16px;
}

.invoice-action-group h5 {
    margin: 0 0 12px;
    color: #061735;
    font-weight: 800;
}

.invoice-action-group button,
.invoice-action-group .action-btn {
    margin: 4px 8px 4px 0;
}

.invoice-action-group.warning {
    border-color: #f5a400;
    background: #fffbeb;
}
.section-header {
    cursor: pointer;
    user-select: none;
    padding: 8px 0;
}

.section-header h4 {
    margin: 0;
    color: #061735;
    font-weight: 800;
}
.invoice-action-group.danger-zone {
    border-color: #dc2626;
    background: #fff1f2;
}
.section-header:hover {
    opacity: .8;
}
.reminder-status-box {
    background: white;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 12px;
    border-left: 5px solid #f5a400;
}
.login-page {
    min-height: 100vh;
    width: 100%;
    background:
        radial-gradient(circle at top left, rgba(255,255,255,0.18), transparent 35%),
        linear-gradient(135deg, #0f172a 0%, #1e293b 45%, #0f766e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.login-box {
    width: 100%;
    max-width: 420px;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 24px;
    padding: 38px 34px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
    text-align: center;
}

.login-logo {
    width: 78px;
    height: 78px;
    margin: 0 auto 18px;
    border-radius: 22px;
    background: linear-gradient(135deg, #0f766e, #14b8a6);
    color: white;
    font-size: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-box h1 {
    margin: 0;
    font-size: 28px;
    color: #0f172a;
}

.login-subtitle {
    margin: 8px 0 26px;
    color: #64748b;
}

.login-box input {
    width: 100%;
    padding: 14px 16px;
    margin-bottom: 14px;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    font-size: 15px;
    outline: none;
}

.login-box input:focus {
    border-color: #0f766e;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.15);
}

.login-box button {
    width: 100%;
    margin-top: 8px;
    padding: 14px 16px;
    border: none;
    border-radius: 14px;
    background: #0f766e;
    color: white;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}
.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logout-btn {
    background: #dc2626;
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

.logout-btn:hover {
    background: #b91c1c;
}

.login-box button:hover {
    background: #115e59;
}

.login-error {
    margin-top: 16px;
    color: #dc2626;
    font-weight: 600;
}s

.reminder-status-box span,
.reminder-status-box small {
    display: block;
    margin-top: 4px;
}

.preview-header {
    background: #061735;
    color: white;
    padding: 12px 16px;
    border-radius: 14px 14px 0 0;
    font-weight: 800;
}

.invoice-editor-right iframe {
    border-radius: 0 0 12px 12px;
}



@media(max-width:1100px) {
    .finance-columns {
        grid-template-columns: 1fr;
    }
}
.finance-invoice-link {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    background: #eef2ff;
    color: #061735;
    font-weight: 800;
    text-decoration: none;
}
.finance-toggle-bar button {
    min-width: 240px;
    border-radius: 999px;
    font-weight: 700;
}

.finance-invoice-link:hover {
    background: #f5a400;
    color: #061735;
}
.required-field {
    border: 2px solid #dc2626 !important;
    background: #fff1f2 !important;
}

.required-field-soft {
    border: 2px dashed #f5a400 !important;
    background: #fffbeb !important;
}

.valid-field {
    border: 2px solid #16a34a !important;
    background: #f0fdf4 !important;
}

.form-hint {
    margin-top: 10px;
    color: #9b1c1c;
    font-weight: 700;
}

button:disabled {
    opacity: .45;
    cursor: not-allowed;
}

@media(max-width:1100px) {
    .finance-summary-grid,
    .finance-layout,
    .finance-columns {
        grid-template-columns: 1fr;
    }
}



