@import "bootstrap/dist/css/bootstrap.min.css";

/* ==========================================================================
   Manpower ERP — application shell
   Bootstrap 5.3 + brand CSS variables. Light/dark via data-bs-theme.
   ========================================================================== */

:root {
    --brand-primary: #0d6efd;
    --brand-secondary: #6c757d;
    --bs-link-color: var(--brand-primary);
    --bs-link-hover-color: color-mix(in srgb, var(--brand-primary) 80%, #000);
    --app-sidebar-width: 276px;
    --app-sidebar-collapsed: 82px;
    --app-header-height: 64px;
    --app-radius: 10px;
    --app-radius-sm: 8px;
    --app-border: var(--bs-border-color);
    --app-surface: var(--bs-body-bg);
    --app-muted-surface: rgba(var(--bs-body-color-rgb), 0.035);
    --app-sidebar-bg: #0f172a;
    --app-sidebar-bg-soft: #16213a;
    --app-sidebar-text: #cbd5e1;
    --app-sidebar-muted: #8fa1bd;
    --app-sidebar-active: #ffffff;
    --app-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
    --app-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    --app-transition: 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

[data-bs-theme="dark"] {
    --app-sidebar-bg: #080d18;
    --app-sidebar-bg-soft: #111a2c;
    --app-sidebar-text: #b9c6d8;
    --app-sidebar-muted: #7f90aa;
    --app-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
    --app-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

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

body {
    font-family: "Noto Sans", "Noto Sans Bengali", system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 0.925rem;
    line-height: 1.55;
    background: var(--bs-body-bg);
    color: var(--bs-body-color);
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
}

::selection {
    background: rgba(var(--bs-primary-rgb), 0.22);
}

.skip-link {
    position: fixed;
    top: -100px;
    left: 1rem;
    z-index: 2000;
    padding: 0.6rem 0.9rem;
    border-radius: var(--app-radius-sm);
    background: var(--brand-primary);
    color: #fff;
    transition: top 150ms ease;
}

.skip-link:focus {
    top: 1rem;
    color: #fff;
}

/* --------------------------------------------------------------------------
   Shell
   -------------------------------------------------------------------------- */

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

.app-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1 1 auto;
    min-height: 100vh;
}

.app-content {
    flex: 1 1 auto;
    width: 100%;
    padding: 1.35rem 1.5rem 2rem;
}

.app-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    justify-content: space-between;
    padding: 0.85rem 1.5rem;
    border-top: 1px solid var(--app-border);
    color: var(--bs-secondary-color);
    font-size: 0.78rem;
}

/* --------------------------------------------------------------------------
   Sidebar
   -------------------------------------------------------------------------- */

.app-sidebar {
    position: sticky;
    top: 0;
    z-index: 1040;
    display: flex;
    flex-direction: column;
    flex: 0 0 var(--app-sidebar-width);
    width: var(--app-sidebar-width);
    height: 100vh;
    color: var(--app-sidebar-text);
    background:
        radial-gradient(1100px 380px at -10% -10%, rgba(59, 130, 246, 0.18), transparent 60%),
        var(--app-sidebar-bg);
    border-right: 1px solid rgba(148, 163, 184, 0.12);
    transition: width var(--app-transition), flex-basis var(--app-transition), transform var(--app-transition);
    overflow: visible;
}

.app-sidebar__brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    min-height: var(--app-header-height);
    padding: 0.75rem 1.1rem;
    color: #fff;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    white-space: nowrap;
    overflow: hidden;
}

.app-sidebar__brand:hover,
.app-sidebar__brand:focus {
    color: #fff;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
    color: #fff;
    font-weight: 700;
    font-size: 0.82rem;
    letter-spacing: 0.02em;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(13, 110, 253, 0.28);
}

.brand-mark img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #fff;
}

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

.brand-text strong {
    font-size: 0.86rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    overflow: hidden;
    text-overflow: ellipsis;
}

.brand-text small {
    color: var(--app-sidebar-muted);
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.app-sidebar__nav {
    flex: 1 1 auto;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 0.8rem 0.7rem 1rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.3) transparent;
}

.app-sidebar__nav::-webkit-scrollbar {
    width: 6px;
}

.app-sidebar__nav::-webkit-scrollbar-thumb {
    border-radius: 99px;
    background: rgba(148, 163, 184, 0.28);
}

