@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');

html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

a, .btn-link {
    color: #0366d6;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.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 {
    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;
    }

/* ═══════════════════════════════════════════════════
   DARK MODE
   ═══════════════════════════════════════════════════ */

[data-theme="dark"] body {
    background-color: #1a1d23;
    color: #e1e4e8;
}

/* ── Links ─────────────────────────────────────── */
[data-theme="dark"] a,
[data-theme="dark"] .btn-link {
    color: #58a6ff;
}

/* ── Cards ─────────────────────────────────────── */
[data-theme="dark"] .card {
    background-color: #22262e;
    border-color: #3a3f4a;
    color: #e1e4e8;
}

[data-theme="dark"] .card-header {
    background-color: #2a2f38;
    border-bottom-color: #3a3f4a;
    color: #e1e4e8;
}

[data-theme="dark"] .card-footer {
    background-color: #2a2f38;
    border-top-color: #3a3f4a;
}

/* ── Tables ────────────────────────────────────── */
[data-theme="dark"] .table {
    color: #e1e4e8;
    border-color: #3a3f4a;
}

[data-theme="dark"] .table td,
[data-theme="dark"] .table th {
    border-color: #3a3f4a;
}

[data-theme="dark"] .table-hover tbody tr:hover {
    color: #e1e4e8;
    background-color: rgba(255, 255, 255, 0.05);
}

/* ── Forms ─────────────────────────────────────── */
[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select {
    background-color: #2a2f38;
    border-color: #3a3f4a;
    color: #e1e4e8;
}

[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-select:focus {
    background-color: #2a2f38;
    border-color: #58a6ff;
    color: #e1e4e8;
    box-shadow: 0 0 0 0.2rem rgba(88, 166, 255, 0.25);
}

[data-theme="dark"] .form-control::placeholder {
    color: #8b949e;
}

/* ── Breadcrumb ────────────────────────────────── */
[data-theme="dark"] .breadcrumb {
    background-color: #22262e;
}

[data-theme="dark"] .breadcrumb-item + .breadcrumb-item::before {
    color: #8b949e;
}

[data-theme="dark"] .breadcrumb-item.active {
    color: #8b949e;
}

/* ── Alerts ────────────────────────────────────── */
[data-theme="dark"] .alert-info {
    background-color: rgba(88, 166, 255, 0.15);
    border-color: rgba(88, 166, 255, 0.3);
    color: #79c0ff;
}

[data-theme="dark"] .alert-warning {
    background-color: rgba(210, 153, 34, 0.15);
    border-color: rgba(210, 153, 34, 0.3);
    color: #e3b341;
}

[data-theme="dark"] .alert-danger {
    background-color: rgba(248, 81, 73, 0.15);
    border-color: rgba(248, 81, 73, 0.3);
    color: #ff7b72;
}

[data-theme="dark"] .alert-success {
    background-color: rgba(63, 185, 80, 0.15);
    border-color: rgba(63, 185, 80, 0.3);
    color: #56d364;
}

/* ── Pre / Code ────────────────────────────────── */
[data-theme="dark"] pre,
[data-theme="dark"] code {
    color: #e1e4e8;
}

[data-theme="dark"] pre {
    background-color: #2a2f38;
}

/* ── Background utility overrides ──────────────── */
[data-theme="dark"] .bg-light {
    background-color: #22262e !important;
    color: #e1e4e8;
}

[data-theme="dark"] .bg-white {
    background-color: #1a1d23 !important;
    color: #e1e4e8;
}

/* ── Text utility overrides ────────────────────── */
[data-theme="dark"] .text-muted {
    color: #8b949e !important;
}

[data-theme="dark"] .text-dark {
    color: #e1e4e8 !important;
}

/* ── Borders ───────────────────────────────────── */
[data-theme="dark"] .border {
    border-color: #3a3f4a !important;
}

[data-theme="dark"] .border-bottom {
    border-bottom-color: #3a3f4a !important;
}

[data-theme="dark"] .border-success {
    border-color: #3fb950 !important;
}

[data-theme="dark"] .border-danger {
    border-color: #f85149 !important;
}

[data-theme="dark"] .border-primary {
    border-color: #58a6ff !important;
}

[data-theme="dark"] .border-warning {
    border-color: #d29922 !important;
}

/* ── Progress bar track ────────────────────────── */
[data-theme="dark"] .progress {
    background-color: #2a2f38;
}

/* ── Modals / Dropdowns ────────────────────────── */
[data-theme="dark"] .modal-content {
    background-color: #22262e;
    border-color: #3a3f4a;
    color: #e1e4e8;
}

[data-theme="dark"] .modal-header,
[data-theme="dark"] .modal-footer {
    border-color: #3a3f4a;
}

[data-theme="dark"] .dropdown-menu {
    background-color: #22262e;
    border-color: #3a3f4a;
}

[data-theme="dark"] .dropdown-item {
    color: #e1e4e8;
}

[data-theme="dark"] .dropdown-item:hover,
[data-theme="dark"] .dropdown-item:focus {
    background-color: #2a2f38;
    color: #e1e4e8;
}

/* ── Buttons (outline variants) ────────────────── */
[data-theme="dark"] .btn-outline-secondary {
    color: #8b949e;
    border-color: #3a3f4a;
}

[data-theme="dark"] .btn-outline-secondary:hover {
    background-color: #2a2f38;
    border-color: #8b949e;
    color: #e1e4e8;
}

/* ── Blazor error UI ───────────────────────────── */
[data-theme="dark"] #blazor-error-ui {
    background: #2a2f38;
    color: #e1e4e8;
}

/* ── Badge adjustments ─────────────────────────── */
[data-theme="dark"] .badge.bg-secondary {
    background-color: #3a3f4a !important;
}

/* ── Conversation bubbles ──────────────────────── */
[data-theme="dark"] .bg-success.bg-opacity-10 {
    background-color: rgba(63, 185, 80, 0.1) !important;
}

/* ── Top row (header bar) ─────────────────────── */
[data-theme="dark"] .top-row {
    background-color: #041536 !important;
    border-bottom-color: #3a3f4a !important;
}

[data-theme="dark"] .top-row a,
[data-theme="dark"] .top-row .btn-link {
    color: #58a6ff;
}

/* ── Theme toggle button ───────────────────────── */
.theme-toggle {
    background: none;
    border: 1px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0.25rem 0.5rem;
    line-height: 1;
    color: inherit;
}

.theme-toggle:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .theme-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}
