.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e8eef5 0%, #d4dde8 50%, #c5d3e3 100%);
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cpath fill='%233b82f6' fill-opacity='0.06' d='M40 10 L45 25 L60 25 L48 35 L53 50 L40 40 L27 50 L32 35 L20 25 L35 25 Z'/%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Crect x='20' y='15' width='60' height='70' rx='3' fill='%2310b981' fill-opacity='0.05'/%3E%3Crect x='25' y='20' width='50' height='60' rx='2' fill='white' fill-opacity='0.3'/%3E%3Cline x1='30' y1='30' x2='70' y2='30' stroke='%2310b981' stroke-opacity='0.2' stroke-width='2'/%3E%3Cline x1='30' y1='40' x2='70' y2='40' stroke='%2310b981' stroke-opacity='0.2' stroke-width='2'/%3E%3Cline x1='30' y1='50' x2='70' y2='50' stroke='%2310b981' stroke-opacity='0.2' stroke-width='2'/%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='70' height='70' viewBox='0 0 70 70'%3E%3Crect x='30' y='10' width='8' height='50' rx='4' fill='%23f59e0b' fill-opacity='0.08'/%3E%3Cellipse cx='34' cy='12' rx='6' ry='4' fill='%23f59e0b' fill-opacity='0.1'/%3E%3Crect x='28' y='55' width='12' height='8' rx='2' fill='%23f59e0b' fill-opacity='0.06'/%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='90' viewBox='0 0 90 90'%3E%3Crect x='15' y='20' width='60' height='8' rx='2' fill='%2364748b' fill-opacity='0.08' transform='rotate(-30 45 24)'/%3E%3Crect x='15' y='20' width='60' height='8' rx='2' fill='%2364748b' fill-opacity='0.06' transform='rotate(30 45 24)'/%3E%3Ccircle cx='45' cy='45' r='25' fill='none' stroke='%2364748b' stroke-opacity='0.1' stroke-width='3'/%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cpath d='M40 10 L45 30 L65 30 L50 42 L55 62 L40 50 L25 62 L30 42 L15 30 L35 30 Z' fill='%238b5cf6' fill-opacity='0.06'/%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cellipse cx='40' cy='45' rx='25' ry='20' fill='none' stroke='%233b82f6' stroke-opacity='0.1' stroke-width='2'/%3E%3Cellipse cx='40' cy='40' rx='20' ry='15' fill='none' stroke='%233b82f6' stroke-opacity='0.08' stroke-width='1.5'/%3E%3Cpath d='M20 55 Q40 70 60 55' fill='none' stroke='%233b82f6' stroke-opacity='0.1' stroke-width='1.5'/%3E%3Cline x1='40' y1='25' x2='40' y2='65' stroke='%233b82f6' stroke-opacity='0.1' stroke-width='1.5'/%3E%3Cline x1='15' y1='45' x2='65' y2='45' stroke='%233b82f6' stroke-opacity='0.1' stroke-width='1.5'/%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='70' height='70' viewBox='0 0 70 70'%3E%3Cpath d='M35 15 L45 25 L45 45 L35 55 L25 45 L25 25 Z' fill='%2310b981' fill-opacity='0.05'/%3E%3Crect x='40' y='25' width='20' height='3' rx='1' fill='%2310b981' fill-opacity='0.08'/%3E%3Crect x='40' y='32' width='15' height='3' rx='1' fill='%2310b981' fill-opacity='0.06'/%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Crect x='20' y='35' width='40' height='30' rx='3' fill='%23ef4444' fill-opacity='0.04'/%3E%3Crect x='20' y='35' width='40' height='8' rx='3' fill='%23ef4444' fill-opacity='0.06'/%3E%3Cellipse cx='40' cy='30' rx='12' ry='8' fill='none' stroke='%23ef4444' stroke-opacity='0.1' stroke-width='2'/%3E%3Cpath d='M30 50 L35 42 L40 50 L45 42 L50 50' fill='none' stroke='%23ef4444' stroke-opacity='0.08' stroke-width='1.5'/%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='70' height='70' viewBox='0 0 70 70'%3E%3Ccircle cx='35' cy='35' r='20' fill='none' stroke='%2364748b' stroke-opacity='0.1' stroke-width='2'/%3E%3Ccircle cx='35' cy='35' r='12' fill='none' stroke='%2364748b' stroke-opacity='0.08'/%3E%3Ccircle cx='35' cy='35' r='4' fill='%2364748b' fill-opacity='0.15'/%3E%3Cline x1='35' y1='15' x2='35' y2='22' stroke='%2364748b' stroke-opacity='0.1' stroke-width='2'/%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cpath d='M25 30 L30 35 L25 40 L20 35 Z' fill='%233b82f6' fill-opacity='0.06'/%3E%3Cpath d='M55 30 L60 35 L55 40 L50 35 Z' fill='%233b82f6' fill-opacity='0.06'/%3E%3Cellipse cx='40' cy='35' rx='20' ry='12' fill='none' stroke='%233b82f6' stroke-opacity='0.1' stroke-width='2'/%3E%3Cline x1='22' y1='35' x2='58' y2='35' stroke='%233b82f6' stroke-opacity='0.08' stroke-width='1.5'/%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='70' height='70' viewBox='0 0 70 70'%3E%3Crect x='20' y='25' width='30' height='25' rx='2' fill='%23f59e0b' fill-opacity='0.05'/%3E%3Ccircle cx='35' cy='37' r='8' fill='none' stroke='%23f59e0b' stroke-opacity='0.1' stroke-width='2'/%3E%3Crect x='32' y='30' width='6' height='14' rx='1' fill='%23f59e0b' fill-opacity='0.08'/%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Cpath d='M20 15 L40 15 L40 45 L20 45 Z' fill='%2310b981' fill-opacity='0.04'/%3E%3Cpath d='M25 20 L35 20' stroke='%2310b981' stroke-opacity='0.12' stroke-width='2'/%3E%3Cpath d='M25 26 L35 26' stroke='%2310b981' stroke-opacity='0.1' stroke-width='2'/%3E%3Cpath d='M25 32 L35 32' stroke='%2310b981' stroke-opacity='0.08' stroke-width='2'/%3E%3Ccircle cx='30' cy='40' r='3' fill='%2310b981' fill-opacity='0.1'/%3E%3C/svg%3E");
    background-position: 
        5% 8%, 
        85% 12%, 
        15% 75%, 
        75% 70%, 
        50% 25%, 
        25% 45%, 
        60% 60%,
        90% 85%,
        10% 30%,
        80% 40%,
        40% 88%,
        65% 5%;
    background-size: 
        120px 120px, 
        150px 150px, 
        100px 100px,
        130px 130px,
        100px 100px,
        110px 110px,
        90px 90px,
        100px 100px,
        90px 90px,
        110px 110px,
        80px 80px,
        80px 80px;
    background-repeat: no-repeat;
    animation: floatBg 25s ease-in-out infinite;
}

