* { box-sizing: border-box; }

:root {
    --blue: #155eef;
    --blue-dark: #0d47c7;
    --text: #172033;
    --muted: #687386;
    --border: #dce3ef;
    --bg: #f7faff;
}

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

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 10% 10%, rgba(21,94,239,.09), transparent 30%),
        radial-gradient(circle at 90% 90%, rgba(6,185,109,.06), transparent 30%),
        var(--bg);
}

a { text-decoration: none; }

.topbar {
    min-height: 90px;
    padding: 12px 6%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    border-bottom: 1px solid #eee;
}

.brand img {
    width: 150px;
    height: auto;
    display: block;
}

.home-link {
    color: var(--blue);
    font-weight: 700;
}

.login-page {
    min-height: calc(100vh - 180px);
    padding: 55px 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    width: min(450px, 100%);
    padding: 32px 38px;
    background: #fff;
    border: 1px solid #e5eaf2;
    border-radius: 24px;
    box-shadow: 0 18px 50px rgba(16,24,40,.10);
    text-align: center;
}

.logo-wrap img {
    width: 120px;
    max-height: 120px;
    object-fit: contain;
}

.eyebrow {
    margin: 12px 0 6px;
    color: var(--blue);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 2px;
}

h1 {
    margin: 0;
    font-size: 30px;
}

.subtitle {
    margin: 8px 0 24px;
    color: var(--muted);
    font-size: 14px;
}

form { text-align: left; }

form > label {
    display: block;
    margin: 15px 0 7px;
    font-size: 14px;
    font-weight: 700;
}

input[type="text"], input[type="password"] {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    outline: none;
    font-size: 14px;
    background: #fff;
}

input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(21,94,239,.10);
}

.password-box { position: relative; }

.password-box input { padding-right: 65px; }

.toggle {
    position: absolute;
    right: 7px;
    top: 7px;
    height: 34px;
    padding: 0 10px;
    border: 0;
    border-radius: 8px;
    background: #eef4ff;
    color: var(--blue);
    font-weight: 700;
    cursor: pointer;
}

.form-row {
    margin: 14px 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    font-size: 12px;
}

.remember {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
}

.form-row a, .signup a {
    color: var(--blue);
    font-weight: 700;
}

.login-btn {
    width: 100%;
    height: 49px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, #0878f9, #155eef);
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(21,94,239,.20);
}

.login-btn:hover { background: linear-gradient(135deg, #066ce0, #0d47c7); }

.message {
    min-height: 18px;
    margin: 11px 0 0;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
}

.message.error { color: #d92d20; }
.message.success { color: #079455; }
.message.info { color: #475467; }

.divider {
    margin: 23px 0 17px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #98a2b3;
    font-size: 11px;
    font-weight: 700;
}

.divider::before, .divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e4e7ec;
}

.signup {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

footer {
    padding: 25px;
    text-align: center;
    background: #101828;
    color: #b9c1d0;
    font-size: 11px;
}

footer p { margin: 4px; }

@media (max-width: 520px) {
    .topbar { padding: 9px 20px; }
    .brand img { width: 100px; }
    .login-page { padding: 30px 14px; }
    .login-card { padding: 28px 21px; border-radius: 20px; }
    h1 { font-size: 27px; }
}


/* Registration page */
.registration-card {
    width: min(520px, 100%);
}

.registration-card form {
    text-align: left;
}

.registration-card label {
    display: block;
    margin: 15px 0 7px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}

.registration-card input,
.registration-card select {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    color: var(--text);
    font-size: 15px;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}

.registration-card input:focus,
.registration-card select:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(21,94,239,.10);
}

.registration-card select {
    cursor: pointer;
}

.register-text {
    margin: 18px 0 0;
    font-size: 14px;
    color: var(--muted);
}

.register-text a {
    color: var(--blue);
    font-weight: 700;
}

@media (max-width: 520px) {
    .registration-card {
        padding: 26px 20px;
    }

    .registration-card input,
    .registration-card select {
        min-height: 46px;
    }
}


/* Professional form controls and inline status messages */
.input-wrap { position: relative; }
.input-wrap > input,
.input-wrap > select { padding-left: 44px !important; }

.field-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: #98a2b3;
    z-index: 2;
    pointer-events: none;
}
.field-icon svg, .login-btn svg, .message svg, .toggle svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}
.login-btn:hover { transform: translateY(-1px); }
.login-btn:disabled { opacity: .72; cursor: wait; transform: none; }

.password-box .toggle {
    width: 38px;
    padding: 0;
    display: grid;
    place-items: center;
    color: var(--blue);
    background: #eef4ff;
}
.password-box input { padding-right: 48px !important; }

.message {
    min-height: 0;
    margin: 14px 0 0;
    padding: 11px 13px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
    border: 1px solid transparent;
}
.message[hidden] { display: none; }
.message.success {
    color: #067647;
    background: #ecfdf3;
    border-color: #abefc6;
}
.message.error {
    color: #b42318;
    background: #fef3f2;
    border-color: #fecdca;
}
.message svg { flex: 0 0 auto; }

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,.45);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.select-wrap::after {
    content: "⌄";
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-55%);
    color: #667085;
    pointer-events: none;
}
.select-wrap select { appearance: none; padding-right: 38px !important; }
