:root {
    color-scheme: dark;
    font-family: Arial, Helvetica, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    background: #171717;
}

body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    color: #f8fafc;
    background:
        linear-gradient(112deg, rgba(245, 124, 0, 0.1), transparent 38%),
        radial-gradient(circle at 90% 8%, rgba(245, 124, 0, 0.16), transparent 29%),
        #171717;
}

.webmail-page {
    position: relative;
    min-height: 100vh;
    padding: clamp(24px, 5vh, 72px) 20px;
    display: grid;
    place-items: center;
    overflow: hidden;
}

.webmail-page::before,
.webmail-page::after {
    position: absolute;
    z-index: 0;
    content: '';
    pointer-events: none;
}

.webmail-page::before {
    width: min(50vw, 760px);
    aspect-ratio: 1;
    right: -20%;
    bottom: -41%;
    border: 1px solid rgba(245, 124, 0, 0.22);
    border-radius: 50%;
    box-shadow:
        0 0 0 48px rgba(245, 124, 0, 0.035),
        0 0 0 97px rgba(245, 124, 0, 0.025);
}

.webmail-page::after {
    width: min(42vw, 620px);
    height: 1px;
    top: 17%;
    left: -10%;
    background: linear-gradient(90deg, transparent, rgba(245, 124, 0, 0.6), transparent);
    transform: rotate(-24deg);
}

.webmail-card {
    position: relative;
    z-index: 1;
    width: min(100%, 460px);
    padding: clamp(28px, 5vw, 44px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-top-color: rgba(245, 124, 0, 0.74);
    border-radius: 16px;
    background: rgba(30, 30, 30, 0.96);
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.33);
}

.brand {
    padding-bottom: 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.brand img {
    display: block;
    width: auto;
    height: 64px;
    max-width: 100%;
    object-fit: contain;
    object-position: left center;
}

.heading {
    margin: 28px 0 24px;
}

.eyebrow {
    margin: 0 0 8px;
    color: #f57c00;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

h1 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(1.6rem, 4vw, 2rem);
    line-height: 1.15;
}

.heading > p:last-child,
.access-note {
    color: #cbd5e1;
    font-size: 0.95rem;
    line-height: 1.55;
}

.heading > p:last-child {
    margin: 10px 0 0;
}

.notice {
    margin: 0 0 20px;
    padding: 12px 14px;
    border: 1px solid;
    border-radius: 8px;
    font-size: 0.9rem;
    line-height: 1.45;
}

.notice--error {
    color: #fee2e2;
    border-color: rgba(248, 113, 113, 0.72);
    background: rgba(127, 29, 29, 0.36);
}

.notice--success {
    color: #dcfce7;
    border-color: rgba(74, 222, 128, 0.68);
    background: rgba(20, 83, 45, 0.35);
}

.field {
    margin-bottom: 18px;
}

label {
    display: inline-block;
    margin-bottom: 8px;
    color: #f8fafc;
    font-size: 0.9rem;
    font-weight: 700;
}

input[type='email'],
input[type='password'] {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid #4b5563;
    border-radius: 8px;
    outline: none;
    color: #ffffff;
    background: #171717;
    font: inherit;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

input[type='email']:hover,
input[type='password']:hover {
    border-color: #94a3b8;
}

input[type='email']:focus,
input[type='password']:focus,
input[type='checkbox']:focus-visible,
button:focus-visible {
    outline: 3px solid rgba(245, 124, 0, 0.48);
    outline-offset: 2px;
}

input[type='email']:focus,
input[type='password']:focus {
    border-color: #f57c00;
    box-shadow: 0 0 0 3px rgba(245, 124, 0, 0.16);
}

.remember {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 28px;
    margin: 1px 0 24px;
    color: #dbe4ef;
    font-weight: 500;
    cursor: pointer;
}

.remember input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #f57c00;
}

.remember span {
    line-height: 1.35;
}

button {
    width: 100%;
    min-height: 50px;
    padding: 12px 20px;
    border: 0;
    border-radius: 8px;
    color: #ffffff;
    background: linear-gradient(135deg, #f57c00, #d96d00);
    box-shadow: 0 10px 24px rgba(245, 124, 0, 0.17);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    transition: background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

button:hover {
    background: linear-gradient(135deg, #ff8a18, #e87400);
    box-shadow: 0 12px 26px rgba(245, 124, 0, 0.28);
    transform: translateY(-1px);
}

button:active {
    transform: translateY(0);
}

.access-note {
    margin: 23px 0 0;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.8rem;
}

.site-return-link {
    display: inline-flex;
    margin-top: 12px;
    color: rgba(203, 213, 225, 0.7);
    font-size: 0.8rem;
    line-height: 1.4;
    text-decoration: none;
    transition: color 160ms ease, transform 160ms ease;
}

.site-return-link:hover {
    color: #ffffff;
    transform: translateX(-2px);
}

.site-return-link:focus-visible {
    outline: 3px solid rgba(245, 124, 0, 0.48);
    outline-offset: 3px;
}

@media (max-height: 700px) and (min-width: 640px) {
    .webmail-page {
        padding-block: 20px;
    }

    .webmail-card {
        padding-block: 26px;
    }

    .brand {
        padding-bottom: 15px;
    }

    .brand img {
        height: 52px;
    }

    .heading {
        margin: 18px 0;
    }

    .field {
        margin-bottom: 13px;
    }

    .remember {
        margin-bottom: 18px;
    }

    .access-note {
        margin-top: 17px;
        padding-top: 14px;
    }
}

@media (max-width: 480px) {
    .webmail-page {
        padding-inline: 14px;
    }

    .webmail-card {
        border-radius: 12px;
    }

    .brand img {
        height: 56px;
    }
}
