@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+Thai:wght@300;400;500;600;700;800&display=swap");

:root {
    --bg: #f5f7fb;
    --panel: #ffffff;
    --panel-soft: #f9fafb;
    --ink: #111827;
    --muted: #667085;
    --line: #e5e7eb;
    --accent: #2563eb;
    --accent-strong: #1d4ed8;
    --danger: #b42318;
    --shadow: 0 16px 36px rgba(15, 23, 42, 0.07);
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--ink);
    font-family: "Noto Sans Thai", Arial, "Helvetica Neue", sans-serif;
}

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

code {
    padding: 2px 6px;
    border-radius: 5px;
    background: #eef2ff;
    color: #1e3a8a;
    font-size: 0.92em;
}

.app-shell {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    border-right:1px solid rgba(255,255,255,.6);
    background:rgba(255,255,255,.75);
    backdrop-filter:blur(20px);
    padding: 0 16px 20px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 132px;
    margin: 0 -16px 24px;
    background: #030712;
    padding: 22px 26px;
}

.brand-mark,
.avatar,
.project-icon,
.nav-icon {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    font-weight: 800;
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    background: var(--accent);
    color: #fff;
}

.brand-logo-wrap {
    display: block;
    width: 100%;
}

.brand-logo {
    display: block;
    width: min(100%, 220px);
    height: auto;
    filter: brightness(0) invert(1);
}

.brand-text {
    display: none;
}

.brand strong,
.brand small {
    display: block;
}

.brand small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px;
}

.side-nav {
    display: grid;
    align-content: start;
    flex: 1 1 auto;
    gap: 6px;
    grid-auto-rows: max-content;
    min-height: 0;
    overflow-y: auto;
    padding-bottom: 8px;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: rgba(96, 165, 250, .72) rgba(2, 12, 36, .28);
}

.side-nav::-webkit-scrollbar {
    width: 9px;
}

.side-nav::-webkit-scrollbar-track {
    border-radius: 999px;
    background: rgba(2, 12, 36, .28);
    box-shadow: inset 0 0 0 1px rgba(147, 197, 253, .08);
}

.side-nav::-webkit-scrollbar-thumb {
    min-height: 44px;
    border: 2px solid rgba(4, 25, 67, .78);
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(125, 211, 252, .88), rgba(37, 99, 235, .92));
    background-clip: padding-box;
    box-shadow: 0 0 10px rgba(59, 130, 246, .28);
}

.side-nav::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #bae6fd, #3b82f6);
    background-clip: padding-box;
}

.side-nav::-webkit-scrollbar-button,
.side-nav::-webkit-scrollbar-corner {
    width: 0;
    height: 0;
    background: transparent;
}

.side-nav-label {
    margin: 18px 12px 6px;
    color: #667085;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.side-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 50px;
    border-radius: 8px;
    padding: 10px 14px;
    color: #344054;
    font-weight: 700;
}

.side-nav a:hover,
.side-nav a.active {
    background: #eef4ff;
    color: #1d4ed8;
}

.nav-icon {
    width: 34px;
    height: 34px;
    border-radius: 7px;
    background: #f2f6ff;
    color: #0f254f;
    font-size: 18px;
}

.side-nav a.active .nav-icon,
.side-nav a:hover .nav-icon {
    background: #dbeafe;
    color: #1d4ed8;
}

.sidebar-footer {
    margin-top: auto;
    padding: 12px 8px 0;
}

.sidebar-toggle {
    display: none;
}

.logout-link {
    display: flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 12px;
    color: #344054;
    font-weight: 700;
}

.logout-link:hover {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
}

.main-panel {
    min-width: 0;
    padding: 32px;
}

.portal-dashboard {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
    padding: 28px 32px 40px;
}

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

.dashboard-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.dashboard-hero h1 {
    color: #0b1220;
    font-size: clamp(34px, 4vw, 50px);
}

.dashboard-hero h2 {
    margin: 12px 0 2px;
    color: #0b1220;
    font-size: 16px;
}

.dashboard-hero p:not(.eyebrow) {
    margin: 0;
    color: #475467;
    font-size: 15px;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 30px;
}

.dashboard-stat {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 126px;
    border: 1px solid #e4e7ec;
    border-radius: 8px;
    background: #ffffff;
    padding: 22px 26px;
    box-shadow: var(--shadow);
}

.dashboard-stat-icon,
.dashboard-app-icon {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 92%, #ffffff), color-mix(in srgb, var(--accent) 72%, #0f172a));
    color: #ffffff;
    box-shadow: 0 16px 26px color-mix(in srgb, var(--accent) 22%, transparent);
    font-weight: 900;
    letter-spacing: 0;
}

.dashboard-stat-icon {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    font-size: 26px;
}

.dashboard-stat strong,
.dashboard-stat small,
.dashboard-stat em {
    display: block;
}

.dashboard-stat strong {
    color: #0b1220;
    font-size: 25px;
    line-height: 1.05;
}

.dashboard-stat small {
    margin-top: 5px;
    color: #344054;
    font-size: 15px;
    font-weight: 700;
}

.dashboard-stat em {
    margin-top: 4px;
    color: #667085;
    font-size: 13px;
    font-style: normal;
}

.dashboard-section > h2 {
    margin-bottom: 16px;
    color: #344054;
    font-size: 14px;
    font-weight: 900;
    text-transform: uppercase;
}

