:root {
    --navy-950: #07111f;
    --navy-900: #0b1728;
    --navy-800: #10233b;
    --blue-600: #246bfd;
    --blue-500: #3b7cff;
    --cyan-400: #3fd5e8;
    --slate-900: #182230;
    --slate-700: #344054;
    --slate-500: #667085;
    --slate-300: #d0d5dd;
    --slate-200: #e4e7ec;
    --slate-100: #f2f4f7;
    --white: #ffffff;
    --danger-bg: #fff1f1;
    --danger-border: #ffc9c9;
    --danger-text: #b42318;
    --shadow:
        0 24px 70px rgba(16, 24, 40, 0.16),
        0 3px 12px rgba(16, 24, 40, 0.08);
}

* {
    box-sizing: border-box;
}

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

body {
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    color: var(--slate-900);
}

button,
input {
    font: inherit;
}

.login-body {
    background: var(--slate-100);
}

.login-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(360px, 44%) 1fr;
}

.brand-panel {
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: 72px;
    color: var(--white);
    background:
        radial-gradient(
            circle at 15% 20%,
            rgba(63, 213, 232, 0.24),
            transparent 30%
        ),
        radial-gradient(
            circle at 85% 75%,
            rgba(59, 124, 255, 0.32),
            transparent 34%
        ),
        linear-gradient(
            145deg,
            var(--navy-950),
            var(--navy-800)
        );
}

.brand-panel::after {
    content: "";
    position: absolute;
    width: 420px;
    height: 420px;
    right: -210px;
    bottom: -180px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 50%;
    box-shadow:
        0 0 0 70px rgba(255, 255, 255, 0.025),
        0 0 0 140px rgba(255, 255, 255, 0.018);
}

.brand-content {
    position: relative;
    z-index: 1;
    max-width: 530px;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 62px;
    height: 62px;
    margin-bottom: 42px;
    border: 1px solid rgba(255, 255, 255, 0.36);
    border-radius: 18px;
    color: var(--white);
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.08em;
    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.18),
            rgba(255, 255, 255, 0.04)
        );
    backdrop-filter: blur(10px);
}

.brand-mark.small {
    width: 42px;
    height: 42px;
    margin: 0;
    border-radius: 12px;
    font-size: 14px;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--cyan-400);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.eyebrow.dark {
    color: var(--blue-600);
}

.brand-content h1 {
    margin: 0;
    font-size: clamp(46px, 6vw, 76px);
    line-height: 1;
    letter-spacing: -0.045em;
}

.brand-description {
    max-width: 500px;
    margin: 28px 0 42px;
    color: rgba(255, 255, 255, 0.74);
    font-size: 18px;
    line-height: 1.7;
}

.security-note {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 11px 15px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.84);
    background: rgba(255, 255, 255, 0.06);
    font-size: 13px;
}

.security-icon {
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    color: var(--navy-950);
    background: var(--cyan-400);
    font-weight: 900;
}

.login-panel {
    display: grid;
    place-items: center;
    padding: 48px;
}

.login-card {
    width: min(100%, 440px);
    padding: 46px;
    border: 1px solid rgba(16, 24, 40, 0.06);
    border-radius: 24px;
    background: var(--white);
    box-shadow: var(--shadow);
}

.mobile-brand {
    display: none;
}

.login-card h2 {
    margin: 0;
    font-size: 38px;
    letter-spacing: -0.035em;
}

.subtitle {
    margin: 12px 0 32px;
    color: var(--slate-500);
    line-height: 1.6;
}

.alert {
    margin-bottom: 24px;
    padding: 13px 15px;
    border: 1px solid var(--danger-border);
    border-radius: 10px;
    color: var(--danger-text);
    background: var(--danger-bg);
    font-size: 14px;
}

label {
    display: block;
    margin: 19px 0 8px;
    color: var(--slate-700);
    font-size: 14px;
    font-weight: 700;
}

input[type="text"],
input[type="password"] {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    border: 1px solid var(--slate-300);
    border-radius: 10px;
    outline: none;
    color: var(--slate-900);
    background: var(--white);
    transition:
        border-color 0.15s,
        box-shadow 0.15s;
}

