.page-transition {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 2000;
}

.page-transition.is-active {
    opacity: 1;
    pointer-events: all;
}

.page-transition.is-success .page-transition__content {
    border-color: rgba(34, 197, 94, 0.6);
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.15);
}

.page-transition__content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(148, 163, 184, 0.3);
    color: #e2e8f0;
    font-weight: 600;
}

.login-shake {
    position: relative;
    animation: loginShake 0.35s ease;
}

.alert.is-hidden {
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.auth-shell {
    display: grid;
    gap: 2rem;
}

@media (min-width: 992px) {
    .auth-shell {
        grid-template-columns: 1.05fr 0.95fr;
        align-items: stretch;
    }
}

.auth-hero,
.auth-card {
    padding: 2rem;
}

.auth-hero {
    position: relative;
    overflow: hidden;
}

.auth-hero::after {
    content: "";
    position: absolute;
    inset: auto -20% -40% auto;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--primary-soft), transparent 60%);
    opacity: 0.2;
    pointer-events: none;
}

.auth-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(15, 118, 110, 0.2);
    color: var(--primary-soft);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.75rem;
}

.auth-hero-grid {
    display: grid;
    gap: 0.75rem;
    margin-top: 1rem;
}

.auth-feature {
    display: flex;
    gap: 0.75rem;
    padding: 0.9rem;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.25);
    border: 1px solid rgba(148, 163, 184, 0.18);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-feature i {
    color: var(--accent);
    margin-top: 0.2rem;
}

.auth-feature:hover {
    transform: translateY(-2px);
    border-color: rgba(94, 234, 212, 0.4);
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.22);
}

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

.auth-metric-value {
    font-size: 1.1rem;
    font-weight: 700;
}

.auth-metric-label {
    font-size: 0.78rem;
    color: var(--muted);
}

.auth-card {
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: "";
    position: absolute;
    inset: -60% auto auto -30%;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, var(--accent-glow), transparent 70%);
    opacity: 0.45;
    pointer-events: none;
}

.auth-card .form-control,
.auth-card .form-select {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-card .form-control:focus,
.auth-card .form-select:focus {
    border-color: var(--primary-soft);
    box-shadow: 0 0 0 0.2rem rgba(94, 234, 212, 0.15);
}

.auth-card .btn-primary {
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.auth-card .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
}

.page-action-btn,
.filter-chip {
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.page-action-btn:hover,
.filter-chip:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 22px rgba(0, 0, 0, 0.22);
}

.page-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.75rem;
    padding: 1.2rem 1.4rem;
    border-radius: 20px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.7));
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.25);
}

.page-hero__info {
    max-width: 720px;
}

.page-hero__eyebrow {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--muted);
    margin-bottom: 0.35rem;
}

.page-hero__title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.page-hero__subtitle {
    color: var(--muted);
    margin-bottom: 0;
}

.page-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

[data-bs-theme="light"] .page-hero {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(241, 245, 249, 0.96));
    border-color: rgba(15, 23, 42, 0.14);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.12);
}

[data-bs-theme="light"] .page-hero__title {
    color: #0f172a;
}

[data-bs-theme="light"] .page-hero__eyebrow,
[data-bs-theme="light"] .page-hero__subtitle {
    color: #334155;
}

[data-bs-theme="light"] .page-hero .btn-outline-light {
    color: #0f172a;
    border-color: rgba(51, 65, 85, 0.35);
    background: rgba(255, 255, 255, 0.82);
}

[data-bs-theme="light"] .page-hero .btn-outline-light:hover {
    color: #0f172a;
    border-color: rgba(15, 23, 42, 0.45);
    background: rgba(255, 255, 255, 1);
}

.page-section {
    border-radius: 18px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
    padding: 1.5rem;
}

.page-section + .page-section {
    margin-top: 1.5rem;
}

.section-title {
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.section-subtitle {
    color: var(--muted);
    font-size: 0.9rem;
}

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

.premium-toolbar__meta {
    font-size: 0.85rem;
    color: var(--muted);
}

.premium-toolbar__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.table-premium thead th {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--muted);
}

.table-premium tbody tr {
    transition: background 0.2s ease, transform 0.2s ease;
}

.table-premium tbody tr:hover {
    background: rgba(148, 163, 184, 0.08);
    transform: translateX(2px);
}

.empty-state {
    border-radius: 16px;
    border: 1px dashed var(--border);
    background: rgba(15, 23, 42, 0.35);
    padding: 1.25rem;
    text-align: center;
}

.empty-state__icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    margin: 0 auto 0.75rem;
    background: rgba(94, 234, 212, 0.12);
    color: var(--primary-soft);
    font-size: 1.2rem;
}

.empty-state__title {
    font-weight: 600;
}

.empty-state__cta {
    margin-top: 0.75rem;
}

.fade-in {
    animation: fadeInUp 0.35s ease;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
    .page-hero {
        padding: 1rem;
    }
    .page-hero__title {
        font-size: 1.2rem;
    }
}

@media (max-width: 991.98px) {
    .main-shell > .container {
        max-width: 100%;
        padding-inline: 0.75rem;
    }

    .main-shell .glass-card,
    .main-shell .page-section,
    .main-shell .page-hero {
        max-width: 100%;
    }

    .main-shell .table-responsive {
        width: 100%;
        max-width: 100%;
    }

    .page-hero {
        margin-bottom: 1.25rem;
        border-radius: 16px;
        gap: 0.8rem;
    }

    .page-hero__title {
        font-size: 1.24rem;
        line-height: 1.25;
    }

    .page-hero__subtitle {
        font-size: 0.92rem;
        line-height: 1.42;
    }

    .page-hero__actions {
        width: 100%;
    }

    .page-hero__actions .btn,
    .page-hero__actions .page-action-btn {
        min-height: 44px;
        padding-inline: 0.85rem;
        font-size: 0.92rem;
    }
}

@media (max-width: 575.98px) {
    .main-shell > .container {
        padding-inline: 0.6rem;
    }

    .page-hero {
        padding: 0.9rem;
    }

    .page-hero__title {
        font-size: 1.12rem;
    }

    .page-hero__subtitle {
        font-size: 0.88rem;
    }

    .page-hero__actions .btn,
    .page-hero__actions .page-action-btn {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .fade-in,
    .auth-feature,
    .auth-card .btn-primary,
    .page-action-btn,
    .filter-chip,
    .table-premium tbody tr {
        animation: none;
        transition: none;
    }
}

@keyframes loginShake {
    0% { left: 0; }
    20% { left: -8px; }
    40% { left: 8px; }
    60% { left: -6px; }
    80% { left: 6px; }
    100% { left: 0; }
}

.toast-container {
    z-index: 1090;
}

.itr-toast {
    border-radius: 14px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(6px);
}

.itr-toast .toast-body {
    font-weight: 600;
}
