:root {
    --pulse-blue: #0d6efd;
    --pulse-blue-hover: #0b5ed7;
    --pulse-teal: #20c997;
    --pulse-bg: #f5f7fb;
    --pulse-card: #ffffff;
    --pulse-border: #e5e7eb;
    --pulse-text: #1f2937;
    --pulse-muted: #6b7280;
    --pulse-input-bg: #ffffff;
}

html.pulse-dark {
    --pulse-bg: #0f172a;
    --pulse-card: #111827;
    --pulse-border: #334155;
    --pulse-text: #e5e7eb;
    --pulse-muted: #94a3b8;
    --pulse-input-bg: #020617;
}

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

.identity-body {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at top left, rgba(13, 110, 253, .18), transparent 32rem),
        radial-gradient(circle at bottom right, rgba(32, 201, 151, .12), transparent 30rem),
        var(--pulse-bg);
    color: var(--pulse-text);
}

.identity-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
}

.identity-brand {
    display: inline-flex;
    align-items: center;
    gap: .75rem;
    color: var(--pulse-text);
    text-decoration: none;
    font-weight: 800;
    letter-spacing: -.02em;
}

.identity-brand:hover {
    color: var(--pulse-text);
}

.identity-logo-small,
.identity-logo-large {
    background: linear-gradient(135deg, var(--pulse-blue), var(--pulse-teal));
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 28px rgba(13, 110, 253, .25);
}

.identity-logo-small {
    width: 40px;
    height: 40px;
    border-radius: 13px;
}

.identity-logo-large {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.identity-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.identity-theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid var(--pulse-border);
    background: var(--pulse-card);
    color: var(--pulse-text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.identity-theme-toggle:hover {
    border-color: var(--pulse-blue);
}

.identity-language {
    display: flex;
    align-items: center;
    gap: .5rem;
    color: var(--pulse-muted);
    font-size: .86rem;
    font-weight: 700;
}

.identity-language a {
    color: var(--pulse-text);
    text-decoration: none;
}

.identity-language a:hover {
    color: var(--pulse-blue);
}

.identity-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 1.25rem 2rem;
}

.identity-panel {
    width: 100%;
    max-width: 460px;
}

.identity-heading {
    text-align: center;
    margin-bottom: 1.5rem;
}

.identity-heading h1 {
    margin: 0;
    font-size: 2rem;
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: -.04em;
    color: var(--pulse-text);
}

.identity-heading p {
    margin: .5rem 0 0;
    color: var(--pulse-muted);
    font-size: .95rem;
}

.identity-card {
    background: rgba(17, 24, 39, .88);
    border: 1px solid var(--pulse-border);
    border-radius: 22px;
    padding: 2rem;
    box-shadow: 0 24px 70px rgba(0,0,0,.32);
    backdrop-filter: blur(12px);
}

html:not(.pulse-dark) .identity-card {
    background: rgba(255,255,255,.92);
    box-shadow: 0 24px 70px rgba(15,23,42,.14);
}

.identity-card-title {
    margin-bottom: 1.35rem;
}

.identity-card-title h2 {
    margin: 0;
    color: var(--pulse-text);
    font-size: 1.45rem;
    font-weight: 800;
}

.identity-card-title p {
    margin: .35rem 0 0;
    color: var(--pulse-muted);
}

.form-label,
.form-check-label {
    color: var(--pulse-text);
    font-weight: 600;
}

.form-control {
    background-color: var(--pulse-input-bg);
    color: var(--pulse-text);
    border-color: var(--pulse-border);
    border-radius: 10px;
    padding: .7rem .8rem;
}

.form-control:focus {
    background-color: var(--pulse-input-bg);
    color: var(--pulse-text);
    border-color: var(--pulse-blue);
    box-shadow: 0 0 0 .2rem rgba(13,110,253,.18);
}

.form-check-input {
    border-color: var(--pulse-border);
}

.btn-pulse {
    background: var(--pulse-blue);
    border: 1px solid var(--pulse-blue);
    color: white;
    border-radius: 10px;
    font-weight: 700;
    padding: .72rem 1rem;
}

.btn-pulse:hover,
.btn-pulse:focus {
    background: var(--pulse-blue-hover);
    border-color: var(--pulse-blue-hover);
    color: white;
}

.identity-link {
    color: var(--pulse-blue);
    text-decoration: none;
    font-weight: 700;
}

.identity-link:hover {
    text-decoration: underline;
}

.text-danger {
    color: #fb7185 !important;
}

html.pulse-dark input:-webkit-autofill,
html.pulse-dark input:-webkit-autofill:hover,
html.pulse-dark input:-webkit-autofill:focus,
html.pulse-dark input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px #020617 inset !important;
    box-shadow: 0 0 0 1000px #020617 inset !important;
    -webkit-text-fill-color: #e5e7eb !important;
    caret-color: #e5e7eb !important;
    border-color: #334155 !important;
}

@media (max-width: 576px) {
    .identity-topbar {
        height: auto;
        padding: 1rem;
    }

    .identity-brand span:last-child {
        display: none;
    }

    .identity-language {
        display: none;
    }

    .identity-page {
        padding-top: 5.75rem;
        align-items: flex-start;
    }

    .identity-card {
        padding: 1.25rem;
        border-radius: 18px;
    }

    .identity-heading h1 {
        font-size: 1.65rem;
    }
}
