/* css/admin.css */

:root {
    --primary-color: #EE0000;
    --text-color: #333;
    --background-color: #f4f7f6;
    --card-background: #ffffff;
    --border-color: #e0e0e0;
    --sidebar-bg: #2c3e50; /* Darker shade for sidebar */
    --sidebar-text: #ecf0f1;
    --sidebar-hover: #34495e;
    --active-link: var(--primary-color);
}

body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--background-color);
    color: var(--text-color);
}

.main-content-wrapper {
    display: flex;
    min-height: calc(100vh - 100px); /* Adjust based on header/footer height */
    margin-top: 80px; /* To clear the fixed header */
}

.admin-container {
    display: flex;
    width: 100%;
    gap: 32px;
}

/* Sidebar Styling */
.sidebar {
    width: 250px;
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    padding: 20px 0;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: fixed;
    top: 80px; /* Align with main content wrapper margin-top */
    bottom: 0;
    overflow-y: auto;
}

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

.admin-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 10px;
    border: 2px solid var(--primary-color);
}

.admin-info h2 {
    margin: 0;
    font-size: 1.2em;
    color: var(--sidebar-text);
}

.admin-info p {
    margin: 5px 0 0;
    font-size: 0.9em;
    color: rgba(255,255,255,0.7);
}

.sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-item {
    position: relative;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #222222 !important;
    text-decoration: none;
    transition: background-color 0.3s, color 0.3s;
    font-size: 1.0em;
    opacity: 1 !important;
    font-weight: 600;
    background: none;
}

.sidebar-link i {
    margin-right: 10px;
    width: 20px; /* Fixed width for icons */
    text-align: center;
}

.sidebar-link:hover,
.sidebar-link.active {
    color: #b12121 !important;
    background: #c00 !important;
    font-weight: 700;
    box-shadow: 2px 0 8px rgba(204,0,0,0.08);
}

.sidebar-link:visited {
    color: #222 !important;
}

.sidebar-link[disabled], .sidebar-link.disabled {
    color: #222 !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    background: none !important;
}

.sidebar-item.has-submenu .sidebar-link {
    justify-content: space-between;
}

.submenu-icon {
    font-size: 0.8em;
    transition: transform 0.3s ease;
}

.sidebar-item.expanded .submenu-icon {
    transform: rotate(90deg);
}

.submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    background-color: #3f5872; /* Slightly lighter than sidebar-bg */
    display: none; /* Hidden by default */
    overflow: hidden;
}

.sidebar-item.expanded .submenu {
    display: block;
}

.submenu li a {
    display: block;
    padding: 10px 20px 10px 50px; /* Indent submenu items */
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: background-color 0.3s, color 0.3s;
    font-size: 0.95em;
}

.submenu li a:hover {
    background-color: #4e6a87;
    color: var(--active-link);
}

/* Main Content Area */
.content-area {
    margin-left: 250px; /* Offset by sidebar width */
    flex-grow: 1;
    padding: 20px 30px;
    background-color: var(--background-color);
}

