:root {
    --purple: #6c3ef5;
    --purple-dark: #5a2fd4;
    --purple-soft: #efe9ff;
    --ink: #1b2437;
    --muted: #6b7385;
    --line: #e4e7ef;
    --bg: #f6f7fb;
    --white: #ffffff;
    --danger: #d64545;
    --success: #1f9d63;
    --shadow: 0 18px 50px rgba(28, 39, 76, 0.08);
    --radius: 14px;
    --font: "Plus Jakarta Sans", system-ui, sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    font-family: var(--font);
    color: var(--ink);
    background: var(--bg);
}

a {
    color: var(--purple);
    text-decoration: none;
}

.auth-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
}

.auth-hero {
    position: relative;
    padding: 36px 48px;
    background:
        radial-gradient(circle at 20% 20%, rgba(108, 62, 245, 0.12), transparent 42%),
        radial-gradient(circle at 80% 70%, rgba(91, 143, 255, 0.14), transparent 40%),
        linear-gradient(160deg, #f8f9ff 0%, #eef1fb 55%, #f7f8fc 100%);
    display: flex;
    flex-direction: column;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--purple);
    font-weight: 800;
    font-size: 1.35rem;
    letter-spacing: -0.02em;
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--purple);
    color: #fff;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.brand-mark svg {
    width: 24px;
    height: 24px;
}

.hero-art {
    flex: 1;
    display: grid;
    place-items: center;
    animation: floatIn 0.8s ease both;
}

.hero-svg {
    width: min(100%, 520px);
    height: auto;
}

.auth-panel {
    display: grid;
    place-items: center;
    padding: 40px 28px;
    background: var(--white);
}

.auth-card {
    width: min(100%, 430px);
    animation: riseIn 0.55s ease both;
}

.brand-mobile {
    display: none;
    margin-bottom: 10px;
}

.auth-subtitle {
    margin: 0 0 22px;
    color: var(--muted);
    font-size: 0.95rem;
}

.auth-tabs {
    display: flex;
    gap: 28px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 28px;
}

.auth-tab {
    appearance: none;
    border: 0;
    background: transparent;
    padding: 0 0 12px;
    font: inherit;
    font-weight: 600;
    color: var(--muted);
    cursor: pointer;
    position: relative;
}

.auth-tab[aria-selected="true"] {
    color: var(--purple);
}

.auth-tab[aria-selected="true"]::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: var(--purple);
}

.auth-title {
    margin: 0 0 8px;
    font-size: 1.85rem;
    letter-spacing: -0.03em;
}

.auth-hint {
    margin: 0 0 20px;
    color: var(--muted);
    font-size: 0.92rem;
}

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

.field {
    display: grid;
    gap: 8px;
}

.field label {
    font-size: 0.9rem;
    font-weight: 600;
}

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

.field input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 13px 14px;
    font: inherit;
    color: var(--ink);
    background: #fff;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field input:focus {
    border-color: var(--purple);
    box-shadow: 0 0 0 4px rgba(108, 62, 245, 0.12);
}

.input-with-icon {
    position: relative;
}

.input-with-icon input {
    padding-right: 46px;
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: var(--muted);
    width: 34px;
    height: 34px;
    border-radius: 8px;
    cursor: pointer;
    display: grid;
    place-items: center;
}

.toggle-password:hover {
    color: var(--purple);
    background: var(--purple-soft);
}

.icon-eye {
    width: 18px;
    height: 18px;
}

.field-error {
    color: var(--danger);
    font-size: 0.82rem;
}

.btn {
    appearance: none;
    border: 0;
    border-radius: 12px;
    padding: 13px 18px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn:active {
    transform: translateY(1px);
}

.btn-primary {
    background: var(--purple);
    color: #fff;
    box-shadow: 0 10px 24px rgba(108, 62, 245, 0.28);
}

.btn-primary:hover {
    background: var(--purple-dark);
}

.btn-block {
    width: 100%;
    margin-top: 6px;
}

.btn-outline {
    background: #fff;
    color: var(--purple);
    border: 1px solid #d9cffc;
}

.btn-outline:hover {
    background: var(--purple-soft);
}

.auth-switch {
    margin: 22px 0 0;
    text-align: center;
    color: var(--muted);
    font-size: 0.92rem;
}

.link-btn {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--purple);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
}

.alert {
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 18px;
    font-size: 0.92rem;
}

.alert-success {
    background: #e8f8ef;
    color: var(--success);
    border: 1px solid #bfe8d0;
}

.dashboard-body {
    min-height: 100vh;
    background:
        radial-gradient(circle at top right, rgba(108, 62, 245, 0.08), transparent 30%),
        var(--bg);
}

.dash-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 20px 28px;
    background: #fff;
    border-bottom: 1px solid var(--line);
}

.dash-user {
    display: flex;
    align-items: center;
    gap: 16px;
}

.dash-user-meta {
    display: grid;
    text-align: right;
    line-height: 1.25;
}

.dash-user-meta span {
    color: var(--muted);
    font-size: 0.85rem;
}

.dash-main {
    padding: 28px;
    max-width: 720px;
    margin: 0 auto;
}

.dash-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 28px;
}

.dash-card h1 {
    margin: 0 0 8px;
    letter-spacing: -0.03em;
}

.dash-card p {
    margin: 0 0 20px;
    color: var(--muted);
}

.dash-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 12px;
}

.dash-list li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    background: #f8f9fd;
}

.dash-list span {
    color: var(--muted);
}

@keyframes floatIn {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes riseIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@media (max-width: 960px) {
    .auth-page {
        grid-template-columns: 1fr;
    }

    .auth-hero {
        display: none;
    }

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

    .auth-panel {
        min-height: 100vh;
        align-items: flex-start;
        padding-top: 48px;
    }
}
