* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #F0F4F8;
    position: relative;
    overflow: hidden;
}

.bg-shape {
    position: fixed;
    pointer-events: none;
    z-index: 0;
}

.bg-wave-1 {
    bottom: 0;
    left: 0;
    width: 100%;
    height: 220px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='%23006098' fill-opacity='0.06' d='M0,224L48,213.3C96,203,192,181,288,186.7C384,192,480,224,576,234.7C672,245,768,235,864,213.3C960,192,1056,160,1152,154.7C1248,149,1344,171,1392,181.3L1440,192L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z'/%3E%3C/svg%3E") no-repeat bottom center;
    background-size: cover;
}

.bg-wave-2 {
    bottom: 0;
    left: 0;
    width: 100%;
    height: 180px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='%230070A8' fill-opacity='0.04' d='M0,288L48,272C96,256,192,224,288,213.3C384,203,480,213,576,229.3C672,245,768,267,864,261.3C960,256,1056,224,1152,208C1248,192,1344,192,1392,192L1440,192L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z'/%3E%3C/svg%3E") no-repeat bottom center;
    background-size: cover;
}

.bg-wave-top {
    top: 0;
    left: 0;
    width: 100%;
    height: 160px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='%2300ACD0' fill-opacity='0.04' d='M0,64L48,80C96,96,192,128,288,138.7C384,149,480,139,576,122.7C672,107,768,85,864,90.7C960,96,1056,128,1152,138.7C1248,149,1344,139,1392,133.3L1440,128L1440,0L1392,0C1344,0,1248,0,1152,0C1056,0,960,0,864,0C768,0,672,0,576,0C480,0,384,0,288,0C192,0,96,0,48,0L0,0Z'/%3E%3C/svg%3E") no-repeat top center;
    background-size: cover;
}

.login-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
    padding: 20px;
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
    transform: translateY(20px);
}

@keyframes slideUp {
    to { opacity: 1; transform: translateY(0); }
}

.login-card {
    background: white;
    border-radius: 20px;
    padding: 0;
    box-shadow: 0 8px 40px rgba(0,40,80,0.08), 0 1px 3px rgba(0,40,80,0.04);
    overflow: hidden;
}

.card-header {
    background: linear-gradient(135deg, #006098 0%, #0070A8 50%, #0099BA 100%);
    padding: 36px 36px 32px;
    position: relative;
    overflow: hidden;
}

.card-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(0,172,208,0.2) 0%, transparent 60%);
    border-radius: 50%;
    pointer-events: none;
}

.card-header::after {
    content: '';
    position: absolute;
    bottom: -40%;
    left: -15%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 60%);
    border-radius: 50%;
    pointer-events: none;
}

.header-content {
    position: relative;
    z-index: 1;
}

.logo-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 10px;
}

.logo-icon {
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
    font-weight: 700;
    flex-shrink: 0;
}

h1 {
    color: white;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.subtitle {
    color: rgba(255,255,255,0.65);
    font-size: 0.82rem;
    letter-spacing: 0.3px;
}

.card-body {
    padding: 32px 36px 36px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.75rem;
    color: #5A6F84;
    margin-bottom: 8px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.input-wrap {
    position: relative;
}

.input-wrap input {
    width: 100%;
    padding: 12px 14px 12px 40px;
    background: #F8F9FC;
    border: 1.5px solid #E4E8EE;
    border-radius: 10px;
    font-size: 0.92rem;
    color: #1A2C3E;
    outline: none;
    transition: all 0.2s ease;
    font-family: inherit;
}

.input-wrap input::placeholder {
    color: #B0B8C4;
}

.input-wrap input:focus {
    border-color: #0070A8;
    background: white;
    box-shadow: 0 0 0 3px rgba(0,112,168,0.08);
}

.input-wrap input.error {
    border-color: #E25D5D;
    background: #FFF8F7;
    box-shadow: 0 0 0 3px rgba(226,93,93,0.06);
}

.input-icon {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.input-icon svg {
    width: 16px;
    height: 16px;
    color: #9AA8B5;
    transition: color 0.2s;
}

.input-wrap input:focus ~ .input-icon svg {
    color: #0070A8;
}

.pw-wrap input {
    padding-right: 42px;
}

.pw-eye {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9AA8B5;
    border-radius: 6px;
    transition: all 0.15s;
    user-select: none;
}

.pw-eye:hover {
    color: #5A6F84;
    background: #F0F2F6;
}

.pw-eye svg {
    width: 16px;
    height: 16px;
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #E4E8EE;
    border-radius: 10px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 20;
    display: none;
    box-shadow: 0 8px 24px rgba(0,40,80,0.1);
    padding: 4px;
}

.user-dropdown div {
    padding: 9px 12px;
    cursor: pointer;
    font-size: 0.88rem;
    color: #3D4F62;
    border-radius: 6px;
    transition: all 0.1s;
}

.user-dropdown div:hover {
    background: #F0F4F8;
    color: #006098;
}

.remember-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    font-size: 0.8rem;
    color: #5A6F84;
    cursor: pointer;
    user-select: none;
}

.remember-row input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border: 1.5px solid #D0D8E2;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    transition: all 0.15s;
}

.remember-row input[type="checkbox"]:checked {
    background: #0070A8;
    border-color: #0070A8;
}

.remember-row input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 1px;
    width: 5px;
    height: 8px;
    border: solid white;
    border-width: 0 1.5px 1.5px 0;
    transform: rotate(45deg);
}

.remembers {
    margin-bottom: 4px;
}

.btn {
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, #0070A8, #006098);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 0.92rem;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
    margin-top: 20px;
    position: relative;
    overflow: hidden;
    font-family: inherit;
    letter-spacing: 0.2px;
}

.btn:hover {
    background: linear-gradient(135deg, #0080B8, #0070A8);
    box-shadow: 0 4px 16px rgba(0,96,152,0.3);
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0,96,152,0.2);
}

.btn:disabled {
    opacity: 0.35;
    cursor: default;
    background: #B0BEC5;
    transform: none;
    box-shadow: none;
}

.error-msg {
    color: #C44B3C;
    font-size: 0.82rem;
    margin-top: 16px;
    text-align: center;
    display: none;
    padding: 10px 14px;
    background: #FFF5F4;
    border: 1px solid rgba(196,75,60,0.12);
    border-radius: 8px;
    font-weight: 500;
    line-height: 1.4;
}

.error-msg.show {
    display: block;
    animation: shake 0.35s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-3px); }
}

.user-dropdown::-webkit-scrollbar { width: 5px; }
.user-dropdown::-webkit-scrollbar-track { background: transparent; }
.user-dropdown::-webkit-scrollbar-thumb { background: #E4E8EE; border-radius: 3px; }

@media (max-width: 480px) {
    .card-header { padding: 28px 24px 24px; }
    .card-body { padding: 24px 24px 28px; }
    .login-wrapper { padding: 16px; }
}
