:root {
    --blue: #1677ff;
    --blue-dark: #075bd8;
    --text: #111827;
    --muted: #4b5563;
    --border: #d1d5db;
    --card: rgba(255, 255, 255, .94);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background:
        linear-gradient(180deg, rgba(255,255,255,.16), rgba(255,255,255,.08)),
        url('/assets/brand/drivecloud-bg.jpg') center center / cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 16px;
}

.login-page {
    width: min(560px, 100%);
}

.login-card {
    width: 100%;
    padding: 38px 40px 34px;
    border-radius: 16px;
    background: var(--card);
    border: 1px solid var(--border);
    box-shadow: 0 24px 70px rgba(8, 25, 62, .22);
    backdrop-filter: blur(10px);
}

.brand {
    text-align: center;
    margin-bottom: 34px;
}

.brand img {
    width: 230px;
    max-width: 78%;
    height: auto;
    display: block;
    margin: 0 auto 4px;
}


.alert {
    background: #fff1f2;
    color: #9f1239;
    border: 1px solid #fecdd3;
    border-radius: 8px;
    padding: 13px 15px;
    margin-bottom: 22px;
    font-size: 15px;
    font-weight: 700;
    text-align: center;
}

.field {
    position: relative;
    margin-bottom: 18px;
}

.field label {
    display: block;
    margin-bottom: 8px;
    color: #1f2937;
    font-size: 15px;
    font-weight: 700;
}

.field input[type="email"],
.field input[type="password"],
.field input[type="text"] {
    width: 100%;
    height: 56px;
    border-radius: 7px;
    border: 1.5px solid #8d8d8d;
    background: #fff;
    color: var(--text);
    padding: 0 56px 0 16px;
    font-size: 16px;
    font-weight: 500;
    outline: none;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.field input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(22,119,255,.13);
}

.password-toggle {
    position: absolute;
    right: 14px;
    bottom: 11px;
    border: 0;
    background: transparent;
    color: var(--blue);
    font-size: 20px;
    cursor: pointer;
    padding: 6px;
    width: auto;
    height: auto;
    box-shadow: none;
}

.remember-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0 24px;
    color: #1f2937;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
}

.remember-row input {
    width: 21px;
    height: 21px;
    accent-color: #0f78bd;
    cursor: pointer;
    flex: 0 0 auto;
}

.login-button {
    width: 100%;
    height: 56px;
    border: 0;
    border-radius: 7px;
    cursor: pointer;
    background: linear-gradient(180deg, #2884ff, #1677ff);
    color: #fff;
    font-size: 16px;
    font-weight: 850;
    box-shadow: 0 12px 24px rgba(22,119,255,.24);
    transition: transform .14s ease, box-shadow .14s ease, filter .14s ease;
}

.login-button:hover {
    transform: translateY(-1px);
    filter: brightness(1.03);
    box-shadow: 0 16px 30px rgba(22,119,255,.30);
}

.login-button:active {
    transform: translateY(1px);
}

.login-button span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.login-button .arrow {
    font-size: 24px;
    line-height: 1;
}

.links {
    margin-top: 24px;
    text-align: center;
    display: grid;
    gap: 16px;
}

.links a {
    color: #006bff;
    font-size: 15px;
    font-weight: 750;
    text-decoration: none;
}

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

@media (max-width: 640px) {
    body {
        align-items: flex-start;
        padding: 30px 14px;
    }

    .login-page {
        width: min(520px, 100%);
    }

    .login-card {
        padding: 32px 22px 28px;
        border-radius: 14px;
    }

    .brand {
        margin-bottom: 28px;
    }

    .brand img {
        width: 205px;
    }

    .field input[type="email"],
    .field input[type="password"],
    .field input[type="text"],
    .login-button {
        height: 54px;
    }

    .remember-row {
        align-items: flex-start;
        font-size: 14px;
    }

    .remember-row input {
        margin-top: 1px;
    }
}

/* Premium login field polish */
.input-shell {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    z-index: 2;
    transform: translateY(-50%);
    width: 22px;
    text-align: center;
    color: #7b8aa3;
    font-size: 16px;
    line-height: 1;
    pointer-events: none;
}

.input-shell input[type="email"],
.input-shell input[type="password"],
.input-shell input[type="text"] {
    height: 58px;
    border-radius: 12px;
    border: 1.4px solid #cfd7e3;
    background:
        linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    padding-left: 48px;
    padding-right: 78px;
    color: #111827;
    font-size: 16px;
    font-weight: 550;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.9),
        0 8px 18px rgba(15, 45, 95, .045);
}