input:focus {
    border-color: var(--blue-500);
    box-shadow: 0 0 0 4px rgba(59, 124, 255, 0.14);
}

button[type="submit"] {
    width: 100%;
    height: 50px;
    margin-top: 26px;
    border: 0;
    border-radius: 10px;
    color: var(--white);
    background:
        linear-gradient(
            135deg,
            var(--blue-600),
            var(--blue-500)
        );
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(36, 107, 253, 0.22);
}

button[type="submit"]:hover {
    filter: brightness(1.04);
}

.login-footer {
    margin: 25px 0 0;
    color: var(--slate-500);
    font-size: 12px;
    line-height: 1.6;
    text-align: center;
}

.app-body {
    min-height: 100vh;
    background: #f7f8fa;
}

.topbar {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 38px;
    color: var(--white);
    background: var(--navy-950);
    box-shadow: 0 2px 12px rgba(7, 17, 31, 0.18);
}

.topbar-brand {
    display: flex;
    align-items: center;
    gap: 13px;
}

.topbar-brand > div:last-child {
    display: flex;
    flex-direction: column;
}

.topbar-brand span,
.user-details span {
    color: rgba(255, 255, 255, 0.58);
    font-size: 12px;
}

.user-area {
    display: flex;
    align-items: center;
    gap: 22px;
}

.user-details {
    display: flex;
    flex-direction: column;
    text-align: right;
}

.user-area form {
    margin: 0;
}

.logout-button {
    width: auto !important;
    height: 38px !important;
    margin: 0 !important;
    padding: 0 16px;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    background: rgba(255, 255, 255, 0.08) !important;
    box-shadow: none !important;
}

.dashboard {
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
    padding: 72px 0;
}

.welcome h1 {
    margin: 0;
    font-size: 42px;
    letter-spacing: -0.04em;
}

.welcome > p:last-child {
    margin: 14px 0 0;
    color: var(--slate-500);
    font-size: 17px;
}

.tool-section {
    margin-top: 68px;
}

.section-heading h2 {
    margin: 0;
    font-size: 25px;
}

.section-heading p {
    margin: 8px 0 0;
    color: var(--slate-500);
}

.tool-grid {
    display: grid;
    grid-template-columns:
        repeat(auto-fit, minmax(310px, 1fr));
    gap: 22px;
    margin-top: 22px;
}

.tool-card {
    display: flex;
    gap: 20px;
    padding: 26px;
    border: 1px solid var(--slate-200);
    border-radius: 16px;
    background: var(--white);
    box-shadow: 0 3px 12px rgba(16, 24, 40, 0.04);
}

.tool-card.disabled {
    opacity: 0.78;
}

.tool-icon {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 15px;
    color: var(--blue-600);
    background: rgba(36, 107, 253, 0.09);
    font-size: 13px;
    font-weight: 900;
}

.tool-content h3 {
    margin: 11px 0 8px;
    font-size: 18px;
}

.tool-content p {
    margin: 0;
    color: var(--slate-500);
    line-height: 1.6;
}

.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 999px;
    color: var(--blue-600);
    background: rgba(36, 107, 253, 0.09);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

@media (max-width: 860px) {
    .login-layout {
        grid-template-columns: 1fr;
    }

    .brand-panel {
        display: none;
    }

    .login-panel {
        padding: 24px;
    }

    .mobile-brand {
        display: flex;
        align-items: center;
        gap: 12px;
        margin-bottom: 40px;
        color: var(--navy-950);
        font-weight: 800;
    }

    .mobile-brand .brand-mark {
        color: var(--white);
        background: var(--navy-900);
    }

    .topbar {
        padding: 14px 18px;
    }

    .user-details {
        display: none;
    }

    .dashboard {
        width: min(100% - 32px, 1180px);
        padding: 48px 0;
    }
}

@media (max-width: 520px) {
    .login-panel {
        padding: 0;
    }

    .login-card {
        min-height: 100vh;
        padding: 34px 24px;
        border-radius: 0;
    }

    .welcome h1 {
        font-size: 34px;
    }
}
