:root {
    --primary: #1565c0;
    --primary-dark: #1a237e;
    --primary-hover: #0d47a1;
    --navy-gradient: linear-gradient(135deg, #1a237e 0%, #283593 40%, #1565c0 100%);
    --card-shadow: 0 16px 40px rgba(21, 101, 192, 0.12), 0 2px 8px rgba(0, 0, 0, 0.04);
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #f0f4f8;
    background-image:
        radial-gradient(at 0% 0%, rgba(21, 101, 192, 0.08) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(26, 35, 126, 0.08) 0px, transparent 50%);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #263238;
}

.login-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
}

.login-card {
    width: 100%;
    max-width: 440px;
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid rgba(220, 230, 240, 0.9);
    box-shadow: var(--card-shadow);
    padding: 40px 36px;
    position: relative;
    overflow: hidden;
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: var(--navy-gradient);
}

.login-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 32px;
}

.login-brand.is-compact {
    margin-bottom: 24px;
}

.brand-icon-box {
    width: 58px;
    height: 58px;
    border-radius: 16px;
    background: var(--navy-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 26px;
    box-shadow: 0 8px 20px rgba(21, 101, 192, 0.3);
    margin-bottom: 16px;
    transition: transform 0.25s ease;
}

.login-card:hover .brand-icon-box {
    transform: scale(1.05);
}

.brand-title {
    font-size: 22px;
    font-weight: 800;
    color: #1a237e;
    letter-spacing: -0.3px;
    margin: 0 0 4px 0;
}

.brand-subtitle {
    font-size: 13px;
    color: #78909c;
    margin: 0;
    font-weight: 500;
}

.page-intro {
    font-size: 14px;
    color: #546e7a;
    line-height: 1.5;
    margin: 0 0 24px 0;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #546e7a;
    margin-bottom: 8px;
}

.form-label.is-block {
    display: block;
}

.input-group-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 14px;
    color: #90a4ae;
    font-size: 15px;
    pointer-events: none;
    transition: color 0.2s ease;
}

.form-input {
    width: 100%;
    height: 48px;
    padding: 0 16px 0 42px;
    font-size: 14px;
    font-family: inherit;
    color: #263238;
    background: #f8fafc;
    border: 1.5px solid #dce6ef;
    border-radius: 12px;
    outline: none;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.form-input:focus {
    background: #ffffff;
    border-color: #1565c0;
    box-shadow: 0 0 0 4px rgba(21, 101, 192, 0.12);
}

.form-input:focus + .input-icon,
.input-group-wrap:focus-within .input-icon {
    color: #1565c0;
}

.form-input::placeholder {
    color: #b0bec5;
}

.toggle-password {
    position: absolute;
    right: 14px;
    background: none;
    border: none;
    color: #90a4ae;
    cursor: pointer;
    padding: 6px;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.toggle-password:hover {
    color: #1565c0;
}

.forgot-link {
    font-size: 12px;
    font-weight: 600;
    color: #1565c0;
    text-decoration: none;
    transition: color 0.15s ease;
    text-transform: none;
    letter-spacing: normal;
}

.forgot-link:hover {
    color: #0d47a1;
    text-decoration: underline;
}

.btn-submit {
    width: 100%;
    height: 48px;
    background: var(--navy-gradient);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    letter-spacing: 0.2px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 16px rgba(21, 101, 192, 0.3);
    transition: all 0.22s ease;
    margin-top: 8px;
}

.btn-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(21, 101, 192, 0.4);
}

.btn-submit:active:not(:disabled) {
    transform: translateY(0);
}

.btn-submit:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    box-shadow: none;
}

.alert-danger-custom {
    background: #ffebee;
    border: 1px solid #ffcdd2;
    color: #c62828;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-message {
    font-size: 13px;
    margin: 0 0 16px 0;
    min-height: 18px;
    text-align: center;
}

.form-message.is-error {
    color: #c62828;
}

.form-message.is-success {
    color: #2e7d32;
}

.form-message.is-info {
    color: #546e7a;
}

.match-hint {
    font-size: 12px;
    margin: 8px 0 0 0;
    min-height: 16px;
}

.match-hint.is-error {
    color: #c62828;
}

.match-hint.is-success {
    color: #2e7d32;
}

.back-link-wrap {
    text-align: center;
    margin-top: 20px;
}

.back-link {
    font-size: 13px;
    font-weight: 600;
    color: #1565c0;
    text-decoration: none;
}

.back-link:hover {
    color: #0d47a1;
    text-decoration: underline;
}

.login-footer {
    text-align: center;
    padding: 16px;
    font-size: 12px;
    color: #90a4ae;
}
