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

/* Reset và base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #667eea;
    --primary-dark: #5568d3;
    --primary-light: #764ba2;
    --secondary-color: #f8f9fa;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

body {
    font-family: 'Inter', 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    background: white;
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

/* Capitalize chữ cái đầu của mỗi từ cho toàn bộ text */
body {
    text-transform: capitalize;
}

/* Áp dụng capitalize cho các element text thông thường */
body p,
body span,
body div,
body td,
body th,
body li,
body label,
body h1,
body h2,
body h3,
body h4,
body h5,
body h6,
body a,
body small {
    text-transform: capitalize;
}

/* Loại trừ các element không cần capitalize */
input,
textarea,
select,
select option,
button,
code,
pre,
.no-capitalize,
mark,
[contenteditable],
.pagination-info,
.pagination-ellipsis,
.page-number,
.number,
.price,
.amount,
.currency,
table th,
.stat-content h3,
.menu-card h3,
.page-header h1,
.logo-text,
.sidebar-nav a,
.dropdown-item,
input *,
textarea *,
select *,
button *,
code *,
pre *,
.no-capitalize * {
    text-transform: none !important;
}

strong {
    color: rgba(225, 136, 35, 1);
    font-weight: 600;
}

/* Login page */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-container {
    width: 100%;
    max-width: 450px;
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-box {
    background: white;
    padding: 48px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.login-box h1 {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    margin-bottom: 12px;
    font-size: 2.25em;
    font-weight: 700;
    letter-spacing: -1px;
}

.login-box h2 {
    color: #666;
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.2em;
    font-weight: normal;
}

/* Login form styling */
.login-form {
    margin-top: 8px;
}

.login-form .form-group {
    margin-bottom: 24px;
}

.login-form .form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95em;
    letter-spacing: 0.3px;
}

.login-form .form-group label i {
    color: var(--primary-color);
    font-size: 0.9em;
}

.login-form .form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1em;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
    font-family: inherit;
    box-sizing: border-box;
}

.login-form .form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

.login-form .form-group input:hover {
    border-color: var(--text-secondary);
}

.login-form .form-group input::placeholder {
    color: #999;
    opacity: 0.7;
}

/* Password input wrapper with toggle */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper input {
    padding-right: 50px !important;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    border-radius: var(--radius-sm);
    z-index: 1;
}

.password-toggle:hover {
    color: var(--primary-color);
    background: rgba(102, 126, 234, 0.1);
}

.password-toggle:active {
    transform: translateY(-50%) scale(0.95);
}

.password-toggle-icon {
    font-size: 1.3em;
    display: inline-block;
    line-height: 1;
    user-select: none;
}

/* Login button */
.btn-login {
    width: 100%;
    padding: 16px;
    font-size: 1.05em;
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-login i {
    font-size: 1em;
}

/* Login footer inside form */
.login-form .login-footer {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 2px solid var(--border-color);
}

.login-form .login-footer-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    color: var(--text-secondary);
    font-size: 0.8em;
    white-space: nowrap;
    line-height: 1.4;
}

.login-form .login-footer-brand {
    font-weight: 500;
    color: var(--text-secondary);
}

.login-form .login-footer-divider {
    color: var(--text-secondary);
    opacity: 0.4;
}

.login-form .login-footer-phone {
    font-weight: 500;
    color: var(--text-secondary);
}

@media (max-width: 480px) {
    .login-form .login-footer {
        margin-top: 24px;
        padding-top: 20px;
    }

    .login-form .login-footer-content {
        font-size: 0.75em;
        gap: 6px;
    }
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
    margin-bottom: 30px;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
}

.header-content {
    max-width: 100%;
    width: 100%;
    margin: 0;
    padding: 18px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    box-sizing: border-box;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.menu-toggle {
    display: none;
    background: #667eea;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.2em;
    transition: all 0.3s;
}

.menu-toggle:hover {
    background: #764ba2;
}

.logo h2 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.5em;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.logo-icon {
    font-size: 1.2em;
    filter: drop-shadow(0 2px 4px rgba(102, 126, 234, 0.3));
    display: inline-block;
    line-height: 1;
}

.logo-text {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-left: auto;
}

.user-name {
    font-weight: bold;
    color: #667eea;
}

.user-role {
    padding: 6px 12px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: var(--radius-sm);
    font-size: 0.85em;
    font-weight: 600;
    color: #92400e;
    box-shadow: var(--shadow-sm);
    display: inline-flex;
    align-items: center;
    transition: all 0.3s;
}

.user-role:hover {
    background: linear-gradient(135deg, #fde68a 0%, #fcd34d 100%);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.user-role-dropdown {
    position: relative;
}

.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    z-index: 1000;
    border: 1px solid var(--border-color);
    overflow: hidden;
    animation: slideDown 0.3s ease-out;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s;
    border-bottom: 1px solid var(--border-color);
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.1) 0%, rgba(102, 126, 234, 0.05) 100%);
    color: var(--primary-color);
    padding-left: 20px;
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 4px 0;
}

