/**
 * 电视节目三审系统 - 主样式表
 * 主色调：深蓝色 (#1e3a5f, #2c5282)
 * 辅助色：灰色系 (#e5e7eb, #9ca3af)
 */

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

:root {
    --primary-color: #1e3a5f;
    --primary-light: #2c5282;
    --primary-dark: #152a46;
    --secondary-color: #4a5568;
    --accent-color: #3b82f6;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --light-gray: #f3f4f6;
    --medium-gray: #e5e7eb;
    --dark-gray: #6b7280;
    --text-color: #1f2937;
    --border-radius: 8px;
    --box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #f8fafc;
}

/* 页面布局 */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.front-layout {
    min-height: 100vh;
    display: flex;
    background: #f8fafc;
}

.front-sidebar {
    width: 240px;
    background: #141821;
    color: #e2e8f0;
    padding: 20px 14px;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.15);
}

.front-logo {
    margin-bottom: 10px;
}

.front-sidebar-subtitle {
    color: #94a3b8;
    font-size: 12px;
    margin-bottom: 18px;
    padding-left: 8px;
}

.front-menu {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.front-menu-item {
    color: #e2e8f0;
    text-decoration: none;
    padding: 10px 12px;
    border-radius: 8px;
    transition: var(--transition);
    position: relative;
}

.front-menu-item:hover,
.front-menu-item.active {
    background: rgba(59, 130, 246, 0.2);
    color: #fff;
}

.front-main {
    flex: 1;
    min-width: 0;
}

.front-topbar {
    height: 64px;
    background: #fff;
    border-bottom: 1px solid var(--medium-gray);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

/* 头部导航 */
.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    /* 尺寸由内容决定 */
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    overflow: visible;
}

.logo-icon img {
    display: block;
    max-height: 100%;
    width: auto;
}

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

.nav-menu a {
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 6px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-menu a:hover,
.nav-menu a.active {
    background: rgba(255, 255, 255, 0.2);
}

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

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.notification-btn {
    position: relative;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
}

.notification-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger-color);
    color: white;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: bold;
}

/* 主内容区 */
.main-content {
    flex: 1;
    padding: 30px 0;
}

.page-header {
    margin-bottom: 30px;
}

.page-title {
    font-size: 28px;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.page-description {
    color: var(--dark-gray);
    font-size: 14px;
}

/* 卡片 */
.card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 25px;
    margin-bottom: 20px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--medium-gray);
}

.card-title {
    font-size: 18px;
    font-weight: bold;
    color: var(--primary-color);
}

/* 按钮 */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    justify-content: center;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30, 58, 95, 0.3);
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-success:hover {
    background: #059669;
}

.btn-warning {
    background: var(--warning-color);
    color: white;
}

.btn-warning:hover {
    background: #d97706;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

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

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: #374151;
}

.btn-outline {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-lg {
    padding: 12px 30px;
    font-size: 16px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 表单 */
.form-group {
    margin-bottom: 20px;
}

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

.form-label.required::after {
    content: '*';
    color: var(--danger-color);
    margin-left: 4px;
}

.form-control {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--medium-gray);
    border-radius: 6px;
    font-size: 14px;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-control:disabled {
    background: var(--light-gray);
    cursor: not-allowed;
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

select.form-control {
    cursor: pointer;
}

.form-help {
    font-size: 12px;
    color: var(--dark-gray);
    margin-top: 5px;
}

.form-error {
    font-size: 12px;
    color: var(--danger-color);
    margin-top: 5px;
}

/* 表格 */
.table-container {
    overflow-x: auto;
}

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

.table thead {
    background: var(--light-gray);
}

.table th {
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: var(--primary-color);
    border-bottom: 2px solid var(--medium-gray);
}

.table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--medium-gray);
}

.table tbody tr {
    transition: var(--transition);
}

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

/* 状态标签 */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-draft {
    background: #e5e7eb;
    color: #6b7280;
}

.status-pending {
    background: #dbeafe;
    color: #1e40af;
}

.status-rejected {
    background: #fee2e2;
    color: #991b1b;
}

.status-approved {
    background: #d1fae5;
    color: #065f46;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: var(--border-radius);
    max-width: 90%;
    max-height: 90%;
    overflow: auto;
    position: relative;
}

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

.modal-title {
    font-size: 20px;
    font-weight: bold;
    color: var(--primary-color);
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--dark-gray);
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--light-gray);
}

.modal-body {
    padding: 25px;
}

.modal-footer {
    padding: 20px 25px;
    border-top: 1px solid var(--medium-gray);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

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

.login-box {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 420px;
    padding: 40px;
}

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

.login-logo {
    /* 尺寸由图片决定 */
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-logo img {
    display: block;
    max-height: 100px;
    width: auto;
}

.login-title {
    font-size: 22px;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 5px;
    line-height: 1.4;
}

.login-subtitle {
    color: var(--dark-gray);
    font-size: 14px;
}

/* 筛选栏 */
.filter-bar {
    background: white;
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 20px;
    display: flex;
    gap: 15px;
    align-items: end;
    flex-wrap: wrap;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 20px;
}

.pagination a,
.pagination span {
    padding: 8px 12px;
    border: 1px solid var(--medium-gray);
    border-radius: 4px;
    text-decoration: none;
    color: var(--text-color);
    transition: var(--transition);
}

.pagination a:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination .active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* 工具提示 */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    background-color: var(--text-color);
    color: white;
    text-align: center;
    border-radius: 6px;
    padding: 5px 10px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 12px;
    white-space: nowrap;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

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

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--dark-gray);
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state-text {
    font-size: 16px;
    margin-bottom: 20px;
}

/* 响应式 */
@media (max-width: 768px) {
    .front-layout {
        flex-direction: column;
    }

    .front-sidebar {
        width: 100%;
    }

    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-menu {
        flex-direction: column;
        width: 100%;
    }
    
    .filter-bar {
        flex-direction: column;
    }
    
    .filter-bar .form-group {
        width: 100%;
        margin-bottom: 0;
    }
}

/* 审片深色主题 */
body.review-theme {
    --primary-color: #3b82f6;
    --primary-light: #60a5fa;
    --primary-dark: #1e40af;
    --secondary-color: #94a3b8;
    --accent-color: #38bdf8;
    --success-color: #22c55e;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --light-gray: #1f232b;
    --medium-gray: #2b3340;
    --dark-gray: #94a3b8;
    --text-color: #e2e8f0;
    --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
    background-color: #0f1115;
    color: var(--text-color);
}

body.review-theme .header {
    background: #141821;
}

body.review-theme .card {
    background: #1f232b;
    box-shadow: var(--box-shadow);
}

body.review-theme .card-header {
    border-bottom: 1px solid #2b3340;
}

body.review-theme .page-title {
    color: #e2e8f0;
}

body.review-theme .page-description {
    color: #94a3b8;
}

body.review-theme .form-control,
body.review-theme select.form-control {
    background: #0f131a;
    color: #e2e8f0;
    border-color: #2b3340;
}

body.review-theme .form-control:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

body.review-theme .btn-outline {
    background: transparent;
    color: #e2e8f0;
    border-color: #334155;
}

body.review-theme .table thead {
    background: #1f232b;
}

body.review-theme .table th {
    color: #e2e8f0;
    border-bottom-color: #2b3340;
}

body.review-theme .table td {
    border-bottom-color: #2b3340;
}

body.review-theme .table tbody tr:hover {
    background: #151a22;
}


