/* app.css — Editorial Precision light theme */

/* ── Fonts ──────────────────────────────────────────────────────── */
html, body {
    font-family: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

/* ── Design System Tokens ───────────────────────────────────────── */
:root {
    /* Primary (editorial blue) */
    --primary:       #0053dc;
    --primary-light: #3e76fe;
    --primary-dim:   #0049c2;
    --primary-dark:  #003faa;
    --on-primary:    #ffffff;

    /* Status */
    --danger:        #a83836;
    --danger-light:  rgba(168, 56, 54, 0.10);
    --warning:       #c47900;
    --success:       #15803d;
    --success-light: rgba(21, 128, 61, 0.10);

    /* Surface hierarchy — "layers of fine paper"
       Layer 0 (base):            --gray-50   #f7f9fb
       Layer 1 (sidebar/panels):  --gray-200  #f0f4f7
       Layer 2 (cards/inputs):    --gray-100  #ffffff          */
    --gray-50:  #f7f9fb;  /* app background */
    --gray-100: #ffffff;  /* card / input surface */
    --gray-200: #f0f4f7;  /* panel / sidebar surface */
    --gray-300: #dce4e8;  /* borders / dividers */
    --gray-400: #acb3b7;  /* muted borders */
    --gray-500: #596064;  /* muted text (on-surface-variant) */
    --gray-600: #2c3437;  /* body text (on-surface) */
    --gray-700: #1e282b;  /* strong text */
    --gray-800: #141d20;  /* headings */
    --gray-900: #0a1214;  /* max contrast */

    /* Secondary / tertiary tokens */
    --secondary-container:    #dde1f9;
    --on-secondary-container: #4c5164;
    --tertiary-container:     #e6cafa;
    --on-tertiary-container:  #564067;
    --error-container:        rgba(250, 116, 111, 0.20);
    --on-error-container:     #6e0a12;

    /* Ambient shadows — light, not muddy */
    --shadow-sm: 0 1px 3px  rgba(44, 52, 55, 0.06);
    --shadow-md: 0 4px 12px rgba(44, 52, 55, 0.08);
    --shadow-lg: 0 8px 24px rgba(44, 52, 55, 0.08);
    --shadow-xl: 0 16px 48px rgba(44, 52, 55, 0.10);

    /* Border radius */
    --radius-sm:   4px;
    --radius-md:   6px;
    --radius-lg:   1rem;     /* 16px — cards */
    --radius-xl:   1.25rem;  /* 20px */
    --radius-full: 9999px;

    /* Layout */
    --sidebar-width: 256px;
    --topbar-height: 56px;

    /* Motion */
    --transition: 150ms ease;
}

/* ── Global baseline ────────────────────────────────────────────── */
html, body {
    background: var(--gray-50);
    color: var(--gray-600);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── Headline font ──────────────────────────────────────────────── */
h1, h2, h3, .font-headline {
    font-family: 'Manrope', 'Inter', sans-serif;
}

/* ── Layout shell ───────────────────────────────────────────────── */
/* Sidebar is fixed; topbar + main are offset by its width */
.tc-topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    margin-left: var(--sidebar-width);
    height: var(--topbar-height);
    min-height: var(--topbar-height);
    background: rgba(247, 249, 251, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0 2rem;
    border-bottom: 1px solid rgba(172, 179, 183, 0.20);
    transition: margin-left 250ms ease;
}

.tc-main {
    margin-left: var(--sidebar-width);
    min-height: calc(100vh - var(--topbar-height));
    transition: margin-left 250ms ease;
}

/* ── Sidebar ────────────────────────────────────────────────────── */
.tc-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--gray-200);
    display: flex;
    flex-direction: column;
    z-index: 200;
    overflow-y: auto;
    overflow-x: hidden;
    transition: width 250ms ease;
}

.tc-sidebar-brand {
    padding: 1.75rem 1.5rem 1.25rem;
    flex-shrink: 0;
}

.tc-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    text-decoration: none;
}

.tc-brand-mark {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-md);
    background: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 800;
    font-size: 0.75rem;
    font-family: 'Manrope', sans-serif;
    flex-shrink: 0;
}

