:root {
    --app-bg: #eef4fb;
    --app-bg-deep: #e2edf9;
    --surface: rgba(255, 255, 255, 0.78);
    --surface-strong: rgba(255, 255, 255, 0.92);
    --surface-muted: rgba(248, 250, 252, 0.92);
    --sidebar-bg: linear-gradient(180deg, rgba(7, 25, 40, 0.98) 0%, rgba(11, 36, 58, 0.98) 100%);
    --sidebar-border: rgba(148, 163, 184, 0.12);
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-soft: #94a3b8;
    --line: rgba(148, 163, 184, 0.22);
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --accent: #0ea5a4;
    --success: #0f766e;
    --danger: #dc2626;
    --warning: #f59e0b;
    --gold: #fbbf24;
    --shadow: 0 14px 34px rgba(15, 23, 42, 0.09);
    --shadow-soft: 0 8px 22px rgba(15, 23, 42, 0.06);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    font-family: "Aptos", "Segoe UI Variable", "Segoe UI", "Helvetica Neue", sans-serif;
    color: var(--text-main);
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.14), transparent 28%),
        radial-gradient(circle at 90% 12%, rgba(14, 165, 164, 0.14), transparent 24%),
        linear-gradient(180deg, var(--app-bg) 0%, var(--app-bg-deep) 100%);
    position: relative;
    overflow-x: hidden;
}

body::before,
body::after {
    content: "";
    position: fixed;
    border-radius: 999px;
    filter: blur(24px);
    opacity: 0.46;
    pointer-events: none;
    z-index: 0;
}

body::before {
    width: 280px;
    height: 280px;
    top: -90px;
    left: -90px;
    background: rgba(251, 191, 36, 0.16);
}

body::after {
    width: 220px;
    height: 220px;
    right: -70px;
    bottom: 10vh;
    background: rgba(37, 99, 235, 0.1);
}

a {
    color: inherit;
    text-decoration: none;
}

a:hover,
a:focus {
    text-decoration: none;
}

.alert-link {
    color: var(--text-main);
    font-weight: 700;
    text-decoration: none;
    transition: color 0.18s ease;
}

.alert-link:hover,
.alert-link:focus {
    color: var(--primary-dark);
}

.app-body,
.auth-body {
    min-height: 100vh;
}

.app-shell,
.auth-shell {
    position: relative;
}

.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 294px;
    padding: 1.25rem;
    background: var(--sidebar-bg);
    color: #e5eef9;
    border-right: 1px solid var(--sidebar-border);
    box-shadow: 18px 0 36px rgba(7, 25, 40, 0.14);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    position: sticky;
    top: 0;
    height: 100vh;
    transition: width 0.22s ease, padding 0.22s ease;
}

.sidebar-brand {
    display: flex;
    gap: 0.9rem;
    align-items: center;
    margin-bottom: 1rem;
}

.brand-mark {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: #fff;
    font-size: 1.2rem;
    box-shadow: 0 12px 26px rgba(37, 99, 235, 0.22);
}

.brand-kicker,
.page-kicker,
.auth-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gold);
}

.sidebar-brand h2 {
    font-size: 1.35rem;
    line-height: 1.12;
    margin: 0;
    color: #fff;
}

.brand-subtitle {
    margin-top: 0.2rem;
    color: rgba(226, 232, 240, 0.7);
    font-size: 0.88rem;
    font-weight: 500;
}

.brand-copy,
.nav-label,
.user-copy,
.logout-label,
.sidebar-section-label {
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.sidebar-section-label {
    color: rgba(148, 163, 184, 0.78);
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.72rem;
    margin-bottom: 0.9rem;
}

.sidebar-nav {
    gap: 0.4rem;
}

.sidebar-nav .nav-link {
    border-radius: 16px;
    padding: 0.8rem 0.95rem;
    color: rgba(226, 232, 240, 0.84);
    display: flex;
    align-items: center;
    gap: 0.9rem;
    font-weight: 600;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link.active {
    color: #fff;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.28), rgba(14, 165, 164, 0.18));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 8px 20px rgba(2, 6, 23, 0.18);
}

.nav-icon {
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.06);
    color: inherit;
}

.sidebar-footer {
    margin-top: auto;
    padding: 1rem;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(18px);
    transition: padding 0.22s ease;
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin-bottom: 1rem;
}

.user-avatar {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.9), rgba(245, 158, 11, 0.95));
    color: #1e293b;
    font-weight: 800;
}

.user-label {
    font-size: 0.76rem;
    color: rgba(226, 232, 240, 0.74);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 0.2rem;
}

.main-content {
    flex: 1;
    position: relative;
    min-width: 0;
}

.main-content > .container-fluid {
    max-width: 1540px;
    margin-inline: auto;
    padding-left: clamp(1rem, 2.2vw, 1.9rem);
    padding-right: clamp(1rem, 2.2vw, 1.9rem);
}

.app-main-container {
    padding-top: 0;
}

