:root {
    --sa-primary: #2563EB;
    --sa-primary-dark: #1D4ED8;
    --sa-sky: #60A5FA;
    --sa-bg: #F4F8FD;
    --sa-card: #FFFFFF;
    --sa-border: #E2EAF5;
    --sa-text: #16243A;
    --sa-muted: #718096;
    --sa-sidebar: #0B1F3A;
    --sa-sidebar-2: #07172C;
}

* { box-sizing: border-box; }

body.sa-body,
body.sa-login-body {
    margin: 0;
    font-family: "DM Sans", Arial, sans-serif;
    color: var(--sa-text);
    background: var(--sa-bg);
}

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

button, input, select, textarea { font: inherit; }

.sa-login-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at top right, rgba(96, 165, 250, .25), transparent 34%),
        linear-gradient(135deg, #07172C, #0B1F3A 55%, #103E78);
    padding: 20px;
}

.sa-login-card {
    width: min(420px, 100%);
    background: rgba(255,255,255,.96);
    border: 1px solid rgba(255,255,255,.5);
    border-radius: 22px;
    box-shadow: 0 24px 70px rgba(0,0,0,.24);
    padding: 30px;
}

.sa-login-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 30px;
}

.sa-brand-mark {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, #60A5FA, #2563EB);
    font-weight: 900;
}

.sa-login-brand strong {
    display: block;
    font-size: 22px;
    font-weight: 900;
}

.sa-login-brand small {
    color: var(--sa-muted);
    font-size: 11px;
    font-weight: 700;
}

.sa-login-card h1 {
    margin: 0 0 8px;
    font-size: 26px;
    font-weight: 900;
}

.sa-login-card p {
    margin: 0 0 24px;
    color: var(--sa-muted);
    font-size: 13px;
}

.sa-alert {
    padding: 12px 13px;
    border-radius: 12px;
    margin-bottom: 15px;
    font-size: 12px;
    font-weight: 700;
}