.app-sidebar__footer {
    flex: 0 0 auto;
    padding: 0.8rem 1rem;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    color: var(--app-sidebar-muted);
    font-size: 0.7rem;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar-group + .sidebar-group {
    margin-top: 0.12rem;
}

.sidebar-group__toggle {
    display: flex;
    align-items: center;
    gap: 0.72rem;
    width: 100%;
    min-height: 40px;
    padding: 0.48rem 0.62rem;
    border: 0;
    border-radius: var(--app-radius-sm);
    background: transparent;
    color: var(--app-sidebar-text);
    font-size: 0.82rem;
    font-weight: 600;
    text-align: left;
    transition: background-color 150ms ease, color 150ms ease;
}

.sidebar-group__toggle:hover,
.sidebar-group__toggle:focus-visible {
    background: rgba(148, 163, 184, 0.1);
    color: var(--app-sidebar-active);
    outline: none;
}

.sidebar-group.is-active > .sidebar-group__toggle {
    color: var(--app-sidebar-active);
    background: rgba(148, 163, 184, 0.09);
}

.sidebar-group__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    color: var(--app-sidebar-muted);
    transition: color 150ms ease;
}

.sidebar-group.is-active > .sidebar-group__toggle .sidebar-group__icon,
.sidebar-group__toggle:hover .sidebar-group__icon {
    color: var(--brand-primary);
}

[data-bs-theme="dark"] .sidebar-group.is-active > .sidebar-group__toggle .sidebar-group__icon,
[data-bs-theme="dark"] .sidebar-group__toggle:hover .sidebar-group__icon {
    color: #7db4ff;
}

.sidebar-group__label {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    opacity: 1;
    transition: opacity 120ms ease;
}

.sidebar-group__chevron {
    display: inline-flex;
    flex: 0 0 auto;
    color: var(--app-sidebar-muted);
    transition: transform var(--app-transition), opacity 120ms ease;
}

.sidebar-group.is-open > .sidebar-group__toggle .sidebar-group__chevron {
    transform: rotate(180deg);
}

.sidebar-submenu {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows var(--app-transition);
}

.sidebar-group.is-open > .sidebar-submenu {
    grid-template-rows: 1fr;
}

.sidebar-submenu__inner {
    overflow: hidden;
    min-height: 0;
    padding: 0.15rem 0 0.3rem;
}

.sidebar-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 34px;
    margin: 0.06rem 0;
    padding: 0.38rem 0.62rem 0.38rem 2.35rem;
    border-radius: var(--app-radius-sm);
    color: var(--app-sidebar-muted);
    font-size: 0.79rem;
    line-height: 1.35;
    transition: color 150ms ease, background-color 150ms ease;
}

.sidebar-link:hover,
.sidebar-link:focus-visible {
    color: var(--app-sidebar-active);
    background: rgba(148, 163, 184, 0.08);
    outline: none;
}

.sidebar-link.is-active {
    color: #fff;
    background: linear-gradient(90deg, rgba(13, 110, 253, 0.24), rgba(13, 110, 253, 0.08));
    box-shadow: inset 2px 0 0 var(--brand-primary);
}

[data-bs-theme="light"] .sidebar-link.is-active {
    color: #fff;
}

.sidebar-link__dot {
    position: absolute;
    left: 1.22rem;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.55;
}

.sidebar-link.is-active .sidebar-link__dot {
    opacity: 1;
    background: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.18);
}

.sidebar-link__label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-link.is-active .sidebar-link__label {
    font-weight: 600;
}

/* Collapsed desktop rail */
.app-shell.is-collapsed .app-sidebar {
    flex-basis: var(--app-sidebar-collapsed);
    width: var(--app-sidebar-collapsed);
}

.app-shell.is-collapsed .brand-text,
.app-shell.is-collapsed .sidebar-group__label,
.app-shell.is-collapsed .sidebar-group__chevron,
.app-shell.is-collapsed .sidebar-submenu,
.app-shell.is-collapsed .app-sidebar__footer {
    display: none;
}

.app-shell.is-collapsed .app-sidebar__brand {
    justify-content: center;
    padding-inline: 0.5rem;
}

.app-shell.is-collapsed .app-sidebar__nav {
    padding-inline: 0.55rem;
}