.app-topbar {
    position: sticky;
    top: 0;
    z-index: 70;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.78rem 0.9rem;
    margin-bottom: 1.35rem;
    border-radius: 0 0 22px 22px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-top: 0;
    backdrop-filter: blur(18px);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

.topbar-left,
.topbar-right {
    display: flex;
    align-items: center;
    gap: 0.72rem;
    flex-wrap: wrap;
    min-width: 0;
}

.topbar-right {
    flex: 1 1 auto;
    justify-content: flex-end;
}

.topbar-left {
    flex: 1 1 auto;
}

.topbar-right form {
    display: flex;
}

.topbar-caption,
.page-title-wrap,
.panel-header > div,
.quick-action > div,
.metric-head > div {
    min-width: 0;
}

.topbar-caption {
    display: grid;
    gap: 0.22rem;
}

.topbar-page-title,
.topbar-caption strong {
    display: block;
    font-size: clamp(1.28rem, 2vw, 1.68rem);
    color: var(--text-main);
    letter-spacing: -0.03em;
    line-height: 1.05;
}

.topbar-page-title {
    display: inline-flex;
    align-items: center;
    gap: 0.62rem;
}

.topbar-page-title i {
    color: var(--primary);
    font-size: 0.95em;
}

.topbar-caption small {
    display: block;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
    max-width: 42rem;
}

.page-header {
    margin-bottom: 1.5rem;
}

.page-header-shell {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1.15rem;
    padding: 1.35rem 1.45rem;
    border-radius: 26px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.92) 0%, rgba(248, 250, 252, 0.92) 58%, rgba(224, 242, 254, 0.86) 100%);
    border: 1px solid rgba(148, 163, 184, 0.16);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.page-header-shell::before {
    content: "";
    position: absolute;
    inset: auto auto -48px -34px;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.12) 0%, rgba(37, 99, 235, 0) 70%);
    pointer-events: none;
}

.page-header-shell::after {
    content: "";
    position: absolute;
    top: -46px;
    right: -56px;
    width: 190px;
    height: 190px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(14, 165, 164, 0.14) 0%, rgba(14, 165, 164, 0) 70%);
    pointer-events: none;
}

.page-header-icon {
    position: relative;
    z-index: 1;
    width: 60px;
    height: 60px;
    border-radius: 20px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--primary) 0%, #60a5fa 100%);
    color: #fff;
    font-size: 1.2rem;
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.18);
    flex-shrink: 0;
}

.page-header .page-title-wrap {
    position: relative;
    z-index: 1;
}

.page-header .page-kicker {
    color: var(--primary-dark);
    letter-spacing: 0.16em;
    font-size: 0.72rem;
}

.page-title-wrap h1 {
    margin: 0.25rem 0 0.35rem;
    font-size: clamp(2rem, 3vw, 2.65rem);
    letter-spacing: -0.04em;
    line-height: 1.04;
}

.page-subtitle {
    max-width: 40rem;
    color: var(--text-muted);
    font-size: 0.96rem;
    line-height: 1.55;
}

.sidebar-toggle {
    min-width: 48px;
    min-height: 48px;
    padding-inline: 0.85rem;
}

.sidebar-toggle i {
    color: var(--primary);
}

.surface-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.68rem 0.9rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid rgba(148, 163, 184, 0.18);
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow-soft);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.surface-pill strong {
    color: var(--text-main);
    font-weight: 700;
}

.surface-pill i {
    color: var(--primary);
}

.topbar-user {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 56px;
    padding: 0.34rem 0.42rem 0.34rem 0.34rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: var(--shadow-soft);
}

.topbar-user-link {
    color: inherit;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.topbar-user-link:hover {
    color: inherit;
    border-color: rgba(37, 99, 235, 0.24);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
}

.topbar-user .user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    overflow: hidden;
}

.topbar-user-copy {
    padding-right: 0.18rem;
}

