/* ==========================================================================
   FS Tech System Manager — admin design system
   ========================================================================== */

:root {
    --fst-primary: #6366f1;
    --fst-primary-dark: #4f46e5;
    --fst-accent: #a855f7;
    --fst-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 55%, #a855f7 100%);
    --fst-ink: #171a2b;
    --fst-muted: #6b7188;
    --fst-body-bg: #f4f5fa;
    --fst-sidebar-bg: #0e1122;
    --fst-sidebar-hover: rgba(99, 102, 241, .14);
    --fst-sidebar-text: #a9aec6;
    --fst-card-radius: 16px;
    --fst-control-radius: 10px;
    --fst-shadow: 0 1px 2px rgba(18, 21, 40, .04), 0 10px 30px rgba(18, 21, 40, .05);
    --fst-shadow-hover: 0 18px 40px rgba(99, 102, 241, .14);
    --fst-sidebar-width: 264px;
    --fst-sidebar-collapsed: 78px;
}

:root,
[data-bs-theme="light"] {
    --bs-body-bg: #ffffff;
    --bs-body-color: #171a2b;
    --bs-secondary-color: #6b7188;
    --bs-tertiary-bg: #f2f4fa;
    --bs-border-color: #e7e9f2;
    --bs-border-color-translucent: rgba(23, 26, 43, .08);
}

[data-bs-theme="dark"] {
    --fst-body-bg: #0b0d16;
    --fst-ink: #e8eaf4;
    --fst-muted: #98a0ba;
    --fst-sidebar-bg: #0c0f1d;
    --bs-body-bg: #131625;
    --bs-body-color: #e4e7f2;
    --bs-secondary-color: #9aa3bd;
    --bs-tertiary-bg: #1a1e31;
    --bs-border-color: #272c45;
    --bs-border-color-translucent: rgba(255, 255, 255, .09);
    --fst-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px rgba(0, 0, 0, .25);
    --fst-shadow-hover: 0 18px 44px rgba(0, 0, 0, .4);
}

body {
    background: var(--fst-body-bg);
    color: var(--bs-body-color);
    font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
    font-size: .9375rem;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    letter-spacing: -.02em;
}

::selection {
    background: rgba(99, 102, 241, .22);
}

* {
    scrollbar-width: thin;
    scrollbar-color: rgba(120, 125, 155, .35) transparent;
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-thumb {
    background: rgba(120, 125, 155, .32);
    border: 2px solid transparent;
    border-radius: 999px;
    background-clip: content-box;
}

/* ---------- Sidebar ---------- */
.fst-sidebar {
    width: var(--fst-sidebar-width);
    min-height: 100vh;
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1040;
    display: flex;
    flex-direction: column;
    color: var(--fst-sidebar-text);
    border-right: 1px solid rgba(255, 255, 255, .06);
    background:
        radial-gradient(120% 55% at 0% 0%, rgba(99, 102, 241, .18) 0%, transparent 55%),
        linear-gradient(180deg, #0f1226 0%, var(--fst-sidebar-bg) 45%, #0a0c18 100%);
    transition: width .25s ease, transform .25s ease;
}

.fst-sidebar.collapsed {
    width: var(--fst-sidebar-collapsed);
}

.fst-sidebar.collapsed .fst-brand-text,
.fst-sidebar.collapsed .nav-link span,
.fst-sidebar.collapsed .fst-group-label,
.fst-sidebar.collapsed .fst-user-meta {
    display: none;
}

.fst-sidebar.collapsed .fst-sidebar-brand {
    justify-content: center;
    padding-inline: 0;
}

.fst-sidebar.collapsed .nav-link {
    justify-content: center;
    padding: .7rem 0 !important;
    margin: 2px 12px;
}

.fst-sidebar.collapsed .nav-link i {
    font-size: 1.1rem;
}

.fst-sidebar.collapsed .fst-user-card {
    justify-content: center;
    padding: .5rem;
}

.fst-sidebar .nav {
    padding: 0 .6rem;
}

.fst-sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .62rem .8rem;
    margin: 2px 0;
    border-radius: 10px;
    color: var(--fst-sidebar-text);
    font-size: .9rem;
    font-weight: 500;
    text-decoration: none;
    transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}

.fst-sidebar .nav-link i {
    width: 1.35rem;
    font-size: 1.02rem;
    text-align: center;
    color: #8c93b0;
    transition: color .15s ease;
}

.fst-sidebar .nav-link:hover {
    background: var(--fst-sidebar-hover);
    color: #fff;
}

.fst-sidebar .nav-link:hover i {
    color: #c7cbff;
}

.fst-sidebar .nav-link.active {
    background: var(--fst-gradient);
    color: #fff;
    box-shadow: 0 8px 20px rgba(99, 102, 241, .35);
}

.fst-sidebar .nav-link.active i {
    color: #fff;
}

.fst-group-label {
    font-size: .65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: #6f7693;
    padding: 1rem 1.65rem .4rem;
    margin: 0;
}

.fst-sidebar-brand {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: .35rem;
    padding: 1.15rem 1.15rem;
    color: #fff;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.fst-sidebar-brand img {
    border-radius: 10px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .35);
}