.app-shell.is-collapsed .sidebar-group__toggle {
    justify-content: center;
    padding-inline: 0.4rem;
}

.app-shell.is-collapsed .sidebar-group__icon {
    flex-basis: 24px;
    width: 24px;
    height: 24px;
}

.app-shell.is-collapsed .sidebar-group.is-active > .sidebar-group__toggle {
    background: rgba(13, 110, 253, 0.2);
    box-shadow: inset 3px 0 0 var(--brand-primary);
}

.sidebar-tooltip {
    position: fixed;
    z-index: 1080;
    max-width: 240px;
    padding: 0.38rem 0.6rem;
    border-radius: 7px;
    background: #0b1220;
    color: #fff;
    font-size: 0.76rem;
    line-height: 1.25;
    box-shadow: var(--app-shadow);
    pointer-events: none;
    opacity: 0;
    transform: translateY(-50%) translateX(-4px);
    transition: opacity 120ms ease, transform 120ms ease;
}

.sidebar-tooltip.is-visible {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

body.sidebar-open {
    overflow: hidden;
}

.sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1035;
    background: rgba(2, 6, 23, 0.55);
    backdrop-filter: blur(2px);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--app-transition);
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.app-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: var(--app-header-height);
    padding: 0.55rem 1.5rem;
    border-bottom: 1px solid var(--app-border);
    background: var(--bs-body-bg);
    background: color-mix(in srgb, var(--bs-body-bg) 88%, transparent);
    backdrop-filter: saturate(160%) blur(12px);
}

.app-header__start,
.app-header__end {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
}

.app-header__start {
    flex: 1 1 auto;
}

.app-header__brand {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
    margin-right: 0.25rem;
    color: var(--bs-body-color);
}

.app-header__brand .brand-mark {
    flex-basis: 30px;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    font-size: 0.68rem;
    box-shadow: none;
}

.app-header__brand span {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.85rem;
    font-weight: 700;
}

.header-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: var(--bs-secondary-color);
    transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}

.header-icon-btn:hover,
.header-icon-btn:focus-visible {
    background: var(--bs-tertiary-bg);
    color: var(--bs-body-color);
    border-color: var(--app-border);
    outline: none;
}

.header-icon-btn[aria-expanded="true"] {
    background: var(--bs-tertiary-bg);
    color: var(--bs-body-color);
}

.app-header .dropdown-menu {
    margin-top: 0.45rem;
    border-color: var(--app-border);
    border-radius: 12px;
    box-shadow: var(--app-shadow);
}

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

.app-breadcrumb .breadcrumb {
    --bs-breadcrumb-divider: "›";
    margin-bottom: 0;
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    color: var(--bs-secondary-color);
    opacity: 0.6;
}

.app-breadcrumb a {
    color: var(--bs-secondary-color);
}

.app-breadcrumb a:hover {
    color: var(--brand-primary);
}

.app-breadcrumb .active {
    color: var(--bs-body-color);
    font-weight: 600;
}

.theme-icon-dark {
    display: none;
}

[data-bs-theme="dark"] .theme-icon-light {
    display: none;
}

[data-bs-theme="dark"] .theme-icon-dark {
    display: inline-flex;
}

.header-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.user-menu-button {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.25rem 0.45rem 0.25rem 0.25rem;
    border: 1px solid transparent;
    border-radius: 11px;
    background: transparent;
    color: var(--bs-body-color);
}

.user-menu-button:hover,
.user-menu-button:focus-visible,
.user-menu-button[aria-expanded="true"] {
    background: var(--bs-tertiary-bg);
    border-color: var(--app-border);
    outline: none;
}

.user-menu-button .user-name {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.1;
    text-align: left;
}

.user-menu-button .user-role {
    display: block;
    color: var(--bs-secondary-color);
    font-size: 0.68rem;
    font-weight: 400;
}

.user-menu-header {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--app-border);
}

.notification-menu {
    width: min(360px, calc(100vw - 2rem));
    padding: 0;
}

.notification-menu__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.8rem 1rem;
    border-bottom: 1px solid var(--app-border);
}

.notification-menu__list {
    max-height: 340px;
    overflow-y: auto;
}

.notification-item {
    display: flex;
    gap: 0.7rem;
    padding: 0.75rem 1rem;
    color: var(--bs-body-color);
    border-bottom: 1px solid var(--app-border);
}