.topbar-user-copy small {
    display: block;
    color: var(--text-soft);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.topbar-user-copy strong {
    display: block;
    color: var(--text-main);
    line-height: 1.1;
}

.topbar-user-arrow {
    width: 2rem;
    height: 2rem;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: var(--text-soft);
    background: rgba(248, 250, 252, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.14);
}

.avatar-photo {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    border-radius: inherit;
}

.topbar-logout {
    min-height: 56px;
    padding-inline: 1.05rem;
    border-radius: 18px;
}

.card,
.filter-card,
.table-card,
.auth-card,
.detail-card {
    background: var(--surface);
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 24px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(20px);
    overflow: hidden;
}

.card-header,
.modal-header,
.modal-footer {
    border-color: rgba(148, 163, 184, 0.14);
}

.card-header {
    background: transparent !important;
    padding: 1.2rem 1.35rem 0;
}

.card-body {
    padding: 1.35rem;
}

.filter-card .card-body {
    padding: 1.15rem 1.25rem;
}

.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.toolbar form,
.panel-header .btn,
.topbar-right > *,
.hero-metrics,
.snapshot-grid {
    min-width: 0;
}

.btn-group-wrap,
.table-actions {
    display: flex;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.btn {
    border-radius: 13px;
    padding: 0.74rem 1rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    box-shadow: none;
}

.btn-sm {
    padding: 0.5rem 0.85rem;
    border-radius: 11px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-color: transparent;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover,
.btn-primary:focus {
    background: linear-gradient(135deg, #2c6df0 0%, #1e40af 100%);
    border-color: transparent;
}

.btn-light,
.btn-outline-secondary,
.btn-outline-primary,
.btn-outline-danger {
    border-width: 1px;
}

.btn-outline-secondary,
.btn-outline-primary,
.btn-outline-danger,
.btn-light.border {
    background: rgba(255, 255, 255, 0.72);
}

.form-control,
.form-select {
    min-height: 46px;
    border-radius: 14px;
    border-color: rgba(148, 163, 184, 0.25);
    background: rgba(248, 250, 252, 0.95);
    color: var(--text-main);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(37, 99, 235, 0.42);
    box-shadow: 0 0 0 0.24rem rgba(37, 99, 235, 0.12);
    background: #fff;
}

textarea.form-control {
    min-height: 110px;
}

.input-icon-wrap {
    position: relative;
}

.input-icon-wrap i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-soft);
    z-index: 2;
}

.input-icon-wrap .form-control {
    padding-left: 2.8rem;
}

.table-card .card-body {
    padding: 0.55rem 0.65rem 0.8rem;
}

.table {
    margin-bottom: 0;
}

.table thead th {
    border-bottom-color: rgba(148, 163, 184, 0.18);
    color: var(--text-muted);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    padding: 1rem 1.2rem 0.8rem;
    text-transform: uppercase;
    white-space: nowrap;
}

.table td,
.table th {
    vertical-align: middle;
}

.table tbody td {
    border-color: rgba(148, 163, 184, 0.14);
    padding: 1rem 1.2rem;
}

.table-hover > tbody > tr:hover > * {
    background: rgba(248, 250, 252, 0.72);
}

.table-responsive {
    padding: 0 0.05rem 0.1rem;
}

.table-shell {
    padding: 0;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 20px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.table-shell .table {
    margin-bottom: 0;
}

.table-shell .table thead th {
    background: rgba(255, 255, 255, 0.84);
}

.table-shell .table tbody td {
    background: transparent;
}

.table-shell .table thead th:first-child,
.table-shell .table tbody td:first-child {
    padding-left: 1.35rem;
}

.table-shell .table thead th:last-child,
.table-shell .table tbody td:last-child {
    padding-right: 1.35rem;
}

.table-shell .table tbody tr:last-child td {
    border-bottom-color: transparent;
}

.table-shell .table-hover > tbody > tr:hover > * {
    background: rgba(248, 250, 252, 0.82);
}

.smart-table {
    border-collapse: separate;
    border-spacing: 0 0.75rem;
}

.smart-table thead th {
    border-bottom: 0;
    padding: 0.2rem 1rem 0.45rem;
}

.smart-table tbody td {
    padding: 1.05rem 1rem;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(255, 255, 255, 0.84);
}

.smart-table tbody td:first-child {
    border-left: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 18px 0 0 18px;
}

.smart-table tbody td:last-child {
    border-right: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 0 18px 18px 0;
}

.smart-table.table-hover > tbody > tr:hover > * {
    background: rgba(255, 255, 255, 0.96);
    border-color: rgba(96, 165, 250, 0.2);
}

.smart-table .table-empty-state td {
    border: 1px dashed rgba(148, 163, 184, 0.24);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.58);
    box-shadow: none;
}

.smart-table .table-empty-state td:first-child,
.smart-table .table-empty-state td:last-child {
    border-radius: 18px;
}

.assignment-table {
    min-width: 1080px;
}

.assignment-record-list {
    display: grid;
    gap: 1rem;
}

.assignment-record {
    border-radius: 24px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(248, 250, 252, 0.9));
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.assignment-record-empty {
    padding: 1.2rem 1.3rem;
}

.assignment-record-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.2rem 1.25rem 1rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.7), rgba(239, 246, 255, 0.7));
}

.assignment-record-identity {
    min-width: 0;
}

.assignment-record-title {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.2;
    color: var(--text-main);
}

.assignment-record-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem 1rem;
    margin-top: 0.55rem;
    color: var(--text-muted);
    font-size: 0.88rem;
}

.assignment-record-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.assignment-record-meta i {
    color: var(--primary);
}

.assignment-record-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.55rem;
}

.assignment-record-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 0.9rem;
    padding: 1rem 1.25rem 1.25rem;
}