.fst-brand-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.15;
}

.fst-brand-text strong {
    font-size: .95rem;
    font-weight: 700;
    letter-spacing: -.01em;
}

.fst-brand-text small {
    margin-top: 3px;
    font-size: .65rem;
    text-transform: uppercase;
    letter-spacing: .14em;
    color: #7f86a3;
}

.fst-brand-icon {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 10px;
    background: var(--fst-gradient);
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 1.05rem;
    box-shadow: 0 4px 14px rgba(99, 102, 241, .45);
}

.fst-brand-mark {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: .88rem;
    font-weight: 800;
    letter-spacing: -.04em;
    background: var(--fst-gradient);
    box-shadow: 0 6px 16px rgba(99, 102, 241, .38);
}

.fst-brand-mark-lg {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
    border-radius: 13px;
    font-size: 1rem;
}

.fst-user-card {
    margin: .75rem;
    padding: .7rem .8rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(255, 255, 255, .07);
}

.fst-user-card .avatar {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    border-radius: 50%;
    background: var(--fst-gradient);
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 600;
    font-size: .85rem;
}

/* ---------- Main area ---------- */
.fst-main {
    margin-left: var(--fst-sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left .25s ease;
}

.fst-main.expanded {
    margin-left: var(--fst-sidebar-collapsed);
}

.fst-topbar {
    position: sticky;
    top: 0;
    z-index: 1030;
    min-height: 64px;
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .6rem 1.5rem;
    background: color-mix(in srgb, var(--bs-body-bg) 82%, transparent);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--bs-border-color);
}

.fst-topbar-title {
    display: flex;
    flex-direction: column;
    margin-left: .25rem;
    line-height: 1.15;
}

.fst-topbar-title .fst-crumb {
    font-size: .66rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--fst-muted);
}

.fst-topbar-title .fst-current {
    font-size: .92rem;
    font-weight: 600;
    color: var(--fst-ink);
}

.fst-search {
    position: relative;
    width: min(380px, 100%);
    margin-left: .25rem;
}

.fst-search > .bi {
    position: absolute;
    left: .9rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: .85rem;
    color: var(--fst-muted);
    pointer-events: none;
}

