/* ========================================
   MODERN LAYOUT CSS - WHO STATISTICS STYLE
   Áp dụng cho toàn bộ trang web
   ======================================== */

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    line-height: 1.6;
}

/* ========================================
   HEADER STYLES
   ======================================== */
.main-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    background: rgba(255,255,255,0.1);
    padding: 15px 0;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.header-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
    color: white;
}

.logo-section img {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: white;
    padding: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.logo-text h1 {
    margin: 0;
    font-size: 20px;
    font-weight: bold;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.logo-text p {
    margin: 0;
    font-size: 14px;
    color: rgba(255,255,255,0.95);
}

.logo-text p a {
    color: white;
    text-decoration: none;
    font-weight: 600;
}

.logo-text p a:hover {
    text-decoration: underline;
}

.header-user-section {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    background: rgba(255,255,255,0.15);
    padding: 8px 16px;
    border-radius: 25px;
}

.user-info img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.user-name {
    font-weight: 600;
    font-size: 15px;
}

.login-form {
    display: flex;
    gap: 12px;
    align-items: center;
}

.login-form input {
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
}

.login-form input[type="text"],
.login-form input[type="password"] {
    width: 160px;
    background: rgba(255,255,255,0.95);
}

.login-form input[type="text"]:focus,
.login-form input[type="password"]:focus {
    outline: none;
    background: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.login-form input[type="submit"] {
    background: #4CAF50;
    color: white;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
}

.login-form input[type="submit"]:hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(76, 175, 80, 0.5);
}

.user-actions {
    display: flex;
    gap: 10px;
}

.user-actions a {
    color: white;
    text-decoration: none;
    padding: 10px 18px;
    border-radius: 8px;
    background: rgba(255,255,255,0.2);
    transition: all 0.3s;
    font-size: 14px;
    font-weight: 500;
}

.user-actions a:hover {
    background: rgba(255,255,255,0.35);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* ========================================
   HORIZONTAL MENU
   ======================================== */
.horizontal-menu {
    background: rgba(255,255,255,0.98);
    padding: 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 5px;
}

.nav-menu li {
    position: relative;
}

.nav-menu li a {
    display: block;
    padding: 18px 35px;
    color: #333;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
    font-size: 15px;
}

.nav-menu li a:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom-color: #4CAF50;
    transform: translateY(-2px);
}

.nav-menu li.current a {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom-color: #4CAF50;
}

.nav-menu li.disabled a {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f5f5f5;
}

.nav-menu li a i {
    margin-right: 8px;
}

/* ========================================
   MAIN CONTENT WRAPPER
   ======================================== */
.main-content-wrapper {
    max-width: 1400px;
    margin: 30px auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
}

.content-body {
    padding: 40px;
}

/* ========================================
   FOOTER STYLES
   ======================================== */
.main-footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    margin-top: 40px;
    padding: 40px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: #fff;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
    display: inline-block;
}

.footer-section p,
.footer-section ul {
    color: rgba(255,255,255,0.85);
    line-height: 1.8;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
}

.footer-section ul li:before {
    content: "▸";
    position: absolute;
    left: 0;
    color: #667eea;
}

.footer-section a {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    transition: all 0.3s;
}

.footer-section a:hover {
    color: #667eea;
    padding-left: 5px;
}

.footer-info-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.footer-info-item i {
    color: #667eea;
    font-size: 18px;
    min-width: 25px;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    text-align: center;
}

.footer-bottom p {
    color: rgba(255,255,255,0.7);
    margin: 5px 0;
}

.social-links {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 15px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.3s;
}

.social-links a:hover {
    background: #667eea;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.5);
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 768px) {
    /* Header Top - Compact mobile layout */
    .header-top {
        padding: 8px 0;
    }
    
    .header-info {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    
    /* Logo Section - Horizontal compact layout */
    .logo-section {
        flex-direction: row;
        text-align: left;
        gap: 10px;
    }
    
    .logo-section img {
        width: 40px;
        height: 40px;
        padding: 5px;
    }
    
    .logo-text h1 {
        font-size: 14px;
        line-height: 1.2;
    }
    
    .logo-text p {
        font-size: 11px;
        line-height: 1.2;
    }
    
    /* Login Form - Compact */
    .login-form {
        flex-direction: row;
        flex-wrap: wrap;
        width: 100%;
        gap: 5px;
    }
    
    .login-form input[type="text"],
    .login-form input[type="password"] {
        width: calc(50% - 3px);
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .login-form input[type="submit"] {
        width: 100%;
        padding: 8px 12px;
        font-size: 12px;
    }
    
    /* User Info - Compact */
    .user-info {
        padding: 5px 12px;
        gap: 8px;
    }
    
    .user-info img {
        width: 35px;
        height: 35px;
        border-width: 2px;
    }
    
    .user-name {
        font-size: 13px;
    }
    
    .user-actions {
        flex-direction: row;
        flex-wrap: wrap;
        width: 100%;
        gap: 5px;
    }
    
    .user-actions a {
        text-align: center;
        padding: 8px 12px;
        font-size: 12px;
        flex: 1;
        min-width: calc(50% - 3px);
    }
    
    /* Horizontal Menu - Compact scrollable */
    .horizontal-menu {
        padding: 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .nav-menu {
        flex-direction: row;
        justify-content: flex-start;
        gap: 0;
        flex-wrap: nowrap;
        min-width: min-content;
    }
    
    .nav-menu li {
        flex-shrink: 0;
    }
    
    .nav-menu li a {
        padding: 12px 15px;
        font-size: 13px;
        white-space: nowrap;
        border-bottom-width: 2px;
    }
    
    .nav-menu li a i {
        margin-right: 5px;
        font-size: 12px;
    }
    
    /* Content wrapper */
    .main-content-wrapper {
        margin: 10px;
        border-radius: 12px;
    }
    
    .content-body {
        padding: 15px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 480px) {
    /* Extra compact for very small screens */
    .logo-section img {
        width: 35px;
        height: 35px;
    }
    
    .logo-text h1 {
        font-size: 12px;
    }
    
    .logo-text p {
        font-size: 10px;
    }
    
    .login-form input[type="text"],
    .login-form input[type="password"] {
        font-size: 11px;
        padding: 6px 10px;
    }
    
    .login-form input[type="submit"] {
        font-size: 11px;
        padding: 6px 10px;
    }
    
    .nav-menu li a {
        padding: 10px 12px;
        font-size: 12px;
    }
    
    .user-name {
        font-size: 12px;
    }
    
    .user-actions a {
        font-size: 11px;
        padding: 6px 10px;
    }
}
