@font-face {
    font-display: swap;
    font-family: "Manrope";
    font-style: normal;
    font-weight: 200 800;
    src: url("../fonts/manrope-81401990.woff2") format("woff2");
}

:root {
    --brand: #8a50c3;
    --brand-dark: #5d2a91;
    --brand-deep: #32154e;
    --brand-soft: #f2eafa;
    --ink: #211b29;
    --muted: #756e7c;
    --line: #e9e4ed;
    --canvas: #f7f5f8;
    --white: #ffffff;
    --green: #2f9567;
    --green-soft: #e8f6ef;
    --amber: #d78c30;
    --amber-soft: #fff3df;
    --red: #c94a58;
    --red-soft: #fcebed;
    --shadow: 0 18px 48px rgba(43, 26, 55, .09);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--canvas); }
body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    font-family: "Manrope", "Avenir Next", Avenir, "Segoe UI", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible,
a:focus-visible {
    outline: 3px solid rgba(138, 80, 195, .46);
    outline-offset: 3px;
}

.auth-body {
    background: var(--canvas);
    display: grid;
    min-height: 100vh;
    padding: 22px;
    place-items: center;
}

.auth-shell {
    background: var(--white);
    border: 1px solid rgba(111, 78, 137, .12);
    border-radius: 24px;
    box-shadow: 0 28px 90px rgba(48, 23, 67, .15);
    display: grid;
    grid-template-columns: minmax(400px, .92fr) minmax(460px, 1.08fr);
    min-height: min(760px, calc(100vh - 44px));
    max-width: 1180px;
    overflow: hidden;
    width: 100%;
}

.auth-brand-panel {
    background:
        radial-gradient(circle at 85% 15%, rgba(255,255,255,.12), transparent 24%),
        radial-gradient(circle at 15% 86%, rgba(255,255,255,.08), transparent 25%),
        linear-gradient(145deg, #8a50c3 0%, #66339a 46%, #32154e 100%);
    color: var(--white);
    display: flex;
    flex-direction: column;
    padding: 46px 50px;
    position: relative;
}

.auth-brand-panel::after {
    border: 1px solid rgba(255,255,255,.11);
    border-radius: 50%;
    content: "";
    height: 320px;
    position: absolute;
    right: -180px;
    top: 120px;
    width: 320px;
}

.brand-lockup {
    align-items: center;
    color: var(--ink);
    display: flex;
    gap: 12px;
    position: relative;
    z-index: 1;
}
.brand-lockup-light { color: var(--white); }
.brand-logo-image {
    display: block;
    height: auto;
    object-fit: contain;
    width: 185px;
}
.brand-drop {
    align-items: center;
    background: var(--brand);
    border-radius: 15px 15px 15px 5px;
    color: var(--white);
    display: flex;
    font-size: 19px;
    font-weight: 800;
    height: 46px;
    justify-content: center;
    width: 46px;
}
.brand-lockup-light .brand-drop {
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.2);
}
.brand-lockup strong,
.brand-lockup small { display: block; }
.brand-lockup strong { font-size: 17px; letter-spacing: .16em; }
.brand-lockup small { font-size: 7px; font-weight: 700; letter-spacing: .25em; margin-top: 6px; opacity: .6; }

.auth-message { margin: auto 0 44px; max-width: 430px; position: relative; z-index: 1; }
.auth-kicker {
    color: rgba(255,255,255,.62);
    display: block;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .17em;
}
.auth-kicker.dark { color: var(--brand); }
.auth-message h1 {
    font-size: clamp(34px, 4vw, 50px);
    letter-spacing: -.045em;
    line-height: 1.08;
    margin: 18px 0;
}
.auth-message p {
    color: rgba(255,255,255,.68);
    font-size: 14px;
    line-height: 1.7;
    margin: 0;
}
.auth-feature-list { display: grid; gap: 12px; position: relative; z-index: 1; }
.auth-feature-list > div {
    align-items: center;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.11);
    border-radius: 13px;
    display: flex;
    gap: 13px;
    padding: 12px 14px;
}
.auth-feature-list i {
    align-items: center;
    background: rgba(255,255,255,.12);
    border-radius: 8px;
    display: flex;
    font-size: 9px;
    font-style: normal;
    font-weight: 800;
    height: 31px;
    justify-content: center;
    width: 31px;
}
.auth-feature-list strong, .auth-feature-list small { display: block; }
.auth-feature-list strong { font-size: 11px; }
.auth-feature-list small { color: rgba(255,255,255,.55); font-size: 9px; margin-top: 3px; }
.auth-copyright { color: rgba(255,255,255,.35); font-size: 9px; margin: 30px 0 0; position: relative; z-index: 1; }