.content-section {
    display: none;
    padding: 20px;
    background-color: var(--card-background);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

.content-section.active {
    display: block;
}

.content-section h2 {
    color: var(--primary-color);
    margin-top: 0;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

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

.stat-card {
    background-color: #f9f9f9;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.stat-card h3 {
    color: var(--text-color);
    margin-top: 0;
    font-size: 1.1em;
}

.stat-card p {
    font-size: 2em;
    font-weight: bold;
    color: var(--primary-color);
    margin: 5px 0 0;
}

/* Review and V-Family Theater sections */
.review-filters,
.theater-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f0f0f0;
    border-radius: 5px;
}

.review-filters label {
    font-weight: bold;
    color: var(--text-color);
}

.review-filters select,
.review-filters button,
.add-new-theater-btn {
    padding: 8px 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    background-color: var(--card-background);
    cursor: pointer;
    transition: background-color 0.3s, border-color 0.3s;
}

.review-filters button,
.add-new-theater-btn {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.review-filters button:hover,
.add-new-theater-btn:hover {
    opacity: 0.9;
}

.review-list,
.theater-list {
    display: grid;
    gap: 15px;
}

.review-item,
.theater-item {
    background-color: #f9f9f9;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.review-item h3,
.theater-item h3 {
    margin: 0;
    color: var(--primary-color);
    font-size: 1.1em;
}

.review-item p,
.theater-item p {
    margin: 0;
    font-size: 0.95em;
}

.review-item button,
.theater-item button {
    padding: 7px 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-right: 10px;
    transition: background-color 0.3s;
}

.review-item .approve-btn {
    background-color: #28a745;
    color: white;
}
.review-item .approve-btn:hover {
    background-color: #218838;
}

.review-item .reject-btn {
    background-color: #dc3545;
    color: white;
}
.review-item .reject-btn:hover {
    background-color: #c82333;
}

.review-item .view-detail-btn,
.theater-item button {
    background-color: #007bff;
    color: white;
}
.review-item .view-detail-btn:hover,
.theater-item button:hover {
    background-color: #0056b3;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        top: 0;
        box-shadow: none;
        border-bottom: 1px solid var(--border-color);
    }

    .main-content-wrapper {
        flex-direction: column;
        margin-top: 0;
    }

    .content-area {
        margin-left: 0;
        padding: 15px;
    }

    .sidebar-nav ul {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }

    .sidebar-item {
        width: 48%; /* Two columns */
        margin-bottom: 10px;
    }

    .sidebar-item.has-submenu .sidebar-link {
        flex-direction: column;
        align-items: flex-start;
    }

    .submenu-icon {
        position: absolute;
        right: 10px;
        top: 12px;
    }

    .submenu {
        width: 100%;
        padding-left: 0;
    }

    .submenu li a {
        padding-left: 20px;
    }

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

@media (max-width: 900px) {
    .admin-container {
        flex-direction: column;
        gap: 0;
    }
    .admin-section, .stats-grid, .type-stats {
        margin-bottom: 20px;
    }
}

/* 清理区间表单卡片样式 */
.admin-section {
    margin-bottom: 32px;
}
.admin-section form {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    padding: 20px 24px 16px 24px;
    max-width: 500px;
    margin-bottom: 0;
}
.admin-section label {
    font-weight: 600;
    margin-right: 8px;
}
.admin-section input[type="date"] {
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 15px;
}
.admin-section button.btn-danger {
    background: #e53935;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 8px 18px;
    font-weight: 500;
    transition: background 0.2s;
}
.admin-section button.btn-danger:hover {
    background: #b71c1c;
}
.message.success {
    background: #eaf7ea;
    color: #1a7f1a;
    border: 1px solid #b2e2b2;
    padding: 12px 20px;
    border-radius: 6px;
    margin-bottom: 24px;
    font-size: 1.1em;
    max-width: 600px;
}
/* 让表单和表格之间有更大间距 */
.stats-grid, .admin-section, .type-stats {
    margin-bottom: 32px;
}
/* 让左侧菜单和内容区分割更明显 */
.admin-container {
    display: flex;
    gap: 32px;
}
@media (max-width: 900px) {
    .admin-container {
        flex-direction: column;
        gap: 0;
    }
    .admin-section, .stats-grid, .type-stats {
        margin-bottom: 20px;
    }
}

/* 新版B站管理主布局 */
.admin-main-wrapper {
    display: flex;
    min-height: 100vh;
    background: #f4f7f6;
}
.admin-sidebar {
    width: 220px;
    background: #fff;
    border-right: 1.5px solid #e0e0e0;
    padding: 32px 0 0 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    box-shadow: 2px 0 8px rgba(0,0,0,0.04);
}
.sidebar-title {
    font-size: 1.18em;
    font-weight: bold;
    color: #c00;
    margin-bottom: 32px;
    letter-spacing: 1px;
}
.sidebar-menu {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 13px 28px 13px 28px;
    color: #222;
    text-decoration: none;
    font-weight: 600;
    border-radius: 0 20px 20px 0;
    transition: background 0.2s, color 0.2s;
    font-size: 1.05em;
}
.sidebar-link:hover, .sidebar-link.active {
    background: #ffeaea;
    color: #c00;
}
.admin-content-area {
    flex: 1;
    max-width: 1200px;
    margin-left: 0;
    margin-right: auto;
    padding: 40px 32px 32px 32px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}
.stats-grid {
    margin-bottom: 0;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.stat-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    padding: 24px 0 16px 0;
    text-align: center;
    border: 1.5px solid #e0e0e0;
}
.stat-number {
    font-size: 2.2em;
    font-weight: bold;
    color: #c00;
    letter-spacing: 1px;
    margin-bottom: 4px;
}
.stat-label {
    color: #222;
    font-weight: 600;
    font-size: 1.08em;
}
.admin-section, .type-stats {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    padding: 24px 20px 16px 20px;
    margin-bottom: 0;
    border: 1.5px solid #e0e0e0;
}
.btn, .btn-danger, .btn-primary, .btn-secondary {
    font-weight: 600;
    font-size: 1em;
    border-radius: 5px;
    border: none;
    padding: 10px 22px;
    transition: background 0.2s, color 0.2s;
}
.btn-primary {
    background: #c00;
    color: #fff;
}
.btn-primary:hover {
    background: #a30000;
}
.btn-danger {
    background: #e53935;
    color: #fff;
}
.btn-danger:hover {
    background: #b71c1c;
}
.btn-secondary {
    background: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
}
.btn-secondary:hover {
    background: #e9e9e9;
    color: #c00;
}
/* 统计卡片、表单、表格等间距 */
.admin-content-area > * {
    margin-bottom: 24px;
}
@media (max-width: 900px) {
    .admin-main-wrapper {
        flex-direction: column;
    }
    .admin-sidebar {
        width: 100%;
        min-height: unset;
        flex-direction: row;
        justify-content: center;
        border-right: none;
        border-bottom: 1px solid #eee;
        box-shadow: none;
        padding: 0;
    }
    .sidebar-menu {
        flex-direction: row;
        gap: 0;
    }
    .sidebar-link {
        border-radius: 0;
        padding: 12px 10px;
    }
    .admin-content-area {
        max-width: 100vw;
        padding: 20px 6px;
    }
}
/* 表格表头加深 */
.logs-table th {
    background: #fbeaea;
    color: #c00;
    font-weight: 700;
} 