.assignment-record-panel {
    grid-column: span 3;
    min-width: 0;
    padding: 1rem 1.05rem;
    border-radius: 20px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(255, 255, 255, 0.72);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.assignment-record-panel-wide {
    grid-column: span 6;
}

.assignment-record-actions {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.assignment-record-label {
    display: block;
    margin-bottom: 0.7rem;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-soft);
}

.assignment-record-panel strong,
.assignment-status-copy strong {
    display: block;
    color: var(--text-main);
    font-size: 1.02rem;
    line-height: 1.35;
}

.assignment-record-subline {
    margin-top: 0.22rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

.assignment-record-muted {
    margin-top: 0.6rem;
    color: var(--text-soft);
    font-size: 0.82rem;
    line-height: 1.5;
}

.assignment-detail-table {
    display: grid;
    gap: 0.72rem;
}

.assignment-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.85rem;
}

.assignment-detail-row span {
    color: var(--text-muted);
    font-size: 0.84rem;
    line-height: 1.45;
}

.assignment-detail-row strong {
    text-align: right;
    font-size: 0.96rem;
}

.assignment-profit-value {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    padding: 0.38rem 0.72rem;
    border-radius: 999px;
    font-size: 0.88rem;
}

.assignment-profit-value.is-positive {
    color: #065f46;
    background: rgba(16, 185, 129, 0.14);
}

.assignment-profit-value.is-negative {
    color: #991b1b;
    background: rgba(239, 68, 68, 0.14);
}

.assignment-status-copy {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.assignment-notes-copy {
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.7;
}

.assignment-record-actions .table-actions {
    margin-top: auto;
    justify-content: flex-start;
    align-items: center;
    flex-direction: row;
}

.cell-stack,
.table-duo,
.status-stack {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
}

.cell-title {
    font-size: 0.98rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--text-main);
}

.cell-meta,
.cell-subtle {
    line-height: 1.45;
}

.cell-meta {
    color: var(--text-muted);
    font-size: 0.88rem;
}

.cell-subtle {
    color: var(--text-soft);
    font-size: 0.8rem;
}

.cell-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    width: fit-content;
    margin-top: 0.7rem;
    padding: 0.48rem 0.72rem;
    border-radius: 999px;
    color: var(--primary-dark);
    font-size: 0.87rem;
    font-weight: 700;
    text-decoration: none;
    background: rgba(37, 99, 235, 0.08);
    border: 1px solid rgba(37, 99, 235, 0.12);
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.cell-link:hover {
    color: var(--primary-dark);
    text-decoration: none;
    background: rgba(37, 99, 235, 0.12);
    border-color: rgba(37, 99, 235, 0.18);
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.1);
    transform: translateY(-1px);
}

.table-duo {
    gap: 0.75rem;
}

.table-duo-item {
    display: flex;
    flex-direction: column;
    gap: 0.18rem;
}

.table-duo-label {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-soft);
}

.profit-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    padding: 0.38rem 0.7rem;
    border-radius: 999px;
    font-size: 0.86rem;
    font-weight: 800;
}

.profit-pill.is-positive {
    color: #065f46;
    background: rgba(16, 185, 129, 0.14);
}

.profit-pill.is-negative {
    color: #991b1b;
    background: rgba(239, 68, 68, 0.14);
}

.status-stack {
    align-items: flex-start;
}

.table-note {
    max-width: 17rem;
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.55;
}

.actions-cell {
    white-space: nowrap;
}

.actions-cell .table-actions {
    justify-content: flex-end;
}

.badge {
    padding: 0.5rem 0.78rem;
    border-radius: 999px;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.stacked-cell {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
}

.stacked-cell > strong {
    line-height: 1.35;
}

.stacked-cell > span {
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.45;
}

.permission-pill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.42rem;
}

.permission-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.38rem 0.68rem;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.08);
    color: var(--primary-dark);
    font-size: 0.8rem;
    font-weight: 700;
}

.permission-panel {
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 20px;
    padding: 1rem;
    background: rgba(248, 250, 252, 0.78);
    transition: opacity 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.permission-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.95rem;
}

.permission-panel-head h6 {
    margin: 0 0 0.2rem;
}

.permission-panel-head p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

.permission-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
}

.permission-option {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.9rem 0.95rem;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(255, 255, 255, 0.9);
    cursor: pointer;
}

.permission-option .form-check-input {
    margin-top: 0.15rem;
    flex-shrink: 0;
}

.permission-option strong,
.permission-option span {
    display: block;
}

.permission-option strong {
    margin-bottom: 0.2rem;
    line-height: 1.35;
}

.permission-option span {
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.5;
}

.permission-panel.is-locked {
    opacity: 0.76;
    background: rgba(241, 245, 249, 0.86);
}

.alert {
    border: 0;
    border-radius: 18px;
    box-shadow: var(--shadow-soft);
    padding: 0.95rem 1.1rem;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(148, 163, 184, 0.14);
}

.alert-success {
    background: linear-gradient(135deg, rgba(220, 252, 231, 0.9), rgba(209, 250, 229, 0.86));
    color: #166534;
}

.alert-danger {
    background: linear-gradient(135deg, rgba(254, 226, 226, 0.92), rgba(254, 242, 242, 0.9));
    color: #991b1b;
}

