/* ═══════════════════════════════════════════════════
   eRechnung-Monitor — Dark Mode (GitHub Dark + Orange)
   Palette: Canvas #111827 · Surface #1a1f2e · Orange #D29922
  ═══════════════════════════════════════════════════ */

/* ── Global ── */

html, body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    color: #e2e8f0;
    background-color: #111827;
    margin: 0;
    padding: 0;
}

.content a {
    color: #D29922;
}

.content a:hover {
    color: #e6a817;
}

/* ── Buttons ── */

.btn-primary {
    color: #000000;
    background-color: #D29922;
    border-color: #bb8518;
}

.btn-primary:hover {
    background-color: #e6a817;
    border-color: #bd8320;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.25rem rgba(210, 153, 34, 0.4);
}

.content {
    padding-top: 9.1rem;
}

h1:focus {
    outline: none;
}

/* ── Validation ── */

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

.invalid {
    outline: 1px solid #f85149;
}

.validation-message {
    color: #f85149;
}

/* ── Blazor Error Boundary ── */

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

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

/* ── Checkbox ── */

.darker-border-checkbox.form-check-input {
    border-color: #4b5563;
}

/* ── Floating Labels ── */

.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;
}

/* ── Upload Zone (Info Page) ── */

.upload-zone {
    border: 2px dashed #374151;
    border-radius: 0.75rem;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
    position: relative;
    min-height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-zone--dragover {
    border-color: #D29922;
    background-color: rgba(210, 153, 34, 0.08);
}

.upload-zone {
    cursor: pointer;
}

.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.upload-icon {
    font-size: 2.5rem;
    color: #6b7280;
}

.upload-heading {
    margin: 0;
    font-size: 1rem;
    color: #e2e8f0;
}

.upload-hint {
    margin: 0;
    font-size: 0.85rem;
    color: #9ca3af;
}

.btn-select-file {
    margin-top: 0.5rem;
    padding: 0.5rem 1.25rem;
    background-color: #374151;
    color: #e2e8f0;
    border: 1px solid #4b5563;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

.btn-select-file:hover {
    background-color: #4b5563;
}

.file-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
}

.file-list-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1rem;
    background-color: #1a1f2e;
    border-radius: 0.5rem;
    border: 1px solid #374151;
}

.file-list-item .bi-file-earmark {
    color: #D29922;
    font-size: 1.2rem;
}

.file-list-name {
    flex: 1;
    font-size: 0.9rem;
    color: #e2e8f0;
    text-align: left;
}

.file-list-size {
    font-size: 0.8rem;
    color: #9ca3af;
    white-space: nowrap;
}

.btn-remove-file {
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 0.25rem;
    font-size: 1rem;
    transition: color 0.2s;
}

.btn-remove-file:hover {
    color: #f85149;
}

.upload-select-row {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.upload-select-row label {
    font-size: 0.95rem;
    color: #e2e8f0;
    white-space: nowrap;
}

.upload-select-row select {
    flex: 1;
    padding: 0.5rem 0.75rem;
    background-color: #1a1f2e;
    color: #e2e8f0;
    border: 1px solid #374151;
    border-radius: 0.5rem;
    font-size: 0.9rem;
}

.upload-select-row select:focus {
    outline: none;
    border-color: #D29922;
    box-shadow: 0 0 0 0.25rem rgba(210, 153, 34, 0.4);
}

.upload-actions {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
}

.btn-upload {
    padding: 0.6rem 1.5rem;
    background-color: #D29922;
    color: #000;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-upload:hover:not(:disabled) {
    background-color: #e6a817;
}

.btn-upload:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.toast-notification {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.toast-notification-success {
    background-color: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #4ade80;
}

.toast-notification-error {
    background-color: rgba(248, 81, 73, 0.15);
    border: 1px solid rgba(248, 81, 73, 0.3);
    color: #f85149;
}

.toast-notification-warning {
    background-color: rgba(210, 153, 34, 0.15);
    border: 1px solid rgba(210, 153, 34, 0.3);
    color: #D29922;
}

.btn-update-check {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background-color: #3b82f6;
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-update-check:hover:not(:disabled) {
    background-color: #2563eb;
}

.btn-update-check:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-update-execute {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background-color: #16a34a;
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 1rem;
    transition: background-color 0.2s;
}

.btn-update-execute:hover {
    background-color: #15803d;
}

.update-status {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.update-info {
    background-color: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #ffffff;
}

.update-success {
    background-color: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #ffffff;
}

.update-error {
    background-color: rgba(248, 81, 73, 0.1);
    border: 1px solid rgba(248, 81, 73, 0.3);
    color: #ffffff;
}

.update-changelog {
    margin: 0.5rem 0;
    padding: 0.5rem 0.75rem;
    background-color: rgba(59, 130, 246, 0.08);
    border-radius: 0.375rem;
    color: #ffffff;
}

.last-check {
    margin-top: 0.75rem;
    color: #6c757d;
}

/* ── Update Progress ── */

.update-progress {
    margin-top: 1rem;
}

.update-log {
    background-color: #0d1117;
    color: #c9d1d9;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 0.85rem;
    padding: 12px;
    border-radius: 6px;
    max-height: 300px;
    overflow-y: auto;
    margin-top: 0.75rem;
}

.update-log-line {
    padding: 2px 0;
    white-space: pre-wrap;
    word-break: break-all;
}

.btn-update-check-again {
    margin-top: 0.75rem;
}


