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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
}

/* Container chính */
.login-container {
    width: 100%;
    max-width: 450px;
    padding: 20px;
}

/* Box đăng nhập */
.login-box {
    background: rgb(255, 255, 255);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 50px 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.login-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #667eea, #764ba2, #f093fb);
}

/* Background City Silhouette */
.city-background {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 300px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 300"><rect x="0" y="150" width="60" height="150" fill="%23c8d8e4" opacity="0.3"/><rect x="80" y="100" width="70" height="200" fill="%23c8d8e4" opacity="0.25"/><rect x="170" y="120" width="50" height="180" fill="%23c8d8e4" opacity="0.3"/><rect x="240" y="80" width="80" height="220" fill="%23c8d8e4" opacity="0.2"/><rect x="340" y="130" width="60" height="170" fill="%23c8d8e4" opacity="0.25"/><rect x="420" y="90" width="70" height="210" fill="%23c8d8e4" opacity="0.3"/><rect x="510" y="110" width="55" height="190" fill="%23c8d8e4" opacity="0.25"/><rect x="585" y="70" width="75" height="230" fill="%23c8d8e4" opacity="0.2"/><rect x="680" y="100" width="65" height="200" fill="%23c8d8e4" opacity="0.3"/><rect x="765" y="120" width="50" height="180" fill="%23c8d8e4" opacity="0.25"/><rect x="835" y="90" width="70" height="210" fill="%23c8d8e4" opacity="0.3"/><rect x="925" y="130" width="60" height="170" fill="%23c8d8e4" opacity="0.2"/><rect x="1005" y="100" width="55" height="200" fill="%23c8d8e4" opacity="0.25"/><rect x="1080" y="80" width="80" height="220" fill="%23c8d8e4" opacity="0.3"/></svg>') bottom center no-repeat;
    background-size: cover;
    z-index: 0;
    pointer-events: none;
}

/* Tiêu đề */
.login-title {
    font-size: 24px;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Logo */
.logo-container {
    margin-bottom: 40px;
}

.logo-container img {
    width: 180px;
    height: auto;
    margin: 0 auto;
    display: block;
}

/* Form nhập liệu */
.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-input {
    width: 100%;
    padding: 15px 20px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 30px;
    outline: none;
    transition: all 0.3s ease;
    background: #f8f9fa;
    color: #2c3e50;
}

.form-input:focus {
    border-color: #5b7ec4;
    background: white;
    box-shadow: 0 0 0 3px rgba(91, 126, 196, 0.1);
}

.form-input::placeholder {
    color: #95a5a6;
    text-transform: uppercase;
    font-weight: 500;
    font-size: 14px;
}

/* Nút đăng nhập */
.btn-login {
    width: 100%;
    padding: 15px 20px;
    font-size: 16px;
    font-weight: bold;
    text-transform: uppercase;
    color: #2c3e50;
    background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(253, 160, 133, 0.4);
    margin-top: 10px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(253, 160, 133, 0.6);
}

.btn-login:active {
    transform: translateY(0);
}

/* Alert messages */
.alert {
    padding: 12px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 500;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-danger {
    background: #fee;
    color: #c33;
    border: 1px solid #fcc;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* Icon trong input */
.form-input-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #95a5a6;
    font-size: 18px;
}

/* Loading spinner */
.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #5b7ec4;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-right: 10px;
    vertical-align: middle;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .login-container {
        padding: 15px;
    }
    
    .login-box {
        padding: 40px 30px;
    }
    
    .login-title {
        font-size: 20px;
    }
    
    .logo-container img {
        width: 150px;
    }
    
    .form-input {
        padding: 12px 18px;
        font-size: 15px;
    }
    
    .btn-login {
        padding: 12px 18px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .login-box {
        padding: 30px 20px;
        border-radius: 15px;
    }
    
    .login-title {
        font-size: 18px;
        margin-bottom: 20px;
    }
    
    .logo-container {
        margin-bottom: 30px;
    }
    
    .logo-container img {
        width: 130px;
    }
    
    .form-group {
        margin-bottom: 20px;
    }
    
    .form-input {
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .btn-login {
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .city-background {
        height: 200px;
    }
}

/* Tablet landscape */
@media (min-width: 769px) and (max-width: 1024px) {
    .login-container {
        max-width: 500px;
    }
}

/* Hiệu ứng cho logo */
.logo-container img {
    animation: fadeInScale 0.6s ease;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Forgot password link */
.forgot-password {
    margin-top: 15px;
    text-align: center;
}

.forgot-password a {
    color: #5b7ec4;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.forgot-password a:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* Account Info Box */
.account-info-box {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 25px;
    margin-top: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.info-title {
    font-size: 22px;
    font-weight: bold;
    color: #2c3e50;
    text-align: center;
    margin-bottom: 10px;
}

.info-subtitle {
    text-align: center;
    color: #e74c3c;
    font-size: 16px;
    margin-bottom: 25px;
}

.info-subtitle strong {
    background: #fff3cd;
    padding: 5px 15px;
    border-radius: 5px;
    font-family: 'Courier New', monospace;
    border: 2px solid #ffc107;
}

.account-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.account-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid transparent;
}

.account-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.account-card.super-admin {
    border-color: #e74c3c;
}

.account-card.super-admin .card-header {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.account-card.khu-vuc {
    border-color: #3498db;
}

.account-card.khu-vuc .card-header {
    background: linear-gradient(135deg, #3498db, #2980b9);
}

.account-card.phuong-xa {
    border-color: #9b59b6;
}

.account-card.phuong-xa .card-header {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
}

.account-card.clb {
    border-color: #27ae60;
}

.account-card.clb .card-header {
    background: linear-gradient(135deg, #27ae60, #229954);
}

.account-card.mon-sinh {
    border-color: #ff6b6b;
}

.account-card.mon-sinh .card-header {
    background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
}

.card-header {
    padding: 12px;
    color: white;
    text-align: center;
    font-weight: bold;
    font-size: 14px;
}

.role-icon {
    font-size: 20px;
    display: block;
    margin-bottom: 5px;
}

.role-name {
    display: block;
    font-size: 13px;
}

.card-body {
    padding: 15px;
}

.username-box {
    background: #ecf0f1;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 12px;
    font-size: 15px;
    border: 1px solid #bdc3c7;
}

.permissions-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 12px;
}

.permissions-list li {
    padding: 5px 0;
    color: #555;
    line-height: 1.4;
}

.info-note {
    background: #e8f5e9;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    border-left: 4px solid #4caf50;
}

.info-note p {
    margin: 0;
    color: #2e7d32;
    font-size: 13px;
}

/* Responsive for account info */
@media (max-width: 768px) {
    .account-info-box {
        padding: 20px;
        margin-top: 20px;
    }
    
    .account-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .info-title {
        font-size: 18px;
    }
    
    .info-subtitle {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .account-info-box {
        padding: 15px;
    }
    
    .card-body {
        padding: 12px;
    }
    
    .username-box {
        font-size: 14px;
    }
    
    .permissions-list {
        font-size: 11px;
    }
}