.alert-warning {
    background: linear-gradient(135deg, rgba(254, 249, 195, 0.95), rgba(254, 243, 199, 0.92));
    color: #92400e;
}

.alert-info {
    background: linear-gradient(135deg, rgba(219, 234, 254, 0.92), rgba(239, 246, 255, 0.9));
    color: #1d4ed8;
}

.alert-dismissible .btn-close {
    padding: 1rem 1rem;
}

.metric-card {
    position: relative;
    overflow: hidden;
    min-height: 172px;
    padding: 1.3rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(248, 250, 252, 0.95));
    border-radius: 24px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.metric-card::after {
    content: "";
    position: absolute;
    inset: auto -20% -45% auto;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.16) 0%, rgba(37, 99, 235, 0) 68%);
    pointer-events: none;
}

.metric-card-profit::after {
    background: radial-gradient(circle, rgba(14, 165, 164, 0.18) 0%, rgba(14, 165, 164, 0) 68%);
}

.metric-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.metric-label {
    display: block;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.metric-card strong {
    display: block;
    margin: 0.55rem 0 0.35rem;
    font-size: 2.1rem;
    line-height: 0.95;
    letter-spacing: -0.04em;
}

.metric-copy {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.5;
}

.metric-meta {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.metric-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(248, 250, 252, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.14);
    color: var(--text-muted);
    padding: 0.38rem 0.72rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
}

.metric-icon {
    width: 50px;
    height: 50px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 1.1rem;
    background: linear-gradient(135deg, var(--primary) 0%, #60a5fa 100%);
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.18);
}

.metric-card-profit .metric-icon {
    background: linear-gradient(135deg, var(--success) 0%, var(--accent) 100%);
    box-shadow: 0 10px 22px rgba(14, 165, 164, 0.18);
}

.dashboard-hero {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.96) 0%, rgba(15, 118, 110, 0.88) 100%);
    color: #fff;
    border-radius: 26px;
    padding: 1.5rem;
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.16);
    overflow: hidden;
    position: relative;
}

.dashboard-hero::after {
    content: "";
    position: absolute;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0) 68%);
    right: -70px;
    top: -70px;
}

.dashboard-hero h2 {
    font-size: clamp(1.7rem, 2.3vw, 2.2rem);
    line-height: 1.08;
    margin: 0.45rem 0 0.5rem;
    letter-spacing: -0.04em;
}

.dashboard-hero p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0;
    max-width: 28rem;
    line-height: 1.55;
}

.hero-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.9rem;
}

.hero-metric {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    padding: 0.95rem 1rem;
    backdrop-filter: blur(10px);
}

.hero-metric span {
    display: block;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.4rem;
}

.hero-metric strong {
    display: block;
    font-size: 1.45rem;
    letter-spacing: -0.03em;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.panel-header h5 {
    margin: 0;
    font-size: 1.2rem;
    letter-spacing: -0.02em;
}

.panel-header small {
    display: block;
    color: var(--text-muted);
    line-height: 1.5;
    margin-top: 0.3rem;
}

.ui-title-icon {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: fit-content;
    max-width: 100%;
}

.ui-title-icon i {
    color: var(--primary);
    font-size: 0.95em;
}

.ui-label-icon {
    display: inline-flex;
    align-items: center;
    gap: 0.48rem;
}

.ui-label-icon i {
    width: 1rem;
    color: var(--text-soft);
    text-align: center;
    font-size: 0.88rem;
}

.ui-inline-meta {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.ui-inline-meta i {
    color: var(--primary);
    font-size: 0.84rem;
}

.alert-inline {
    display: inline-flex;
    align-items: flex-start;
    gap: 0.7rem;
}

.alert-inline i {
    margin-top: 0.12rem;
    opacity: 0.92;
}

.account-summary-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 250, 252, 0.94));
}

.account-page {
    align-items: start;
}

.account-card {
    overflow: hidden;
}

.account-sidebar {
    display: grid;
    gap: 1.25rem;
}

.account-main-card .card-body,
.account-card .card-body {
    padding: 0;
}

.account-hero {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 1.15rem;
    align-items: center;
    padding: 1.45rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
    background:
        radial-gradient(circle at right top, rgba(14, 165, 164, 0.12), transparent 32%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(248, 250, 252, 0.92));
}

.account-hero-avatar {
    width: 96px;
    height: 96px;
    border-radius: 26px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.94), rgba(245, 158, 11, 0.98));
    color: #1e293b;
    font-size: 2rem;
    font-weight: 800;
    overflow: hidden;
    box-shadow: 0 16px 32px rgba(245, 158, 11, 0.18);
}

.account-hero-copy {
    min-width: 0;
}

.account-hero-copy h2 {
    margin: 0.35rem 0 0.4rem;
    font-size: clamp(1.7rem, 2.2vw, 2.3rem);
    letter-spacing: -0.04em;
    line-height: 1.05;
}

.account-hero-copy p {
    color: var(--text-muted);
    line-height: 1.55;
}