.notification-item:last-child {
    border-bottom: 0;
}

.notification-item:hover,
.notification-item:focus {
    background: var(--bs-tertiary-bg);
    color: var(--bs-body-color);
}

.notification-item__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: rgba(var(--bs-primary-rgb), 0.1);
    color: var(--brand-primary);
}

.notification-item__text {
    font-size: 0.79rem;
    line-height: 1.35;
}

.notification-item__meta {
    display: block;
    margin-top: 0.15rem;
    color: var(--bs-secondary-color);
    font-size: 0.68rem;
}

.notification-empty {
    padding: 1.6rem 1rem;
    color: var(--bs-secondary-color);
    text-align: center;
    font-size: 0.82rem;
}

.notification-empty svg {
    display: block;
    margin: 0 auto 0.5rem;
    color: var(--bs-success);
}

.notification-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 8px;
    height: 8px;
    border: 2px solid var(--bs-body-bg);
    border-radius: 50%;
    background: var(--bs-danger);
}

/* --------------------------------------------------------------------------
   Page primitives
   -------------------------------------------------------------------------- */

.page-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    margin-bottom: 1.15rem;
}

.page-head h1 {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.015em;
}

.page-head .page-subtitle {
    margin: 0.2rem 0 0;
    color: var(--bs-secondary-color);
    font-size: 0.8rem;
}

.card {
    border-color: var(--app-border);
    border-radius: var(--app-radius);
    box-shadow: var(--app-shadow-sm);
}

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

.stat-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border-radius: 11px;
    background: rgba(var(--bs-primary-rgb), 0.09);
    color: var(--brand-primary);
}

.card-header {
    background: transparent;
    border-bottom-color: var(--app-border);
    font-weight: 600;
}

.table {
    --bs-table-bg: transparent;
}

.table > :not(caption) > * > * {
    padding: 0.62rem 0.7rem;
}

.table thead th {
    color: var(--bs-secondary-color);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
}

.btn {
    border-radius: var(--app-radius-sm);
    font-weight: 500;
}

.form-control,
.form-select {
    border-radius: var(--app-radius-sm);
}

