/* =====================================================================
   Viettel ProTrack — Design system
   Bootstrap 5.3 + biến tùy chỉnh. Màu chủ đạo đổi được qua --primary
   (được gán từ Cài đặt trong layout).
   ===================================================================== */

@font-face {
    font-family: 'Inter';
    src: url('../fonts/InterVariable.woff2') format('woff2');
    font-weight: 100 900;
    font-display: swap;
}

:root {
    --primary: #EE0033;
    --primary-rgb: 238, 0, 51;
    --primary-hover: color-mix(in srgb, var(--primary) 85%, #000);

    --bg: #f4f6fb;
    --surface: #ffffff;
    --border: #e7eaf0;
    --text: #1f2937;
    --muted: #6b7280;

    --sidebar-w: 264px;
    --sidebar-bg: #0f172a;
    --sidebar-text: #94a3b8;
    --sidebar-active: #ffffff;
    --header-h: 64px;

    --radius: 14px;
    --radius-sm: 10px;
    --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
    --shadow: 0 1px 3px rgba(16, 24, 40, .06), 0 4px 16px rgba(16, 24, 40, .05);

    /* Bootstrap overrides */
    --bs-primary: var(--primary);
    --bs-primary-rgb: var(--primary-rgb);
    --bs-body-font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --bs-body-color: var(--text);
    --bs-body-bg: var(--bg);
    --bs-border-color: var(--border);
    --bs-link-color: var(--primary);
    --bs-link-color-rgb: var(--primary-rgb);
    --bs-link-hover-color: var(--primary-hover);
    --bs-border-radius: var(--radius-sm);
    --bs-focus-ring-color: rgba(var(--primary-rgb), .2);
}

body {
    font-feature-settings: 'cv11', 'ss01';
    -webkit-font-smoothing: antialiased;
    font-size: .9375rem;
}

a { text-decoration: none; }

/* ---------- Buttons / form ---------- */
.btn { font-weight: 500; border-radius: var(--radius-sm); padding: .5rem 1rem; }
.btn-sm { padding: .3rem .7rem; border-radius: 8px; }
.btn-primary {
    --bs-btn-bg: var(--primary);
    --bs-btn-border-color: var(--primary);
    --bs-btn-hover-bg: var(--primary-hover);
    --bs-btn-hover-border-color: var(--primary-hover);
    --bs-btn-active-bg: var(--primary-hover);
    --bs-btn-active-border-color: var(--primary-hover);
    --bs-btn-disabled-bg: var(--primary);
    --bs-btn-disabled-border-color: var(--primary);
    box-shadow: 0 1px 2px rgba(var(--primary-rgb), .25);
}
.btn-light { --bs-btn-bg: #f3f4f6; --bs-btn-border-color: #f3f4f6; --bs-btn-hover-bg: #e5e7eb; --bs-btn-hover-border-color: #e5e7eb; }
.btn-outline-secondary { --bs-btn-color: #374151; --bs-btn-border-color: var(--border); --bs-btn-hover-bg: #f3f4f6; --bs-btn-hover-color: #111827; --bs-btn-hover-border-color: #d1d5db; }

.form-control, .form-select {
    border-radius: var(--radius-sm);
    border-color: #dfe3ea;
    padding: .55rem .85rem;
    font-size: .9375rem;
}
.form-control:focus, .form-select:focus {
    border-color: rgba(var(--primary-rgb), .55);
    box-shadow: 0 0 0 .2rem rgba(var(--primary-rgb), .12);
}
.form-label { font-weight: 500; font-size: .875rem; color: #374151; margin-bottom: .35rem; }
.form-check-input:checked { background-color: var(--primary); border-color: var(--primary); }
.form-check-input:focus { box-shadow: 0 0 0 .2rem rgba(var(--primary-rgb), .15); border-color: rgba(var(--primary-rgb), .5); }
.required::after { content: ' *'; color: var(--primary); }

/* ---------- Layout ---------- */
.app { min-height: 100vh; }

.sidebar {
    position: fixed; inset: 0 auto 0 0;
    width: var(--sidebar-w);
    background: var(--sidebar-bg);
    background-image: radial-gradient(120% 60% at 0% 0%, rgba(var(--primary-rgb), .16), transparent 60%);
    color: var(--sidebar-text);
    display: flex; flex-direction: column;
    z-index: 1040;
    transition: transform .25s ease;
}
.sidebar-brand {
    height: var(--header-h);
    display: flex; align-items: center; gap: .75rem;
    padding: 0 1.25rem;
    color: #fff; font-weight: 700; font-size: 1.05rem; letter-spacing: -.01em;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.brand-mark {
    width: 36px; height: 36px; border-radius: 10px;
    display: grid; place-items: center;
    background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 60%, #7c0019));
    color: #fff; font-size: 1.1rem;
    box-shadow: 0 6px 16px rgba(var(--primary-rgb), .35);
}
.brand-sub { display: block; font-size: .7rem; font-weight: 500; color: var(--sidebar-text); letter-spacing: .02em; }

.sidebar-nav { padding: 1rem .75rem; flex: 1; overflow-y: auto; }
.nav-section { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: #64748b; padding: .75rem .75rem .4rem; font-weight: 600; }
.sidebar-link {
    display: flex; align-items: center; gap: .75rem;
    padding: .62rem .8rem; margin-bottom: 2px;
    border-radius: 10px;
    color: var(--sidebar-text); font-weight: 500;
    transition: background .15s, color .15s;
    position: relative;
}
.sidebar-link i { font-size: 1.1rem; width: 1.25rem; text-align: center; }
.sidebar-link:hover { background: rgba(255, 255, 255, .05); color: #e2e8f0; }
.sidebar-link.active { background: rgba(var(--primary-rgb), .16); color: var(--sidebar-active); }
.sidebar-link.active::before {
    content: ''; position: absolute; left: -.75rem; top: 8px; bottom: 8px;
    width: 3px; border-radius: 0 3px 3px 0; background: var(--primary);
}
.sidebar-link.active i { color: color-mix(in srgb, var(--primary) 70%, #fff); }
.sidebar-footer { padding: 1rem 1.25rem; font-size: .75rem; color: #64748b; border-top: 1px solid rgba(255, 255, 255, .06); }

.main { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }

.topbar {
    position: sticky; top: 0; z-index: 1030;
    height: var(--header-h);
    display: flex; align-items: center; gap: 1rem;
    padding: 0 1.5rem;
    background: rgba(255, 255, 255, .85);
    backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid var(--border);
}
.topbar-title { font-weight: 600; font-size: 1.05rem; margin: 0; }
.topbar .btn-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; border: 0; background: transparent; color: #374151; font-size: 1.35rem; }
.topbar .btn-icon:hover { background: #f3f4f6; }

.user-menu { display: flex; align-items: center; gap: .65rem; padding: .3rem .5rem .3rem .3rem; border-radius: 999px; border: 1px solid transparent; background: transparent; color: inherit; }
.user-menu:hover, .user-menu[aria-expanded="true"] { background: #f9fafb; border-color: var(--border); }
.user-meta { line-height: 1.15; text-align: left; }
.user-meta .name { font-weight: 600; font-size: .875rem; }
.user-meta .role { font-size: .75rem; color: var(--muted); }

.avatar {
    width: 36px; height: 36px; border-radius: 50%;
    display: inline-grid; place-items: center; flex-shrink: 0;
    font-size: .8rem; font-weight: 600; color: #fff;
    background: linear-gradient(135deg, var(--primary), #ff6b6b);
}
.avatar-sm { width: 28px; height: 28px; font-size: .7rem; }
.avatar-lg { width: 48px; height: 48px; font-size: 1rem; }

.content { padding: 1.5rem; flex: 1; }
.page-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.page-header h1 { font-size: 1.5rem; font-weight: 700; letter-spacing: -.02em; margin: 0; }
.page-header .subtitle { color: var(--muted); margin: .25rem 0 0; font-size: .9rem; }

.dropdown-menu { border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 10px 30px rgba(16, 24, 40, .12); padding: .4rem; font-size: .9rem; }
.dropdown-item { border-radius: 8px; padding: .5rem .75rem; display: flex; align-items: center; gap: .6rem; }
.dropdown-item:active { background: rgba(var(--primary-rgb), .1); color: var(--primary); }

.sidebar-backdrop { display: none; }

@media (max-width: 991.98px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: none; box-shadow: 0 0 40px rgba(0, 0, 0, .3); }
    .sidebar-backdrop.show { display: block; position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 1035; }
    .main { margin-left: 0; }
    .content { padding: 1rem; }
    .topbar { padding: 0 1rem; }
}

/* ---------- Card ---------- */
.card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    background: var(--surface);
}
.card-header {
    background: transparent;
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.25rem;
    display: flex; align-items: center; justify-content: space-between; gap: .75rem;
}
.card-title { font-size: 1rem; font-weight: 600; margin: 0; }
.card-body { padding: 1.25rem; }

/* Thẻ thống kê */
.stat-card { padding: 1.15rem 1.25rem; display: flex; gap: 1rem; align-items: flex-start; height: 100%; transition: box-shadow .2s, transform .2s; }
.stat-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.stat-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 1.25rem; flex-shrink: 0; }
.stat-label { color: var(--muted); font-size: .8125rem; font-weight: 500; margin-bottom: .2rem; }
.stat-value { font-size: 1.5rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.stat-value.money { font-size: 1.2rem; }

/* Nền icon nhạt theo tông màu */
.tone-primary { background: rgba(var(--primary-rgb), .1); color: var(--primary); }
.tone-blue    { background: #eaf2ff; color: #2563eb; }
.tone-green   { background: #e8f8ef; color: #16a34a; }
.tone-amber   { background: #fff5e0; color: #d97706; }
.tone-purple  { background: #f3edff; color: #7c3aed; }
.tone-slate   { background: #eef1f5; color: #475569; }
.tone-teal    { background: #e3f8f6; color: #0d9488; }
.tone-red     { background: #ffeceb; color: #dc2626; }

/* ---------- Badge trạng thái ---------- */
.status-badge {
    display: inline-flex; align-items: center; gap: .35rem;
    padding: .28rem .65rem; border-radius: 999px;
    font-size: .75rem; font-weight: 600; white-space: nowrap; line-height: 1.2;
}
.status-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-secondary { background: #f1f3f6; color: #4b5563; }
.badge-primary   { background: #e8f0ff; color: #1d4ed8; }
.badge-info      { background: #e2f6fb; color: #0e7490; }
.badge-success   { background: #e6f7ed; color: #15803d; }
.badge-warning   { background: #fff4de; color: #b45309; }
.badge-danger    { background: #fdecec; color: #b91c1c; }
.badge-purple    { background: #f1ebff; color: #6d28d9; }

/* ---------- Table ---------- */
.table { --bs-table-bg: transparent; margin: 0; font-size: .875rem; }
.table > thead th {
    background: #f9fafb; color: #6b7280;
    font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
    border-bottom: 1px solid var(--border); padding: .75rem 1rem; white-space: nowrap;
}
.table > tbody td { padding: .8rem 1rem; vertical-align: middle; border-color: #f0f2f5; }
.table-hover > tbody > tr:hover > * { --bs-table-bg-state: #fafbfc; }

/* ---------- Alert / flash ---------- */
.alert { border-radius: 12px; border: 0; display: flex; gap: .65rem; align-items: flex-start; font-size: .9rem; }
.alert i { font-size: 1.1rem; line-height: 1.3; }
.alert-success { background: #e8f8ef; color: #166534; }
.alert-danger  { background: #fdecec; color: #991b1b; }
.alert-warning { background: #fff5e0; color: #92400e; }
.alert-info    { background: #e8f1ff; color: #1e40af; }
.flash-stack { position: fixed; top: calc(var(--header-h) + 12px); right: 16px; z-index: 1080; width: min(380px, calc(100vw - 32px)); }
.flash-stack .alert { box-shadow: 0 10px 30px rgba(16, 24, 40, .12); animation: slideIn .25s ease; }
@keyframes slideIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ---------- Empty state ---------- */
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--muted); }
.empty-state i { font-size: 2.5rem; color: #cbd5e1; display: block; margin-bottom: .75rem; }

/* ---------- Auth (login) ---------- */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; background: #fff; }
.auth-hero {
    position: relative; overflow: hidden;
    color: #fff; padding: 3rem;
    display: flex; flex-direction: column; justify-content: space-between;
    background:
        radial-gradient(80% 60% at 100% 0%, rgba(255, 255, 255, .14), transparent 60%),
        radial-gradient(60% 50% at 0% 100%, rgba(0, 0, 0, .25), transparent 60%),
        linear-gradient(140deg, var(--primary) 0%, color-mix(in srgb, var(--primary) 55%, #2a0010) 100%);
}
.auth-hero::after {
    content: ''; position: absolute; inset: 0;
    background-image: linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(70% 70% at 70% 30%, #000, transparent);
    pointer-events: none;
}
.auth-hero > * { position: relative; z-index: 1; }
.auth-hero .brand-mark { background: rgba(255, 255, 255, .18); box-shadow: none; backdrop-filter: blur(6px); }
.auth-hero h2 { font-size: 2.25rem; font-weight: 700; letter-spacing: -.03em; line-height: 1.15; max-width: 460px; }
.auth-hero p { color: rgba(255, 255, 255, .8); max-width: 440px; }
.hero-steps { display: grid; gap: .6rem; max-width: 380px; margin-top: 2rem; }
.hero-step { display: flex; align-items: center; gap: .75rem; padding: .7rem .9rem; border-radius: 12px; background: rgba(255, 255, 255, .1); backdrop-filter: blur(6px); font-size: .9rem; }
.hero-step i { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: rgba(255, 255, 255, .18); }

.auth-form-side { display: flex; align-items: center; justify-content: center; padding: 2rem; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h1 { font-size: 1.75rem; font-weight: 700; letter-spacing: -.02em; }
.input-icon { position: relative; }
.input-icon > i { position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); color: #9ca3af; }
.input-icon > .form-control { padding-left: 2.6rem; }
.input-icon .toggle-pass { position: absolute; right: .4rem; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: #9ca3af; padding: .35rem .5rem; }
.form-control-lg { padding-top: .7rem; padding-bottom: .7rem; font-size: .95rem; }

@media (max-width: 991.98px) {
    .auth-wrap { grid-template-columns: 1fr; }
    .auth-hero { display: none; }
}

/* ---------- Error page ---------- */
.error-wrap { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 2rem; }
.error-code { font-size: 5rem; font-weight: 800; letter-spacing: -.04em; line-height: 1; background: linear-gradient(135deg, var(--primary), #ff8a8a); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Utilities ---------- */
.text-muted { color: var(--muted) !important; }
.fw-600 { font-weight: 600; }
.min-w-0 { min-width: 0; }

/* ---------- Step Timeline & Activity Timeline ---------- */
.step-item {
    position: relative;
    padding: 1rem 1.25rem;
    transition: background-color .15s ease;
    border-left: 3px solid transparent;
}
.step-item:hover {
    background-color: #f8fafc;
}
.step-item.step-done {
    border-left-color: #16a34a;
}
.step-item.step-in_progress {
    border-left-color: var(--primary);
    background-color: rgba(var(--primary-rgb), .02);
}
.step-item.step-pending {
    border-left-color: #e2e8f0;
}
.step-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .85rem;
    font-weight: 600;
    flex-shrink: 0;
}
.step-circle.done {
    background-color: #e8f8ef;
    color: #16a34a;
}
.step-circle.in_progress {
    background-color: rgba(var(--primary-rgb), .12);
    color: var(--primary);
}
.step-circle.pending {
    background-color: #f1f5f9;
    color: #64748b;
    border: 1px solid #cbd5e1;
}

.timeline {
    position: relative;
    padding-left: 1.5rem;
}
.timeline::before {
    content: '';
    position: absolute;
    top: 6px;
    bottom: 6px;
    left: 7px;
    width: 2px;
    background-color: #e2e8f0;
}
.timeline-item {
    position: relative;
    padding-bottom: 1.25rem;
}
.timeline-item:last-child {
    padding-bottom: 0;
}
.timeline-point {
    position: absolute;
    left: -1.5rem;
    top: 4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: #fff;
    border: 3px solid var(--primary);
}

/* Shared layout: readable cards, resilient long content, accessible controls. */
:root { --bg: #f3f5f9; --radius: 16px; }
.content { max-width: 1920px; width: 100%; margin-inline: auto; }
.main, .content, .row > *, .page-header > *, .step-item > *, .step-item .d-flex > div { min-width: 0; }
.page-header h1, .card-title, .step-item, .workflow-option, .timeline-item { overflow-wrap: anywhere; }
.page-header { padding-block: .4rem; }
.project-page-header { display: block; }
.page-header > .d-flex { flex-wrap: wrap; }
.card { box-shadow: 0 2px 10px rgba(15, 23, 42, .04); }
.card-header { flex-wrap: wrap; border-radius: var(--radius) var(--radius) 0 0 !important; }
.card-header .badge { white-space: normal; text-align: start; }
.stat-card { flex-direction: row; border: 1px solid var(--border) !important; }
.stat-value { font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.sidebar-brand { min-height: var(--header-h); height: auto; padding-block: .75rem; }
.sidebar-brand > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.brand-mark, .topbar .btn-icon, .topbar > .dropdown { flex-shrink: 0; }
.sidebar-link { padding-block: .8rem; }
.topbar-title { flex: 1; min-width: 0; }
.user-menu .name { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table-responsive { border-radius: inherit; overscroll-behavior-x: contain; }
.table > tbody td { border-color: var(--border); }
.table td .text-truncate { max-width: min(340px, 60vw); }
.btn-outline-primary { --bs-btn-color: var(--primary); --bs-btn-border-color: var(--primary); --bs-btn-hover-bg: var(--primary); --bs-btn-hover-border-color: var(--primary); --bs-btn-active-bg: var(--primary-hover); --bs-btn-active-border-color: var(--primary-hover); }
.btn:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid rgba(var(--primary-rgb), .5); outline-offset: 3px; }
.btn-group form .btn { height: 100%; }
.input-icon:has(.toggle-pass) > input { padding-right: 3rem; }
.form-control::placeholder { color: var(--muted); opacity: .85; }
.fw-500 { font-weight: 500; }
.text-purple { color: #7c3aed !important; }
.bg-purple { background-color: #7c3aed !important; }
.bg-purple-subtle { background-color: #ede9fe !important; }
.border-purple-subtle { border-color: #c4b5fd !important; }
.workflow-policy, .workflow-preview { padding: 1rem; border: 1px solid var(--border); border-radius: 12px; background: rgba(var(--primary-rgb), .035); font-size: .875rem; color: var(--text); }
.workflow-editor { border-top: 1px solid var(--border); padding-top: 1.25rem; scroll-margin-top: 90px; }
.workflow-editor summary { cursor: pointer; padding-block: .5rem; }
.workflow-option { display: flex; align-items: center; gap: .75rem; padding: .7rem; border-bottom: 1px solid var(--border); }
.workflow-option:has(input:disabled) { color: var(--muted); }
.workflow-modal { border: 1px solid var(--border); border-radius: 18px; overflow: hidden; }
.workflow-modal .modal-header, .workflow-modal .modal-footer { padding: 1rem 1.35rem; }
.workflow-modal .modal-body { padding: 1.35rem; }
.workflow-section-heading { min-height: 56px; display: flex; justify-content: space-between; align-items: flex-start; gap: .75rem; }
.workflow-options { min-height: 80px; max-height: min(43vh, 340px); overflow-y: auto; padding: 0; border: 1px solid var(--border); border-radius: 12px; }
.workflow-option { margin: 0; gap: .65rem; padding: .7rem .85rem; cursor: pointer; }
.workflow-option:last-child { border-bottom: 0; }
.workflow-option:hover, .workflow-option:has(input:checked) { background: rgba(var(--primary-rgb), .045); }
.workflow-option-number { display: inline-grid; place-items: center; width: 25px; height: 25px; border-radius: 8px; background: var(--bs-tertiary-bg); color: var(--muted); font-size: .75rem; flex: 0 0 auto; }
.workflow-empty { padding: 1.25rem; color: var(--muted); font-size: .875rem; }
.workflow-preview { font-weight: 600; }
#workflow { scroll-margin-top: 85px; }
.project-list-toolbar { padding: .9rem 1.25rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--border); }
.project-page-size { width: auto; min-width: 110px; }
.project-row-actions { display: flex; justify-content: flex-end; align-items: center; gap: .35rem; white-space: nowrap; }
.project-row-actions .btn { padding: .35rem .55rem; }
.brand-color-picker { width: 56px !important; min-width: 56px; height: 42px; padding: .3rem; cursor: pointer; flex: 0 0 56px; }
.brand-color-code { max-width: 145px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.theme-option-card { cursor: pointer; transition: border-color .15s, box-shadow .15s, background-color .15s; padding-right: 3rem !important; }
.theme-option-card:hover { border-color: var(--primary) !important; }
.theme-option-card:focus-within { outline: 3px solid rgba(var(--primary-rgb), .25); outline-offset: 2px; }
.theme-option-card:has(input:checked) { border-color: var(--primary) !important; box-shadow: 0 0 0 1px var(--primary) inset; }
.theme-option-card.bg-primary-subtle { background: rgba(var(--primary-rgb), .06) !important; }
.theme-choice-indicator { position: absolute; top: 1rem; right: 1rem; width: 23px; height: 23px; border: 1px solid var(--border); border-radius: 50%; display: grid; place-items: center; color: transparent; background: var(--surface); }
.theme-option-card:has(input:checked) .theme-choice-indicator { background: var(--primary); color: white; border-color: var(--primary); }
.step-item { background-color: transparent; }
.step-item:hover { background-color: rgba(var(--primary-rgb), .035); }
.flash-stack .alert { display: flex; align-items: flex-start; gap: .6rem; overflow-wrap: anywhere; }
.skip-link { position: fixed; top: -100px; left: 1rem; z-index: 1100; padding: .75rem 1rem; background: var(--surface); color: var(--primary); border-radius: 8px; }
.skip-link:focus { top: 1rem; }
[data-bs-theme="dark"] { color-scheme: dark; --bs-secondary-color: #aab8cc; --bs-tertiary-bg: #1e293b; }
[data-bs-theme="dark"] .bg-light { background-color: #1e293b !important; }
[data-bs-theme="dark"] .text-secondary { color: #b5c2d5 !important; }
[data-bs-theme="dark"] .list-group { --bs-list-group-bg: transparent; --bs-list-group-color: #e2e8f0; --bs-list-group-border-color: var(--border); }
[data-bs-theme="dark"] .table { --bs-table-color: #e2e8f0; --bs-table-striped-color: #e2e8f0; --bs-table-hover-color: #fff; }
[data-bs-theme="dark"] .btn-outline-secondary { --bs-btn-color: #cbd5e1; --bs-btn-hover-bg: #334155; --bs-btn-hover-color: #fff; }
[data-bs-theme="dark"] .user-menu:hover, [data-bs-theme="dark"] .user-menu[aria-expanded="true"] { background: #1e293b; }
[data-bs-theme="dark"] .form-select option { background: #1e293b; color: #f1f5f9; }
[data-bs-theme="dark"] .text-success { color: #4ade80 !important; }
[data-bs-theme="dark"] .text-danger, [data-bs-theme="dark"] .text-primary { color: #ff819a !important; }
[data-bs-theme="dark"] .text-warning { color: #fbbf24 !important; }
[data-bs-theme="dark"] .bg-purple-subtle { background: #36205e !important; }
[data-bs-theme="dark"] .text-purple { color: #c4b5fd !important; }
@media (max-width: 991.98px) {
    body.sidebar-open { overflow: hidden; }
    .sidebar { width: min(var(--sidebar-w), 85vw); height: 100dvh; }
}
@media (max-width: 575.98px) {
    .content { padding: .85rem; }
    .topbar { gap: .5rem; padding-inline: .75rem; }
    .page-header h1 { font-size: 1.3rem; }
    .card-body.p-4 { padding: 1rem !important; }
    .card-body > .d-flex.justify-content-between { gap: .75rem; flex-wrap: wrap; }
    .step-item { padding: 1rem; }
    .step-item > .d-flex:first-child { width: 100%; }
    .step-item > .d-flex:last-child { flex-wrap: wrap; }
    .nav-pills { gap: .25rem; }
    .nav-pills .nav-link { padding: .65rem !important; }
    .btn { min-height: 40px; }
    .auth-form-side { padding: 1.5rem; }
    .filter-actions { flex-wrap: wrap; }
    .filter-actions > div { margin-left: auto; }
    .project-list-toolbar { padding: .85rem 1rem; }
    .workflow-modal .modal-body { padding: 1rem; }
    .workflow-options { max-height: 180px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