.account-hero-meta {
    display: grid;
    justify-items: end;
    gap: 0.55rem;
    text-align: right;
}

.account-hero-meta-note {
    color: var(--text-muted);
    font-size: 0.86rem;
    font-weight: 600;
}

.account-card-intro {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.35rem 1.45rem 1rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(248, 250, 252, 0.9));
}

.account-card-intro.compact {
    padding-bottom: 1.05rem;
}

.account-card-intro h5 {
    margin: 0.25rem 0 0.35rem;
    font-size: 1.18rem;
    letter-spacing: -0.02em;
}

.account-card-intro p {
    color: var(--text-muted);
    line-height: 1.55;
}

.account-kicker {
    display: inline-block;
    color: var(--gold);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.account-id-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.52rem 0.82rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.16);
    color: var(--text-muted);
    font-size: 0.84rem;
    font-weight: 700;
    white-space: nowrap;
}

.account-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 0.85rem;
}

.account-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.44rem 0.72rem;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-dark);
    font-size: 0.82rem;
    font-weight: 700;
    border: 1px solid rgba(37, 99, 235, 0.12);
}

.account-chip.is-muted {
    background: rgba(255, 255, 255, 0.84);
    color: var(--text-muted);
    border-color: rgba(148, 163, 184, 0.16);
}

.account-form {
    padding: 1.35rem 1.45rem 1.45rem;
}

.account-form-shell {
    display: grid;
    gap: 1rem;
}

.account-section {
    padding: 1.15rem;
    border-radius: 22px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(248, 250, 252, 0.88));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.account-section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.account-section-head h5 {
    margin: 0.2rem 0 0.3rem;
    font-size: 1.08rem;
    letter-spacing: -0.02em;
}

.account-section-head p {
    color: var(--text-muted);
    line-height: 1.55;
}

.account-photo-panel {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) minmax(250px, 320px);
    gap: 1.1rem;
    align-items: center;
    padding: 1.1rem;
    border-radius: 20px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.9), rgba(255, 255, 255, 0.94));
}

.account-photo-preview {
    width: 88px;
    height: 88px;
    border-radius: 24px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.94), rgba(245, 158, 11, 0.96));
    color: #1e293b;
    font-size: 1.85rem;
    font-weight: 800;
    overflow: hidden;
    box-shadow: 0 14px 28px rgba(245, 158, 11, 0.18);
}

.account-photo-copy strong {
    display: block;
    margin-bottom: 0.32rem;
    font-size: 1.04rem;
    color: var(--text-main);
}

.account-photo-copy p {
    color: var(--text-muted);
    line-height: 1.55;
}

.account-photo-actions {
    display: grid;
    gap: 0.75rem;
}

.account-photo-actions .form-check {
    margin: 0;
}

.account-photo-actions .form-check-label {
    color: var(--text-muted);
    font-size: 0.88rem;
}

.account-form .form-label {
    margin-bottom: 0.45rem;
    font-weight: 700;
    color: var(--text-main);
}

.account-form .form-text {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 0.45rem;
}

.account-form-actions {
    display: flex;
    justify-content: flex-end;
    padding-top: 0.1rem;
}

.account-info-tile {
    height: 100%;
    min-height: 100%;
    padding: 1rem 1.05rem;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.92), rgba(255, 255, 255, 0.92));
}

.account-info-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-soft);
    margin-bottom: 0.45rem;
}

.account-info-tile strong {
    display: block;
    font-size: 1.12rem;
    color: var(--text-main);
    margin-bottom: 0.3rem;
}

.account-info-tile p {
    color: var(--text-muted);
    line-height: 1.55;
}

.account-summary-shell {
    padding: 1.2rem 1.35rem 1.35rem;
}

.account-summary-head {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.account-avatar-lg {
    width: 4.25rem;
    height: 4.25rem;
    border-radius: 20px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.94), rgba(245, 158, 11, 0.96));
    color: #1e293b;
    font-size: 1.45rem;
    font-weight: 800;
    box-shadow: 0 14px 28px rgba(245, 158, 11, 0.18);
    overflow: hidden;
}

.account-summary-subtitle {
    color: var(--text-muted);
}

.account-meta-list {
    display: grid;
    gap: 0.8rem;
}

.account-meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 1rem;
}

.account-meta-item {
    display: grid;
    gap: 0.35rem;
    padding: 0.95rem 1rem;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(255, 255, 255, 0.8);
}

.account-meta-item span {
    color: var(--text-muted);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 700;
}

.account-meta-item strong {
    color: var(--text-main);
    font-size: 1rem;
    line-height: 1.35;
}

.account-security-form {
    display: grid;
    gap: 1rem;
}

.account-security-note {
    padding: 0.95rem 1rem;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(219, 234, 254, 0.72), rgba(240, 249, 255, 0.9));
    border: 1px solid rgba(96, 165, 250, 0.16);
    color: #1d4ed8;
    font-size: 0.9rem;
    line-height: 1.6;
}