.btn-primary {
    --bs-btn-bg: var(--brand-primary);
    --bs-btn-border-color: var(--brand-primary);
    --bs-btn-hover-bg: color-mix(in srgb, var(--brand-primary) 86%, #000);
    --bs-btn-hover-border-color: color-mix(in srgb, var(--brand-primary) 86%, #000);
    --bs-btn-active-bg: color-mix(in srgb, var(--brand-primary) 78%, #000);
    --bs-btn-active-border-color: color-mix(in srgb, var(--brand-primary) 78%, #000);
}

.btn-outline-primary {
    --bs-btn-color: var(--brand-primary);
    --bs-btn-border-color: var(--brand-primary);
    --bs-btn-hover-bg: var(--brand-primary);
    --bs-btn-hover-border-color: var(--brand-primary);
    --bs-btn-active-bg: var(--brand-primary);
    --bs-btn-active-border-color: var(--brand-primary);
}

.alert {
    border-radius: var(--app-radius-sm);
}

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

.dropdown-item {
    border-radius: 7px;
    padding: 0.42rem 0.7rem;
    font-size: 0.82rem;
}

.dropdown-item:active {
    background: var(--brand-primary);
}

/* --------------------------------------------------------------------------
   Module development-status page
   -------------------------------------------------------------------------- */

.module-status {
    max-width: 920px;
    margin: 0 auto;
}

.module-status__hero {
    position: relative;
    overflow: hidden;
    padding: 1.6rem;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    background:
        radial-gradient(700px 240px at 100% 0%, rgba(var(--bs-primary-rgb), 0.12), transparent 60%),
        var(--bs-body-bg);
    box-shadow: var(--app-shadow-sm);
}

.module-status__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--bs-secondary-color);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.module-status__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin-bottom: 1rem;
    border-radius: 16px;
    background: rgba(var(--bs-primary-rgb), 0.1);
    color: var(--brand-primary);
}

.module-status h1 {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.module-status__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.6rem;
    border: 1px solid rgba(var(--bs-warning-rgb), 0.35);
    border-radius: 99px;
    background: rgba(var(--bs-warning-rgb), 0.12);
    color: var(--bs-warning-text-emphasis);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.module-status__planned {
    display: grid;
    gap: 0.55rem;
    padding: 0;
    margin: 0;
    list-style: none;
}

.module-status__planned li {
    display: flex;
    gap: 0.55rem;
    align-items: flex-start;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-sm);
    background: var(--bs-body-bg);
    font-size: 0.84rem;
}

.module-status__planned svg {
    flex: 0 0 auto;
    margin-top: 0.12rem;
    color: var(--bs-secondary-color);
}

/* --------------------------------------------------------------------------
   Authentication
   -------------------------------------------------------------------------- */

.auth-body {
    min-height: 100vh;
    background:
        radial-gradient(900px 500px at 10% 10%, rgba(13, 110, 253, 0.13), transparent 60%),
        radial-gradient(800px 500px at 90% 90%, rgba(108, 117, 125, 0.12), transparent 60%),
        var(--bs-body-bg);
}

.auth-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    min-height: 100vh;
}

.auth-brand {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 3rem clamp(2rem, 5vw, 5rem);
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(700px 420px at 20% 15%, rgba(255, 255, 255, 0.18), transparent 60%),
        linear-gradient(145deg, var(--brand-primary), color-mix(in srgb, var(--brand-secondary) 70%, #0b1220));
}

.auth-brand::after {
    content: "";
    position: absolute;
    inset: auto -18% -35% 22%;
    height: 60%;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 50%;
    transform: rotate(-12deg);
    pointer-events: none;
}

.auth-brand__top,
.auth-brand__bottom {
    position: relative;
    z-index: 1;
}

.auth-brand__logo {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    color: #fff;
}

.auth-brand__logo .brand-mark {
    flex-basis: 48px;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.16);
    box-shadow: none;
    backdrop-filter: blur(8px);
}

.auth-brand h1 {
    max-width: 640px;
    margin: 2.4rem 0 0.9rem;
    font-size: clamp(1.8rem, 3.4vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 1.08;
}

.auth-brand p {
    max-width: 560px;
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.95rem;
}

.auth-brand__points {
    display: grid;
    gap: 0.7rem;
    max-width: 520px;
    margin-top: 2.2rem;
    padding: 0;
    list-style: none;
}

.auth-brand__points li {
    display: flex;
    gap: 0.6rem;
    align-items: flex-start;
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.86rem;
}

.auth-brand__points svg {
    flex: 0 0 auto;
    margin-top: 0.14rem;
    color: #d7e9ff;
}

.auth-brand__bottom {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    justify-content: space-between;
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.72rem;
}

.auth-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1.2rem, 4vw, 3rem);
}

.auth-card {
    width: 100%;
    max-width: 430px;
}

.auth-card__head {
    margin-bottom: 1.5rem;
}

.auth-card__head h2 {
    margin: 0 0 0.35rem;
    font-size: 1.55rem;
    font-weight: 700;
    letter-spacing: -0.025em;
}

.auth-card__head p {
    margin: 0;
    color: var(--bs-secondary-color);
    font-size: 0.85rem;
}

.auth-card .form-label {
    font-size: 0.8rem;
    font-weight: 600;
}

.auth-card .form-control {
    min-height: 46px;
}

.auth-card .input-group .form-control {
    border-right: 0;
}

.auth-card .input-group .btn {
    border: 1px solid var(--bs-border-color);
    border-left: 0;
    background: var(--bs-body-bg);
    color: var(--bs-secondary-color);
}

.auth-card .input-group .btn:hover,
.auth-card .input-group .btn:focus {
    color: var(--bs-body-color);
    background: var(--bs-tertiary-bg);
}

.auth-card .btn-primary {
    min-height: 46px;
    font-weight: 600;
}

.auth-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1rem;
    margin: 0.9rem 0 1.2rem;
    font-size: 0.82rem;
}

.auth-footer {
    margin-top: 1.6rem;
    color: var(--bs-secondary-color);
    font-size: 0.75rem;
    text-align: center;
}

.auth-theme-toggle {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 10;
    background: var(--bs-body-bg);
    border: 1px solid var(--app-border);
    box-shadow: var(--app-shadow-sm);
}

.auth-icon-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin-bottom: 1rem;
    border-radius: 15px;
    background: rgba(var(--bs-primary-rgb), 0.1);
    color: var(--brand-primary);
}

.auth-help {
    color: var(--bs-secondary-color);
    font-size: 0.76rem;
}

