/* Reset và base styles */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Container chính */
#kc-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 40px;
    width: 100%;
    max-width: 450px;
    margin: 20px;
}

/* Header */
.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    color: #2c3e50;
    font-size: 28px;
    font-weight: 600;
    margin: 0 0 10px 0;
}

.login-header p {
    color: #7f8c8d;
    font-size: 16px;
    margin: 0;
}

/* Logo */
#kc-logo {
    text-align: center;
    margin-bottom: 30px;
}

#kc-logo-wrapper img {
    max-height: 60px;
    width: auto;
}

/* Form styles */
#kc-form {
    width: 100%;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    color: #34495e;
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e8ed;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #fff;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-control:hover {
    border-color: #cbd6ee;
}

/* Button styles */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: #14238a;
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.btn-block {
    width: 100%;
    margin-top: 10px;
}

/* Form options */
.form-options {
    margin: 20px 0;
}

.checkbox {
    display: flex;
    align-items: center;
}

.checkbox input[type="checkbox"] {
    margin-right: 8px;
    transform: scale(1.2);
}

.checkbox label {
    color: #7f8c8d;
    font-size: 14px;
    cursor: pointer;
    user-select: none;
}

/* Links */
.form-links {
    text-align: center;
    margin-top: 20px;
}

.form-links a {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.form-links a:hover {
    text-decoration: underline;
}

/* Registration link */
#kc-registration-container {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e1e8ed;
}

#kc-registration span {
    color: #7f8c8d;
    font-size: 14px;
}

#kc-registration a {
    color: #667eea;
    font-weight: 600;
    text-decoration: none;
}

#kc-registration a:hover {
    text-decoration: underline;
}

/* Error messages */
.error-message {
    color: #e74c3c;
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

.alert-error {
    background: #fdf2f2;
    color: #e74c3c;
    padding: 12px;
    border-radius: 8px;
    border-left: 4px solid #e74c3c;
    margin-bottom: 20px;
}

/* Success messages */
.alert-success {
    background: #f0f9f0;
    color: #27ae60;
    padding: 12px;
    border-radius: 8px;
    border-left: 4px solid #27ae60;
    margin-bottom: 20px;
}

/* Info messages */
.alert-info {
    background: #f0f8ff;
    color: #3498db;
    padding: 12px;
    border-radius: 8px;
    border-left: 4px solid #3498db;
    margin-bottom: 20px;
}

/* Local login link */
.local-login-container {
    text-align: center !important;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #e1e8ed;
    display: block;
    width: 100%;
}

.local-login-container a {
    color: #7f8c8d;
    text-decoration: none;
    font-size: 14px;
    display: inline-block;
}

.local-login-container a:hover {
    color: #14238a;
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 480px) {
    #kc-container {
        padding: 24px 16px;
        margin: 10px;
        border-radius: 14px;
    }

    .login-header h1 {
        font-size: 22px;
    }

    .login-header p {
        font-size: 14px;
    }

    .login-header img {
        width: 120px;
        margin-bottom: 16px;
    }

    .form-group {
        margin-bottom: 16px;
    }

    .form-label {
        font-size: 13px;
        margin-bottom: 6px;
    }

    .form-control {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 10px 12px;
        border-radius: 8px;
    }

    .btn {
        padding: 10px 20px;
        font-size: 15px;
        border-radius: 8px;
    }

    .form-options {
        margin: 14px 0;
    }

    .checkbox label {
        font-size: 13px;
    }

    .form-links {
        margin-top: 16px;
    }

    .form-links a {
        font-size: 13px;
    }

    #kc-registration-container {
        margin-top: 20px;
        padding-top: 16px;
    }

    .local-login-container {
        margin-top: 18px;
        padding-top: 14px;
    }
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#kc-container {
    animation: fadeIn 0.5s ease-out;
}

/* Social login buttons (nếu có) */
.social-login {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e1e8ed;
}

.social-login .btn {
    margin-bottom: 10px;
    width: 100%;
}

.btn-google {
    background: #db4437;
    color: white;
}

.btn-facebook {
    background: #3b5998;
    color: white;
}

.btn-github {
    background: #333;
    color: white;
}

body {
    background-image: url(../img/background.jpg) !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

.login-header img {
    width: 150px;
    margin-bottom: 20px;
}

.card-pf {
    background: rgb(255 255 255 / 85%) !important;
    border-radius: 15px
}

#kc-header {
    display: none;
}

#kc-login,
#username,
#password{
    border-radius: 5px;
    padding: 6px;
    font-size: 14px;
}