.snapshot-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

.snapshot-item {
    border-radius: 18px;
    padding: 1rem 1.05rem;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.94), rgba(255, 255, 255, 0.9));
    border: 1px solid rgba(148, 163, 184, 0.14);
}

.snapshot-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.7rem;
}

.snapshot-top span {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.snapshot-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
}

.snapshot-item strong {
    font-size: 1.8rem;
    letter-spacing: -0.03em;
}

.quick-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.95rem 1rem;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(255, 255, 255, 0.72);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    overflow: hidden;
}

.quick-action:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-soft);
    border-color: rgba(37, 99, 235, 0.22);
}

.quick-action.primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    border-color: transparent;
}

.quick-action .qa-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: rgba(15, 23, 42, 0.06);
    flex: 0 0 auto;
}

.quick-action.primary .qa-icon {
    background: rgba(255, 255, 255, 0.14);
}

.quick-action small {
    display: block;
    color: inherit;
    opacity: 0.72;
    margin-top: 0.15rem;
}

.text-profit {
    color: var(--success);
}

.auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.auth-card {
    overflow: hidden;
}

.auth-showcase {
    height: 100%;
    padding: 2.25rem;
    background: linear-gradient(160deg, rgba(7, 25, 40, 0.96) 0%, rgba(15, 118, 110, 0.88) 100%);
    color: #fff;
}

.auth-showcase h2 {
    margin: 0.7rem 0 0.75rem;
    font-size: clamp(2rem, 2.8vw, 2.7rem);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.auth-copy {
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.75;
    margin-bottom: 1.8rem;
}

.auth-feature-list {
    display: grid;
    gap: 1rem;
}

.auth-feature {
    display: flex;
    gap: 0.95rem;
    align-items: flex-start;
    padding: 1rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-feature-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.12);
}

.auth-feature strong {
    display: block;
    margin-bottom: 0.2rem;
}

.auth-feature span {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.94rem;
    line-height: 1.6;
}

.auth-form-panel {
    padding: 2.25rem;
}

.auth-login-layout {
    min-height: calc(100vh - 8rem);
    align-items: center;
}

.auth-login-card {
    max-width: 34rem;
    margin-inline: auto;
}

.auth-login-panel {
    padding: 2.2rem;
}

.auth-login-head {
    margin-bottom: 1.6rem;
}

