:root {
    --bg: #f8f8f6;
    --panel: rgba(255, 255, 255, 0.82);
    --panel-strong: #ffffff;
    --border: rgba(17, 24, 39, 0.1);
    --text: #111827;
    --muted: #6b7280;
    --accent: #f58220;
    --accent-strong: #e06f10;
    --shadow: 0 18px 44px rgba(15, 23, 42, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: 'Inter', sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(245, 130, 32, 0.12), transparent 22%),
        linear-gradient(180deg, #fffdfa 0%, #f3f2ee 100%);
}

a {
    color: inherit;
}

.login-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(320px, 1.15fr) minmax(360px, 440px);
    gap: 28px;
    padding: 20px 24px;
}

.login-intro {
    position: relative;
    padding: 28px;
    border: 1px solid rgba(245, 130, 32, 0.1);
    border-radius: 32px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 250, 244, 0.92) 100%);
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: calc(100vh - 40px);
}

.login-intro::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top right, rgba(245, 130, 32, 0.08), transparent 24%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 42%);
    pointer-events: none;
}

.brand {
    position: relative;
    z-index: 1;
    text-decoration: none;
    display: inline-flex;
    gap: 8px;
    align-items: baseline;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand-accent {
    color: var(--accent);
}

.intro-copy {
    position: relative;
    z-index: 1;
    max-width: 560px;
    display: grid;
    gap: 12px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(245, 130, 32, 0.1);
    color: #c96b18;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.intro-copy h1 {
    font-size: clamp(24px, 2.6vw, 36px);
    line-height: 1.12;
    letter-spacing: -0.04em;
    max-width: 560px;
}

.intro-copy p {
    max-width: 520px;
    color: #5b6472;
    font-size: 15px;
    line-height: 1.6;
}

.intro-panel {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 16px;
}

.mini-window {
    padding: 14px;
    border-radius: 20px;
    background: #ffffff;
    border: 1px solid rgba(17, 24, 39, 0.08);
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
}

.mini-window > header {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

.mini-window > header span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(17, 24, 39, 0.12);
}

.mini-body {
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 14px;
    min-height: 190px;
}

.mini-body aside {
    padding: 10px;
    border-radius: 16px;
    background: #f5f7fa;
    display: grid;
    gap: 12px;
}

.mini-slide {
    height: 48px;
    border-radius: 10px;
    background: #ffffff;
    border: 1px solid transparent;
}

.mini-slide.active {
    border-color: rgba(245, 130, 32, 0.9);
    background: rgba(245, 130, 32, 0.18);
}

.mini-body section {
    padding: 12px;
    border-radius: 16px;
    background: #f8fafc;
    display: grid;
    gap: 16px;
}

.mini-toolbar {
    display: flex;
    gap: 8px;
}

.mini-toolbar span {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid rgba(17, 24, 39, 0.07);
}

.mini-canvas {
    min-height: 120px;
    border-radius: 14px;
    background:
        linear-gradient(135deg, rgba(245, 130, 32, 0.08), transparent 45%),
        linear-gradient(180deg, #ffffff 0%, #eef2f7 100%);
    border: 1px solid rgba(17, 24, 39, 0.06);
}

.intro-list {
    list-style: none;
    display: grid;
    gap: 8px;
    color: #495260;
}

.intro-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    line-height: 1.45;
}

.intro-list li::before {
    content: '';
    width: 10px;
    height: 10px;
    margin-top: 7px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
}

.auth-column {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-card {
    width: 100%;
    padding: 26px;
    border-radius: 24px;
    border: 1px solid rgba(17, 24, 39, 0.08);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow);
}

.auth-card.show {
    display: block;
}

.auth-card.hide {
    display: none;
}

form[name="register"] {
    position: fixed;
    top: 50%;
    left: 50%;
    width: min(440px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    overflow: auto;
    transform: translate(-50%, -50%);
    z-index: 30;
}

.register-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, 0.36);
    backdrop-filter: blur(6px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease;
    z-index: 20;
}

body.register-open {
    overflow: hidden;
}

body.register-open .register-backdrop {
    opacity: 1;
    pointer-events: auto;
}

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

.card-kicker {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.switch-link {
    border: 0;
    background: transparent;
    color: var(--accent);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.card-copy {
    margin-bottom: 18px;
}

.card-copy h2 {
    font-size: 22px;
    line-height: 1.12;
    letter-spacing: -0.04em;
    margin-bottom: 10px;
    font-weight: 700;
}

.card-copy p {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.45;
}

.field,
.field-select,
.terms {
    display: block;
    margin-bottom: 12px;
}

.field-label,
.field-select legend {
    display: block;
    margin-bottom: 8px;
    color: #4b5563;
    font-size: 13px;
    font-weight: 600;
}

.field input,
.field-select select {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--panel-strong);
    padding: 12px 14px;
    font: inherit;
    color: var(--text);
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.field input:focus,
.field-select select:focus {
    border-color: rgba(245, 130, 32, 0.7);
    box-shadow: 0 0 0 4px rgba(245, 130, 32, 0.12);
}

.field input::placeholder {
    color: #9ca3af;
}

.field-select {
    border: 0;
    padding: 0;
}

.field-select select {
    appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, #6b7280 50%),
        linear-gradient(135deg, #6b7280 50%, transparent 50%);
    background-position:
        calc(100% - 18px) calc(50% - 2px),
        calc(100% - 12px) calc(50% - 2px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}

.forgot-link {
    width: fit-content;
    margin: 2px 0 14px;
    color: #4b5563;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.forgot-link:hover,
.switch-link:hover,
.terms a:hover {
    color: var(--accent-strong);
}

.submit-btn {
    width: 100%;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--accent) 0%, var(--accent-strong) 100%);
    color: #fff;
    padding: 13px 18px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(245, 130, 32, 0.2);
}

.submit-btn:hover {
    transform: translateY(-1px);
}

.terms {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: #4b5563;
    font-size: 14px;
    line-height: 1.5;
}

.terms input {
    margin-top: 3px;
}

.terms a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

#shadow #box.popUp {
    padding: 28px;
}

#shadow #box.popUp form {
    width: 360px;
    max-width: 100%;
}

#shadow #box.popUp form input {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 14px;
    outline: none;
}

#shadow #box.popUp form button {
    border: 0;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    padding: 12px 18px;
    cursor: pointer;
}

@media only screen and (max-width: 1080px) {
    .login-shell {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .login-intro {
        min-height: auto;
    }

    .auth-column {
        padding-bottom: 24px;
    }
}

@media only screen and (max-width: 720px) {
    .login-shell {
        padding: 14px;
    }

    .login-intro {
        padding: 20px;
        border-radius: 24px;
    }

    .intro-copy h1 {
        font-size: 28px;
    }

    .mini-body {
        grid-template-columns: 1fr;
    }

    .auth-card {
        padding: 24px;
        border-radius: 22px;
    }

    form[name="register"] {
        width: calc(100vw - 20px);
        max-height: calc(100vh - 20px);
    }

    .card-head {
        align-items: flex-start;
        flex-direction: column;
    }
}
