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

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

:root {
    --primary: #667eea;
    --primary-dark: #5a67d8;
    --secondary: #764ba2;
    --bg-light: #f7fafc;
    --bg-dark: #1a202c;
    --text-dark: #1a202c;
    --text-muted: #718096;
    --border: #e2e8f0;
    --success: #48bb78;
    --warning: #ed8936;
    --error: #fc8181;
    --white: #ffffff;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.15);
    --shadow-xl: 0 20px 60px rgba(0,0,0,0.2);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #8b5cf6 100%);
    min-height: 100vh;
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

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

.admin-sidebar {
    width: 260px;
    background: linear-gradient(180deg, #1a202c 0%, #2d3748 100%);
    color: #fff;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
}

.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header h1 {
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-nav {
    padding: 16px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 24px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: rgba(255,255,255,0.05);
    color: #fff;
}

.nav-item.active {
    background: rgba(102,126,234,0.2);
    color: #fff;
    border-left-color: var(--primary);
}

.nav-item .icon {
    font-size: 18px;
}

.admin-main {
    flex: 1;
    margin-left: 260px;
    min-height: 100vh;
}

.admin-header {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    padding: 20px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-left h2 {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-dark);
}

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

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    background: var(--bg-light);
    border-radius: 10px;
}

.user-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
}

.btn-logout {
    font-size: 13px;
    color: var(--error);
    text-decoration: none;
    padding: 4px 12px;
    border-radius: 6px;
    background: rgba(252,129,129,0.1);
    transition: all 0.2s;
}

.btn-logout:hover {
    background: rgba(252,129,129,0.2);
}

.admin-content {
    padding: 32px;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--white);
    border-radius: 20px;
    padding: 24px;
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.stat-card.blue .stat-icon { background: linear-gradient(135deg, #667eea20, #764ba220); }
.stat-card.green .stat-icon { background: linear-gradient(135deg, #48bb7820, #38a16920); }
.stat-card.orange .stat-icon { background: linear-gradient(135deg, #ed893620, #dd6b2020); }
.stat-card.red .stat-icon { background: linear-gradient(135deg, #fc818120, #f5656520); }

.stat-info {
    flex: 1;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.2;
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

.admin-panel {
    background: var(--white);
    border-radius: 20px;
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

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

.panel-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
}

.panel-body {
    padding: 0;
}

.layui-table {
    width: 100%;
    border-collapse: collapse;
}

.layui-table th {
    background: var(--bg-light);
    padding: 14px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    text-align: left;
}

.layui-table td {
    padding: 16px;
    font-size: 14px;
    color: var(--text-dark);
    border-bottom: 1px solid var(--border);
}

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

.layui-table tbody tr:hover {
    background: var(--bg-light);
}

.file-type-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.badge-word { background: linear-gradient(135deg, #2b6cb020, #3182ce20); color: #2b6cb0; }
.badge-excel { background: linear-gradient(135deg, #21734620, #2e7d3220); color: #217346; }
.badge-pdf { background: linear-gradient(135deg, #e53e3e20, #c5303020); color: #e53e3e; }
.badge-ppt { background: linear-gradient(135deg, #d44d0020, #ed893620); color: #d44d00; }
.badge-default { background: var(--bg-light); color: var(--text-muted); }

.login-body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #8b5cf6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

.login-box {
    background: var(--white);
    border-radius: 28px;
    padding: 40px;
    box-shadow: var(--shadow-xl);
}

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

.login-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
}

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

.login-form .layui-form-item {
    margin-bottom: 20px;
}

.login-form .layui-form-label {
    padding: 9px 0;
    font-size: 14px;
    color: var(--text-dark);
    font-weight: 500;
}

.login-form .layui-input {
    height: 44px;
    border-radius: 10px;
    border: 2px solid var(--border);
    font-size: 14px;
    transition: all 0.2s;
}

.login-form .layui-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102,126,234,0.1);
}

.login-form .layui-btn {
    width: 100%;
    height: 48px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
}

.login-form .layui-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102,126,234,0.4);
}

@media (max-width: 1200px) {
    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .admin-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
    }

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

    .admin-main {
        margin-left: 0;
    }

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

    .admin-content {
        padding: 20px;
    }

    .admin-header {
        padding: 16px 20px;
    }

    .header-left h2 {
        font-size: 18px;
    }
}

.filter-bar {
    display: flex;
    gap: 16px;
    padding: 16px 24px;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}

.filter-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-item label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.filter-item .layui-input {
    height: 36px;
    border-radius: 8px;
    font-size: 13px;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 20px;
    flex-wrap: wrap;
}

.page-btn {
    min-width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    background: var(--white);
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.page-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

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

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.form-group .layui-input,
.form-group .layui-textarea {
    border-radius: 10px;
    font-size: 14px;
}

.form-actions {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.form-actions .layui-btn {
    border-radius: 10px;
    padding: 0 32px;
    height: 42px;
    line-height: 42px;
}

.empty-tip {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-size: 14px;
}

.action-btn {
    padding: 5px 12px;
    border: 1px solid var(--border);
    background: var(--white);
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-dark);
}

.action-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.action-btn.danger {
    color: var(--error);
    border-color: rgba(252,129,129,0.3);
}

.action-btn.danger:hover {
    background: rgba(252,129,129,0.1);
    border-color: var(--error);
}

.file-type-icon {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    background: var(--bg-light);
}

.icon-word { color: #2b6cb0; background: rgba(43,108,176,0.1); }
.icon-xls, .icon-xlsx { color: #217346; background: rgba(33,115,70,0.1); }
.icon-pdf { color: #e53e3e; background: rgba(229,62,62,0.1); }
.icon-ppt, .icon-pptx { color: #d44d00; background: rgba(212,77,0,0.1); }
.icon-jpg, .icon-jpeg, .icon-png, .icon-gif, .icon-img { color: #805ad5; background: rgba(128,90,213,0.1); }
.icon-zip, .icon-rar { color: #dd6b20; background: rgba(221,107,32,0.1); }

.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-active {
    background: rgba(72,187,120,0.1);
    color: var(--success);
}

.status-disabled {
    background: rgba(252,129,129,0.1);
    color: var(--error);
}

.log-type {
    display: inline-block;
    padding: 3px 8px;
    background: rgba(102,126,234,0.1);
    color: var(--primary);
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.batch-actions {
    display: flex;
    gap: 8px;
}

.batch-actions .layui-btn {
    border-radius: 8px;
}
