.icon-button {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    color: var(--ink);
    cursor: pointer;
    font-weight: 800;
    line-height: 1;
}

.icon-button:hover {
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
}

.notice {
    margin: 16px 0;
    border-radius: 8px;
    padding: 12px 14px;
}

.notice.success {
    color: var(--green);
    background: #e8f4ee;
}

.notice.danger {
    color: var(--danger);
    background: #fae9e6;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--panel);
    color: var(--accent-dark);
    padding: 5px 9px;
    font-size: 13px;
}

.muted {
    color: var(--muted);
}

dialog {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: var(--shadow);
    color: var(--ink);
    padding: 20px;
}

.account-dialog {
    width: min(820px, 88vw);
}

.account-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: -4px 0 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
}

.account-header h2,
.account-form h3 {
    margin: 0;
}

.account-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.account-grid.single {
    grid-template-columns: minmax(0, 1fr);
}

.account-form {
    display: grid;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: linear-gradient(
        180deg,
        color-mix(in srgb, var(--panel-soft) 82%, transparent),
        var(--panel)
    );
}

.account-note-box {
    align-content: start;
}

.account-note-box p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

.account-form label,
.account-form span {
    display: grid;
    gap: 6px;
}

.account-form span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.account-form input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    color: var(--ink);
    padding: 12px 13px;
    outline: none;
}

.account-form input:focus {
    border-color: var(--accent);
}

.account-profile {
    display: grid;
    gap: 5px;
    margin-bottom: 16px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background:
        linear-gradient(
            135deg,
            color-mix(in srgb, var(--accent) 14%, transparent),
            transparent 48%
        ),
        var(--panel-soft);
}

.account-profile strong {
    font-size: 18px;
}

.account-kicker {
    color: var(--accent-dark);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.account-profile span,
.account-profile small,
.account-note,
.account-security span {
    color: var(--muted);
    font-size: 13px;
}

.account-profile p {
    margin: 8px 0 0;
    color: var(--green);
    font-size: 13px;
    line-height: 1.5;
}

.account-security {
    display: grid;
    gap: 5px;
    margin-bottom: 14px;
    padding: 13px 14px;
    border: 1px solid color-mix(in srgb, var(--accent) 26%, var(--line));
    border-radius: 8px;
    background: color-mix(in srgb, var(--accent) 8%, var(--panel));
}

.account-security strong {
    font-size: 14px;
}

.account-note {
    margin: 0;
    line-height: 1.5;
}

.code-shell {
    overflow: hidden;
    margin: 0 0 1.1em;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #1f2933;
}

.code-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 38px;
    padding: 7px 9px 7px 13px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.18);
}

.code-lang {
    color: #b9c6d2;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.code-copy {
    min-width: 68px;
    min-height: 28px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    color: #f6efe3;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
}

.code-copy:hover,
.code-copy.copied {
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
}

.code-shell pre {
    margin: 0;
    border: 0;
    border-radius: 0;
}

.table-wrap {
    overflow-x: auto;
    margin: 0 0 1.4em;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
}

.account-dialog {
    width: min(820px, 92vw);
    max-height: 88vh;
    overflow: auto;
    border: 0;
    border-radius: 18px;
    background: transparent;
    color: var(--ink);
    padding: 0;
    box-shadow: none;
}

.account-dialog::backdrop {
    background: rgba(15, 23, 42, 0.36);
    backdrop-filter: blur(4px);
}

.account-dialog-panel {
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--panel);
    box-shadow: var(--shadow);
    padding: 20px;
}

/* =========================
   Split Login Modal
========================= */

.login-split-dialog {
    width: min(1040px, 94vw);
    max-width: 1040px;
    max-height: 90vh;
    border: 0;
    border-radius: 22px;
    background: transparent;
    padding: 0;
    overflow: visible;
    color: var(--ink);
    box-shadow: none;
}

.login-split-dialog::backdrop {
    background: rgba(15, 23, 42, 0.48);
    backdrop-filter: blur(8px);
}

.login-modal-shell {
    display: grid;
    grid-template-columns: minmax(360px, 0.92fr) minmax(420px, 1fr);
    min-height: 650px;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
    border-radius: 22px;
    background: var(--panel);
    box-shadow:
        0 32px 90px rgba(15, 23, 42, 0.28),
        0 12px 28px rgba(15, 23, 42, 0.14);
}

/* Left hero */