.sa-alert-success { color: #075985; background: #E0F2FE; border: 1px solid #BAE6FD; }
.sa-alert-error { color: #991B1B; background: #FEE2E2; border: 1px solid #FECACA; }

.sa-field { margin-bottom: 16px; }
.sa-field label {
    display: block;
    margin-bottom: 7px;
    color: #365171;
    font-size: 12px;
    font-weight: 800;
}
.sa-field input,
.sa-field select,
.sa-field textarea {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--sa-border);
    border-radius: 11px;
    padding: 0 13px;
    outline: 0;
    color: #263B5A;
    background: #fff;
}
.sa-field textarea { padding: 12px 13px; min-height: 90px; }
.sa-field input:focus,
.sa-field select:focus,
.sa-field textarea:focus {
    border-color: #93C5FD;
    box-shadow: 0 0 0 4px rgba(37,99,235,.11);
}

.sa-remember { display: flex; gap: 8px; align-items: center; color: var(--sa-muted); font-size: 12px; margin-bottom: 18px; }

.sa-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 10px;
    border: 1px solid transparent;
    cursor: pointer;
    font-size: 12px;
    font-weight: 900;
    transition: .18s ease;
}
.sa-btn-primary {
    color: #fff;
    background: linear-gradient(135deg, #3B82F6, #2563EB);
    box-shadow: 0 10px 22px rgba(37,99,235,.24);
}
.sa-btn-primary:hover { transform: translateY(-1px); color: #fff; }
.sa-btn-light { background: #fff; color: #506986; border-color: var(--sa-border); }
.sa-btn-danger { background: #FEE2E2; color: #991B1B; border-color: #FECACA; }
.sa-btn-warning { background: #DBEAFE; color: #1D4ED8; border-color: #BFDBFE; }
.sa-w-100 { width: 100%; }

.sa-layout {
    min-height: 100vh;
    display: flex;
}

.sa-sidebar {
    width: 270px;
    min-height: 100vh;
    position: fixed;
    inset: 0 auto 0 0;
    padding: 22px 16px;
    color: #D8E8FA;
    background: linear-gradient(180deg, var(--sa-sidebar), var(--sa-sidebar-2));
}

.sa-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 26px;
    padding: 0 7px;
}

.sa-sidebar-brand strong { display: block; font-size: 18px; font-weight: 900; }
.sa-sidebar-brand small { color: #98B3D0; font-size: 10px; }

.sa-nav-title {
    margin: 18px 9px 9px;
    color: #7D9ABD;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 1px;
}

.sa-nav-link {
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 11px;
    border-radius: 11px;
    color: #C6D8EE;
    font-size: 12px;
    font-weight: 800;
}
.sa-nav-link:hover,
.sa-nav-link.active {
    color: #fff;
    background: linear-gradient(90deg, #2563EB, rgba(96,165,250,.72));
}

.sa-main {
    flex: 1;
    margin-left: 270px;
    min-width: 0;
}

.sa-topbar {
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    border-bottom: 1px solid var(--sa-border);
    padding: 0 26px;
}

.sa-topbar h2 { margin: 0; font-size: 17px; font-weight: 900; }
.sa-user { display: flex; align-items: center; gap: 10px; color: #506986; font-size: 12px; font-weight: 800; }

.sa-content { padding: 26px; }

.sa-page-head {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    margin-bottom: 22px;
}
.sa-page-head h1 { margin: 0 0 6px; font-size: 28px; font-weight: 900; letter-spacing: -.8px; }
.sa-page-head p { margin: 0; color: var(--sa-muted); font-size: 13px; }

.sa-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0,1fr));
    gap: 15px;
    margin-bottom: 22px;
}
.sa-stat-card,
.sa-card {
    background: var(--sa-card);
    border: 1px solid var(--sa-border);
    border-radius: 16px;
    box-shadow: 0 10px 28px rgba(21,48,86,.055);
}
.sa-stat-card { padding: 18px; }
.sa-stat-card span { color: var(--sa-muted); font-size: 11px; font-weight: 800; }
.sa-stat-card h3 { margin: 10px 0 0; font-size: 26px; font-weight: 900; color: var(--sa-primary); }

.sa-card { padding: 18px; }
.sa-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}
.sa-card-head h3 { margin: 0; font-size: 16px; font-weight: 900; }

.sa-table-wrap { overflow-x: auto; }
.sa-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 820px;
}
.sa-table th {
    color: #7D8DA3;
    background: #F8FBFF;
    border-top: 1px solid var(--sa-border);
    border-bottom: 1px solid var(--sa-border);
    padding: 11px 12px;
    font-size: 10px;
    font-weight: 900;
    text-align: left;
    text-transform: uppercase;
}
.sa-table td {
    padding: 13px 12px;
    border-bottom: 1px solid #EDF3FA;
    color: #40566F;
    font-size: 12px;
    vertical-align: middle;
}
.sa-table strong { color: #1F3858; }
.sa-actions { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }

.sa-badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 99px;
    font-size: 10px;
    font-weight: 900;
}
.sa-badge-active { color: #075985; background: #E0F2FE; }
.sa-badge-trial { color: #1D4ED8; background: #DBEAFE; }
.sa-badge-suspended,
.sa-badge-expired { color: #991B1B; background: #FEE2E2; }
.sa-badge-inactive,
.sa-badge-cancelled { color: #475569; background: #E2E8F0; }

.sa-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.sa-col-span-2 { grid-column: span 2; }

@media (max-width: 1100px) {
    .sa-stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
    .sa-sidebar { position: static; width: 100%; min-height: auto; }
    .sa-layout { display: block; }
    .sa-main { margin-left: 0; }
}
@media (max-width: 640px) {
    .sa-content { padding: 18px; }
    .sa-page-head { flex-direction: column; }
    .sa-stats-grid, .sa-form-grid { grid-template-columns: 1fr; }
    .sa-col-span-2 { grid-column: span 1; }
}
/* =========================================================
   SUPER ADMIN PREMIUM LOGIN UI
   ========================================================= */

.sa-auth-body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    color: #14233a;
    background: #f4f8fd;
    font-family: "DM Sans", sans-serif;
}

.sa-auth-wrapper {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(520px, 1.15fr) minmax(420px, 0.85fr);
}

.sa-auth-left {
    min-height: 100vh;
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 36px 54px 32px;
    color: #ffffff;
    background:
        radial-gradient(circle at 12% 75%, rgba(96, 165, 250, 0.35), transparent 26%),
        radial-gradient(circle at 90% 12%, rgba(37, 99, 235, 0.48), transparent 34%),
        linear-gradient(145deg, #06162d 0%, #0b1f3a 46%, #123f7a 100%);
}

.sa-auth-left::after {
    content: "";
    width: 600px;
    height: 600px;
    position: absolute;
    right: -270px;
    bottom: -300px;
    z-index: -1;
    border: 90px solid rgba(147, 197, 253, 0.07);
    border-radius: 50%;
}

.sa-auth-left__pattern {
    position: absolute;
    inset: 0;
    z-index: -2;
    opacity: 0.72;
    background-image:
        linear-gradient(rgba(147, 197, 253, 0.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(147, 197, 253, 0.055) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: linear-gradient(to bottom, #000 0%, transparent 88%);
}

.sa-auth-brand,
.sa-auth-mobile-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.sa-auth-brand__icon {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, #60a5fa, #2563eb);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 15px;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.20);
    font-size: 19px;
}

.sa-auth-brand strong,
.sa-auth-mobile-brand strong {
    display: block;
    color: #ffffff;
    font-family: Manrope, sans-serif;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.8px;
}

.sa-auth-brand small,
.sa-auth-mobile-brand small {
    display: block;
    margin-top: 3px;
    color: #b9cfea;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.sa-auth-left__content {
    width: min(590px, 100%);
    margin: auto 0 125px;
}

.sa-auth-badge {
    width: max-content;
    max-width: 100%;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 22px;
    padding: 8px 12px;
    color: #dbeafe;
    background: rgba(191, 219, 254, 0.11);
    border: 1px solid rgba(147, 197, 253, 0.26);
    border-radius: 999px;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.8px;
}

.sa-auth-badge i {
    color: #93c5fd;
}

.sa-auth-left__content h1 {
    max-width: 620px;
    margin: 0 0 18px;
    color: #ffffff;
    font-family: Manrope, sans-serif;
    font-size: clamp(36px, 3.2vw, 54px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -1.8px;
}

.sa-auth-left__content p {
    max-width: 560px;
    margin: 0;
    color: #c4d8f1;
    font-size: 15px;
    line-height: 1.75;
}

.sa-auth-features {
    display: grid;
    gap: 13px;
    margin-top: 34px;
}

.sa-auth-feature {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.sa-auth-feature > span {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    flex: 0 0 34px;
    color: #bfdbfe;
    background: rgba(96, 165, 250, 0.16);
    border: 1px solid rgba(147, 197, 253, 0.18);
    border-radius: 11px;
    font-size: 14px;
}

.sa-auth-feature strong {
    display: block;
    color: #f3f8ff;
    font-size: 13px;
    font-weight: 800;
}

.sa-auth-feature small {
    display: block;
    margin-top: 3px;
    color: #aac2df;
    font-size: 11px;
}

.sa-auth-stats-card {
    width: 310px;
    position: absolute;
    right: 8%;
    bottom: 38px;
    padding: 18px;
    color: #eaf4ff;
    background: linear-gradient(145deg, rgba(23, 65, 121, 0.76), rgba(14, 45, 91, 0.84));
    border: 1px solid rgba(147, 197, 253, 0.26);
    border-radius: 18px;
    box-shadow: 0 22px 48px rgba(3, 16, 36, 0.28);
    backdrop-filter: blur(12px);
}

.sa-auth-stats-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #bad4ef;
    font-size: 11px;
    font-weight: 700;
}

.sa-auth-stats-card__top strong {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #ffffff;
    font-size: 10px;
}

.sa-auth-stats-card__top i {
    color: #60a5fa;
    font-size: 7px;
}

.sa-auth-stats-card__main {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 18px 0 16px;
}

.sa-auth-stats-card__main div {
    padding: 10px;
    background: rgba(255, 255, 255, 0.07);
    border-radius: 12px;
}

.sa-auth-stats-card__main small {
    display: block;
    color: #adc7e6;
    font-size: 8px;
}

.sa-auth-stats-card__main strong {
    display: block;
    margin-top: 4px;
    color: #ffffff;
    font-size: 18px;
    font-weight: 900;
}

.sa-auth-bars {
    height: 42px;
    display: flex;
    align-items: end;
    gap: 6px;
}

.sa-auth-bars span {
    width: 100%;
    display: block;
    background: linear-gradient(to top, #2563eb, #8ec5ff);
    border-radius: 5px 5px 2px 2px;
}

.sa-auth-right {
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 50px 30px;
    background:
        radial-gradient(circle at 100% 0%, rgba(219, 234, 254, 0.75), transparent 35%),
        #ffffff;
}

.sa-auth-card {
    width: min(430px, 100%);
    position: relative;
    z-index: 1;
}

.sa-auth-mobile-brand {
    display: none;
    margin-bottom: 30px;
}

.sa-auth-mobile-brand strong {
    color: #172a46;
}

.sa-auth-mobile-brand small {
    color: #718096;
}

.sa-auth-heading {
    margin-bottom: 28px;
}

.sa-auth-heading span {
    display: inline-block;
    margin-bottom: 10px;
    color: #2563eb;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 1.2px;
}

.sa-auth-heading h2 {
    margin: 0 0 10px;
    color: #142a49;
    font-family: Manrope, sans-serif;
    font-size: 31px;
    font-weight: 800;
    letter-spacing: -1px;
}

.sa-auth-heading p {
    margin: 0;
    color: #73849a;
    font-size: 13px;
    line-height: 1.6;
}

.sa-auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin-bottom: 16px;
    padding: 12px 13px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
}

.sa-auth-alert--error {
    color: #991b1b;
    background: #fee2e2;
    border: 1px solid #fecaca;
}

.sa-auth-form {
    display: grid;
    gap: 19px;
}

.sa-auth-field {
    display: grid;
    gap: 8px;
}

.sa-auth-field label,
.sa-auth-label-row label {
    color: #38516f;
    font-size: 11px;
    font-weight: 800;
}

.sa-auth-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sa-auth-label-row a {
    color: #2563eb;
    font-size: 10px;
    font-weight: 800;
    text-decoration: none;
}

.sa-auth-input {
    height: 49px;
    display: flex;
    align-items: center;
    color: #8ca0b8;
    background: #ffffff;
    border: 1px solid #e1eaf4;
    border-radius: 13px;
    transition: 0.18s ease;
}

.sa-auth-input:focus-within {
    color: #2563eb;
    border-color: #96c3ff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.10);
}

.sa-auth-input > i {
    width: 46px;
    flex: 0 0 46px;
    text-align: center;
    font-size: 14px;
}

.sa-auth-input input {
    width: 100%;
    height: 100%;
    min-width: 0;
    padding: 0 12px 0 0;
    color: #263b5a;
    background: transparent;
    border: 0;
    outline: 0;
    font-size: 13px;
    font-weight: 700;
}

.sa-auth-input input::placeholder {
    color: #a2b2c5;
    font-weight: 500;
}

.sa-auth-password-toggle {
    width: 45px;
    height: 100%;
    display: grid;
    place-items: center;
    flex: 0 0 45px;
    color: #88a0bc;
    background: transparent;
    border: 0;
    cursor: pointer;
}

.sa-auth-password-toggle:hover {
    color: #2563eb;
}

.sa-auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: -2px;
}

.sa-auth-options small {
    color: #8293aa;
    font-size: 10px;
    font-weight: 600;
}

.sa-auth-check {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #5e748f;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}

.sa-auth-check input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.sa-auth-check span {
    width: 16px;
    height: 16px;
    position: relative;
    display: inline-block;
    background: #ffffff;
    border: 1px solid #c9d7e7;
    border-radius: 5px;
}

.sa-auth-check input:checked + span {
    background: #2563eb;
    border-color: #2563eb;
}

.sa-auth-check input:checked + span::after {
    content: "\f00c";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #ffffff;
    font-family: "Font Awesome 6 Free";
    font-size: 8px;
    font-weight: 900;
}

.sa-auth-submit {
    min-height: 51px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #ffffff;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 55%, #1d4ed8 100%);
    border: 0;
    border-radius: 13px;
    box-shadow: 0 12px 25px rgba(37, 99, 235, 0.25);
    cursor: pointer;
    font-size: 13px;
    font-weight: 900;
    transition: 0.2s ease;
}

.sa-auth-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 15px 30px rgba(37, 99, 235, 0.34);
}

.sa-auth-submit i {
    transition: transform 0.18s ease;
}

.sa-auth-submit:hover i {
    transform: translateX(3px);
}

.sa-auth-demo-box {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 22px;
    padding: 12px;
    color: #607890;
    background: #f6faff;
    border: 1px solid #e2eefb;
    border-radius: 13px;
}

.sa-auth-demo-box > span {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    flex: 0 0 30px;
    color: #2563eb;
    background: #dbeafe;
    border-radius: 9px;
    font-size: 12px;
}

.sa-auth-demo-box strong {
    display: block;
    color: #284464;
    font-size: 11px;
    font-weight: 900;
}

.sa-auth-demo-box small {
    display: block;
    margin-top: 2px;
    color: #718096;
    font-size: 10px;
}

.sa-auth-footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin-top: 24px;
    color: #8294ab;
    font-size: 11px;
    font-weight: 700;
}

.sa-auth-footer-links a {
    color: #2563eb;
    text-decoration: none;
}

.sa-auth-copyright {
    position: absolute;
    bottom: 24px;
    margin: 0;
    color: #9aa9bc;
    font-size: 10px;
}

@media (max-width: 980px) {
    .sa-auth-wrapper {
        display: block;
    }

    .sa-auth-left {
        display: none;
    }

    .sa-auth-right {
        min-height: 100vh;
        padding: 48px 22px 70px;
    }

    .sa-auth-mobile-brand {
        display: inline-flex;
    }

    .sa-auth-copyright {
        bottom: 20px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .sa-auth-right {
        padding: 38px 17px 66px;
    }

    .sa-auth-heading h2 {
        font-size: 26px;
    }

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