.dashboard-app-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.dashboard-app-card {
    display: grid;
    grid-template-rows: auto auto minmax(68px, 1fr) auto;
    justify-items: center;
    min-height: 264px;
    border: 1px solid #e4e7ec;
    border-radius: 8px;
    background: #ffffff;
    padding: 26px 22px 0;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.dashboard-app-card:hover {
    border-color: color-mix(in srgb, var(--accent) 40%, #e4e7ec);
    box-shadow: 0 22px 46px rgba(37, 99, 235, 0.13);
    transform: translateY(-3px);
}

.dashboard-app-icon {
    width: 66px;
    height: 66px;
    border-radius: 18px;
    margin-bottom: 16px;
    font-size: 27px;
}

.dashboard-app-card strong {
    color: #0b1220;
    font-size: 17px;
}

.dashboard-app-card small {
    margin-top: 12px;
    color: #475467;
    font-size: 13px;
    line-height: 1.55;
}

.dashboard-open-link {
    display: flex;
    width: calc(100% + 44px);
    min-height: 52px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-top: 1px solid #eef2f7;
    color: #0046d5;
    font-weight: 900;
}

.dashboard-rail {
    display: grid;
    align-content: start;
    gap: 18px;
    min-width: 0;
}

.dashboard-user-card,
.dashboard-side-card {
    border: 1px solid #e4e7ec;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.dashboard-user-card {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 92px;
    margin-bottom: 31px;
    padding: 18px 20px;
}

.dashboard-user-card strong,
.dashboard-user-card small {
    display: block;
}

.dashboard-user-card strong {
    color: #0b1220;
    font-size: 16px;
}

.dashboard-user-card small {
    margin-top: 3px;
    color: #667085;
}

.dashboard-avatar {
    width: 54px;
    height: 54px;
    border-radius: 999px;
    background: #061333;
    font-size: 15px;
}

.dashboard-side-card {
    padding: 20px 22px;
}

.dashboard-side-card h2 {
    margin-bottom: 18px;
    color: #0046d5;
    font-size: 14px;
    font-weight: 900;
    text-transform: uppercase;
}

.dashboard-info-list {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 18px 14px;
}

.dashboard-info-icon,
.dashboard-action-list span {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: #f2f6ff;
    color: #0f254f;
    font-size: 16px;
    font-weight: 900;
}

.dashboard-info-list strong,
.dashboard-info-list small {
    display: block;
}

.dashboard-info-list strong {
    color: #0b1220;
    font-size: 14px;
}

.dashboard-info-list small {
    margin-top: 4px;
    color: #475467;
    font-size: 13px;
}

.dashboard-action-list {
    display: grid;
    gap: 10px;
}

.dashboard-action-list a {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    min-height: 52px;
}

.dashboard-action-list strong,
.dashboard-action-list small {
    display: block;
}

.dashboard-action-list strong {
    color: #0b1220;
    font-size: 14px;
}

.dashboard-action-list small {
    color: #667085;
    font-size: 12px;
}

.dashboard-announcement-list {
    display: grid;
    gap: 14px;
}

.dashboard-announcement-list span {
    display: grid;
    grid-template-columns: 12px minmax(0, 1fr);
    gap: 6px;
}

.dashboard-announcement-list span > strong,
.dashboard-announcement-list span > small {
    grid-column: 2;
}

.dashboard-announcement-list i {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #2563eb;
    margin-top: 6px;
}

.dashboard-announcement-list span:nth-child(2) i {
    background: #14b8a6;
}

.dashboard-announcement-list strong,
.dashboard-announcement-list small {
    display: block;
}

.dashboard-announcement-list strong {
    color: #0b1220;
    font-size: 13px;
}

.dashboard-announcement-list small {
    margin-top: 3px;
    color: #667085;
    font-size: 12px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 28px;
}

.eyebrow {
    margin: 0 0 6px;
    color: var(--accent-strong);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.05;
    letter-spacing: 0;
}

h2 {
    margin: 0 0 14px;
    font-size: 35px;
    letter-spacing: 0;
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    padding: 8px 12px 8px 8px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
    font-weight: 700;
}

.avatar {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: #475467;
    color: #fff;
    font-size: 12px;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.project-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    min-height: 130px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    padding: 18px;
    box-shadow: var(--shadow);
    transition: transform 160ms ease, border-color 160ms ease;
}

.project-card:hover {
    border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
    box-shadow: 0 18px 40px rgba(37, 99, 235, 0.10);
    transform: translateY(-2px);
}

.project-icon {
    width: 46px;
    height: 46px;
    border-radius: 8px;
    background: var(--accent);
    color: #fff;
}

.project-card strong,
.project-card small {
    display: block;
}

.project-card strong {
    margin-top: 2px;
    font-size: 18px;
}

.project-card small {
    margin-top: 8px;
    color: var(--muted);
    line-height: 1.45;
}

.empty-state,
.content-panel {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    padding: 18px;
    box-shadow: var(--shadow);
}

.empty-state {
    display: grid;
    gap: 8px;
    color: var(--muted);
}

.empty-state strong {
    color: var(--ink);
}

.content-panel + .content-panel {
    margin-top: 16px;
}

.module-tabs {
    display: inline-flex;
    gap: 4px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    padding: 4px;
    margin: 0 0 18px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
}

.module-tabs a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 40px;
    border-radius: 7px;
    padding: 8px 12px;
    color: #344054;
    font-weight: 800;
}

.module-tabs a.active {
    background: #eff6ff;
    color: #1d4ed8;
}

.module-tabs strong {
    display: inline-grid;
    place-items: center;
    min-width: 24px;
    min-height: 24px;
    border-radius: 999px;
    background: #f2f4f7;
    color: #344054;
    font-size: 12px;
}

.module-tabs a.active strong {
    background: #dbeafe;
    color: #1d4ed8;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.section-heading h2 {
    margin-bottom: 0;
}

.stat-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.stat {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
    background: var(--panel-soft);
}

.stat span {
    display: block;
    color: var(--muted);
    font-size: 13px;
}

.stat strong {
    display: block;
    margin-top: 6px;
    font-size: 24px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    overflow: hidden;
}

.data-table th,
.data-table td {
    border-bottom: 1px solid var(--line);
    padding: 12px 10px;
    text-align: left;
}

.data-table th {
    color: var(--muted);
    font-size: 13px;
    background: var(--panel-soft);
}

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

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    border-radius: 999px;
    padding: 4px 10px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 800;
}

.login-page {
    display: grid;
    min-height: 100vh;
    place-items: center;
    background:
        linear-gradient(90deg, rgba(246, 250, 255, 0.78) 0%, rgba(246, 250, 255, 0.42) 43%, rgba(255, 255, 255, 0.72) 100%),
        url("../img/background_login.png") center / cover no-repeat;
    padding: 48px;
}

.login-layout {
    display: grid;
    grid-template-columns: minmax(420px, 1fr) minmax(420px, 620px);
    align-items: center;
    gap: clamp(44px, 7vw, 110px);
    width: min(100%, 1440px);
    min-height: min(860px, calc(100vh - 96px));
}

.login-hero {
    display: grid;
    align-content: start;
    min-height: 720px;
    padding: 18px 0 0 26px;
}

.login-hero-logo {
    width: 220px;
    height: auto;
}

.login-hero-copy {
    margin-top: 42px;
    color: #061a44;
}

.login-hero-copy p {
    margin: 0 0 4px;
    color: #253b64;
    font-size: 28px;
    font-weight: 800;
}

.login-hero-copy h1 {
    color: #061a44;
    font-size: clamp(42px, 4.4vw, 58px);
    line-height: 1.05;
}

.login-hero-copy span {
    display: block;
    width: 88px;
    height: 4px;
    margin: 26px 0 26px;
    background: #d9a736;
}

.login-hero-copy strong {
    color: #253b64;
    font-size: 25px;
    line-height: 1.55;
}

.login-reveal {
    animation: loginFadeSlideUp 700ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.login-reveal:nth-child(1) {
    animation-delay: 120ms;
}

.login-reveal:nth-child(2) {
    animation-delay: 240ms;
}

.login-reveal:nth-child(3) {
    animation-delay: 360ms;
}

.login-reveal:nth-child(4) {
    animation-delay: 480ms;
}

@keyframes loginFadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-benefits {
    display: grid;
    gap: 26px;
    margin-top: 52px;
}

.login-benefits div {
    display: flex;
    align-items: center;
    gap: 20px;
}

.login-benefit-reveal {
    animation: loginFadeSlideUp 700ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.login-benefit-reveal:nth-child(1) {
    animation-delay: 650ms;
}

.login-benefit-reveal:nth-child(2) {
    animation-delay: 800ms;
    margin-left: 48px;
}

.login-benefit-reveal:nth-child(3) {
    animation-delay: 950ms;
    margin-left: 96px;
}

.login-benefits span {
    display: inline-grid;
    place-items: center;
    width: 70px;
    height: 70px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.10);
    color: #155eef;
    font-size: 22px;
    font-weight: 900;
}

.login-benefits p,
.login-benefits strong,
.login-benefits small {
    display: block;
    margin: 0;
}

.login-benefits strong {
    color: #061a44;
    font-size: 20px;
}

.login-benefits small {
    max-width: 270px;
    color: #253b64;
    font-size: 16px;
    line-height: 1.45;
}

.login-panel {
    border: 1px solid rgba(255, 255, 255, 0.82);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.18);
    padding: 54px 58px 34px;
    backdrop-filter: blur(8px);
}