.btn-logout {
    padding: 10px 18px;
    background: linear-gradient(135deg, var(--danger-color) 0%, #dc2626 100%);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

.btn-logout:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 70px;
    width: 260px;
    height: calc(100vh - 70px);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-lg);
    z-index: 99;
    overflow-y: auto;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-right: 1px solid var(--border-color);
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 98;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.sidebar-overlay.show {
    display: block;
    opacity: 1;
    visibility: visible;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    padding: 10px 0;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 4px solid transparent;
    margin: 4px 12px;
    border-radius: var(--radius-md);
    font-weight: 500;
    position: relative;
}

.sidebar-nav a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary-color);
    border-radius: 0 4px 4px 0;
    opacity: 0;
    transition: opacity 0.3s;
}

.sidebar-nav a:hover {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.1) 0%, rgba(102, 126, 234, 0.05) 100%);
    color: var(--primary-color);
    transform: translateX(4px);
}

.sidebar-nav a:hover::before {
    opacity: 1;
}

.sidebar-nav a.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    box-shadow: var(--shadow-md);
    transform: translateX(4px);
}

.sidebar-nav a.active::before {
    opacity: 0;
}

.sidebar-nav a .icon {
    font-size: 1.2em;
    width: 24px;
    text-align: center;
}

.sidebar-nav a .text {
    font-weight: 500;
}

/* Sidebar submenu */
.sidebar-menu-item {
    position: relative;
}

.sidebar-menu-toggle {
    position: relative;
}

.sidebar-menu-toggle .arrow {
    margin-left: auto;
    font-size: 0.7em;
    transition: transform 0.3s ease;
    color: var(--text-secondary);
}

.sidebar-menu-item.active .sidebar-menu-toggle .arrow,
.sidebar-submenu.open~.sidebar-menu-toggle .arrow {
    transform: rotate(180deg);
}

.sidebar-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: rgba(102, 126, 234, 0.05);
    margin-left: 16px;
    border-left: 2px solid rgba(102, 126, 234, 0.2);
    padding-left: 0;
}

.sidebar-submenu.open {
    max-height: 300px;
    padding: 8px 0;
}

.sidebar-submenu a {
    padding: 12px 16px 12px 40px;
    font-size: 0.9em;
    color: var(--text-secondary);
    border-radius: 0;
}

.sidebar-submenu a:hover {
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary-color);
}

.sidebar-submenu a.active {
    background: rgba(102, 126, 234, 0.15);
    color: var(--primary-color);
    font-weight: 600;
}

.sidebar-submenu a.active::before {
    display: none;
}

.sidebar-submenu a .icon {
    font-size: 1em;
    width: 20px;
}

/* Container */
.container {
    max-width: calc(100% - 260px);
    width: calc(100% - 260px);
    margin: 0;
    margin-left: 260px;
    padding: 30px 30px 50px;
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1), width 0.3s cubic-bezier(0.4, 0, 0.2, 1), max-width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeIn 0.5s ease-in;
    flex: 1;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.page-header h1 {
    color: var(--text-primary);
    font-size: 2.25em;
    font-weight: 700;
    letter-spacing: -1px;
    margin: 0;
}