.fst-search-input {
    width: 100%;
    height: 40px;
    padding: 0 1rem 0 2.4rem;
    font-size: .875rem;
    color: var(--bs-body-color);
    background: var(--bs-tertiary-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: var(--fst-control-radius);
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.fst-search-input::placeholder {
    color: var(--fst-muted);
}

.fst-search-input:focus {
    outline: none;
    background: var(--bs-body-bg);
    border-color: rgba(99, 102, 241, .55);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .12);
}

.fst-icon-btn {
    width: 40px;
    height: 40px;
    display: inline-grid;
    place-items: center;
    color: var(--bs-body-color);
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: var(--fst-control-radius);
    transition: color .15s ease, border-color .15s ease, background .15s ease;
}

.fst-icon-btn:hover {
    color: var(--fst-primary);
    border-color: rgba(99, 102, 241, .45);
    background: rgba(99, 102, 241, .06);
}

.fst-user-btn {
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .25rem .7rem .25rem .3rem;
    color: var(--bs-body-color);
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 999px;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.fst-user-btn:hover {
    border-color: rgba(99, 102, 241, .45);
    box-shadow: 0 4px 14px rgba(99, 102, 241, .12);
}

.fst-page {
    flex: 1;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 1.75rem clamp(1rem, 2.4vw, 2.25rem) 2.5rem;
}

/* ---------- Cards ---------- */
.fst-card {
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: var(--fst-card-radius);
    box-shadow: var(--fst-shadow);
    transition: box-shadow .2s ease, transform .2s ease;
}

.fst-card-hover:hover {
    box-shadow: var(--fst-shadow-hover);
    transform: translateY(-2px);
}

.fst-card h5 {
    font-size: 1.02rem;
    letter-spacing: -.015em;
}

.fst-stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-size: 1.15rem;
}

.fst-stat-card .stat-value {
    font-size: 1.7rem;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -.02em;
}

.fst-stat-card .stat-label {
    font-size: .8rem;
    color: var(--bs-secondary-color);
}

.fst-chart {
    position: relative;
    height: 250px;
}

/* ---------- Badges / pills ---------- */
.fst-pill {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .75rem;
    font-weight: 600;
    padding: .3em .75em;
    border-radius: 50rem;
    white-space: nowrap;
}

.fst-pill::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.fst-pill.pill-success { color: #16a34a; background: rgba(22, 163, 74, .12); }
.fst-pill.pill-warning { color: #d97706; background: rgba(217, 119, 6, .12); }
.fst-pill.pill-danger  { color: #dc2626; background: rgba(220, 38, 38, .12); }
.fst-pill.pill-secondary { color: #6b7280; background: rgba(107, 114, 128, .14); }
.fst-pill.pill-info    { color: #0891b2; background: rgba(8, 145, 178, .12); }
.fst-pill.pill-primary { color: #6366f1; background: rgba(99, 102, 241, .12); }

.badge {
    font-weight: 600;
    letter-spacing: .01em;
}

/* ---------- Forms ---------- */
.form-label {
    margin-bottom: .4rem;
    font-size: .8125rem;
    font-weight: 600;
    color: var(--fst-ink);
}

.form-control,
.form-select {
    padding: .55rem .8rem;
    font-size: .9rem;
    color: var(--bs-body-color);
    background-color: var(--bs-body-bg);
    border-color: var(--bs-border-color);
    border-radius: var(--fst-control-radius);
}

.form-control::placeholder {
    color: var(--fst-muted);
    opacity: .85;
}

.form-control:focus,
.form-select:focus {
    color: var(--bs-body-color);
    background-color: var(--bs-body-bg);
    border-color: rgba(99, 102, 241, .6);
    box-shadow: 0 0 0 .22rem rgba(99, 102, 241, .13);
}

.form-control:disabled,
.form-select:disabled {
    background-color: var(--bs-tertiary-bg);
}

.form-check-input {
    border-color: var(--bs-border-color);
}

.form-check-input:checked {
    background-color: var(--fst-primary);
    border-color: var(--fst-primary);
}

.form-check-input:focus {
    border-color: rgba(99, 102, 241, .5);
    box-shadow: 0 0 0 .2rem rgba(99, 102, 241, .13);
}

.input-group-text {
    color: var(--fst-muted);
    background: var(--bs-tertiary-bg);
    border-color: var(--bs-border-color);
    border-radius: var(--fst-control-radius);
}

.input-group > :first-child {
    border-top-left-radius: var(--fst-control-radius);
    border-bottom-left-radius: var(--fst-control-radius);
}

.input-group > :last-child {
    border-top-right-radius: var(--fst-control-radius);
    border-bottom-right-radius: var(--fst-control-radius);
}

.form-text {
    font-size: .78rem;
    color: var(--fst-muted);
}

/* ---------- Buttons ---------- */
.btn {
    --bs-btn-border-radius: var(--fst-control-radius);
    font-weight: 500;
}

.btn-sm {
    --bs-btn-border-radius: 9px;
}

.btn-light {
    --bs-btn-bg: var(--bs-body-bg);
    --bs-btn-color: var(--bs-body-color);
    --bs-btn-border-color: var(--bs-border-color);
    --bs-btn-hover-bg: var(--bs-tertiary-bg);
    --bs-btn-hover-color: var(--fst-ink);
    --bs-btn-hover-border-color: var(--bs-border-color);
    --bs-btn-active-bg: var(--bs-tertiary-bg);
    --bs-btn-active-color: var(--fst-ink);
    --bs-btn-active-border-color: var(--bs-border-color);
    --bs-btn-disabled-bg: var(--bs-body-bg);
    --bs-btn-disabled-color: var(--fst-muted);
}

.btn-fst-primary {
    background: var(--fst-gradient);
    border: none;
    color: #fff;
    box-shadow: 0 4px 14px rgba(99, 102, 241, .28);
}

.btn-fst-primary:hover,
.btn-fst-primary:focus-visible {
    color: #fff;
    filter: brightness(1.07);
    box-shadow: 0 8px 22px rgba(99, 102, 241, .38);
}

.btn-fst-primary:active {
    color: #fff;
    filter: brightness(.97);
}

.btn-link {
    text-decoration: none;
}

/* ---------- Tables ---------- */
.fst-table {
    margin-bottom: 0;
}

.fst-table thead th {
    padding: .7rem 1rem;
    font-size: .68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--fst-muted);
    white-space: nowrap;
    background: var(--bs-tertiary-bg);
    border-bottom: 1px solid var(--bs-border-color);
}

.fst-table tbody td {
    padding: .85rem 1rem;
    vertical-align: middle;
    border-color: color-mix(in srgb, var(--bs-border-color) 65%, transparent);
}

.fst-table tbody tr {
    transition: background .15s ease;
}

.fst-table tbody tr:hover {
    background: rgba(99, 102, 241, .05);
}

.fst-table tbody tr:last-child td {
    border-bottom: 0;
}

.fst-table th:last-child,
.fst-table td:last-child {
    white-space: nowrap;
}

.fst-highlight {
    background: rgba(99, 102, 241, .07);
}

/* ---------- Kanban ---------- */
.fst-kanban {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .9rem;
    align-items: start;
}

.fst-kanban-col {
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--bs-tertiary-bg);
    border: 1px solid var(--bs-border-color);
    border-top: 3px solid var(--bs-border-color);
    border-radius: var(--fst-card-radius);
}

.fst-kanban-col[data-status="todo"]        { border-top-color: #6b7280; }
.fst-kanban-col[data-status="in_progress"] { border-top-color: #d97706; }
.fst-kanban-col[data-status="review"]      { border-top-color: #0891b2; }
.fst-kanban-col[data-status="done"]        { border-top-color: #16a34a; }

.fst-kanban-col .col-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .7rem .85rem;
    background: var(--bs-body-bg);
    border-bottom: 1px solid var(--bs-border-color);
}

.fst-kanban-body {
    min-height: 90px;
    max-height: 62vh;
    overflow-y: auto;
    padding: .65rem;
    transition: background .15s ease;
}

.fst-kanban-body.drag-over {
    background: rgba(99, 102, 241, .07);
}

.fst-task-card {
    position: relative;
    margin-bottom: .55rem;
    padding: .75rem .8rem;
    cursor: grab;
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-left: 3px solid transparent;
    border-radius: 12px;
    box-shadow: var(--fst-shadow);
    transition: box-shadow .15s ease, transform .15s ease;
}

.fst-task-card:last-child {
    margin-bottom: 0;
}

.fst-task-card:hover {
    box-shadow: var(--fst-shadow-hover);
    transform: translateY(-1px);
}

.fst-task-card.dragging {
    opacity: .45;
    transform: rotate(2deg);
}

.fst-drag-ghost {
    opacity: .9;
    box-shadow: 0 10px 24px rgba(99, 102, 241, .25) !important;
}

.fst-task-title {
    line-height: 1.4;
}

.fst-task-card[data-priority="urgent"] { border-left-color: #dc2626; }
.fst-task-card[data-priority="high"]   { border-left-color: #f97316; }
.fst-task-card[data-priority="medium"] { border-left-color: #6366f1; }
.fst-task-card[data-priority="low"]    { border-left-color: #94a3b8; }

.fst-task-card[data-status="done"] .fst-task-title {
    color: var(--bs-secondary-color);
    text-decoration: line-through;
}

.fst-task-card[data-status="done"] {
    opacity: .82;
}

.fst-kanban-empty {
    padding: 1.1rem .5rem;
    text-align: center;
    color: var(--bs-secondary-color);
    border: 1.5px dashed var(--bs-border-color);
    border-radius: 10px;
}

.fst-col-count {
    min-width: 1.7rem;
    padding: .28rem .5rem;
    font-size: .7rem;
    font-weight: 700;
    color: var(--fst-muted);
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 999px;
}

.fst-col-dot {
    width: .55rem;
    height: .55rem;
    flex: 0 0 .55rem;
    background: #6b7280;
    border-radius: 50%;
}

.fst-col-dot[data-status="in_progress"] { background: #d97706; }
.fst-col-dot[data-status="review"]      { background: #0891b2; }
.fst-col-dot[data-status="done"]        { background: #16a34a; }

.fst-task-system {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    max-width: 100%;
    padding: .1rem .55rem;
    overflow: hidden;
    font-size: .72rem;
    font-weight: 600;
    color: var(--bs-secondary-color);
    background: var(--bs-tertiary-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 999px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fst-task-due {
    font-size: .72rem;
    font-weight: 600;
    color: var(--bs-secondary-color);
}

.fst-task-due.overdue {
    color: #dc2626;
}

@media (max-width: 1199.98px) {
    .fst-kanban { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 575.98px) {
    .fst-kanban { grid-template-columns: 1fr; }
}

/* ---------- Developer notes on tasks ---------- */
.fst-notes {
    border-radius: 8px;
}

.fst-notes-list {
    max-height: 140px;
    overflow-y: auto;
}

.fst-note-row {
    padding: 2px 0;
}

.fst-note-check {
    width: .95rem;
    height: .95rem;
    margin-top: .1rem;
    flex: 0 0 auto;
    cursor: pointer;
}

.fst-note-check:checked {
    background-color: var(--fst-primary);
    border-color: var(--fst-primary);
}

.fst-note-body {
    line-height: 1.35;
    word-break: break-word;
}

.fst-note-delete {
    color: var(--bs-tertiary-color);
    font-size: .85rem;
    line-height: 1;
}

.fst-note-delete:hover {
    color: #dc2626;
}

.fst-note-progress {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
}

.fst-note-bar {
    background: var(--bs-tertiary-bg);
    border-radius: 999px;
}

.fst-note-input {
    min-width: 0;
}

.fst-notes form .form-select {
    flex: 0 0 auto;
    width: 98px;
}

.fst-notes form .fst-note-input {
    flex: 1 1 70px;
    width: auto;
}

.fst-note-input:focus {
    border-color: rgba(99, 102, 241, .6);
    box-shadow: 0 0 0 .2rem rgba(99, 102, 241, .13);
}

/* ---------- Misc ---------- */
.fst-timeline {
    position: relative;
    padding-left: 1.75rem;
}

.fst-timeline::before {
    content: "";
    position: absolute;
    left: 9px;
    top: 4px;
    bottom: 4px;
    width: 2px;
    background: var(--bs-border-color);
}

.fst-timeline-item {
    position: relative;
    padding-bottom: 1.25rem;
}

.fst-timeline-item::before {
    content: "";
    position: absolute;
    left: calc(-1.75rem + 3px);
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--fst-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .2);
}

.system-avatar {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 1.15rem;
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-grid;
    place-items: center;
    color: #fff;
    font-size: .85rem;
    font-weight: 600;
    vertical-align: middle;
}

.avatar-sm {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-grid;
    place-items: center;
    color: #fff;
    font-size: .7rem;
    font-weight: 600;
    vertical-align: middle;
}

.link-plain {
    color: inherit;
    text-decoration: none;
}

.link-plain:hover {
    color: var(--fst-primary);
}

.min-width-0 {
    min-width: 0;
}

.fst-tabs .nav-link {
    padding: .6rem .9rem;
    font-weight: 500;
    color: var(--bs-secondary-color);
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
}

.fst-tabs .nav-link:hover {
    color: var(--fst-primary);
}

.fst-tabs .nav-link.active,
.fst-tabs .fst-tab-active {
    color: var(--fst-primary);
    background: transparent;
    border-bottom-color: var(--fst-primary);
}

.dropdown-menu {
    padding: .4rem;
    border-color: var(--bs-border-color);
    border-radius: 14px;
    box-shadow: 0 18px 40px rgba(18, 20, 40, .16);
}

.dropdown-item {
    padding: .5rem .65rem;
    font-size: .875rem;
    border-radius: 9px;
}

.dropdown-item:hover,
.dropdown-item:focus {
    color: var(--fst-primary);
    background: rgba(99, 102, 241, .08);
}

.dropdown-item.text-danger:hover,
.dropdown-item.text-danger:focus {
    color: #dc2626;
    background: rgba(220, 38, 38, .08);
}

.dropdown-header {
    font-size: .75rem;
}

.modal-content {
    border: none;
    border-radius: 18px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .25);
}

.modal-header {
    padding: 1.1rem 1.35rem;
    border-bottom: 1px solid var(--bs-border-color);
}

.modal-body {
    padding: 1.35rem;
}

.modal-footer {
    padding: .9rem 1.35rem;
    border-top: 1px solid var(--bs-border-color);
}

.alert {
    border: 0;
    border-radius: 12px;
}

.alert-auto {
    box-shadow: var(--fst-shadow);
}

.page-item .page-link {
    margin: 0 3px;
    color: var(--bs-body-color);
    border-radius: 9px;
}

.page-item.active .page-link {
    background: var(--fst-primary);
    border-color: var(--fst-primary);
}

.pagination {
    margin: 0;
}

.progress {
    border-radius: 999px;
    background: var(--bs-tertiary-bg);
}

/* ---------- Sign in ---------- */
.fst-auth-body {
    min-height: 100vh;
    margin: 0;
    color: var(--fst-ink);
    background: var(--fst-body-bg);
    font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.fst-auth {
    display: grid;
    grid-template-columns: minmax(440px, 1.1fr) minmax(420px, 1fr);
    min-height: 100vh;
}

.fst-auth-showcase {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 2.5rem;
    padding: clamp(2rem, 4vw, 3.5rem);
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(90% 60% at 8% 4%, rgba(99, 102, 241, .38) 0%, transparent 55%),
        radial-gradient(70% 55% at 92% 96%, rgba(168, 85, 247, .28) 0%, transparent 55%),
        linear-gradient(165deg, #0d1020 0%, #12142a 52%, #0a0c18 100%);
}

.fst-auth-showcase::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
    background-size: 46px 46px;
    -webkit-mask-image: radial-gradient(75% 70% at 35% 30%, #000 0%, transparent 75%);
    mask-image: radial-gradient(75% 70% at 35% 30%, #000 0%, transparent 75%);
}

.fst-auth-showcase::after {
    content: "";
    position: absolute;
    right: -160px;
    bottom: -180px;
    width: 480px;
    height: 480px;
    pointer-events: none;
    border: 1px solid rgba(168, 85, 247, .28);
    border-radius: 50%;
    box-shadow: 0 0 0 60px rgba(99, 102, 241, .05), 0 0 0 160px rgba(99, 102, 241, .03);
}

.fst-auth-showcase > * {
    position: relative;
    z-index: 1;
}

.fst-auth-brand {
    display: flex;
    align-items: center;
    gap: .85rem;
    width: max-content;
    color: #fff;
    text-decoration: none;
}

.fst-auth-brand img {
    border-radius: 12px;
    box-shadow: 0 10px 26px rgba(0, 0, 0, .45);
}

.fst-auth-brand .fst-brand-text strong {
    font-size: 1rem;
}

.fst-auth-brand .fst-brand-text small {
    color: #8a91b4;
}

.fst-auth-copy {
    max-width: 470px;
}

.fst-auth-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .32rem .7rem;
    font-size: .68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .14em;
    color: #c3c6f9;
    background: rgba(99, 102, 241, .16);
    border: 1px solid rgba(129, 140, 248, .28);
    border-radius: 999px;
}

.fst-auth-headline {
    margin: 1.1rem 0 .9rem;
    font-size: clamp(1.85rem, 2.4vw, 2.55rem);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -.03em;
}

.fst-auth-lead {
    margin: 0;
    font-size: .95rem;
    line-height: 1.65;
    color: #a7adc8;
}

.fst-auth-features {
    display: grid;
    gap: .9rem;
    margin-top: 1.75rem;
}

.fst-auth-feature {
    display: flex;
    gap: .8rem;
    align-items: flex-start;
}

.fst-auth-feature-icon {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: grid;
    place-items: center;
    color: #c9ccff;
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 11px;
}

.fst-auth-feature strong {
    display: block;
    font-size: .875rem;
    font-weight: 600;
    color: #fff;
}

.fst-auth-feature span {
    font-size: .8rem;
    line-height: 1.5;
    color: #8f96b4;
}

.fst-auth-showcase-foot {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .75rem;
    color: #767d9c;
}

.fst-auth-form-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1.5rem;
    background:
        radial-gradient(60% 45% at 82% 0%, rgba(99, 102, 241, .07) 0%, transparent 70%),
        var(--fst-body-bg);
}

.fst-auth-card {
    width: 100%;
    max-width: 432px;
    padding: clamp(1.5rem, 3vw, 2.35rem);
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 22px;
    box-shadow: 0 30px 70px rgba(18, 21, 40, .12);
}

.fst-auth-mobile-brand {
    display: none;
    align-items: center;
    gap: .7rem;
    margin-bottom: 1.5rem;
}

.fst-auth-mobile-brand img {
    border-radius: 10px;
}

.fst-auth-card-kicker {
    margin-bottom: .35rem;
    font-size: .7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .14em;
    color: var(--fst-primary);
}

.fst-auth-card-title {
    margin: 0;
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: -.02em;
    color: var(--fst-ink);
}

.fst-auth-card-sub {
    margin: .45rem 0 0;
    font-size: .875rem;
    color: var(--fst-muted);
}

.fst-auth-alert {
    display: flex;
    gap: .5rem;
    align-items: flex-start;
    margin: 1.1rem 0 0;
    padding: .7rem .9rem;
    font-size: .82rem;
    color: #b91c1c;
    background: rgba(220, 38, 38, .09);
    border-radius: 12px;
}

.fst-auth-form {
    margin-top: 1.4rem;
}

.fst-auth-field {
    margin-bottom: 1.1rem;
}

.fst-auth-input {
    position: relative;
}

.fst-auth-input > i {
    position: absolute;
    left: .95rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: .9rem;
    color: var(--fst-muted);
    pointer-events: none;
}

.fst-auth-input .form-control {
    height: 46px;
    padding-left: 2.55rem;
    padding-right: 2.6rem;
    font-size: .9rem;
}

.fst-auth-eye {
    position: absolute;
    top: 50%;
    right: .45rem;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    color: var(--fst-muted);
    background: transparent;
    border: none;
    border-radius: 8px;
}

.fst-auth-eye:hover {
    color: var(--fst-primary);
    background: rgba(99, 102, 241, .08);
}

.fst-auth-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.4rem;
}

.fst-auth-meta .form-check-label {
    font-size: .82rem;
    color: var(--fst-muted);
}

.fst-auth-hint {
    font-size: .78rem;
    color: var(--fst-muted);
}

.fst-auth-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    width: 100%;
    height: 46px;
    font-weight: 600;
    border-radius: 11px;
}

.fst-auth-foot {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    margin: 1.4rem 0 0;
    padding-top: 1.1rem;
    font-size: .74rem;
    color: var(--fst-muted);
    border-top: 1px solid var(--bs-border-color);
}

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

    .fst-auth-showcase {
        display: none;
    }

    .fst-auth-form-wrap {
        padding: 2rem 1rem;
    }

    .fst-auth-mobile-brand {
        display: flex;
    }
}

@media (max-width: 575.98px) {
    .fst-auth-card {
        border-radius: 18px;
        box-shadow: 0 14px 40px rgba(18, 21, 40, .1);
    }

    .fst-auth-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: .4rem;
    }
}

/* ---------- Responsive shell ---------- */
@media (max-width: 767.98px) {
    .fst-page > .d-flex.justify-content-between {
        flex-wrap: wrap;
        gap: .75rem;
    }

    .fst-page > .d-flex.justify-content-between > div:last-child {
        flex-wrap: wrap;
    }
}

@media (max-width: 991.98px) {
    .fst-sidebar {
        width: var(--fst-sidebar-width);
        transform: translateX(-100%);
        box-shadow: 0 0 60px rgba(0, 0, 0, .4);
    }

    .fst-sidebar.show {
        transform: translateX(0);
    }

    .fst-main {
        margin-left: 0 !important;
    }

    .fst-sidebar.collapsed {
        width: var(--fst-sidebar-width);
    }

    .fst-sidebar.collapsed .fst-brand-text {
        display: flex;
    }

    .fst-sidebar.collapsed .nav-link span {
        display: inline;
    }

    .fst-sidebar.collapsed .fst-group-label {
        display: block;
    }

    .fst-sidebar.collapsed .fst-user-meta {
        display: block;
    }

    .fst-sidebar.collapsed .fst-sidebar-brand {
        justify-content: flex-start;
        padding-inline: 1.15rem;
    }

    .fst-sidebar.collapsed .nav-link {
        justify-content: flex-start;
        padding: .62rem .8rem !important;
    }

    .fst-sidebar.collapsed .fst-user-card {
        justify-content: flex-start;
        padding: .7rem .8rem;
    }

    .fst-backdrop {
        position: fixed;
        inset: 0;
        z-index: 1035;
        display: none;
        background: rgba(6, 8, 18, .55);
        backdrop-filter: blur(2px);
    }

    .fst-backdrop.show {
        display: block;
    }
}

@media (max-width: 767.98px) {
    .fst-topbar {
        padding: .55rem 1rem;
    }

    .fst-page {
        padding: 1.25rem 1rem 2rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}

@media print {
    .fst-sidebar,
    .fst-topbar,
    .fst-backdrop {
        display: none !important;
    }

    .fst-main {
        margin: 0 !important;
    }

    .fst-page {
        max-width: none;
        padding: 0;
        animation: none;
    }
}