.login-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
    text-align: center;
}

.login-logo {
    flex: 0 0 auto;
    width: 210px;
    height: auto;
    display: block;
}

.login-brand h1 {
    color: #092869;
    font-size: clamp(34px, 4vw, 48px);
}

.login-brand p {
    margin: 10px 0 0;
    color: #50648a;
    font-size: 20px;
    font-weight: 800;
}

.login-form {
    display: grid;
    gap: 20px;
    margin-top: 46px;
}

.login-form label {
    display: grid;
    gap: 10px;
    color: #092869;
    font-size: 16px;
    font-weight: 900;
}

.login-form input {
    width: 100%;
    min-height: 60px;
    border: 1px solid #c7d7ee;
    border-radius: 8px;
    background: rgba(248, 251, 255, 0.9);
    color: #0b1220;
    padding: 12px 48px 12px 64px;
    font: inherit;
    font-weight: 800;
}

.login-form input:focus {
    border-color: var(--accent);
    outline: 3px solid rgba(37, 99, 235, 0.14);
}

.login-form button {
    min-height: 62px;
    border: 0;
    border-radius: 8px;
    background: linear-gradient(135deg, #155eef, #0046d5);
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-weight: 800;
    font-size: 20px;
}

.login-form button:hover {
    background: var(--accent-strong);
}

.login-input-wrap {
    position: relative;
    display: block;
}

.login-input-icon,
.login-password-toggle {
    position: absolute;
    top: 50%;
    display: inline-grid;
    place-items: center;
    transform: translateY(-50%);
}

.login-input-icon {
    left: 20px;
    color: #155eef;
    font-size: 22px;
    font-weight: 900;
}

.login-password-toggle {
    right: 16px;
    width: 34px;
    height: 34px;
    min-height: 34px !important;
    border: 0;
    border-radius: 8px;
    background: transparent !important;
    color: #50648a !important;
    font-size: 24px !important;
    padding: 0;
}

.login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    color: #50648a;
    font-weight: 800;
}

.login-options label {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: inherit;
    font-size: 15px;
}

.login-options input {
    width: 20px;
    min-height: 20px;
    border: 0;
    padding: 0;
    accent-color: #155eef;
}

.login-options a {
    color: #155eef;
    font-size: 15px;
    font-weight: 900;
}

.login-separator {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 20px;
    margin: 34px 0 22px;
    color: #667085;
    font-weight: 800;
}

.login-separator::before,
.login-separator::after {
    content: "";
    height: 1px;
    background: #d9e2ef;
}

.login-support-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    border-radius: 8px;
    background: rgba(248, 251, 255, 0.9);
    padding: 16px;
}

.login-support-card > span {
    display: inline-grid;
    place-items: center;
    width: 50px;
    height: 50px;
    border-radius: 8px;
    background: #eaf2ff;
    color: #155eef;
    font-weight: 900;
}

.login-support-card strong,
.login-support-card small {
    display: block;
}

.login-support-card strong {
    color: #092869;
}

.login-support-card small {
    color: #155eef;
    font-size: 15px;
}

.login-support-card em {
    color: #50648a;
    font-size: 34px;
    font-style: normal;
}

.alert {
    margin-top: 16px;
    border: 1px solid #fecdca;
    border-radius: 8px;
    background: #fffbfa;
    color: var(--danger);
    padding: 10px 12px;
    font-weight: 700;
}

.notice {
    margin: 0 0 16px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: #eff6ff;
    color: #1d4ed8;
    padding: 10px 12px;
    font-weight: 700;
}

.admin-form {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    align-items: end;
}

.admin-form.compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-form .wide-field {
    grid-column: span 2;
}

.create-user-form {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: start;
    gap: 16px;
}

.create-user-form .role-set,
.create-user-form button {
    grid-column: 1 / -1;
}

.create-user-form button {
    justify-self: start;
    min-width: 180px;
}

.admin-form label {
    display: grid;
    gap: 7px;
    color: #344054;
    font-weight: 700;
}

.admin-form input,
.admin-form select {
    width: 100%;
    min-height: 42px;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    padding: 9px 11px;
    font: inherit;
    background: #ffffff;
}

.admin-form input:focus,
.admin-form select:focus {
    border-color: var(--accent);
    outline: 3px solid rgba(37, 99, 235, 0.14);
}

.admin-form button,
.user-actions button {
    min-height: 42px;
    border: 0;
    border-radius: 8px;
    background: var(--accent);
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-weight: 800;
    padding: 9px 14px;
}

.role-set {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 8px 10px;
    margin: 0;
}

.role-create-form .menu-set,
.role-create-form button {
    grid-column: 1 / -1;
}

.menu-set {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    margin: 0;
    background: #ffffff;
}

.create-user-form .role-set {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: start;
    gap: 12px;
    background: #ffffff;
    padding: 14px;
}

.menu-set legend {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.menu-set label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    color: #344054;
    font-weight: 700;
}

.menu-set input {
    width: auto;
    min-height: auto;
}

.role-set legend {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.role-set label,
.toggle-line {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #344054;
    font-weight: 700;
}

.create-user-form .role-set label,
.modal-role-set label {
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel-soft);
    padding: 9px 11px;
}

.create-user-form .role-set label:has(input:checked),
.modal-role-set label:has(input:checked) {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
}

.role-set input,
.toggle-line input {
    width: auto;
    min-height: auto;
}

.user-list,
.role-list {
    display: grid;
    gap: 10px;
}

.user-filter-bar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 14px;
}

.user-filter-bar label {
    display: grid;
    gap: 7px;
    color: #344054;
    font-weight: 700;
}

.user-filter-bar input {
    width: 100%;
    min-height: 42px;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    background: #ffffff;
    padding: 9px 11px;
    font: inherit;
}

.user-filter-bar input:focus {
    border-color: var(--accent);
    outline: 3px solid rgba(37, 99, 235, 0.14);
}

.empty-state {
    border: 1px dashed var(--line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--muted);
    padding: 18px;
    text-align: center;
    font-weight: 700;
}

.user-row-card,
.role-row-card {
    display: grid;
    grid-template-columns: minmax(260px, 1.25fr) minmax(300px, 1.75fr) 104px;
    align-items: center;
    gap: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    padding: 12px 14px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.03);
}

.user-row-main {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 12px;
}

.user-row-main strong,
.user-row-main small {
    display: block;
}