.login-container::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(to top, rgba(255,255,255,0.4) 0%, transparent 100%);
    pointer-events: none;
}

@keyframes floatBg {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.api-loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.api-loading .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e0e0e0;
    border-top-color: #3B82F6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.spin-icon {
    display: inline-block;
    animation: spin 0.8s linear infinite;
}

.login-box {
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--radius-xl);
    padding: 48px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
    animation: fadeIn 0.5s ease;
    position: relative;
    z-index: 1;
    backdrop-filter: blur(10px);
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-header .logo {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, #3B82F6 0%, #1D4ED8 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 32px;
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.login-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 16px;
}

.login-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
}

.login-tabs .tab-btn {
    flex: 1;
    padding: 12px;
    border: 2px solid var(--border-color);
    background: transparent;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.login-tabs .tab-btn:hover {
    border-color: var(--primary-light);
}

.login-tabs .tab-btn.active {
    border-color: var(--primary-color);
    background: rgba(59, 130, 246, 0.05);
    color: var(--primary-color);
}

.login-methods {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 24px;
}

.login-method {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 13px 29px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: var(--transition);
    flex: 1;
    max-width: 154px;
}

.login-method:hover {
    border-color: var(--primary-color);
    background: rgba(59, 130, 246, 0.05);
    transform: translateY(-2px);
}

.login-method .method-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.login-method .method-icon.wechat {
    background: #07C160;
    color: white;
}

.login-method .method-icon.phone {
    background: var(--primary-color);
    color: white;
}

.login-method span {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.login-divider {
    display: flex;
    align-items: center;
    color: var(--text-muted);
    font-size: 14px;
}

.login-divider::before,
.login-divider::after {
    content: '';
    width: 30px;
    height: 1px;
    background: var(--border-color);
}

.phone-login-form {
    animation: fadeIn 0.3s ease;
}

@media (max-width: 480px) {
    .login-method {
        max-width: 100%;
        flex-direction: row;
        padding: 16px;
        gap: 16px;
    }
    
    .login-divider {
        display: none;
    }
}

.login-content .tab-content {
    display: none;
}

.login-content .tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.wechat-login {
    text-align: center;
    padding: 20px 0;
}

.wechat-login p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.admin-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: var(--card-bg);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    transition: var(--transition);
}

.sidebar.collapsed {
    width: 80px;
}

.sidebar-header {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-header .logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
    width: 100%;
}

.sidebar-header .logo i {
    font-size: 28px;
}

.sidebar.collapsed .sidebar-header .logo span {
    display: none;
}

.sidebar-toggle {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--bg-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.sidebar-close {
    display: none;
    width: 32px;
    height: 32px;
    border: none;
    background: var(--bg-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.sidebar-toggle:hover {
    background: var(--border-color);
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 16px 12px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.sidebar-nav::-webkit-scrollbar {
    display: none;
}

.nav-list {
    list-style: none;
}

.nav-item {
    margin-bottom: 4px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition);
}

.nav-link:hover {
    background: var(--bg-color);
    color: var(--text-primary);
}

.nav-link.active {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
}

.nav-link i {
    font-size: 20px;
    width: 24px;
    text-align: center;
}

.nav-link .arrow {
    margin-left: auto;
    transition: var(--transition);
}

.nav-item.open .nav-link .arrow {
    transform: rotate(180deg);
}

.sidebar.collapsed .nav-link span,
.sidebar.collapsed .nav-link .arrow {
    display: none;
}

.nav-sublist {
    list-style: none;
    padding-left: 36px;
    max-height: 0;
    overflow: hidden;
    transition: var(--transition);
}

.nav-item.open .nav-sublist {
    max-height: 500px;
}

.nav-sublink {
    display: block;
    padding: 10px 16px;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    font-size: 13px;
    transition: var(--transition);
}

.nav-sublink:hover {
    background: var(--bg-color);
    color: var(--text-primary);
}

.nav-sublink.active {
    color: var(--primary-color);
    background: rgba(59, 130, 246, 0.05);
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-color);
}

.board-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition);
}

.board-link:hover {
    background: var(--primary-color);
    color: white;
}

.sidebar.collapsed .board-link span {
    display: none;
}

.main-container {
    flex: 1;
    margin-left: 260px;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

.sidebar.collapsed + .main-container {
    margin-left: 80px;
}

.header {
    height: 64px;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 50;
}

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

.menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border: none;
    background: var(--bg-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 20px;
}

.breadcrumb {
    color: var(--text-secondary);
    font-size: 14px;
}

.breadcrumb span {
    display: inline-flex;
    align-items: center;
}

.breadcrumb span:not(:last-child)::after {
    content: '/';
    margin: 0 8px;
    color: var(--text-muted);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-info {
    text-align: right;
}

.user-name {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
}

.user-role {
    font-size: 12px;
    color: var(--text-muted);
}

.user-dropdown {
    position: relative;
}

.dropdown-toggle {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--bg-color);
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    color: var(--text-secondary);
    transition: var(--transition);
}

.dropdown-toggle:hover {
    background: var(--border-color);
    color: var(--text-primary);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: var(--card-bg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 160px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
}

.user-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: var(--text-secondary);
    transition: var(--transition);
}

.dropdown-menu a:hover {
    background: var(--bg-color);
    color: var(--danger-color);
}

.main-content {
    flex: 1;
    padding: 24px;
    background: var(--bg-color);
}

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

.batch-toolbar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    background: #f8fafc;
    border-radius: 8px;
    margin-bottom: 16px;
}

.batch-toolbar .selected-count {
    color: var(--text-secondary);
    font-size: 14px;
}

.batch-toolbar .selected-count span {
    color: var(--primary-color);
    font-weight: 600;
}

.page-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.page-actions {
    display: flex;
    gap: 12px;
}

@media (max-width: 1200px) {
    .sidebar {
        transform: translateX(-100%);
        width: 260px;
    }
    
    .sidebar.collapsed {
        width: 260px;
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .sidebar.open.collapsed {
        transform: translateX(-100%);
    }
    
    .main-container {
        margin-left: 0;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .sidebar-toggle {
        display: none;
    }
    
    .sidebar-close {
        display: flex;
    }
    
    .sidebar-nav {
        overflow-y: auto;
        max-height: calc(100vh - 120px);
    }
    
    .nav-sublist {
        display: none;
        max-height: none;
        overflow: visible;
        padding-left: 20px;
    }
    
    .nav-item.open > .nav-sublist {
        display: block;
    }
    
    .nav-item.open > .nav-link .arrow {
        transform: rotate(180deg);
    }
}

@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-container {
        margin-left: 0;
    }
    
    .menu-toggle {
        display: flex;
    }
}

@media (max-width: 768px) {
    .admin-layout {
        display: block;
    }
    
    .sidebar {
        width: 280px;
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-container {
        margin-left: 0;
    }
    
    .main-content {
        padding: 16px;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .page-title {
        font-size: 20px;
    }
    
    .page-actions {
        width: 100%;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .page-actions .btn {
        flex: 1;
        min-width: calc(50% - 4px);
        justify-content: center;
    }
    
    .page-actions .btn i {
        margin-right: 4px;
    }
    
    .page-actions .btn span {
        display: none;
    }
    
    .header {
        padding: 0 16px;
        height: 56px;
    }
    
    .header-left {
        gap: 8px;
    }
    
    .menu-toggle {
        display: flex;
        width: 36px;
        height: 36px;
    }
    
    .breadcrumb {
        font-size: 13px;
        max-width: 150px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .user-info {
        display: none;
    }
    
    .tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 6px;
    }
    
    .tabs .tab-btn {
        padding: 8px 12px;
        font-size: 14px;
        flex-shrink: 0;
    }
    
    .card {
        padding: 16px;
        margin-bottom: 16px;
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 16px;
        padding-bottom: 12px;
    }
    
    .card-title {
        font-size: 16px;
    }
    
    .search-box {
        flex-direction: column;
        gap: 10px;
    }
    
    .search-box input,
    .search-box select {
        width: 100%;
        min-width: unset;
    }
    
    .search-box .btn {
        width: 100%;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-bottom: 16px;
    }
    
    .stat-card {
        padding: 16px;
    }
    
    .stat-card .value {
        font-size: 24px;
    }
    
    .stat-card .icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .table-container {
        overflow-x: auto;
        margin: 0 -16px;
        padding: 0 16px;
    }
    
    table {
        min-width: 600px;
    }
    
    table th,
    table td {
        padding: 10px 8px;
        font-size: 13px;
    }
    
    .pagination {
        flex-direction: column;
        gap: 12px;
    }
    
    .pagination > div {
        flex-direction: column;
        gap: 8px;
    }
    
    .pagination button {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .modal {
        width: 95%;
        max-height: 85vh;
        padding: 20px;
        margin: 10px;
        overflow-y: auto;
    }
    
    .modal.large {
        max-width: 95%;
    }
    
    .modal-title {
        font-size: 18px;
    }
    
    .modal-footer {
        flex-direction: column;
        gap: 10px;
    }
    
    .modal-footer .btn {
        width: 100%;
    }
    
    .btn {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .btn-sm {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .form-group {
        margin-bottom: 16px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .input-group input {
        width: 100%;
    }
    
    .badge {
        padding: 3px 8px;
        font-size: 11px;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .chart-container {
        padding: 16px;
    }
    
    .chart-container .chart {
        height: 250px;
    }
    
    .toast {
        right: 10px;
        left: 10px;
        padding: 12px 16px;
    }
    
    select {
        font-size: 14px;
        padding: 8px 12px;
        -webkit-appearance: none;
        appearance: none;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 12px center;
        padding-right: 36px;
    }
    
    input[type="text"],
    input[type="search"],
    input[type="file"] {
        font-size: 14px;
    }
    
    .login-box {
        padding: 24px;
    }
    
    .login-header .logo {
        width: 60px;
        height: 60px;
        font-size: 28px;
    }
    
    .login-header h1 {
        font-size: 20px;
    }
    
    .login-tabs {
        flex-direction: column;
    }
    
    .nav-link {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .nav-sublink {
        padding: 8px 12px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    :root {
        font-size: 13px;
    }
    
    .main-content {
        padding: 12px;
    }
    
    .page-title {
        font-size: 18px;
    }
    
    .header {
        padding: 0 12px;
    }
    
    .card {
        padding: 12px;
        border-radius: var(--radius-md);
    }
    
    .stat-card {
        padding: 12px;
    }
    
    .stat-card .value {
        font-size: 20px;
    }
    
    .stat-card .label {
        font-size: 12px;
    }
    
    .modal {
        padding: 16px;
        border-radius: var(--radius-md);
        margin: 8px;
    }
    
    .btn {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .btn-sm {
        padding: 5px 8px;
        font-size: 11px;
    }
    
    table th,
    table td {
        padding: 8px 6px;
        font-size: 12px;
    }
    
    .badge {
        padding: 2px 6px;
        font-size: 10px;
    }
    
    .warning-list-container {
        height: 250px;
    }
    
    .category-ranking {
        gap: 8px;
    }
    
    .category-item {
        padding: 10px;
    }
    
    .category-rank {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }
    
    .charts-row {
        gap: 12px;
    }
    
    .chart-container .chart {
        height: 200px;
    }
    
    #dorm-report-table {
        font-size: 12px;
    }
    
    #dorm-report-table th,
    #dorm-report-table td {
        padding: 8px 4px;
    }
    
    .week-label {
        min-width: 80px;
        font-size: 12px;
    }
    
    .page-actions {
        gap: 6px;
    }
    
    .page-actions .btn {
        padding: 8px 10px;
    }
    
    .page-actions .btn i {
        margin-right: 2px;
    }
    
    .header-right {
        gap: 6px;
    }
    
    .dropdown-toggle {
        width: 32px;
        height: 32px;
    }
    
    .sidebar-header {
        padding: 12px;
    }
    
    .nav-link {
        padding: 10px 10px;
        font-size: 13px;
    }
    
    .nav-sublink {
        padding: 8px 10px;
        font-size: 12px;
    }
    
    .search-box {
        gap: 8px;
    }
    
    .search-box input,
    .search-box select {
        padding: 8px 10px;
        font-size: 13px;
    }
    
    .search-box .btn {
        padding: 8px 12px;
    }
    
    .card-header {
        padding-bottom: 10px;
        margin-bottom: 12px;
    }
    
    .card-title {
        font-size: 15px;
    }
    
    .stats-grid {
        gap: 10px;
    }
    
    .stat-card .icon {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }
    
    .form-group {
        margin-bottom: 12px;
    }
    
    .form-group label {
        font-size: 13px;
        margin-bottom: 6px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 8px 10px;
        font-size: 13px;
    }
    
    .pagination button {
        padding: 5px 8px;
        font-size: 11px;
    }
    
    .chart-container {
        padding: 12px;
    }
    
    .chart-container .chart {
        height: 180px;
    }
    
    .modal-title {
        font-size: 16px;
    }
    
    .modal-header {
        margin-bottom: 16px;
    }
    
    .modal-body {
        font-size: 13px;
    }
    
    .login-box {
        padding: 20px;
        border-radius: var(--radius-lg);
    }
    
    .login-header {
        margin-bottom: 20px;
    }
    
    .login-header .logo {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
    
    .login-header h1 {
        font-size: 18px;
    }
    
    .login-header p {
        font-size: 12px;
    }
    
    .login-tabs {
        margin-bottom: 16px;
    }
    
    .login-methods {
        gap: 12px;
    }
    
    .login-method {
        padding: 12px;
    }
    
    .login-method .method-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .login-method span {
        font-size: 12px;
    }
    
    .sidebar {
        width: 260px;
    }
}

@media (max-width: 360px) {
    :root {
        font-size: 12px;
    }
    
    .page-title {
        font-size: 16px;
    }
    
    .stat-card .value {
        font-size: 18px;
    }
    
    .modal {
        width: 98%;
        margin: 8px;
    }
    
    .detail-stats-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
    }
    
    .detail-stats-grid > div {
        padding: 10px !important;
    }
    
    .detail-stats-grid > div > div:first-child {
        font-size: 16px !important;
    }
}