.tc-brand-text {
    font-family: 'Manrope', sans-serif;
    font-weight: 800;
    font-size: 1rem;
    color: var(--gray-800);
    letter-spacing: -0.01em;
}

.tc-sidebar-nav {
    flex: 1;
    padding: 0 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tc-sidebar-section-label {
    padding: 1rem 0.75rem 0.25rem;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* Sidebar nav links */
.tc-sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.6rem 0.75rem;
    border-radius: var(--radius-full);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-500);
    transition: background var(--transition), color var(--transition), transform var(--transition);
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.tc-sidebar-link i {
    width: 16px;
    text-align: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.tc-sidebar-link:hover {
    background: rgba(0, 83, 220, 0.06);
    color: var(--gray-700);
    transform: translateX(2px);
    text-decoration: none;
}

.tc-sidebar-link.active {
    background: var(--secondary-container);
    color: var(--primary);
    border-left: 3px solid var(--primary);
    padding-left: calc(0.75rem - 3px);
    border-radius: 0 var(--radius-full) var(--radius-full) 0;
}

.tc-sidebar-link-danger {
    color: var(--danger) !important;
}

.tc-sidebar-link-danger:hover {
    background: var(--danger-light) !important;
    color: var(--danger) !important;
}

.tc-sidebar-footer {
    padding: 0.75rem;
    border-top: 1px solid rgba(172, 179, 183, 0.20);
    flex-shrink: 0;
}

/* Mobile backdrop */
.tc-sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(20, 29, 32, 0.40);
    z-index: 150;
}

.tc-sidebar-backdrop--visible {
    display: block;
}

/* ── Topbar search ──────────────────────────────────────────────── */
.tc-topbar-search {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.tc-topbar-search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    font-size: 0.8rem;
    pointer-events: none;
}

.tc-topbar-search-input {
    width: 100%;
    background: var(--gray-200);
    border: none;
    border-radius: var(--radius-xl);
    padding: 0.45rem 0.75rem 0.45rem 2.25rem;
    font-size: 0.875rem;
    color: var(--gray-600);
    outline: none;
    transition: background var(--transition), box-shadow var(--transition);
    font-family: 'Inter', sans-serif;
}

.tc-topbar-search-input:focus {
    background: var(--gray-100);
    box-shadow: 0 0 0 2px rgba(0, 83, 220, 0.15);
}

.tc-topbar-search-input::placeholder {
    color: var(--gray-400);
}

/* Topbar right section */
.tc-topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
}

.tc-topbar-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-left: 0.75rem;
    border-left: 1px solid var(--gray-300);
}

.tc-topbar-user-name {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--gray-700);
    line-height: 1.1;
    font-family: 'Manrope', sans-serif;
}

.tc-topbar-user-sub {
    font-size: 0.75rem;
    color: var(--gray-500);
}

/* User badge (avatar circle) */
.tc-user-badge {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.8rem;
    flex-shrink: 0;
    font-family: 'Manrope', sans-serif;
}

/* Burger (mobile only) */
.tc-burger {
    display: none;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-300);
    background: var(--gray-100);
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--gray-500);
    transition: background var(--transition), border-color var(--transition);
    flex-shrink: 0;
}

.tc-burger:hover {
    background: var(--gray-200);
    border-color: var(--gray-400);
}

/* ── TC Board reset ─────────────────────────────────────────────── */
.tc-board, .tc-board * { box-sizing: border-box; }
.tc-board p, .tc-board h1, .tc-board h2, .tc-board h3 { margin: 0; }

/* ── Links ──────────────────────────────────────────────────────── */
.tc-page a {
    color: var(--primary);
    text-decoration: none;
}

.tc-page a:hover { text-decoration: underline; }

/* ── Buttons ────────────────────────────────────────────────────── */
.tc-btn {
    border: 1px solid var(--gray-300);
    background: var(--gray-100);
    color: var(--gray-700);
    padding: 0.45rem 0.85rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
    font-family: 'Inter', sans-serif;
}

.tc-btn:hover:not(:disabled) {
    background: var(--gray-200);
    border-color: var(--gray-400);
}