.auth-success-list {
    display: grid;
    gap: 0.6rem;
    margin: 1rem 0 0;
    padding: 0;
    list-style: none;
}

.auth-success-list li {
    display: flex;
    gap: 0.55rem;
    align-items: flex-start;
    font-size: 0.84rem;
}

.auth-success-list svg {
    flex: 0 0 auto;
    margin-top: 0.1rem;
    color: var(--bs-success);
}

/* --------------------------------------------------------------------------
   Misc
   -------------------------------------------------------------------------- */

.workflow-timeline .workflow-step {
    border-left: 3px solid var(--bs-border-color);
    padding: 0.25rem 0 0.75rem 0.75rem;
    margin-left: 0.4rem;
}

.workflow-timeline .workflow-step.done {
    border-left-color: var(--brand-primary);
}

.workflow-timeline .workflow-step.pending {
    opacity: 0.65;
}

.workflow-progress {
    display: flex;
    gap: 3px;
    min-width: 150px;
}

.workflow-progress span {
    height: 5px;
    flex: 1 1 0;
    border-radius: 99px;
    background: var(--bs-tertiary-bg);
}

.workflow-progress span.is-done {
    background: var(--brand-primary);
}

.workflow-progress span.is-current {
    background: color-mix(in srgb, var(--brand-primary) 55%, #fff);
    box-shadow: 0 0 0 2px rgba(var(--bs-primary-rgb), 0.15);
}

.table-responsive {
    overflow-x: auto;
}

[data-bs-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) > * {
    --bs-table-bg-type: rgba(255, 255, 255, 0.025);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1199.98px) {
    .app-content {
        padding: 1.1rem 1.1rem 1.7rem;
    }

    .app-header {
        padding-inline: 1.1rem;
    }
}

@media (max-width: 991.98px) {
    .app-sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        flex-basis: 288px;
        width: 288px;
        height: 100dvh;
        transform: translateX(-102%);
        box-shadow: 0 0 60px rgba(2, 6, 23, 0.45);
        z-index: 1060;
    }

    .app-shell.is-mobile-open .app-sidebar {
        transform: translateX(0);
    }

    .app-shell.is-mobile-open .sidebar-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    /* Collapsed rail is a desktop-only state. */
    .app-shell.is-collapsed .app-sidebar {
        flex-basis: 288px;
        width: 288px;
    }

    .app-shell.is-collapsed .brand-text {
        display: flex;
    }

    .app-shell.is-collapsed .sidebar-group__label {
        display: inline;
    }

    .app-shell.is-collapsed .sidebar-group__chevron {
        display: inline-flex;
    }

    .app-shell.is-collapsed .app-sidebar__footer {
        display: block;
    }

    .app-shell.is-collapsed .sidebar-submenu {
        display: grid;
    }

    .app-shell.is-collapsed .app-sidebar__brand {
        justify-content: flex-start;
        padding-inline: 1.1rem;
    }

    .app-shell.is-collapsed .app-sidebar__nav {
        padding-inline: 0.7rem;
    }

    .app-shell.is-collapsed .sidebar-group__toggle {
        justify-content: flex-start;
        padding-inline: 0.62rem;
    }

    .app-header {
        padding-inline: 0.85rem;
    }

    .app-header__brand span {
        max-width: 160px;
    }

    .app-content {
        padding: 1rem 0.85rem 1.6rem;
    }

    .app-footer {
        padding-inline: 0.85rem;
    }

    .auth-shell {
        grid-template-columns: 1fr;
    }

    .auth-brand {
        padding: 1.6rem 1.35rem 2rem;
        min-height: auto;
    }

    .auth-brand h1 {
        margin-top: 1.4rem;
        font-size: clamp(1.5rem, 6vw, 2rem);
    }

    .auth-brand__points,
    .auth-brand__bottom {
        display: none;
    }

    .auth-panel {
        padding: 1.4rem 1rem 2.4rem;
        align-items: flex-start;
    }
}

@media (max-width: 575.98px) {
    .app-header__brand span {
        display: none;
    }

    .app-breadcrumb {
        display: none;
    }

    .user-menu-button .user-name {
        display: none;
    }

    .page-head h1 {
        font-size: 1.2rem;
    }

    .module-status__hero {
        padding: 1.15rem;
    }
}

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