.user-row-main strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-row-main small {
    overflow: hidden;
    margin-top: 3px;
    color: var(--muted);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-row-meta {
    display: grid;
    grid-template-columns: auto minmax(120px, 0.8fr) minmax(160px, 1.2fr);
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.user-row-meta > span:not(.badge) {
    display: grid;
    gap: 2px;
    align-content: center;
    min-height: 28px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel-soft);
    padding: 6px 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-row-meta strong {
    color: #98a2b3;
    font-size: 10px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.user-update-button {
    justify-self: end;
    min-height: 38px;
    width: 96px;
    border: 0;
    border-radius: 8px;
    background: var(--accent);
    color: #ffffff;
    cursor: pointer;
    font: inherit;
    font-weight: 800;
    padding: 8px 14px;
}

.user-update-button:hover {
    background: var(--accent-strong);
}

.role-management-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 14px;
}

.role-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.role-summary span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #ffffff;
    color: var(--muted);
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 800;
}

.member-list {
    display: grid;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    padding: 12px;
}

.member-list > strong {
    color: #344054;
    font-size: 13px;
}

.muted-text {
    color: var(--muted);
    font-size: 13px;
}

.member-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.member-chip {
    display: inline-grid;
    gap: 2px;
    max-width: 240px;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: #eff6ff;
    color: #1d4ed8;
    padding: 7px 10px;
    font-size: 13px;
    font-weight: 800;
}

.member-chip small {
    overflow: hidden;
    color: #475467;
    font-size: 11px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.member-chip.inactive {
    border-color: var(--line);
    background: #f2f4f7;
    color: #667085;
}

.doc-article {
    color: #344054;
    line-height: 1.7;
}

.doc-article h2 {
    color: var(--ink);
}

.doc-article p {
    margin: 0 0 12px;
}

.doc-lead {
    max-width: 900px;
    color: #475467;
    font-size: 16px;
}

.doc-article ul,
.doc-article ol {
    margin: 10px 0 0;
    padding-left: 22px;
}

.doc-article li + li {
    margin-top: 6px;
}

.doc-article pre {
    overflow-x: auto;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    background: #0f172a;
    color: #e5e7eb;
    padding: 14px;
    line-height: 1.55;
}

.doc-article pre code {
    padding: 0;
    background: transparent;
    color: inherit;
    font-size: 13px;
}

.doc-table {
    margin-top: 12px;
}

.user-card {
    display: grid;
    gap: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel-soft);
    padding: 14px;
}

.user-card-head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
}

.user-card-head strong,
.user-card-head small {
    display: block;
}

.user-card-head small {
    margin-top: 3px;
    color: var(--muted);
}

.user-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.user-actions .role-set {
    flex: 1 1 260px;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: grid;
    place-items: center;
    overflow-y: auto;
    background: rgba(15, 23, 42, 0.56);
    padding: 28px;
}

.modal-backdrop[hidden] {
    display: none;
}

.modal-panel {
    width: min(880px, 100%);
    max-height: calc(100vh - 56px);
    overflow-y: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
    padding: 20px;
}

.modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.modal-head h2 {
    margin: 0;
}

.role-modal-summary {
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel-soft);
    padding: 12px;
}

.role-modal-stats {
    display: none;
}

.role-modal-fields {
    grid-template-columns: minmax(220px, 0.8fr) minmax(320px, 1.2fr) !important;
    align-items: start;
}

.modal-close {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--ink);
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
}

.modal-form {
    display: grid;
    gap: 16px;
}

.modal-form .admin-form.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
}

.modal-role-set {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 12px;
    background: #ffffff;
    padding: 14px;
}

.modal-menu-set {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    padding: 14px;
}

.modal-menu-set label {
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel-soft);
    padding: 9px 11px;
}

.modal-menu-set label:has(input:checked) {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
}

.role-member-list {
    background: #ffffff;
    padding: 14px;
}

.role-member-list > strong {
    font-size: 14px;
}

.modal-actions {
    justify-content: flex-end;
    border-top: 1px solid var(--line);
    padding-top: 14px;
}

.danger-button {
    background: var(--danger) !important;
}