/* Stats grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    min-width: 345px;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--primary-light) 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s;
}

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.stat-card:hover::before {
    transform: scaleX(1);
}

.stat-icon {
    font-size: 3.5em;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s;
}

.stat-card:hover .stat-icon {
    transform: scale(1.1) rotate(5deg);
}

.stat-content h3 {
    font-size: 1.6em;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 6px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stat-content {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.stat-content p {
    color: var(--text-secondary);
    margin: 0;
    font-weight: 500;
    font-size: 0.95em;
}

/* Menu grid */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.menu-card {
    background: white;
    padding: 32px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    text-decoration: none;
    color: inherit;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.menu-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.menu-card:hover::after {
    left: 100%;
}

.menu-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.menu-icon {
    font-size: 3.5em;
    margin-bottom: 16px;
    display: inline-block;
    transition: transform 0.3s;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

.menu-card:hover .menu-icon {
    transform: scale(1.15) rotate(5deg);
}

.menu-card h3 {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
    font-size: 1.35em;
    font-weight: 700;
}

.menu-card p {
    color: var(--text-secondary);
    font-size: 0.95em;
    line-height: 1.5;
}

/* Section */
.section {
    background: white;
    padding: 32px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: 32px;
    border: 1px solid var(--border-color);
    transition: box-shadow 0.3s;
}

.section:hover {
    box-shadow: var(--shadow-lg);
}

.section h2 {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-color);
    font-size: 1.75em;
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* Forms */
.form-container {
    background: white;
    padding: 36px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95em;
    letter-spacing: 0.3px;
}

.form-group .required {
    color: var(--danger-color);
    margin-left: 4px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1em;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

.form-group input:hover,
.form-group textarea:hover,
.form-group select:hover {
    border-color: var(--text-secondary);
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 0.9em;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

/* Buttons */
.btn {
    padding: 14px 28px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1em;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    letter-spacing: 0.3px;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color) 0%, #059669 100%);
    color: white;
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning-color) 0%, #d97706 100%);
    color: white;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.btn-info {
    background: linear-gradient(135deg, var(--info-color) 0%, #2563eb 100%);
    color: white;
}

.btn-info:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.btn-sm {
    padding: 6px 10px;
    font-size: 0.8em;
    white-space: nowrap;
    min-width: auto;
}

/* Alerts */
.alert {
    padding: 16px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    border-left: 4px solid;
    box-shadow: var(--shadow-sm);
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.alert-success {
    background: linear-gradient(90deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    border-left-color: var(--success-color);
}

.alert-error {
    background: linear-gradient(90deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    border-left-color: var(--danger-color);
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.table thead {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
}

.table th {
    padding: 10px 10px;
    text-align: left;
    font-weight: 600;
    font-size: 0.95em;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    font-size: 0.85em;
    text-align: center;
}

.table td {
    padding: 10px 10px;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s;
}

.table tbody tr {
    transition: all 0.2s;
}

.table tbody tr:hover {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.05) 0%, rgba(102, 126, 234, 0.02) 100%);
    transform: scale(1.01);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.text-center {
    text-align: center;
}

.text-muted {
    color: #999;
}

/* Badges */
.badge {
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.85em;
    font-weight: 600;
    display: inline-block;
    box-shadow: var(--shadow-sm);
    letter-spacing: 0.3px;
}

.badge-admin {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    border: 1px solid #fcd34d;
}

.badge-user {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
    border: 1px solid #93c5fd;
}

/* Search box */
.search-box {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 24px 30px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
    width: 100%;
    max-width: 100%;
}

.search-box form {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    width: 100%;
    align-items: flex-start;
}

.search-box form>div {
    flex: 1;
    min-width: 300px;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1em;
    transition: all 0.3s ease;
    background: white;
    box-shadow: var(--shadow-sm);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: white;
}

#searchSuggestions {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    margin-top: 8px;
    overflow: hidden;
}

#searchSuggestions .suggestion-item {
    padding: 14px 18px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

#searchSuggestions .suggestion-item:last-child {
    border-bottom: none;
}

#searchSuggestions .suggestion-item:hover,
#searchSuggestions .suggestion-item[style*="background-color: rgb(240, 240, 240)"] {
    background-color: #f0f4ff !important;
    border-left: 3px solid var(--primary-color);
    padding-left: 15px;
}

#searchSuggestions .suggestion-item mark {
    background: linear-gradient(135deg, #ffeb3b 0%, #ffc107 100%);
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 600;
    color: var(--text-primary);
}

/* Filter Form */
.filter-form {
    width: 100%;
}

.filter-form-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.filter-form-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-left: auto;
}

.filter-form-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    padding: 12px 20px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-form-actions .btn span {
    font-size: 1.1em;
}

.filter-form-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.25);
}

.filter-form-actions .btn:active {
    transform: translateY(0);
}

/* Month Input Localization */
input[type="month"] {
    position: relative;
}

input[type="month"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 1;
}

input[type="month"][lang="vi"] {
    font-family: inherit;
}

/* Pagination Per Page Selector */
.pagination-per-page {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pagination-per-page label {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 14px;
    white-space: nowrap;
}

.pagination-per-page select {
    padding: 10px 16px;
    padding-right: 40px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    background: white;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23667eea' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    min-width: 100px;
}

.pagination-per-page select:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.15);
    transform: translateY(-1px);
}

.pagination-per-page select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1), 0 4px 8px rgba(102, 126, 234, 0.15);
}

.pagination-per-page select option {
    padding: 10px;
    font-weight: 600;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 32px;
    padding: 20px 24px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1), 0 2px 4px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(102, 126, 234, 0.1);
    flex-wrap: wrap;
}

.pagination a.btn {
    min-width: 44px;
    height: 44px;
    padding: 0 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.pagination a.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s;
    z-index: 0;
}

.pagination a.btn:hover::before {
    width: 300px;
    height: 300px;
}

.pagination a.btn:hover {
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.3);
    z-index: 1;
    position: relative;
}