.input-shell input::placeholder {
    color: #9aa7b8;
    font-weight: 500;
}

.input-shell input:hover {
    border-color: #a9b9cf;
}

.input-shell input:focus {
    border-color: #1677ff;
    background: #fff;
    box-shadow:
        0 0 0 4px rgba(22, 119, 255, .13),
        0 12px 26px rgba(22, 119, 255, .10);
}

.input-shell .password-toggle {
    right: 12px;
    bottom: auto;
    top: 50%;
    transform: translateY(-50%);
    min-width: 48px;
    padding: 7px 9px;
    border-radius: 9px;
    color: #1677ff;
    background: rgba(22, 119, 255, .08);
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
}

.input-shell .password-toggle:hover {
    background: rgba(22, 119, 255, .14);
}

/* Override old field input rules when using .input-shell */
.field > input[type="email"],
.field > input[type="password"],
.field > input[type="text"] {
    display: none;
}

@media (max-width: 640px) {
    .input-shell input[type="email"],
    .input-shell input[type="password"],
    .input-shell input[type="text"] {
        height: 56px;
        font-size: 15px;
        padding-left: 46px;
        padding-right: 76px;
    }

    .input-shell .password-toggle {
        font-size: 12px;
    }
}

/* Normalize email and password SVG field icons */
.input-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    font-size: 0;
}

.input-icon svg {
    width: 22px;
    height: 22px;
    display: block;
    color: #7b8aa3;
}

.powered-footer {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(209, 213, 219, .75);
    text-align: center;
    color: #6b7280;
    font-size: 13px;
    font-weight: 500;
}

.powered-footer strong {
    color: #111827;
    font-weight: 850;
}

/* Powered by badge card */
.powered-footer {
    width: fit-content;
    max-width: 100%;
    margin: 20px auto 0;
    padding: 9px 15px;
    border-radius: 999px;
    border: 1px solid rgba(22, 119, 255, .16);
    background:
        linear-gradient(180deg, rgba(248, 251, 255, .96), rgba(239, 246, 255, .92));
    color: #5b6b83;
    font-size: 12.5px;
    font-weight: 650;
    letter-spacing: .1px;
    text-align: center;
    box-shadow:
        0 8px 22px rgba(22, 119, 255, .08),
        inset 0 1px 0 rgba(255,255,255,.85);
}

.powered-footer strong {
    color: #1677ff;
    font-weight: 900;
}

.auth-title {
    margin: -8px 0 8px;
    text-align: center;
    color: #111827;
    font-size: 24px;
    line-height: 1.2;
    letter-spacing: -.4px;
}

.auth-copy {
    max-width: 420px;
    margin: 0 auto 24px;
    text-align: center;
    color: #5b6b83;
    font-size: 14px;
    line-height: 1.55;
}

.status {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
    border-radius: 8px;
    padding: 13px 15px;
    margin-bottom: 22px;
    font-size: 14px;
    font-weight: 750;
    text-align: center;
}

.status,
.alert {
    transition: opacity .35s ease, transform .35s ease, max-height .45s ease, margin .45s ease, padding .45s ease;
    overflow: hidden;
}

.notice-hide {
    opacity: 0;
    transform: translateY(-6px);
    max-height: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}