.auth-login-brand {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

.auth-login-icon {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: #fff;
    font-size: 1.35rem;
    box-shadow: 0 16px 30px rgba(37, 99, 235, 0.2);
}

.auth-login-brand h1 {
    margin: 0;
    font-size: clamp(1.8rem, 4vw, 2.3rem);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.auth-login-brand p {
    margin: 0.45rem 0 0;
    color: var(--text-muted);
    font-size: 1rem;
}

.auth-login-helper {
    margin-top: 1.3rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.install-hint {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.install-hint a {
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
}

.empty-state {
    padding: 1.5rem 0.75rem;
    text-align: center;
    color: var(--text-muted);
}

.timeline {
    position: relative;
    padding-left: 1.4rem;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 0.35rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(148, 163, 184, 0.28);
}

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

.timeline-item::before {
    content: "";
    position: absolute;
    left: -1.05rem;
    top: 0.25rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14);
}

.timeline-item.closed::before {
    background: #64748b;
    box-shadow: 0 0 0 4px rgba(100, 116, 139, 0.12);
}

.timeline-card {
    border-radius: 20px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    padding: 1rem 1.15rem;
    background: rgba(255, 255, 255, 0.82);
}

.modal-content {
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 20px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.96);
    overflow: hidden;
}

.modal {
    z-index: 1080;
}

.modal-backdrop {
    z-index: 1070;
}

html.sidebar-collapsed .sidebar {
    width: 102px;
    padding-inline: 1rem;
}

html.sidebar-collapsed .sidebar-brand {
    justify-content: center;
    gap: 0;
}

html.sidebar-collapsed .brand-copy,
html.sidebar-collapsed .nav-label,
html.sidebar-collapsed .user-copy,
html.sidebar-collapsed .logout-label,
html.sidebar-collapsed .sidebar-section-label {
    opacity: 0;
    transform: translateX(-8px);
    pointer-events: none;
    width: 0;
    overflow: hidden;
}

html.sidebar-collapsed .sidebar-nav .nav-link {
    justify-content: center;
    gap: 0;
    padding-inline: 0.8rem;
    min-height: 3.95rem;
}

html.sidebar-collapsed .sidebar-footer {
    padding: 0.8rem;
}

html.sidebar-collapsed .user-chip {
    justify-content: center;
    gap: 0;
}

html.sidebar-collapsed .nav-icon,
html.sidebar-collapsed .brand-mark,
html.sidebar-collapsed .user-avatar {
    margin-inline: auto;
}

html.sidebar-collapsed .sidebar-footer .btn {
    padding-inline: 0.7rem;
}

.modal-header,
.modal-footer {
    padding: 1.2rem 1.4rem;
}

.modal-body {
    padding: 1.35rem 1.4rem;
}

code {
    background: rgba(15, 23, 42, 0.06);
    color: #1e40af;
    padding: 0.2rem 0.45rem;
    border-radius: 8px;
}

@media (max-width: 1199.98px) {
    .sidebar {
        width: 282px;
    }
}

@media (max-width: 991.98px) {
    .app-shell {
        display: block;
    }

    html.sidebar-collapsed .sidebar {
        width: 100%;
        padding-inline: 1.5rem;
    }

    html.sidebar-collapsed .brand-copy,
    html.sidebar-collapsed .nav-label,
    html.sidebar-collapsed .user-copy,
    html.sidebar-collapsed .logout-label,
    html.sidebar-collapsed .sidebar-section-label {
        opacity: 1;
        transform: none;
        pointer-events: auto;
        width: auto;
        overflow: visible;
    }

    html.sidebar-collapsed .sidebar-brand,
    html.sidebar-collapsed .user-chip,
    html.sidebar-collapsed .sidebar-nav .nav-link {
        justify-content: flex-start;
    }

    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
        border-radius: 0 0 24px 24px;
        box-shadow: 0 16px 30px rgba(7, 25, 40, 0.14);
    }

    .page-header-shell {
        align-items: flex-start;
    }

    .app-topbar {
        position: relative;
        top: 0;
        flex-direction: column;
        align-items: stretch;
        border-radius: 0 0 18px 18px;
    }

    .topbar-right {
        justify-content: flex-start;
    }

    .account-hero {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .account-hero-meta {
        grid-column: 1 / -1;
        justify-items: start;
        text-align: left;
    }

    .account-photo-panel {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .account-photo-actions {
        grid-column: 1 / -1;
    }

    .account-meta-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .assignment-record-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .assignment-record-panel,
    .assignment-record-panel-wide {
        grid-column: span 1;
    }

    .permission-grid {
        grid-template-columns: 1fr;
    }

    .auth-showcase,
    .auth-form-panel,
    .auth-login-panel {
        padding: 1.75rem;
    }
}

@media (max-width: 767.98px) {
    .snapshot-grid,
    .hero-metrics {
        grid-template-columns: 1fr;
    }

    .toolbar,
    .btn-group-wrap,
    .table-actions,
    .install-hint {
        flex-direction: column;
        align-items: stretch;
    }

    .topbar-left,
    .topbar-right {
        width: 100%;
    }

    .surface-pill {
        width: 100%;
        justify-content: center;
    }

    .topbar-user,
    .topbar-logout {
        width: 100%;
        justify-content: center;
    }

    .table-responsive {
        padding-inline: 0;
    }

    .card-body,
    .filter-card .card-body {
        padding: 1.2rem;
    }

    .page-header-shell {
        flex-direction: column;
        align-items: flex-start;
        padding: 1.15rem 1.1rem;
        border-radius: 22px;
        gap: 0.9rem;
    }

    .page-header-icon {
        width: 52px;
        height: 52px;
        border-radius: 16px;
        font-size: 1.05rem;
    }

    .topbar-caption strong {
        font-size: clamp(1.15rem, 5.6vw, 1.45rem);
    }

    .topbar-caption small {
        font-size: 0.86rem;
    }

    .account-card-intro {
        flex-direction: column;
    }

    .account-id-pill {
        align-self: flex-start;
    }

    .account-hero {
        grid-template-columns: 1fr;
        justify-items: start;
    }

    .account-hero-avatar {
        width: 82px;
        height: 82px;
        border-radius: 22px;
        font-size: 1.7rem;
    }

    .account-hero-meta {
        width: 100%;
    }

    .account-photo-panel {
        grid-template-columns: 1fr;
        justify-items: start;
    }

    .account-photo-preview {
        width: 76px;
        height: 76px;
        border-radius: 20px;
        font-size: 1.55rem;
    }

    .account-photo-actions {
        width: 100%;
    }

    .assignment-record-head,
    .assignment-detail-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .assignment-record-badges {
        justify-content: flex-start;
    }

    .assignment-record-grid {
        grid-template-columns: 1fr;
    }

    .assignment-record-panel,
    .assignment-record-panel-wide {
        grid-column: span 1;
    }

    .assignment-detail-row strong {
        text-align: left;
    }

    .assignment-record-actions .table-actions {
        flex-direction: row;
        align-items: center;
    }

    .account-form,
    .account-summary-shell {
        padding: 1.15rem;
    }

    .account-section {
        padding: 1rem;
        border-radius: 20px;
    }

    .account-meta-grid {
        grid-template-columns: 1fr;
    }

    .metric-card,
    .dashboard-hero,
    .auth-showcase,
    .auth-form-panel,
    .auth-login-panel {
        padding: 1.35rem;
    }

    .page-title-wrap h1 {
        font-size: clamp(1.9rem, 8vw, 2.4rem);
    }
}