.pagination a.btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.pagination a.btn:disabled,
.pagination a.btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.pagination span.pagination-info {
    font-weight: 600;
    color: var(--text-primary);
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 15px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pagination span.pagination-info::before {
    content: '📄';
    font-size: 18px;
    -webkit-text-fill-color: initial;
    filter: grayscale(0.3);
}

.pagination span.pagination-ellipsis {
    padding: 0 8px;
    color: var(--text-secondary);
    font-size: 16px;
    font-weight: 400;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    user-select: none;
}

.pagination .page-number {
    min-width: 44px;
    height: 44px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.pagination .page-number::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s;
    z-index: 0;
}

.pagination .page-number:hover::before {
    width: 300px;
    height: 300px;
}

.pagination .page-number:hover {
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.3);
    z-index: 1;
    position: relative;
}

.pagination .page-number.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    z-index: 1;
    position: relative;
}

.pagination .page-number.active::before {
    display: none;
}

.pagination .page-number:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

/* Responsive pagination */
@media (max-width: 768px) {
    .pagination {
        gap: 6px;
        padding: 16px;
    }

    .pagination a.btn,
    .pagination .page-number {
        min-width: 36px;
        height: 36px;
        padding: 0 10px;
        font-size: 12px;
    }

    .pagination span.pagination-info {
        font-size: 12px;
        padding: 6px 8px;
        margin-left: 8px;
    }

    .pagination span.pagination-info::before {
        display: none;
    }

    .pagination span.pagination-ellipsis {
        font-size: 14px;
        padding: 0 4px;
    }

    .filter-form-row {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-form-actions {
        margin-left: 0;
        width: 100%;
        justify-content: stretch;
    }

    .filter-form-actions .btn {
        flex: 1;
        justify-content: center;
    }
}

/* Year input - remove thousand separator */
#date-year {
    -moz-appearance: textfield;
}

#date-year::-webkit-outer-spin-button,
#date-year::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Footer */
.footer {
    background: transparent;
    color: var(--text-secondary);
    padding: 20px 24px;
    margin-top: auto;
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    box-sizing: border-box;
    overflow-x: hidden;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: center;
    align-items: center;
}

.footer-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
    text-align: center;
    margin: 0 auto;
    max-width: 100%;
}

.footer-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85em;
    font-weight: 400;
}

.footer-copyright {
    color: var(--text-secondary);
    font-weight: 400;
}

.footer-icon {
    color: var(--primary-color);
    font-size: 1.1em;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.9;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.1);
    }
}

.footer-text {
    color: var(--text-primary);
    font-weight: 600;
}

.footer-brand {
    color: var(--text-secondary);
    font-weight: 400;
    font-size: 0.85em;
    letter-spacing: 0;
}

.footer-divider {
    color: var(--text-secondary);
    font-weight: 300;
    margin: 0 2px;
    opacity: 0.4;
}

.footer-phone {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 400;
    padding: 0;
    border-radius: 0;
    background: transparent;
    transition: color 0.2s ease;
    border: none;
}

.footer-phone:hover {
    background: transparent;
    transform: none;
    box-shadow: none;
    color: var(--primary-color);
    border-color: transparent;
}

.footer-phone:active {
    transform: none;
}

.footer-phone-icon {
    font-size: 0.85em;
    color: inherit;
}

.footer-phone span {
    color: inherit;
}

/* Responsive Footer */
@media (max-width: 768px) {
    .footer {
        padding: 16px;
    }

    .footer-content {
        flex-direction: column;
        gap: 8px;
    }

    .footer-item {
        font-size: 0.8em;
    }

    .footer-divider {
        display: none;
    }

    .footer-phone {
        padding: 0;
        font-size: inherit;
    }
}

@media (max-width: 480px) {
    .footer {
        padding: 14px;
    }

    .footer-content {
        gap: 6px;
    }

    .footer-item {
        font-size: 0.75em;
    }
}

/* Product info */
.product-info {
    margin-bottom: 20px;
}

.revenue-info {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
}

/* Responsive */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .sidebar {
        width: 350px;
        top: 130px;
        height: calc(100vh - 80px);
        transform: translateX(-100%);
        transition: transform 0.3s;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .container {
        margin-left: 0;
        width: 100%;
        max-width: 100%;
    }

    .footer {
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
    }

    body {
        overflow-x: hidden;
    }

    .header-content {
        flex-direction: row;
        justify-content: space-between;
    }

    .user-info {
        margin-left: 0;
        gap: 10px;
    }

    .user-name,
    .user-role {
        font-size: 0.9em;
    }

    .stats-grid,
    .menu-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .table {
        font-size: 0.9em;
    }

    .table th,
    .table td {
        padding: 10px;
    }
}