/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;700&family=Nunito:wght@400;600;700&display=swap');

:root {
    --primary: #c0392b;     /* Đỏ thẫm truyền thống */
    --primary-light: #e74c3c;
    --secondary: #f39c12;   /* Vàng ấm */
    --secondary-light: #f1c40f;
    --dark: #2c3e50;
    --light: #ecf0f1;
    --white: #ffffff;
    --text: #333333;
    --gray: #7f8c8d;
    --bg-color: #fdfbf7;    /* Nền kem nhạt gợi chất giấy cũ */
    
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 10px 15px rgba(192, 57, 43, 0.1);
    --radius: 8px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Nunito', 'Noto Sans SC', sans-serif;
    background-color: var(--bg-color);
    color: var(--text);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 15px;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--secondary);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Nav */
.header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo span {
    color: var(--secondary);
    font-family: 'Noto Sans SC', sans-serif;
}

/* Navigation Menu */
.nav-menu {
    display: flex;
    gap: 5px;
    list-style: none;
}

.nav-link {
    padding: 10px 15px;
    color: var(--dark);
    font-weight: 600;
    border-radius: var(--radius);
}

.nav-link:hover, .nav-link.active {
    background-color: #fff5f5;
    color: var(--primary);
}

/* User Menu */
.user-menu {
    position: relative;
    display: flex;
    align-items: center;
    margin-left: 10px;
}

.btn-login {
    background-color: var(--primary);
    color: var(--white);
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
}
.btn-login:hover {
    background-color: var(--primary-light);
    color: var(--white);
    box-shadow: var(--shadow-hover);
}

.user-dropdown-toggle {
    cursor: pointer;
    font-weight: 600;
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--dark);
}

.user-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--white);
    box-shadow: var(--shadow);
    border-radius: var(--radius);
    min-width: 180px;
    display: none;
    flex-direction: column;
    padding: 10px 0;
    border: 1px solid #eee;
}

.user-menu:hover .user-dropdown-menu {
    display: flex;
}

.user-dropdown-menu a {
    padding: 10px 20px;
    color: var(--dark);
    font-weight: 500;
}
.user-dropdown-menu a:hover {
    background: #f8f9fa;
    color: var(--primary);
}

/* Hamburger */
.hamburger {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--dark);
    cursor: pointer;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 40px 0;
}

/* Footer */
.footer {
    background-color: var(--dark);
    color: var(--light);
    text-align: center;
    padding: 20px 0;
    margin-top: auto;
}

.footer p { margin: 0; font-size: 14px; }

/* Components */
.card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 25px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border-top: 4px solid transparent;
}
.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-top-color: var(--primary);
}

.btn {
    display: inline-block;
    padding: 10px 24px;
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: var(--transition);
}
.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-light); color: var(--white); }

/* Forms */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 600; color: var(--dark); }
.form-control { width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: var(--radius); font-size: 16px; transition: var(--transition); font-family: inherit; }
.form-control:focus { outline: none; border-color: var(--secondary); box-shadow: 0 0 0 3px rgba(243, 156, 18, 0.2); }

/* Utility classes cho co giãn */
.responsive-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Responsive Media Queries (Mobile First approach implicit by standard structure but enforced below) */
@media (max-width: 1024px) {
    /* Tablet tweaks if needed */
    .nav-link { padding: 10px 8px; font-size: 15px; }
}

@media (max-width: 768px) {
    .hamburger { display: block; }
    
    .nav-menu {
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        display: none;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .user-menu { margin-top: 10px; width: 100%; justify-content: flex-start; margin-left: 0; border-top: 1px solid #eee; padding-top: 10px; }
    .user-dropdown-menu { position: static; box-shadow: none; border: none; background: #f8f9fa; width: 100%; display: none; margin-top: 5px; }
    
    /* Ngăn hover menu trên mobile làm xổ ra liên tục, chỉ xổ khi có class active */
    .user-menu:hover .user-dropdown-menu { display: none; }
    .user-menu.active .user-dropdown-menu { display: flex; }
}

@media (max-width: 480px) {
    .main-content { padding: 20px 0; }
    .card { padding: 15px; }
}