.tc-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
}

.tc-btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-color: var(--primary);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 83, 220, 0.25);
}

.tc-btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--primary-dim) 0%, var(--primary) 100%);
    border-color: var(--primary-dim);
    box-shadow: 0 4px 12px rgba(0, 83, 220, 0.30);
}

.tc-btn-ghost {
    background: transparent;
    border-color: transparent;
    color: var(--gray-500);
}

.tc-btn-ghost:hover:not(:disabled) {
    background: var(--gray-200);
    border-color: transparent;
    color: var(--gray-700);
}

.tc-btn-danger {
    background: var(--danger);
    border-color: var(--danger);
    color: #ffffff;
}

.tc-btn-danger:hover:not(:disabled) {
    background: #c53030;
    border-color: #c53030;
    color: #ffffff;
}

.tc-btn-outline-danger {
    background: transparent;
    border-color: var(--danger);
    color: var(--danger);
}

.tc-btn-outline-danger:hover:not(:disabled) {
    background: var(--danger);
    color: #ffffff;
}

/* Icon button */
.tc-icon-btn {
    width: 2rem;
    height: 2rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-300);
    background: var(--gray-100);
    color: var(--gray-500);
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition);
}

.tc-icon-btn:hover:not(:disabled) {
    background: var(--gray-200);
    border-color: var(--gray-400);
    color: var(--gray-700);
}

.tc-icon-danger {
    color: var(--danger);
    border-color: rgba(168, 56, 54, 0.30);
}

/* ── Cards / surfaces ───────────────────────────────────────────── */
.tc-card {
    background: var(--gray-100);
    border-radius: var(--radius-lg);
    /* No border — use tonal layering per design spec */
}

/* ── Inputs ─────────────────────────────────────────────────────── */
.tc-input {
    width: 100%;
    padding: 0.55rem 0.75rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-300);
    background: var(--gray-100);
    color: var(--gray-700);
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
}

.tc-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 83, 220, 0.10);
}

/* ── Labels ─────────────────────────────────────────────────────── */
.tc-label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* ── Toast / alert ──────────────────────────────────────────────── */
.tc-toast, .tc-alert {
    background: var(--gray-100);
    color: var(--gray-600);
    border-radius: var(--radius-lg);
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    border: 1px solid var(--gray-300);
}

.tc-toast-ok {
    border-color: rgba(21, 128, 61, 0.30);
    background: rgba(21, 128, 61, 0.07);
    color: #065f46;
}

.tc-toast-error, .tc-alert-error {
    border-color: rgba(168, 56, 54, 0.30);
    background: rgba(168, 56, 54, 0.07);
    color: #7f1d1d;
}

/* ══════════════════════════════════════════════════════════════════
   MODALS  —  shared across all pages
   ══════════════════════════════════════════════════════════════════ */

/* ── Overlay / Backdrop (both class names used across the codebase) */
.tc-overlay,
.tc-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 9999;
    animation: tc-fade-in 140ms ease;
}

@keyframes tc-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ── Modal panel ─────────────────────────────────────────────────── */
.tc-modal {
    background: #ffffff;
    border-radius: 16px;
    width: 100%;
    max-width: 520px;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    box-shadow:
        0 0 0 1px rgba(0,0,0,.06),
        0 8px 24px rgba(0,0,0,.12),
        0 32px 64px rgba(0,0,0,.10);
    animation: tc-modal-in 180ms cubic-bezier(.34,1.16,.64,1);
    overflow: hidden;
}

@keyframes tc-modal-in {
    from { transform: translateY(20px) scale(.97); opacity: 0; }
    to   { transform: translateY(0)    scale(1);   opacity: 1; }
}

/* ── Header ──────────────────────────────────────────────────────── */
.tc-modal-header,
.tc-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 22px 22px 16px;
    border-bottom: 1px solid #f1f5f9;
    flex-shrink: 0;
}

.tc-modal-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a;
    font-family: 'Manrope', sans-serif;
    line-height: 1.3;
    display: flex;
    align-items: center;
    gap: 9px;
}