.auth-form-panel { display: grid; padding: 50px; place-items: center; }
.auth-form-wrap { max-width: 410px; width: 100%; }
.mobile-brand { display: none; }
.auth-form-head { margin-bottom: 30px; }
.auth-form-head h2 { font-size: 34px; letter-spacing: -.04em; margin: 9px 0 8px; }
.auth-form-head p { color: var(--muted); font-size: 12px; margin: 0; }
.auth-form { display: grid; gap: 18px; }
.form-field { display: grid; gap: 8px; }
.form-field > span { color: #554d5b; font-size: 10px; font-weight: 750; }
.form-field input,
.form-field select {
    background: #fbfafc;
    border: 1px solid #ded8e2;
    border-radius: 11px;
    color: var(--ink);
    font-size: 12px;
    height: 48px;
    outline: none;
    padding: 0 14px;
    transition: 150ms ease;
    width: 100%;
}
.form-field input:focus,
.form-field select:focus {
    background: var(--white);
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(138, 80, 195, .1);
}
.input-wrap { position: relative; }
.input-wrap input { padding-left: 43px; padding-right: 58px; }
.input-icon {
    color: var(--brand);
    font-size: 12px;
    font-style: normal;
    font-weight: 800;
    left: 16px;
    position: absolute;
    top: 16px;
}
.password-toggle {
    background: transparent;
    border: 0;
    color: var(--brand);
    cursor: pointer;
    font-size: 9px;
    font-weight: 800;
    position: absolute;
    right: 12px;
    top: 18px;
}
.remember-row {
    align-items: center;
    color: var(--muted);
    display: flex;
    font-size: 10px;
    gap: 8px;
}
.remember-row input { accent-color: var(--brand); height: 15px; width: 15px; }
.auth-submit {
    align-items: center;
    background: linear-gradient(115deg, var(--brand-dark), var(--brand));
    border: 0;
    border-radius: 11px;
    box-shadow: 0 12px 26px rgba(104, 49, 152, .22);
    color: var(--white);
    cursor: pointer;
    display: flex;
    font-size: 11px;
    font-weight: 800;
    height: 49px;
    justify-content: space-between;
    padding: 0 17px;
}
.auth-submit.compact { margin-top: 5px; width: 100%; }
.auth-recovery-trigger {
    background: transparent;
    border: 0;
    color: var(--brand-dark);
    cursor: pointer;
    display: block;
    font-size: 10px;
    font-weight: 800;
    margin: 16px auto 0;
    padding: 4px;
}
.auth-recovery-trigger:hover { color: var(--brand); }
.recovery-head { margin-bottom: 22px; }
.auth-back-button {
    background: transparent;
    border: 0;
    color: var(--brand-dark);
    cursor: pointer;
    font-size: 9px;
    font-weight: 800;
    margin: 0 0 22px;
    padding: 0;
}
.recovery-form { gap: 14px; }
.recovery-security-copy {
    color: var(--muted);
    font-size: 9px;
    line-height: 1.5;
    margin: 14px 0 0;
    text-align: center;
}
.security-note {
    align-items: flex-start;
    border-top: 1px solid var(--line);
    display: flex;
    gap: 10px;
    margin-top: 28px;
    padding-top: 20px;
}
.security-shield {
    align-items: center;
    background: var(--green-soft);
    border-radius: 8px;
    color: var(--green);
    display: flex;
    flex: 0 0 auto;
    font-size: 10px;
    font-weight: 800;
    height: 28px;
    justify-content: center;
    width: 28px;
}
.security-note p { color: var(--muted); font-size: 9px; line-height: 1.5; margin: 0; }
.security-note strong { color: var(--ink); display: block; font-size: 9px; margin-bottom: 2px; }

.flash-message {
    border-radius: 10px;
    font-size: 10px;
    margin-bottom: 18px;
    padding: 11px 13px;
}
.flash-message.error { background: var(--red-soft); color: var(--red); }
.flash-message.success { background: var(--green-soft); color: var(--green); }
.inline-flash { margin: 0 0 18px; }

.dashboard-body { background: var(--canvas); }
.dashboard-shell { min-height: 100vh; }
.sidebar {
    background: linear-gradient(165deg, #743cad, var(--brand-deep));
    bottom: 0;
    color: var(--white);
    display: flex;
    flex-direction: column;
    left: 0;
    overflow-y: auto;
    padding: 26px 18px 18px;
    position: fixed;
    top: 0;
    width: 250px;
}
.sidebar > .brand-lockup { padding: 0 9px 24px; }
.access-card {
    align-items: center;
    background: rgba(255,255,255,.09);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 13px;
    display: flex;
    gap: 9px;
    margin-bottom: 24px;
    padding: 10px;
}
.user-avatar {
    align-items: center;
    background: var(--brand-soft);
    border-radius: 10px;
    color: var(--brand-dark);
    display: flex;
    flex: 0 0 auto;
    font-size: 9px;
    font-weight: 800;
    height: 35px;
    justify-content: center;
    width: 35px;
}
.access-card .user-avatar { background: rgba(255,255,255,.13); color: var(--white); }
.access-card > span:nth-child(2) { min-width: 0; }
.access-card strong, .access-card small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.access-card strong { font-size: 10px; }
.access-card small { color: rgba(255,255,255,.5); font-size: 8px; margin-top: 3px; }
.access-card i { color: #cfa9ef; font-size: 10px; font-style: normal; margin-left: auto; }
.sidebar-nav { display: flex; flex-direction: column; gap: 5px; }
.nav-title {
    color: rgba(255,255,255,.35);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .16em;
    margin: 0 11px 6px;
}
.nav-title-spaced { margin-top: 20px; }
.sidebar-nav a,
.nav-disabled {
    align-items: center;
    border-radius: 10px;
    color: rgba(255,255,255,.66);
    display: flex;
    font-size: 10px;
    font-weight: 700;
    gap: 11px;
    min-height: 40px;
    padding: 9px 11px;
    text-decoration: none;
}
.sidebar-nav a:hover,
.sidebar-nav a.active { background: rgba(255,255,255,.12); color: var(--white); }
.sidebar-nav a.active { box-shadow: inset 3px 0 #d5b1f2; }
.sidebar-nav i, .nav-disabled i { font-size: 13px; font-style: normal; text-align: center; width: 17px; }
.nav-disabled { opacity: .48; }
.nav-disabled small {
    background: rgba(255,255,255,.1);
    border-radius: 99px;
    font-size: 6px;
    margin-left: auto;
    padding: 3px 5px;
    text-transform: uppercase;
}
.sidebar-footer { margin-top: auto; padding-top: 28px; }
.system-status {
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 11px;
    display: grid;
    gap: 1px 8px;
    grid-template-columns: auto 1fr;
    padding: 10px;
}
.system-status > i {
    background: #6bddaa;
    border-radius: 50%;
    grid-row: 1 / 3;
    height: 7px;
    margin-top: 4px;
    width: 7px;
}
.system-status strong { font-size: 8px; }
.system-status small { color: rgba(255,255,255,.42); font-size: 7px; }
.sidebar-footer form { margin-top: 9px; }
.sidebar-footer button {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 9px;
    color: rgba(255,255,255,.58);
    cursor: pointer;
    display: flex;
    font-size: 9px;
    justify-content: space-between;
    padding: 9px 10px;
    width: 100%;
}
.sidebar-footer button:hover { background: rgba(255,255,255,.08); color: var(--white); }

.dashboard-main { margin-left: 250px; min-height: 100vh; }
.dashboard-topbar {
    align-items: center;
    background: rgba(255,255,255,.95);
    border-bottom: 1px solid var(--line);
    display: flex;
    height: 76px;
    justify-content: space-between;
    padding: 0 30px;
    position: sticky;
    top: 0;
    z-index: 10;
}
.dashboard-topbar h1 { font-size: 18px; margin: 4px 0 0; }
.topbar-user { align-items: center; display: flex; gap: 12px; }
.topbar-date { color: var(--muted); font-size: 9px; }
.role-badge {
    background: var(--brand-soft);
    border-radius: 99px;
    color: var(--brand-dark);
    display: inline-flex;
    font-size: 8px;
    font-weight: 800;
    padding: 6px 9px;
}
.role-badge.role-employee { background: #e9f1fb; color: #3f76b7; }
.dashboard-content { margin: 0 auto; max-width: 1450px; padding: 27px 30px 48px; }
.welcome-banner {
    align-items: center;
    background:
        radial-gradient(circle at 78% 10%, rgba(255,255,255,.13), transparent 24%),
        linear-gradient(115deg, var(--brand-dark), var(--brand));
    border-radius: 18px;
    box-shadow: 0 18px 45px rgba(105, 50, 155, .17);
    color: var(--white);
    display: flex;
    justify-content: space-between;
    min-height: 180px;
    overflow: hidden;
    padding: 30px 34px;
}
.banner-kicker { color: rgba(255,255,255,.57); font-size: 8px; font-weight: 800; letter-spacing: .16em; }
.welcome-banner h2 { font-size: 29px; letter-spacing: -.04em; margin: 10px 0 8px; }
.welcome-banner p { color: rgba(255,255,255,.66); font-size: 11px; line-height: 1.6; margin: 0; max-width: 650px; }
.banner-role-mark {
    align-items: center;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 50%;
    display: flex;
    flex: 0 0 auto;
    font-size: 32px;
    font-weight: 800;
    height: 104px;
    justify-content: center;
    margin-left: 25px;
    width: 104px;
}
.foundation-grid { display: grid; gap: 14px; grid-template-columns: repeat(3, 1fr); margin-top: 17px; }
.foundation-card {
    align-items: flex-start;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 14px;
    display: flex;
    gap: 12px;
    padding: 17px;
    position: relative;
}
.foundation-icon {
    align-items: center;
    border-radius: 10px;
    display: flex;
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 800;
    height: 37px;
    justify-content: center;
    width: 37px;
}
.foundation-icon.purple { background: var(--brand-soft); color: var(--brand); }
.foundation-icon.green { background: var(--green-soft); color: var(--green); }
.foundation-icon.amber { background: var(--amber-soft); color: var(--amber); }
.foundation-card small { color: var(--muted); font-size: 7px; font-weight: 800; letter-spacing: .1em; }
.foundation-card h3 { font-size: 12px; margin: 4px 0; }
.foundation-card p { color: var(--muted); font-size: 8px; line-height: 1.5; margin: 0; padding-right: 28px; }
.card-state {
    border-radius: 99px;
    font-size: 6px;
    font-weight: 800;
    padding: 4px 6px;
    position: absolute;
    right: 10px;
    top: 10px;
    text-transform: uppercase;
}
.card-state.ready { background: var(--green-soft); color: var(--green); }
.dashboard-lower-grid { display: grid; gap: 16px; grid-template-columns: 1.55fr .85fr; margin-top: 17px; }
.panel { background: var(--white); border: 1px solid var(--line); border-radius: 15px; padding: 19px; }
.panel-heading { align-items: flex-start; display: flex; justify-content: space-between; margin-bottom: 18px; }
.panel-heading h3 { font-size: 14px; margin: 5px 0 0; }
.permission-list { display: grid; gap: 13px; }
.permission-list > div { align-items: flex-start; border-bottom: 1px solid #f0edf2; display: flex; gap: 10px; padding-bottom: 12px; }
.permission-list > div:last-child { border-bottom: 0; padding-bottom: 0; }
.permission-check, .permission-lock {
    align-items: center;
    background: var(--green-soft);
    border-radius: 7px;
    color: var(--green);
    display: flex;
    flex: 0 0 auto;
    font-size: 9px;
    font-weight: 800;
    height: 26px;
    justify-content: center;
    width: 26px;
}
.permission-lock { background: #efedf1; color: #88808c; }
.permission-list strong, .permission-list small { display: block; }
.permission-list strong { font-size: 9px; }
.permission-list small { color: var(--muted); font-size: 8px; margin-top: 3px; }
.next-step-panel { position: relative; }
.next-step-panel h3 { font-size: 20px; margin: 8px 0; }
.next-step-panel > p { color: var(--muted); font-size: 9px; line-height: 1.6; margin: 0 0 18px; }
.primary-link {
    align-items: center;
    background: var(--brand);
    border-radius: 9px;
    color: var(--white);
    display: flex;
    font-size: 8px;
    font-weight: 800;
    justify-content: space-between;
    padding: 10px 12px;
    text-decoration: none;
}
.user-count { align-items: baseline; display: flex; gap: 5px; margin-top: 16px; }
.user-count strong { font-size: 23px; }
.user-count span { color: var(--muted); font-size: 8px; }
.read-only-note { background: var(--brand-soft); border-radius: 8px; color: var(--brand-dark); display: block; font-size: 8px; line-height: 1.5; padding: 10px; }

.section-intro { align-items: center; display: flex; justify-content: space-between; margin-bottom: 18px; }
.section-intro h2 { font-size: 22px; letter-spacing: -.03em; margin: 0; }
.section-intro p { color: var(--muted); font-size: 10px; margin: 5px 0 0; }
.secure-chip { background: var(--green-soft); border-radius: 99px; color: var(--green); font-size: 8px; font-weight: 800; padding: 7px 10px; }
.user-management-grid { display: grid; gap: 16px; grid-template-columns: minmax(300px, .7fr) minmax(500px, 1.3fr); }
.stacked-form { display: grid; gap: 13px; }
.form-two { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
.form-help { color: var(--muted); font-size: 8px; line-height: 1.5; margin: -2px 0 0; }
.users-list { display: grid; gap: 10px; }
.user-row {
    align-items: center;
    background: #faf9fb;
    border: 1px solid var(--line);
    border-radius: 11px;
    display: flex;
    gap: 10px;
    padding: 11px;
}
.user-identity { flex: 1; min-width: 0; }
.user-identity strong, .user-identity small, .user-identity > span { display: block; }
.user-identity strong { font-size: 9px; }
.user-identity small { color: var(--muted); font-size: 8px; margin-top: 2px; }
.user-identity > span { color: #aaa2ad; font-size: 7px; margin-top: 4px; }
.user-access-form { align-items: center; display: flex; gap: 6px; }
.user-access-form select {
    background: var(--white);
    border: 1px solid #ddd7e1;
    border-radius: 7px;
    color: #514a56;
    font-size: 8px;
    height: 31px;
    padding: 0 7px;
}
.user-access-form button {
    background: var(--brand-soft);
    border: 0;
    border-radius: 7px;
    color: var(--brand-dark);
    cursor: pointer;
    font-size: 8px;
    font-weight: 800;
    height: 31px;
    padding: 0 10px;
}

@media (max-width: 950px) {
    .auth-shell { grid-template-columns: 1fr; max-width: 600px; }
    .auth-brand-panel { display: none; }
    .mobile-brand { display: block; margin-bottom: 42px; }
    .sidebar { width: 220px; }
    .dashboard-main { margin-left: 220px; }
    .foundation-grid { grid-template-columns: 1fr; }
    .user-management-grid { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
    .auth-body { padding: 0; }
    .auth-shell { border: 0; border-radius: 0; min-height: 100vh; }
    .auth-form-panel { padding: 34px 24px; }
    .sidebar { bottom: auto; height: auto; padding: 15px; position: relative; width: 100%; }
    .sidebar > .brand-lockup { padding: 0; }
    .access-card, .sidebar-nav, .sidebar-footer { display: none; }
    .dashboard-main { margin-left: 0; }
    .dashboard-topbar { height: 66px; padding: 0 16px; }
    .dashboard-content { padding: 18px 15px 35px; }
    .topbar-date { display: none; }
    .welcome-banner { align-items: flex-start; min-height: 0; padding: 24px; }
    .banner-role-mark { height: 55px; margin-left: 12px; width: 55px; }
    .dashboard-lower-grid { grid-template-columns: 1fr; }
    .form-two { grid-template-columns: 1fr; }
    .user-row { align-items: flex-start; flex-wrap: wrap; }
    .user-access-form { width: 100%; }
    .user-access-form select { flex: 1; }
}

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