@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

* {
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', 'Segoe UI', Arial, sans-serif;
    background:
        radial-gradient(900px 520px at 8% -8%, #e7efff 0%, rgba(231,239,255,0) 60%),
        radial-gradient(860px 500px at 100% 100%, #efe9ff 0%, rgba(239,233,255,0) 58%),
        linear-gradient(145deg, #f8fbff 0%, #eef2ff 100%);
    min-height: 100vh;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #1f2937;
}

.login-container {
    background: rgba(255, 255, 255, 0.96);
    padding: 2.1rem 1.9rem;
    border-radius: 18px;
    border: 1px solid #e5eaf7;
    box-shadow: 0 18px 36px rgba(37, 99, 235, 0.13);
    width: 100%;
    max-width: 430px;
    backdrop-filter: blur(4px);
}

.login-container h1 {
    text-align: center;
    color: #0f172a;
    margin: 0 0 1.6rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    font-size: clamp(1.35rem, 2.4vw, 1.75rem);
}

.form-group {
    margin-bottom: 1.05rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.55rem;
    color: #334155;
    font-weight: 600;
    font-size: 0.93rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.78rem 0.85rem;
    border: 1.5px solid #d7e2f6;
    border-radius: 10px;
    font-size: 0.99rem;
    background: #f7faff;
    color: #1e293b;
    caret-color: #1e293b;
    color-scheme: light;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.form-group input {
    cursor: text;
}

#password {
    caret-color: #0f172a;
    color: #0f172a;
    background: #ffffff;
    -webkit-text-fill-color: #0f172a;
}

#password:focus {
    color: #020617;
    background: #ffffff;
    caret-color: #020617;
    -webkit-text-fill-color: #020617;
}

#password:hover,
#password:active,
#password:focus-visible {
    caret-color: #020617;
    color: #020617;
    -webkit-text-fill-color: #020617;
}

input[type="password"] {
    caret-color: #0f172a !important;
    color: #0f172a !important;
    -webkit-text-fill-color: #0f172a !important;
}

input[type="password"]::selection {
    background: rgba(59, 130, 246, 0.22);
    color: #020617;
}

input[type="password"]:-webkit-autofill,
input[type="password"]:-webkit-autofill:hover,
input[type="password"]:-webkit-autofill:focus {
    -webkit-text-fill-color: #0f172a !important;
    caret-color: #0f172a !important;
    box-shadow: 0 0 0 1000px #ffffff inset;
    transition: background-color 9999s ease-out 0s;
}

.form-group select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 2.6rem;
    border-color: #c9d8f3;
    background-image:
        linear-gradient(45deg, transparent 50%, #4b70b8 50%),
        linear-gradient(135deg, #4b70b8 50%, transparent 50%),
        linear-gradient(180deg, #f7faff 0%, #edf4ff 100%);
    background-position:
        calc(100% - 20px) calc(50% + 1px),
        calc(100% - 14px) calc(50% + 1px),
        0 0;
    background-size:
        6px 6px,
        6px 6px,
        100% 100%;
    background-repeat: no-repeat;
    cursor: pointer;
}

.form-group select:hover {
    border-color: #9bb5e8;
    background-image:
        linear-gradient(45deg, transparent 50%, #35589f 50%),
        linear-gradient(135deg, #35589f 50%, transparent 50%),
        linear-gradient(180deg, #ffffff 0%, #edf4ff 100%);
}

.form-group input:focus,
.form-group select:focus {
    border-color: #3b82f6;
    outline: none;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.16);
}

.form-group select option {
    background: #ffffff;
    color: #1e293b;
}

.form-group select option[value=""] {
    color: #64748b;
}

.native-select-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.custom-select {
    position: relative;
    width: 100%;
}

.custom-select-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0.78rem 0.85rem;
    border: 1.5px solid #c9d8f3;
    border-radius: 10px;
    font-size: 0.99rem;
    font-family: inherit;
    font-weight: 500;
    color: #1e293b;
    background: linear-gradient(180deg, #f7faff 0%, #edf4ff 100%);
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.custom-select-trigger:hover {
    border-color: #9bb5e8;
    background: linear-gradient(180deg, #ffffff 0%, #edf4ff 100%);
}

.custom-select-trigger:focus {
    outline: none;
    border-color: #3b82f6;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.16);
}

.custom-select-chevron {
    width: 10px;
    height: 10px;
    border-right: 2px solid #4b70b8;
    border-bottom: 2px solid #4b70b8;
    transform: rotate(45deg);
    margin-top: -3px;
    flex-shrink: 0;
    transition: transform 0.18s ease;
}

.custom-select-trigger[aria-expanded="true"] .custom-select-chevron {
    transform: rotate(-135deg);
    margin-top: 3px;
}

.custom-select-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 20;
    display: grid;
    gap: 3px;
    max-height: 260px;
    overflow-y: auto;
    padding: 8px;
    border: 1px solid #d8e4f7;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.18);
}

.custom-select-menu[hidden] {
    display: none !important;
    pointer-events: none;
}

.custom-option {
    width: 100%;
    text-align: left;
    border: 0;
    border-radius: 9px;
    padding: 0.62rem 0.72rem;
    background: #ffffff;
    color: #1e293b;
    font-size: 0.96rem;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.18s ease, color 0.18s ease;
}

.custom-option:hover {
    background: #edf4ff;
    color: #1d4ed8;
}

.custom-option.is-selected {
    background: #dbeafe;
    color: #1e40af;
    font-weight: 700;
}

.custom-option.placeholder {
    color: #64748b;
}

.btn-col {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.btn {
    width: 100%;
    padding: 0.8rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    display: block;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.btn-col .btn:first-child {
    background: linear-gradient(90deg, #2563eb 0%, #1d4ed8 100%);
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.28);
}

.btn-col .btn:first-child:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 22px rgba(37, 99, 235, 0.33);
}

.btn-col .btn:last-child {
    background: #f8fafc;
    color: #1e3a8a;
    border: 1.5px solid #dbe7ff;
}

.btn-col .btn:last-child:hover {
    background: #eef4ff;
    border-color: #c7dafd;
}

.btn:focus-visible {
    outline: 3px solid rgba(59, 130, 246, 0.35);
    outline-offset: 2px;
}

.error {
    color: #b42318;
    text-align: center;
    margin-bottom: 1rem;
    padding: 0.72rem 0.8rem;
    background-color: #fee4e2;
    border: 1px solid #fecaca;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
}

.login-container select {
    background: #f7faff;
}

.success-message {
    color: #166534;
    text-align: center;
    margin-bottom: 1rem;
    padding: 0.72rem 0.8rem;
    background-color: #dcfce7;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
}

@media (max-width: 540px) {
    body {
        padding: 14px;
    }

    .login-container {
        padding: 1.4rem 1.05rem;
        border-radius: 14px;
        box-shadow: 0 12px 26px rgba(37, 99, 235, 0.15);
    }

    .form-group input,
    .form-group select,
    .custom-select-trigger,
    .btn {
        font-size: 0.95rem;
    }

    .custom-select-menu {
        max-height: 220px;
    }
}