.login-hero-panel {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(
            circle at 68% 32%,
            rgba(248, 113, 113, 0.28),
            transparent 26%
        ),
        linear-gradient(150deg, #111827 0%, #2f1f3f 42%, #c2410c 100%);
    color: #fff;
}

.login-hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(
            circle at 30% 20%,
            rgba(255, 255, 255, 0.12),
            transparent 2px
        ),
        radial-gradient(
            circle at 58% 32%,
            rgba(255, 255, 255, 0.18),
            transparent 2px
        ),
        radial-gradient(
            circle at 78% 44%,
            rgba(255, 255, 255, 0.12),
            transparent 2px
        ),
        linear-gradient(180deg, transparent 0%, rgba(2, 6, 23, 0.62) 78%),
        url("data:image/svg+xml,%3Csvg width='720' height='720' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='rgba(255,255,255,.18)' stroke-width='1'%3E%3Cpath d='M80 180 C220 80 360 260 520 140'/%3E%3Cpath d='M120 310 C260 160 440 420 620 240'/%3E%3Cpath d='M70 450 C260 380 420 520 650 380'/%3E%3C/g%3E%3C/svg%3E");
    background-size: cover;
    opacity: 0.95;
}

.login-hero-bg::after {
    content: '';
    position: absolute;
    inset: auto -20% -8% -20%;
    height: 46%;
    background: linear-gradient(
        135deg,
        transparent 38%,
        rgba(15, 23, 42, 0.7) 38.5%,
        rgba(15, 23, 42, 0.82) 100%
    );
    clip-path: polygon(
        0 80%,
        14% 58%,
        26% 74%,
        40% 42%,
        55% 68%,
        72% 36%,
        88% 62%,
        100% 44%,
        100% 100%,
        0 100%
    );
}

.login-hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    min-height: 650px;
    padding: 38px 40px;
}

.login-hero-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    width: fit-content;
    color: #fff;
}

.login-brand-mark {
    display: grid;
    place-items: center;
    width: 31px;
    height: 31px;
    border-radius: 10px;
    background: linear-gradient(135deg, #ef4444, #f97316);
    box-shadow: 0 10px 28px rgba(239, 68, 68, 0.32);
    font-size: 15px;
}

.login-hero-brand strong {
    font-size: 15px;
    font-weight: 900;
}

.login-hero-copy {
    margin-top: 58px;
}

.login-hero-copy h2 {
    margin: 0;
    color: #fff;
    font-size: clamp(31px, 3vw, 35px);
    font-weight: 950;
    line-height: 1.2;
    letter-spacing: -0.05em;
}

.login-hero-copy p {
    width: min(360px, 100%);
    margin: 20px 0 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
    line-height: 1.75;
}

.login-feature-list {
    display: grid;
    gap: 18px;
    margin-top: 34px;
}

.login-feature-item {
    display: grid;
    grid-template-columns: 43px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
}

.login-feature-item > span {
    display: grid;
    place-items: center;
    width: 43px;
    height: 43px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.13);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(10px);
    color: #fff;
    font-size: 14px;
    font-weight: 900;
}

.login-feature-item strong {
    display: block;
    color: #fff;
    font-size: 14px;
    font-weight: 900;
}

.login-feature-item p {
    margin: 4px 0 0;
    color: rgba(255, 255, 255, 0.68);
    font-size: 12px;
    line-height: 1.5;
}

.login-hero-quote {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    margin-top: 20px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 17px;
    background: rgba(255, 255, 255, 0.12);
    padding: 16px;
    backdrop-filter: blur(14px);
}

.login-quote-avatar {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #fff;
    color: #111827;
    font-weight: 950;
}

.login-hero-quote p {
    margin: 0;
    color: #fff;
    font-size: 13px;
    line-height: 1.55;
}

.login-hero-quote span {
    display: block;
    margin-top: 5px;
    color: rgba(255, 255, 255, 0.64);
    font-size: 12px;
}

.login-hero-footer {
    margin-top: 28px;
    color: rgba(255, 255, 255, 0.56);
    font-size: 11px;
}

/* Right form */

.login-form-panel {
    position: relative;
    display: grid;
    align-items: center;
    background:
        radial-gradient(
            circle at 80% 10%,
            rgba(239, 68, 68, 0.04),
            transparent 28%
        ),
        var(--panel);
    padding: 56px 70px;
}

.login-close-button {
    position: absolute;
    top: 28px;
    right: 28px;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--panel);
    color: var(--ink);
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
}

.login-close-button:hover {
    border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
    color: var(--accent-dark);
}

.login-form-inner {
    width: min(430px, 100%);
    margin: 0 auto;
}