button:disabled,
input:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.login-hint {
    margin: 18px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

@media (max-width: 780px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        height: auto;
        border-right: 0;
        border-bottom: 1px solid var(--line);
        padding-top: 0;
        padding-bottom: 12px;
    }

    .brand {
        min-height: 76px;
        margin-bottom: 0;
        padding: 16px 18px;
    }

    .brand-logo {
        width: min(100%, 165px);
    }

    .sidebar-toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: calc(100% - 32px);
        min-height: 44px;
        margin: 12px 16px 0;
        border: 1px solid var(--line);
        border-radius: 8px;
        background: #ffffff;
        color: #0b1220;
        cursor: pointer;
        font: inherit;
        font-weight: 900;
        padding: 8px 12px;
    }

    .sidebar-toggle strong {
        display: inline-grid;
        place-items: center;
        width: 30px;
        height: 30px;
        border-radius: 8px;
        background: #eef4ff;
        color: #1d4ed8;
        font-size: 18px;
        line-height: 1;
    }

    .sidebar.is-mobile-collapsed .side-nav,
    .sidebar.is-mobile-collapsed .sidebar-footer {
        display: none;
    }

    .side-nav {
        grid-template-columns: 1fr;
        gap: 4px;
        padding-top: 12px;
    }

    .side-nav-label {
        margin-top: 12px;
    }

    .side-nav a {
        min-height: 46px;
    }

    .main-panel {
        padding: 22px 16px;
    }

    .portal-dashboard {
        grid-template-columns: 1fr;
        padding: 22px 16px;
    }

    .dashboard-stats,
    .dashboard-app-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-app-card {
        min-height: 220px;
    }

    .dashboard-rail {
        grid-row: auto;
    }

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

    .module-tabs {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        width: 100%;
    }

    .module-tabs a {
        justify-content: center;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .user-row-card,
    .role-row-card {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .user-filter-bar {
        grid-template-columns: 1fr;
    }

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

    .user-update-button {
        justify-self: start;
        width: auto;
    }

    .modal-backdrop {
        align-items: start;
        padding: 16px;
    }

    .modal-panel {
        max-height: calc(100vh - 32px);
        padding: 16px;
    }

    .modal-actions {
        justify-content: flex-start;
    }

    .role-modal-summary {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .topbar,
    .stat-row,
    .admin-form,
    .create-user-form,
    .admin-form.compact {
        align-items: stretch;
        grid-template-columns: 1fr;
        flex-direction: column;
    }

    .modal-form .admin-form.compact {
        grid-template-columns: 1fr;
    }

    .role-modal-fields {
        grid-template-columns: 1fr !important;
    }

    .create-user-form .role-set {
        grid-template-columns: 1fr;
    }

    .admin-form .wide-field,
    .create-user-form .role-set,
    .create-user-form button,
    .role-create-form .menu-set,
    .role-create-form button {
        grid-column: auto;
    }

    .login-brand {
        gap: 10px;
    }

    .login-logo {
        width: 118px;
    }

    .login-page {
        align-items: start;
        padding: 14px;
    }

    .login-layout {
        grid-template-columns: 1fr;
        gap: 12px;
        min-height: 0;
    }

    .login-hero {
        min-height: 0;
        padding: 0;
    }

    .login-hero-logo {
        width: 150px;
    }

    .login-hero-copy {
        margin-top: 8px;
        text-align: center;
    }

    .login-hero-copy p {
        font-size: 17px;
    }

    .login-hero-copy h1 {
        font-size: 34px;
    }

    .login-hero-copy span {
        width: 72px;
        height: 3px;
        margin: 14px auto;
    }

    .login-hero-copy strong {
        font-size: 17px;
        line-height: 1.35;
    }

    .login-benefits {
        display: none;
    }

    .login-benefit-reveal:nth-child(2),
    .login-benefit-reveal:nth-child(3) {
        margin-left: 0;
    }

    .login-panel {
        border-radius: 20px;
        padding: 22px 18px;
    }

    .login-logo {
        width: 142px;
    }

    .login-brand {
        gap: 14px;
    }

    .login-brand h1 {
        font-size: 32px;
    }

    .login-brand p {
        margin-top: 6px;
        font-size: 16px;
    }

    .login-form {
        gap: 14px;
        margin-top: 22px;
    }

    .login-form label {
        gap: 7px;
        font-size: 16px;
    }

    .login-form input {
        min-height: 54px;
        padding-left: 52px;
        padding-right: 44px;
    }

    .login-form button {
        min-height: 56px;
        font-size: 18px;
    }

    .login-options {
        align-items: flex-start;
        flex-direction: column;
    }

    .login-input-icon {
        left: 18px;
        font-size: 20px;
    }

    .login-password-toggle {
        right: 12px;
    }

    .login-separator {
        gap: 12px;
        margin: 20px 0 16px;
    }

    .login-support-card {
        gap: 10px;
        padding: 12px;
    }

    .login-support-card > span {
        width: 42px;
        height: 42px;
    }
}

@media (min-width: 781px) and (max-width: 1120px) {
    .project-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .portal-dashboard {
        grid-template-columns: 1fr;
    }

    .dashboard-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

    .create-user-form .role-set {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .login-page {
        padding: 28px;
    }

    .login-layout {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .login-hero {
        min-height: 0;
        padding: 0;
    }

    .login-hero-copy {
        margin-top: 40px;
    }

    .login-benefits {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 18px;
    }

    .login-benefit-reveal:nth-child(2),
    .login-benefit-reveal:nth-child(3) {
        margin-left: 0;
    }

    .login-benefits div {
        align-items: flex-start;
    }

    .login-panel {
        width: min(100%, 620px);
        justify-self: center;
    }
}

@media (min-width: 1121px) and (max-width: 1440px) {
    .portal-dashboard {
        grid-template-columns: minmax(0, 1fr) 320px;
        gap: 22px;
    }

    .dashboard-app-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (prefers-reduced-motion: reduce) {
    .login-reveal,
    .login-benefit-reveal {
        animation: none;
    }
}
.dashboard-app-icon i,
.dashboard-stat-icon i,
.dashboard-info-icon i{
  width:24px;
  height:24px;
  stroke-width:2.2;
}

.dashboard-app-icon,
.dashboard-stat-icon,
.dashboard-info-icon{
  display:flex;
  align-items:center;
  justify-content:center;
}

body{
  background:#f3f6fb;
}

.portal-dashboard{
  background:
    radial-gradient(circle at top left, rgba(37,99,235,.10), transparent 32%),
    linear-gradient(180deg,#f8fafc 0%,#eef2f7 100%);
}

.dashboard-hero{
  padding:6px 0 18px;
}

.dashboard-hero h1{
  font-size:42px;
  letter-spacing:-1.2px;
  color:#07111f;
}

.dashboard-hero h2{
  margin-top:8px;
  font-size:16px;
  font-weight:800;
  color:#111827;
}

.dashboard-hero p{
  color:#64748b;
}

.eyebrow{
  color:#0057d9;
  font-weight:900;
  letter-spacing:.08em;
}

.dashboard-stats{
  gap:16px;
  margin-bottom:26px;
}

.dashboard-stat{
  border:1px solid rgba(226,232,240,.95);
  border-radius:18px;
  background:rgba(255,255,255,.88);
  box-shadow:0 18px 45px rgba(15,23,42,.06);
  backdrop-filter:blur(14px);
  transition:.22s ease;
}

.dashboard-stat:hover{
  transform:translateY(-3px);
  box-shadow:0 24px 60px rgba(15,23,42,.11);
}

.dashboard-stat-icon,
.dashboard-app-icon,
.dashboard-info-icon{
  display:flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(135deg,var(--accent),color-mix(in srgb,var(--accent) 70%,#0f172a));
  color:#fff;
  box-shadow:0 14px 28px color-mix(in srgb,var(--accent) 26%,transparent);
}

.dashboard-stat-icon i,
.dashboard-app-icon i,
.dashboard-info-icon i{
  width:23px;
  height:23px;
  stroke-width:2.2;
}

.dashboard-section h2{
  font-size:14px;
  font-weight:900;
  color:#1e293b;
  letter-spacing:.04em;
  margin-bottom:14px;
}

.dashboard-app-grid{
  gap:18px;
}

.dashboard-app-card{
  min-height:205px;
  border:1px solid rgba(226,232,240,.95);
  border-radius:20px;
  background:
    linear-gradient(180deg,rgba(255,255,255,.96),rgba(255,255,255,.88));
  box-shadow:0 18px 46px rgba(15,23,42,.07);
  overflow:hidden;
  transition:.25s ease;
}

.dashboard-app-card::before{
  content:"";
  position:absolute;
  inset:0 0 auto 0;
  height:3px;
  background:linear-gradient(90deg,var(--accent),transparent);
  opacity:0;
  transition:.25s ease;
}

.dashboard-app-card:hover{
  transform:translateY(-5px);
  border-color:color-mix(in srgb,var(--accent) 38%,#e2e8f0);
  box-shadow:0 28px 70px rgba(15,23,42,.13);
}

.dashboard-app-card:hover::before{
  opacity:1;
}

.dashboard-app-icon{
  width:56px;
  height:56px;
  border-radius:16px;
  margin-bottom:16px;
}

.dashboard-app-card strong{
  font-size:17px;
  color:#020617;
}

.dashboard-app-card small{
  max-width:82%;
  margin-top:10px;
  color:#64748b;
  line-height:1.55;
}

.dashboard-open-link{
  margin-top:auto;
  width:100%;
  padding:14px 0;
  border-top:1px solid #edf1f7;
  color:#0057d9;
  font-weight:900;
  background:linear-gradient(180deg,rgba(248,250,252,.3),rgba(248,250,252,.75));
}

.dashboard-rail{
  gap:18px;
}

.dashboard-user-card,
.dashboard-side-card{
  border:1px solid rgba(226,232,240,.95);
  border-radius:18px;
  background:rgba(255,255,255,.9);
  box-shadow:0 18px 46px rgba(15,23,42,.07);
}

.dashboard-side-card h2{
  color:#0057d9;
  font-size:14px;
  font-weight:900;
}

.dashboard-info-list{
  gap:14px 12px;
}

.dashboard-info-icon{
  width:38px;
  height:38px;
  border-radius:12px;
  background:#eef4ff;
  color:#315b99;
  box-shadow:none;
}

.dashboard-info-icon i{
  width:19px;
  height:19px;
}

body{
  background:#eef5ff;
}

.portal-dashboard{
  position:relative;
  overflow:hidden;
  background:
    radial-gradient(circle at 18% -8%, rgba(210,232,255,.95) 0%, rgba(230,243,255,.70) 30%, transparent 50%),
    radial-gradient(circle at 82% 8%, rgba(205,229,255,.78) 0%, rgba(235,247,255,.62) 32%, transparent 54%),
    radial-gradient(circle at 78% 92%, rgba(220,240,255,.72) 0%, rgba(240,248,255,.70) 36%, transparent 58%),
    linear-gradient(135deg,#f8fbff 0%,#eef7ff 42%,#f6fbff 100%);
}

.portal-dashboard::before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:
    radial-gradient(ellipse at 30% -10%, rgba(255,255,255,.95), transparent 42%),
    radial-gradient(ellipse at 58% 75%, rgba(255,255,255,.75), transparent 45%);
  z-index:0;
}

.portal-dashboard::after{
  content:"";
  position:absolute;
  right:-120px;
  bottom:-120px;
  width:520px;
  height:520px;
  pointer-events:none;
  background:
    radial-gradient(circle, rgba(255,255,255,.85) 1.2px, transparent 1.4px);
  background-size:12px 12px;
  opacity:.45;
  border-radius:50%;
  z-index:0;
}

.dashboard-main,
.dashboard-rail{
  position:relative;
  z-index:1;
}

.dashboard-stat,
.dashboard-app-card,
.dashboard-user-card,
.dashboard-side-card{
  background:rgba(255,255,255,.72);
  border:1px solid rgba(255,255,255,.78);
  backdrop-filter:blur(22px);
  -webkit-backdrop-filter:blur(22px);
  box-shadow:
    0 22px 60px rgba(31,41,55,.08),
    inset 0 1px 0 rgba(255,255,255,.75);
}

.dashboard-app-card{
  border-radius:22px;
}

.dashboard-stat{
  border-radius:22px;
}

.dashboard-app-icon,
.dashboard-stat-icon{
  background:linear-gradient(135deg,var(--accent) 0%, color-mix(in srgb,var(--accent) 72%, #ffffff) 48%, color-mix(in srgb,var(--accent) 70%, #0f172a) 100%);
  box-shadow:
    0 16px 34px color-mix(in srgb,var(--accent) 34%, transparent),
    inset 0 1px 0 rgba(255,255,255,.35);
}

.dashboard-app-card:nth-child(1){--accent:#8b5cf6!important;}
.dashboard-app-card:nth-child(2){--accent:#3b82f6!important;}
.dashboard-app-card:nth-child(3){--accent:#38bdf8!important;}
.dashboard-app-card:nth-child(4){--accent:#2dd4bf!important;}
.dashboard-app-card:nth-child(5){--accent:#d946ef!important;}
.dashboard-app-card:nth-child(6){--accent:#60a5fa!important;}
.dashboard-app-card:nth-child(7){--accent:#f43f8f!important;}
.dashboard-app-card:nth-child(8){--accent:#818cf8!important;}
.dashboard-app-card:nth-child(9){--accent:#22d3ee!important;}

.dashboard-stat:nth-child(1){--accent:#2563eb!important;}
.dashboard-stat:nth-child(2){--accent:#10b981!important;}
.dashboard-stat:nth-child(3){--accent:#a855f7!important;}

.dashboard-info-icon{
  background:linear-gradient(135deg,#eef6ff,#dbeafe);
  color:#2563eb;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.7);
}

.dashboard-app-card:hover{
  transform:translateY(-6px);
  box-shadow:
    0 30px 80px rgba(31,41,55,.14),
    inset 0 1px 0 rgba(255,255,255,.8);
}

.nav-icon{
  display:flex;
  align-items:center;
  justify-content:center;
  width:30px;
  height:30px;
  border-radius:10px;
  background:linear-gradient(135deg,#eef6ff,#f5f3ff);
  color:#2563eb;
}

.nav-icon i{
  width:17px;
  height:17px;
  stroke-width:2.2;
}

.side-nav a.active .nav-icon{
  background:linear-gradient(135deg,#dbeafe,#eef2ff);
  color:#0057d9;
}

.logout-link{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
}

.logout-link i{
  width:16px;
  height:16px;
}

.side-nav .nav-icon{
  background:linear-gradient(
    135deg,
    var(--accent) 0%,
    color-mix(in srgb,var(--accent) 72%,#ffffff) 52%,
    color-mix(in srgb,var(--accent) 72%,#0f172a) 100%
  );
  color:#fff;
  box-shadow:0 10px 22px color-mix(in srgb,var(--accent) 28%,transparent);
}

.side-nav .nav-icon i{
  width:17px;
  height:17px;
  stroke-width:2.25;
}
.side-nav .nav-icon{
  background:linear-gradient(135deg,var(--accent),color-mix(in srgb,var(--accent) 72%,#ffffff) 52%,color-mix(in srgb,var(--accent) 72%,#0f172a));
  color:#fff;
}

.side-nav .nav-icon i{
  width:17px;
  height:17px;
}

.side-nav .nav-icon{
  width:28px;
  height:28px;
  border-radius:9px;
  background:linear-gradient(
    135deg,
    var(--accent) 0%,
    color-mix(in srgb,var(--accent) 72%,#ffffff) 48%,
    color-mix(in srgb,var(--accent) 70%,#0f172a) 100%
  ) !important;
  color:#fff !important;
  box-shadow:0 10px 22px color-mix(in srgb,var(--accent) 30%,transparent);
}

.side-nav .nav-icon i{
  width:16px;
  height:16px;
  stroke-width:2.25;
}

.hero-pro{
  position:relative;
  padding:22px 26px 24px;
  margin-bottom:18px;
  border-radius:26px;
  overflow:hidden;
  background:
    linear-gradient(135deg,rgba(255,255,255,.82),rgba(255,255,255,.48)),
    radial-gradient(circle at 12% 10%,rgba(37,99,235,.13),transparent 34%),
    radial-gradient(circle at 90% 10%,rgba(96,165,250,.16),transparent 36%);
  border:1px solid rgba(255,255,255,.75);
  box-shadow:
    0 24px 70px rgba(15,23,42,.08),
    inset 0 1px 0 rgba(255,255,255,.85);
  backdrop-filter:blur(22px);
}

.hero-pro::before{
  content:"";
  position:absolute;
  right:-80px;
  top:-100px;
  width:320px;
  height:320px;
  border-radius:50%;
  background:radial-gradient(circle,rgba(147,197,253,.20),transparent 62%);
}

.hero-content{
  position:relative;
  z-index:1;
}

.hero-kicker{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:7px 12px;
  border-radius:999px;
  background:rgba(37,99,235,.10);
  color:#0057d9;
  font-size:12px;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.hero-kicker i{
  width:15px;
  height:15px;
}

.hero-pro h1{
  position:relative;
  display:block;
  width:max-content;
  margin:0 0 16px;
  font-size:72px;
  line-height:1;
  letter-spacing:-2.8px;
  font-weight:950;

 background:linear-gradient(
    90deg,
    #001f54 0%,
    #003b8e 30%,
    #0057d9 60%,
    #1d4ed8 80%,
    #60a5fa 100%
);
  -webkit-background-clip:text;
  background-clip:text;
  -webkit-text-fill-color:transparent;

  text-shadow:
    0 2px 4px rgba(0,35,140,.22),
    0 10px 24px rgba(124,58,237,.20);

}

.hero-pro h1::after{
  content:"";
  position:absolute;
  left:4px;
  right:4px;
  bottom:-12px;
  height:7px;
  border-radius:999px;
background:linear-gradient(
    90deg,
    #001f54 0%,
    #003b8e 35%,
    #0057d9 70%,
    #60a5fa 100%
);
  box-shadow:0 10px 24px rgba(124,58,237,.28);
}

.hero-th{
  margin:0;
  color:#0f172a;
  font-size:16px;
  font-weight:900;
}

.hero-sub{
  margin-top:5px;
  color:#64748b;
  font-size:14px;
}

.hero-badges{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:14px;
}

.hero-badges span{
  display:inline-flex;
  align-items:center;
  gap:7px;
  padding:8px 12px;
  border-radius:999px;
  background:rgba(255,255,255,.72);
  border:1px solid rgba(226,232,240,.85);
  color:#334155;
  font-size:12px;
  font-weight:800;
}

.hero-badges i{
  width:15px;
  height:15px;
  color:#2563eb;
}

.dashboard-avatar{
  display:flex;
  align-items:center;
  justify-content:center;
  width:42px;
  height:42px;
  border-radius:14px;
  background:linear-gradient(
      135deg,
      #0f2c6e 0%,
      #1d4ed8 50%,
      #60a5fa 100%
  );
  color:#fff;
  box-shadow:0 12px 26px rgba(37,99,235,.22);
}

.dashboard-avatar i{
  width:21px;
  height:21px;
  stroke-width:2.3;
}

.logout-link{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;

  height:48px;
  border-radius:14px;
  border:none;

 background:linear-gradient(
    135deg,
    #001f54 0%,
    #003b8e 40%,
    #0057d9 75%,
    #60a5fa 100%
);

  color:#ffffff;
  font-weight:800;

  box-shadow:
    0 8px 20px rgba(124,58,237,.28),
    0 3px 8px rgba(37,99,235,.18);

  transition:.25s ease;
}

.logout-link i{
  width:18px;
  height:18px;
  color:#ffffff;
  stroke-width:2.5;
}

.logout-link:hover{
  transform:translateY(-2px);
  filter:brightness(1.08);

  box-shadow:
    0 16px 32px rgba(124,58,237,.35),
    0 6px 14px rgba(37,99,235,.25);

background:linear-gradient(
    135deg,
    #00163d 0%,
    #002f73 40%,
    #004fc5 75%,
    #4f9fff 100%
);
}

.brand-premium{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  height:118px;
  padding:22px 18px;
  background:linear-gradient(135deg,#020617 0%,#07142c 58%,#0b1f47 100%);
  overflow:hidden;
  border-bottom:1px solid rgba(255,255,255,.08);
  box-shadow:0 14px 34px rgba(15,23,42,.22);
}

.brand-premium::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  height:4px;
  background:linear-gradient(90deg,#001f54,#003b8e,#0057d9,#60a5fa);
}

.brand-premium .brand-logo-wrap{
  position:relative;
  z-index:1;
  background:transparent;
  box-shadow:none;
}

.brand-premium .brand-logo{
  width:170px;
  max-width:100%;
  height:auto;
  filter:drop-shadow(0 8px 18px rgba(255,255,255,.12));
}

.brand-premium .brand-logo,
.brand-logo{
  opacity:1 !important;
  filter:
    brightness(0)
    invert(1)
    contrast(1.8)
    saturate(0)
    drop-shadow(0 8px 18px rgba(255,255,255,.22)) !important;
}

.brand-premium{
  height:128px;
  padding:0;
  display:flex;
  align-items:center;
  justify-content:center;
}

.brand-premium .brand-logo-wrap{
  width:100%;
  height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
}

.brand-premium .brand-logo{
  width:220px;
  max-width:88%;
  height:auto;
  display:block;
}

.hero-pro{
  display:grid;
  grid-template-columns:minmax(0, 1fr) 520px;
  align-items:center;
  gap:24px;
}

.hero-graphic{
  position:relative;
  z-index:1;
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:220px;
  pointer-events:none;
}

.hero-graphic img{
  width:520px;
  max-width:100%;
  height:auto;
  display:block;
  object-fit:contain;
  transform:scale(1.18);
  transform-origin:center;
  filter:drop-shadow(0 24px 42px rgba(37,99,235,.22));
}
/* HERO DARK BLUE ONLY */
.hero-pro{
  background:
    radial-gradient(circle at 74% 45%, rgba(0,102,255,.42), transparent 34%),
    radial-gradient(circle at 88% 20%, rgba(96,165,250,.22), transparent 30%),
    linear-gradient(135deg,#001638 0%,#002b66 48%,#0047a8 100%) !important;
  color:#ffffff;
}

.hero-pro h1,
.hero-pro .hero-th{
  color:#ffffff !important;
}

.hero-pro .hero-sub{
  color:#cfe3ff !important;
}

.hero-kicker{
  background:rgba(255,255,255,.12) !important;
  color:#dbeafe !important;
  border:1px solid rgba(255,255,255,.18);
}

.hero-badges span{
  background:rgba(255,255,255,.12) !important;
  border:1px solid rgba(255,255,255,.18) !important;
  color:#ffffff !important;
}

.hero-badges i{
  color:#93c5fd !important;
}

/* USER CARD STYLE LIKE MOCKUP */
.enterprise-user-card{
  display:flex;
  align-items:flex-start;
  gap:16px;
  min-height:150px;
  padding:26px 24px;
  border-radius:22px;
  background:rgba(255,255,255,.78);
  border:1px solid rgba(255,255,255,.85);
  box-shadow:
    0 22px 60px rgba(15,23,42,.10),
    inset 0 1px 0 rgba(255,255,255,.80);
  backdrop-filter:blur(22px);
}

.enterprise-user-card .dashboard-avatar{
  position:relative;
  width:58px;
  height:58px;
  border-radius:18px;
  background:linear-gradient(135deg,#002b66,#0057d9,#60a5fa);
  box-shadow:0 14px 30px rgba(0,87,217,.28);
}

.enterprise-user-card .dashboard-avatar em{
  position:absolute;
  right:-3px;
  bottom:-3px;
  width:15px;
  height:15px;
  border:3px solid #ffffff;
  border-radius:999px;
  background:#10b981;
}

.enterprise-user-card .online-status{
  display:block;
  margin-bottom:6px;
  color:#059669;
  font-size:12px;
  font-weight:900;
  letter-spacing:.12em;
}

.enterprise-user-card strong{
  display:block;
  color:#0f172a;
  font-size:16px;
  font-weight:900;
}

.enterprise-user-card small{
  display:block;
  margin-top:3px;
  color:#64748b;
}

.enterprise-user-card .user-branch{
  display:inline-flex;
  align-items:center;
  gap:6px;
  margin-top:14px;
  padding:8px 12px;
  border-radius:12px;
  background:#eef6ff;
  color:#0f3f86;
  font-size:12px;
  font-weight:900;
}

.enterprise-user-card .user-branch i{
  width:16px;
  height:16px;
}

/* FIX HERO TITLE CONTRAST ON DARK BLUE */
.hero-pro h1{
  background:linear-gradient(
    90deg,
    #eaf4ff 0%,
    #b9dcff 28%,
    #78b7ff 55%,
    #3b82f6 78%,
    #93c5fd 100%
  ) !important;

  -webkit-background-clip:text !important;
  background-clip:text !important;
  -webkit-text-fill-color:transparent !important;

  text-shadow:
    0 2px 0 rgba(255,255,255,.10),
    0 6px 18px rgba(0,0,0,.38),
    0 0 30px rgba(96,165,250,.35) !important;
}

/* เส้นใต้หัวข้อ */
.hero-pro h1::after{
  background:linear-gradient(
    90deg,
    #eaf4ff 0%,
    #93c5fd 35%,
    #3b82f6 70%,
    #60a5fa 100%
  ) !important;

  box-shadow:
    0 0 18px rgba(96,165,250,.55),
    0 8px 22px rgba(0,0,0,.25) !important;
}

.hero-welcome{
    display:inline-block;
    font-size:13px;
    font-weight:600;
    color:#dbeafe;

    padding:6px 12px;
    margin-bottom:12px;

    border-radius:999px;

    background:rgba(255,255,255,.08);
    border:1px solid rgba(255,255,255,.12);

    backdrop-filter:blur(8px);
}

/* HERO STYLE LIKE REFERENCE IMAGE */
.hero-pro{
  min-height:300px !important;
  padding:34px 28px 28px !important;
  border-radius:18px !important;

  display:grid !important;
  grid-template-columns:minmax(0, 1fr) 520px !important;
  align-items:center !important;
  gap:24px !important;

  background:
    radial-gradient(circle at 78% 42%, rgba(0,140,255,.55), transparent 30%),
    radial-gradient(circle at 88% 18%, rgba(37,99,235,.35), transparent 28%),
    linear-gradient(135deg,#020b2a 0%,#061b4a 46%,#003f9e 100%) !important;

  box-shadow:
    0 24px 70px rgba(0,31,84,.28),
    inset 0 1px 0 rgba(255,255,255,.10) !important;
}

/* Welcome Back */
.hero-welcome{
  display:inline-flex !important;
  align-items:center;
  width:max-content;
  padding:8px 14px;
  margin-bottom:18px;

  border-radius:10px;
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.10);

  color:#dbeafe;
  font-size:14px;
  font-weight:600;
}

/* Title */
.hero-pro h1{
  margin:0 0 18px !important;
  font-size:58px !important;
  line-height:1 !important;
  letter-spacing:-1.8px !important;
  font-weight:900 !important;

  color:#ffffff !important;
  background:none !important;
  -webkit-text-fill-color:#ffffff !important;

  text-shadow:
    0 0 14px rgba(255,255,255,.20),
    0 0 28px rgba(96,165,250,.35),
    0 8px 20px rgba(0,0,0,.45) !important;
}

/* Underline */
.hero-pro h1::after{
  bottom:-14px !important;
  height:5px !important;
  background:linear-gradient(90deg,#ffffff,#60a5fa,#2563eb) !important;
  box-shadow:0 0 18px rgba(96,165,250,.65) !important;
}

/* Text */
.hero-th{
  margin-top:8px !important;
  color:#ffffff !important;
  font-size:15px !important;
  font-weight:800 !important;
}

.hero-sub{
  color:#dbeafe !important;
  font-size:15px !important;
  line-height:1.5 !important;
}

/* Central Workspace Badge */
.hero-kicker{
  margin-top:4px;
  background:rgba(255,255,255,.10) !important;
  border:1px solid rgba(255,255,255,.12) !important;
  color:#ffffff !important;
}

/* Bottom Badges */
.hero-badges{
  margin-top:20px !important;
}

.hero-badges span{
  background:rgba(255,255,255,.08) !important;
  border:1px solid rgba(255,255,255,.12) !important;
  color:#ffffff !important;
  box-shadow:0 10px 24px rgba(0,0,0,.12);
}

/* Right Graphic */
.hero-graphic{
  min-height:260px !important;
  justify-content:center !important;
}

.hero-graphic img{
  width:560px !important;
  max-width:100% !important;
  transform:scale(1.08) !important;
  filter:
    drop-shadow(0 24px 48px rgba(37,99,235,.40))
    drop-shadow(0 0 24px rgba(96,165,250,.25)) !important;
}

.today-login-card {
    width: 100%;
    min-height: 300px;
    padding: 24px;
    border-radius: 24px;
    background:
        radial-gradient(circle at top right, rgba(0, 98, 255, 0.16), transparent 34%),
        linear-gradient(180deg, rgba(255,255,255,.92), rgba(248,251,255,.82));
    border: 1px solid rgba(255,255,255,.85);
    box-shadow: 0 18px 45px rgba(15, 35, 70, .10);
}

.today-login-title {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 24px;
}

.today-login-title span {
    display: inline-block;
    font-size: 11px;
    font-weight: 800;
    color: #005ce6;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.today-login-title h3 {
    margin: 6px 0 0;
    font-size: 17px;
    color: #0f172a;
}

.today-login-title small {
    font-size: 12px;
    color: #64748b;
    font-weight: 700;
    white-space: nowrap;
}

.today-login-main {
    padding: 18px;
    border-radius: 20px;
    background: rgba(255,255,255,.76);
    border: 1px solid rgba(226,232,240,.9);
    margin-bottom: 16px;
}

.today-login-main strong {
    display: block;
    font-size: 38px;
    line-height: 1;
    color: #005ce6;
    margin-bottom: 8px;
}

.today-login-main p {
    margin: 0;
    font-size: 13px;
    color: #64748b;
    font-weight: 700;
}

.today-login-progress {
    height: 10px;
    border-radius: 999px;
    overflow: hidden;
    background: #e5edf7;
    margin-top: 16px;
}

.today-login-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #003d99, #0078ff, #38bdf8);
}

.today-login-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.today-login-grid div {
    padding: 16px;
    border-radius: 18px;
    background: rgba(255,255,255,.72);
    border: 1px solid rgba(226,232,240,.9);
}

.today-login-grid small {
    display: block;
    font-size: 12px;
    color: #64748b;
    font-weight: 700;
    margin-bottom: 8px;
}

.today-login-grid strong {
    display: block;
    font-size: 36px;
    color: #0f172a;
}

.premium-login-main {
    position: relative;
    overflow: hidden;
}

.login-rate-head {
    display: flex;
    align-items: center;
    gap: 14px;
}

.login-rate-icon,
.mini-stat-icon {
    width: 42px;
    height: 42px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: linear-gradient(135deg, #0057ff, #00b7ff);
    box-shadow: 0 12px 28px rgba(0, 87, 255, .25);
}

.login-rate-icon svg,
.mini-stat-icon svg {
    width: 20px;
    height: 20px;
}

.premium-login-grid > div {
    position: relative;
    padding-top: 14px;
}

.premium-login-grid .mini-stat-icon {
    width: 34px;
    height: 34px;
    border-radius: 13px;
    margin-bottom: 10px;
}

.premium-login-grid > div:nth-child(2) .mini-stat-icon {
    background: linear-gradient(135deg, #10b981, #38bdf8);
}





.sidebar{
  background:linear-gradient(180deg,#061633 0%,#08285c 55%,#0057d9 100%);
  border-right:1px solid rgba(255,255,255,.14);
  box-shadow:18px 0 45px rgba(15,23,42,.18);
}

.brand-premium{
  background:linear-gradient(135deg,#020617 0%,#061633 55%,#003b8e 100%);
}

.side-nav-label{
  color:rgba(255,255,255,.55);
}

.side-nav a{
  color:rgba(255,255,255,.86);
}

.side-nav a:hover,
.side-nav a.active{
  background:rgba(255,255,255,.14);
  color:#ffffff;
}

.side-nav .nav-icon{
  background:rgba(255,255,255,.16) !important;
  color:#ffffff !important;
  box-shadow:none;
}

.side-nav a.active .nav-icon,
.side-nav a:hover .nav-icon{
  background:linear-gradient(135deg,#60a5fa,#0057d9) !important;
  color:#ffffff !important;
}

.logout-link{
  background:rgba(255,255,255,.13);
  border:1px solid rgba(255,255,255,.20);
  color:#ffffff;
}

.logout-link:hover{
  background:rgba(255,255,255,.20);
}
.sidebar::before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:
    radial-gradient(circle at 30% 0%,rgba(96,165,250,.28),transparent 32%),
    linear-gradient(180deg,rgba(255,255,255,.06),transparent 38%);
}
.sidebar{
  position:sticky;
  top:0;
  overflow:hidden;
}
.side-nav a.active{
  background:rgba(255,255,255,.18) !important;
  border:1px solid rgba(255,255,255,.14);
}

.side-nav-label{
  color:rgba(255,255,255,.62) !important;
}
.dashboard-app-card:hover{
    transform:translateY(-8px);
}
