:root {
    --bg: #f6f7f9;
    --surface: #ffffff;
    --ink: #0f1419;
    --ink-soft: #5c6670;
    --line: #e6e9ee;
    --line-strong: #d5dae2;
    --accent: #1a6b5c;
    --accent-hover: #145649;
    --accent-tint: #e8f4f1;
    --danger: #b42318;
    --danger-bg: #fef3f2;
    --danger-line: #fecdca;
    --ok: #067647;
    --ok-bg: #ecfdf3;
    --ok-line: #abeec2;
    --shadow: 0 1px 2px rgba(15, 20, 25, 0.04), 0 12px 40px rgba(15, 20, 25, 0.06);
    --radius: 14px;
}

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

body {
    min-height: 100vh;
    font-family: "Inter", "DM Sans", system-ui, sans-serif;
    color: var(--ink);
    background:
        radial-gradient(ellipse 90% 70% at 100% 0%, rgba(26, 107, 92, 0.07), transparent 55%),
        radial-gradient(ellipse 60% 50% at 0% 100%, rgba(15, 20, 25, 0.04), transparent 50%),
        var(--bg);
    display: grid;
    place-items: center;
    padding: 1.5rem;
    -webkit-font-smoothing: antialiased;
}

html[data-theme="dark"] {
    --bg: #0b0f14;
    --surface: #12181f;
    --ink: #e8eef6;
    --ink-soft: #94a3b8;
    --line: #243041;
    --line-strong: #334155;
    --accent: #2dd4bf;
    --accent-hover: #5eead4;
    --accent-tint: rgba(45, 212, 191, 0.12);
    --danger: #f87171;
    --danger-bg: rgba(248, 113, 113, 0.12);
    --danger-line: rgba(248, 113, 113, 0.35);
    --ok: #34d399;
    --ok-bg: rgba(52, 211, 153, 0.12);
    --ok-line: rgba(52, 211, 153, 0.35);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 12px 40px rgba(0, 0, 0, 0.45);
}

html[data-theme="dark"] body {
    background:
        radial-gradient(ellipse 90% 70% at 100% 0%, rgba(45, 212, 191, 0.08), transparent 55%),
        radial-gradient(ellipse 60% 50% at 0% 100%, rgba(15, 20, 25, 0.5), transparent 50%),
        var(--bg);
}

.shell {
    width: 100%;
    max-width: 420px;
    animation: rise 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.shell-wide {
    max-width: 520px;
}

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

.brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-bottom: 1.75rem;
    justify-content: center;
}

.brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--accent);
    display: grid;
    place-items: center;
    color: #fff;
    box-shadow: 0 6px 16px rgba(26, 107, 92, 0.28);
}

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

.brand-name {
    font-family: "Instrument Serif", Georgia, serif;
    font-size: 1.65rem;
    font-weight: 400;
    letter-spacing: -0.02em;
    line-height: 1;
}

.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: calc(var(--radius) + 4px);
    box-shadow: var(--shadow);
    padding: 2rem 1.75rem 1.75rem;
}

.panel h1 {
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: -0.03em;
    margin-bottom: 0.35rem;
}

.panel .lede {
    color: var(--ink-soft);
    font-size: 0.925rem;
    line-height: 1.45;
    margin-bottom: 1.6rem;
}

.field {
    margin-bottom: 1rem;
}

.field label {
    display: block;
    font-size: 0.8rem;
    font-weight: 550;
    color: var(--ink);
    margin-bottom: 0.4rem;
}

.control {
    position: relative;
    display: flex;
    align-items: center;
}

.control .icon {
    position: absolute;
    left: 0.9rem;
    width: 18px;
    height: 18px;
    color: #8b949e;
    pointer-events: none;
    transition: color 0.2s;
}

.control input {
    width: 100%;
    height: 46px;
    padding: 0 2.75rem 0 2.65rem;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: #fafbfc;
    color: var(--ink);
    font: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.control input.no-right-icon {
    padding-right: 1rem;
}

.control input::placeholder {
    color: #9aa3ad;
}

.control input:hover {
    border-color: #c5ccd6;
}

.control input:focus {
    background: #fff;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(26, 107, 92, 0.14);
}

.control:focus-within .icon {
    color: var(--accent);
}

.toggle-pass {
    position: absolute;
    right: 0.45rem;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #8b949e;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: color 0.2s, background 0.2s;
}

.toggle-pass:hover {
    color: var(--ink);
    background: rgba(15, 20, 25, 0.04);
}

.toggle-pass svg {
    width: 18px;
    height: 18px;
}

.toggle-pass .eye-off {
    display: none;
}

.toggle-pass.is-shown .eye {
    display: none;
}

.toggle-pass.is-shown .eye-off {
    display: block;
}

.msg {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    margin-bottom: 1.15rem;
    padding: 0.75rem 0.85rem;
    border-radius: 10px;
    font-size: 0.875rem;
    line-height: 1.4;
}

.msg svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.msg-erro {
    background: var(--danger-bg);
    border: 1px solid var(--danger-line);
    color: var(--danger);
}

.msg-ok {
    background: var(--ok-bg);
    border: 1px solid var(--ok-line);
    color: var(--ok);
}

.btn {
    width: 100%;
    height: 46px;
    margin-top: 0.35rem;
    border: none;
    border-radius: 10px;
    background: var(--accent);
    color: #fff;
    font: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    text-decoration: none;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 6px 16px rgba(26, 107, 92, 0.22);
}

.btn:hover {
    background: var(--accent-hover);
}

.btn:active {
    transform: scale(0.985);
}

.btn svg {
    width: 16px;
    height: 16px;
}

.btn-secondary {
    background: #fff;
    color: var(--ink);
    border: 1px solid var(--line-strong);
    box-shadow: none;
}

.btn-secondary:hover {
    background: #fafbfc;
}

.btn-row {
    display: grid;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.meta {
    margin-top: 1.25rem;
    padding-top: 1.15rem;
    border-top: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    color: var(--ink-soft);
    font-size: 0.85rem;
    line-height: 1.4;
    text-align: center;
}

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

.meta a:hover {
    text-decoration: underline;
}

.footer {
    margin-top: 1.25rem;
    text-align: center;
    color: #9aa3ad;
    font-size: 0.75rem;
}

.profile-list {
    list-style: none;
    margin: 0 0 1.25rem;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
}

.profile-list li {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--line);
}

.profile-list li:last-child {
    border-bottom: none;
}

.profile-list .label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ink-soft);
}

.profile-list .value {
    font-size: 0.95rem;
    font-weight: 500;
    word-break: break-word;
}

@media (min-width: 480px) {
    .profile-list li {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
    }

    .profile-list .label {
        flex-shrink: 0;
    }

    .profile-list .value {
        text-align: right;
    }
}
