:root {
    /* User CP Palette */
    --shadow: #252323;
    --slate: #70798c;
    --parchment: #f5f1ed;
    --bone: #dad2bc;
    --khaki: #a99985;

    /* Auth Theme */
    --auth-bg: var(--parchment);
    --auth-card: #ffffff;
    --auth-border: rgba(112, 121, 140, .28);
    --auth-text: var(--shadow);
    --auth-muted: rgba(37, 35, 35, .68);

    --auth-accent: var(--khaki);
    --auth-accent-dark: rgba(169, 153, 133, .88);

    --auth-danger: #b83a3a;
}

body.mi-auth {
    background: var(--auth-bg);
    margin: 0;
    font-family: "Quicksand", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    color: var(--auth-text);
}

.mi-auth-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 14px;
}

.mi-auth-card {
    width: min(560px, 100%);
    background: var(--auth-card);
    border: 1px solid var(--auth-border);
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(37, 35, 35, .10);
    overflow: hidden;
}

.mi-auth-hero {
    padding: 22px 18px;
    background: linear-gradient(135deg, rgba(37, 35, 35, .95), rgba(112, 121, 140, .88));
    display: flex;
    align-items: center;
    justify-content: center;
}

.mi-auth-hero img {
    max-width: 320px;
    width: 75%;
    height: auto;
    display: block;
    filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .25));
}

.mi-auth-inner {
    padding: 20px 20px 22px;
}

.mi-auth-title {
    margin: 0 0 6px;
    font-size: 22px;
    font-weight: 800;
    text-align: center;
    color: var(--shadow);
}

.mi-auth-note {
    margin: 0 0 16px;
    font-size: 13px;
    color: var(--auth-muted);
    text-align: center;
    line-height: 1.45;
}

.mi-auth-alert {
    border-radius: 14px;
    padding: 12px 12px;
    margin: 0 0 14px;
    border: 1px solid rgba(184, 58, 58, .35);
    background: rgba(184, 58, 58, .08);
    color: #7d1f1f;
    font-size: 13px;
}

.mi-auth-success {
    border-radius: 14px;
    padding: 12px;
    margin: 0 0 14px;
    border: 1px solid rgba(77, 133, 92, .35);
    background: rgba(77, 133, 92, .10);
    color: #315f3d;
    font-size: 13px;
}

.mi-auth-form {
    display: grid;
    gap: 12px;
    margin-top: 10px;
}

.mi-field label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 6px;
    color: rgba(37, 35, 35, .88);
}

.mi-field input {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 12px;
    border: 1px solid var(--auth-border);
    border-radius: 12px;
    outline: none;
    font-size: 14px;
    background: var(--parchment);
    color: var(--shadow);
    transition: .15s ease;
}

.mi-field input::placeholder {
    color: rgba(112, 121, 140, .75);
}

.mi-field input:focus {
    border-color: rgba(169, 153, 133, .85);
    box-shadow: 0 0 0 4px rgba(218, 210, 188, .55);
    background: #fff;
}

.mi-auth-actions {
    display: flex;
    justify-content: center;
    padding-top: 6px;
}

.mh-check {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    width: fit-content;
    margin: 0;
    color: var(--auth-text);
    cursor: pointer;
    font-size: 13px;
    font-weight: 800;
}

.mh-check input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    display: inline-grid;
    place-items: center;
    width: 22px;
    height: 22px;
    min-width: 22px;
    margin: 0;
    padding: 0;
    border: 2px solid #6798c0;
    border-radius: 7px;
    background: #fff;
    box-shadow: none;
    cursor: pointer;
}

.mh-check input[type="checkbox"]::before {
    content: "";
    width: 6px;
    height: 11px;
    border: solid #fff;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg) scale(0);
    transform-origin: center;
}

.mh-check input[type="checkbox"]:checked {
    background: #6798c0;
}

.mh-check input[type="checkbox"]:checked::before {
    transform: rotate(45deg) scale(1);
}

.mh-check input[type="checkbox"]:focus-visible {
    outline: 3px solid rgba(153, 214, 234, .55);
    outline-offset: 2px;
}

.mi-auth-links {
    text-align: center;
    font-size: 12px;
}

.mi-auth-links a,
.mi-auth-foot a {
    color: inherit;
    font-weight: 800;
}

.mi-btn {
    appearance: none;
    border: 0;
    cursor: pointer;
    padding: 12px 18px;
    border-radius: 14px;
    font-weight: 800;
    font-size: 14px;
    background: var(--auth-accent);
    color: #ffffff;
    box-shadow: 0 10px 18px rgba(169, 153, 133, .35);
    transition: .15s ease;
    min-width: 180px;
    text-align: center;
    text-decoration: none;
}

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

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

.mi-auth-foot {
    text-align: center;
    font-size: 12px;
    color: var(--auth-muted);
    margin-top: 10px;
}