.login-kicker {
    display: block;
    margin-bottom: 10px;
    color: var(--accent-dark);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.login-form-inner h2 {
    margin: 0;
    color: var(--ink);
    font-size: 34px;
    font-weight: 950;
    letter-spacing: -0.045em;
}

.login-subtitle {
    margin: 10px 0 30px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
}

.login-notice {
    margin-bottom: 20px;
    border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--line));
    border-radius: 13px;
    background: color-mix(in srgb, var(--accent) 6%, var(--panel));
    color: var(--muted);
    padding: 13px 14px;
    font-size: 12px;
    line-height: 1.6;
}

.login-form {
    display: grid;
    gap: 18px;
}

.login-field {
    display: grid;
    gap: 8px;
}

.login-field > span {
    color: var(--ink);
    font-size: 13px;
    font-weight: 850;
}

.login-input-wrap {
    position: relative;
}

.login-input-wrap i {
    position: absolute;
    top: 50%;
    left: 15px;
    transform: translateY(-50%);
    color: var(--muted);
    font-style: normal;
    font-size: 13px;
}

.login-input-wrap input {
    width: 100%;
    height: 48px;
    border: 1px solid color-mix(in srgb, var(--line) 86%, transparent);
    border-radius: 11px;
    background: var(--panel);
    color: var(--ink);
    padding: 0 14px 0 43px;
    outline: none;
    font-size: 14px;
    transition:
        border-color 0.16s ease,
        box-shadow 0.16s ease,
        background 0.16s ease;
}

.login-input-wrap input:focus {
    border-color: color-mix(in srgb, var(--accent) 58%, var(--line));
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 10%, transparent);
}

.login-input-wrap input::placeholder {
    color: color-mix(in srgb, var(--muted) 70%, transparent);
}

.login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: -2px;
}

.login-options label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.login-options input {
    width: 14px;
    height: 14px;
    accent-color: var(--accent);
}

.login-options a {
    color: var(--muted);
    font-size: 13px;
    font-weight: 750;
}

.login-options a:hover {
    color: var(--accent-dark);
}

.login-submit-button {
    display: grid;
    place-items: center;
    width: 100%;
    height: 52px;
    border: 0;
    border-radius: 11px;
    background: linear-gradient(135deg, #ef4444, #c2410c);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 16px 34px rgba(220, 38, 38, 0.26);
    font-size: 15px;
    font-weight: 900;
}

.login-submit-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 20px 38px rgba(220, 38, 38, 0.32);
}

.login-submit-button.muted {
    background: var(--ink);
    box-shadow: none;
}

.login-divider {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 14px;
    margin: 30px 0 22px;
}

.login-divider span {
    height: 1px;
    background: var(--line);
}

.login-divider em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
    font-weight: 700;
}

.login-social-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.login-social-row button {
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--panel);
    color: var(--ink);
    cursor: pointer;
    font-size: 13px;
    font-weight: 850;
}

.login-social-row button:hover {
    border-color: color-mix(in srgb, var(--accent) 34%, var(--line));
    background: color-mix(in srgb, var(--accent) 5%, var(--panel));
}

.login-bottom-text {
    margin: 28px 0 0;
    color: var(--muted);
    text-align: center;
    font-size: 13px;
}

.login-bottom-text button {
    border: 0;
    background: transparent;
    color: var(--accent-dark);
    cursor: pointer;
    padding: 0;
    font: inherit;
    font-weight: 900;
}

.account-profile-card {
    display: grid;
    grid-template-columns: 62px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    margin: 26px 0;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: color-mix(in srgb, var(--bg) 66%, var(--panel));
    padding: 16px;
}

.account-profile-avatar {
    display: grid;
    place-items: center;
    width: 62px;
    height: 62px;
    border-radius: 18px;
    background: linear-gradient(135deg, #ef4444, #f97316);
    color: #fff;
    font-size: 24px;
    font-weight: 950;
}

.account-profile-card strong {
    display: block;
    color: var(--ink);
    font-size: 16px;
    font-weight: 950;
}

.account-profile-card span {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 13px;
}

/* Responsive */

@media (max-width: 980px) {
    .login-split-dialog {
        width: min(560px, 94vw);
    }

    .login-modal-shell {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .login-hero-panel {
        display: none;
    }

    .login-form-panel {
        min-height: auto;
        padding: 72px 34px 42px;
    }
}

@media (max-width: 520px) {
    .login-form-panel {
        padding: 70px 22px 30px;
    }

    .login-form-inner h2 {
        font-size: 29px;
    }

    .login-social-row {
        grid-template-columns: 1fr;
    }

    .login-options {
        align-items: flex-start;
        flex-direction: column;
    }
}