.tc-modal-title i,
.tc-modal-title .fa-solid,
.tc-modal-title .fas {
    font-size: .9rem;
    color: var(--primary);
    flex-shrink: 0;
}

/* Danger modal title icon */
.tc-modal-title .fa-triangle-exclamation,
.tc-modal-title .fa-trash {
    color: var(--danger, #e53e3e);
}

.tc-modal-sub,
.tc-modal-subtitle,
.tc-modal-desc {
    margin: 5px 0 0;
    font-size: 0.83rem;
    color: #64748b;
    line-height: 1.45;
}

/* Close button */
.tc-modal-close {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 120ms, color 120ms;
    margin-top: 1px;
}

.tc-modal-close:hover {
    background: #f1f5f9;
    color: #1e293b;
}

/* ── Body ─────────────────────────────────────────────────────────── */
.tc-modal-body {
    padding: 20px 22px 16px;
    overflow-y: auto;
    flex: 1;
}

/* Confirmation / info text inside body */
.tc-modal-body p {
    margin: 0;
    font-size: .9rem;
    color: #334155;
    line-height: 1.6;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.tc-modal-body p i,
.tc-modal-body p .fa-solid,
.tc-modal-body p .fas {
    color: #94a3b8;
    margin-top: 3px;
    flex-shrink: 0;
}

/* ── Footer ──────────────────────────────────────────────────────── */
.tc-modal-footer,
.tc-modal-foot {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 14px 22px;
    border-top: 1px solid #f1f5f9;
    background: #ffffff;
    flex-shrink: 0;
}

/* ── Form fields inside modals ───────────────────────────────────── */
.tc-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 2px;
}

.tc-label {
    display: block;
    font-size: 0.73rem;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 7px;
}

.tc-input,
.tc-select,
.tc-textarea {
    width: 100%;
    padding: 10px 13px;
    border-radius: 10px;
    border: 1.5px solid #e2e8f0;
    background: #f8fafc;
    color: #0f172a;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 150ms, box-shadow 150ms, background 150ms;
    font-family: 'Inter', sans-serif;
    box-sizing: border-box;
}

.tc-input:focus,
.tc-select:focus,
.tc-textarea:focus {
    border-color: var(--primary);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.tc-textarea {
    resize: vertical;
    min-height: 88px;
}

.tc-input::placeholder { color: #94a3b8; }

/* ── In-modal toast ──────────────────────────────────────────────── */
.tc-toast-modal {
    margin: 0 22px 4px;
    border-radius: 8px;
    padding: 9px 14px;
    font-size: .82rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 7px;
}

.tc-toast-ok    { background: #dcfce7; color: #166534; }
.tc-toast-error { background: #fee2e2; color: #991b1b; }

/* ── Misc modal helpers ──────────────────────────────────────────── */
.tc-modal-loading {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 20px 22px;
}

.tc-modal-list {
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tc-modal-row {
    width: 100%;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #f8fafc;
    cursor: pointer;
    transition: background 130ms;
    border: 1px solid #f1f5f9;
}

.tc-modal-row:hover { background: #eff6ff; border-color: #bfdbfe; }

.tc-modal-row-main  { flex: 1; min-width: 0; }

.tc-modal-row-title {
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: .88rem;
}

.tc-modal-row-sub {
    margin-top: 2px;
    font-size: 0.78rem;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tc-modal-row-arrow { flex-shrink: 0; color: #cbd5e1; font-size: .8rem; }

.modal-due        { color: #64748b; }
.modal-due-danger { color: var(--danger, #e53e3e); font-weight: 700; }
.modal-due-done   { color: var(--success, #22c55e); }

.tc-modal-cap {
    padding: 8px 22px 14px;
    font-size: 0.78rem;
    color: #94a3b8;
    text-align: center;
    flex-shrink: 0;
}

/* ── Stat cards clickable state ─────────────────────────────────── */
.stat-clickable {
    width: 100%;
    text-align: left;
    cursor: pointer;
    transition: background var(--transition), box-shadow var(--transition), transform 80ms ease;
}

.stat-clickable:hover {
    background: var(--gray-200);
    box-shadow: var(--shadow-sm);
}

.stat-clickable:active { transform: scale(0.985); }

.stat-click-hint {
    margin-top: 6px;
    font-size: 11px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 0.02em;
    opacity: 0;
    transition: opacity var(--transition);
}

.stat-clickable:hover .stat-click-hint { opacity: 1; }

/* ── Bootstrap overrides (keep forms working) ───────────────────── */
a, .btn-link { color: var(--primary); }

.btn-primary {
    color: #fff;
    background-color: var(--primary);
    border-color: var(--primary-dim);
}

.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 rgba(0, 83, 220, 0.35);
}

.content { padding-top: 1.1rem; }
h1:focus  { outline: none; }

.valid.modified:not([type=checkbox]) { outline: 1px solid var(--success); }
.invalid                             { outline: 1px solid var(--danger); }
.validation-message                  { color: var(--danger); }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::after { content: "An error has occurred."; }

.darker-border-checkbox.form-check-input { border-color: #929292; }

.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
    color: var(--gray-400);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* ── Reduce motion ──────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        transition: none !important;
        animation: none !important;
        scroll-behavior: auto !important;
    }
}

/* ── Sidebar collapsed state ────────────────────────────────────── */
:root { --sidebar-collapsed-width: 72px; }

.tc-sidebar--collapsed { width: var(--sidebar-collapsed-width); }

.tc-sidebar--collapsed .tc-brand-text,
.tc-sidebar--collapsed .tc-sidebar-link-text,
.tc-sidebar--collapsed .tc-sidebar-section-label,
.tc-sidebar--collapsed .tc-nav-badge { display: none; }

.tc-sidebar--collapsed .tc-sidebar-link {
    justify-content: center;
    padding: 0.6rem;
}

.tc-sidebar--collapsed .tc-sidebar-link.active {
    border-left: 3px solid var(--primary);
    padding-left: calc(0.6rem - 3px);
}

.tc-sidebar--collapsed .tc-brand { justify-content: center; }
.tc-sidebar--collapsed .tc-brand-mark { margin: 0 auto; }

.tc-topbar--collapsed { margin-left: var(--sidebar-collapsed-width); }

body.sidebar-collapsed .tc-main { margin-left: var(--sidebar-collapsed-width); }

/* ── Sidebar nav badge ──────────────────────────────────────────── */
.tc-nav-badge {
    margin-left: auto;
    background: #ef4444;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    flex-shrink: 0;
}

.tc-has-badge { position: relative; }

.tc-sidebar-link-disabled { opacity: 0.55; cursor: default; }
.tc-sidebar-link-disabled:hover { transform: none !important; background: transparent !important; }
.tc-collapse-btn { background: transparent; border: none; cursor: pointer; }

/* ── Topbar icon buttons ────────────────────────────────────────── */
.tc-topbar-icon-btn {
    position: relative;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-500);
    cursor: pointer;
    transition: background var(--transition);
    flex-shrink: 0;
}

.tc-topbar-icon-btn:hover { background: var(--gray-200); }

.tc-topbar-badge {
    position: absolute;
    top: 2px; right: 2px;
    background: #ef4444;
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    min-width: 16px; height: 16px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    border: 2px solid var(--gray-50);
}

/* Topbar user chip */
.tc-topbar-user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0.75rem 0.3rem 0.5rem;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: background var(--transition);
    margin-left: 0.25rem;
}

.tc-topbar-user:hover { background: var(--gray-200); }

.tc-topbar-user-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-700);
    white-space: nowrap;
    font-family: 'Manrope', sans-serif;
}

.tc-topbar-caret {
    font-size: 0.65rem;
    color: var(--gray-400);
}

/* ── Mobile layout ──────────────────────────────────────────────── */
@media (max-width: 768px) {
    .tc-burger  { display: inline-flex; }

    .tc-sidebar {
        transform: translateX(-100%);
        transition: transform 200ms ease;
        z-index: 300;
    }

    .tc-sidebar--open {
        transform: translateX(0);
        box-shadow: var(--shadow-xl);
    }

    .tc-topbar, .tc-main {
        margin-left: 0 !important;
    }

    .tc-topbar {
        padding: 0 1rem;
    }
}
