/* ===== 全局重置 & 基础 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'PingFang SC', Roboto, 'Helvetica Neue', sans-serif;
    background: #f7f3ee;
    color: #2e2b28;
    padding: 30px 40px 60px;
    line-height: 1.6;
}

.container {
    max-width: 1440px;
    margin: 0 auto;
}

/* ===== 头部 ===== */
.header {
    background: linear-gradient(135deg, #1e2a4a 0%, #2c3e6b 100%);
    color: #f5efe8;
    padding: 32px 40px;
    border-radius: 18px;
    margin-bottom: 40px;
    box-shadow: 0 8px 30px rgba(28, 40, 70, 0.35);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.header h1 {
    font-weight: 600;
    font-size: 28px;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.header h1 small {
    font-size: 16px;
    font-weight: 400;
    opacity: 0.8;
    letter-spacing: 1px;
    margin-left: 8px;
}

.header .badge {
    background: rgba(201, 168, 76, 0.25);
    border: 1px solid rgba(201, 168, 76, 0.4);
    padding: 6px 20px;
    border-radius: 30px;
    font-size: 14px;
    color: #e8d5b0;
}

/* ===== 通用卡片 ===== */
.section {
    background: #ffffff;
    border-radius: 16px;
    padding: 28px 32px 34px;
    margin-bottom: 40px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.05);
    border: 1px solid #ede8e2;
}

.section-title {
    font-size: 22px;
    font-weight: 600;
    color: #1e2a4a;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 3px solid #c9a84c;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.section-title .sub {
    font-size: 14px;
    font-weight: 400;
    color: #7a726a;
    margin-left: auto;
}

/* ===== 第一部分：表格 ===== */
.table-wrap {
    overflow-x: auto;
    margin-top: 6px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    min-width: 1100px;
}

table thead {
    background: #1e2a4a;
    color: #f5efe8;
}

table th {
    padding: 12px 14px;
    text-align: left;
    font-weight: 500;
    white-space: nowrap;
    letter-spacing: 0.5px;
}

table td {
    padding: 11px 14px;
    border-bottom: 1px solid #ede8e2;
    vertical-align: middle;
    color: #2e2b28;
}

table tbody tr:hover {
    background: #f8f4ef;
}

table tbody tr:last-child td {
    border-bottom: none;
}

.col-id {
    width: 40px;
    text-align: center;
    color: #8a827a;
    font-weight: 500;
}
.col-name {
    min-width: 170px;
    font-weight: 500;
}
.col-form {
    min-width: 80px;
}
.col-value {
    min-width: 70px;
    text-align: center;
    color: #b0a89e;
}
.col-format {
    min-width: 70px;
    text-align: center;
    background: #f2ede8;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    color: #4a423a;
    text-transform: uppercase;
}
.col-count {
    min-width: 70px;
    text-align: center;
}
.col-size {
    min-width: 80px;
    text-align: center;
}
.col-note {
    min-width: 160px;
    color: #5a524a;
    font-size: 13px;
}
.col-action {
    min-width: 90px;
    text-align: center;
}

.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #1e2a4a;
    color: #fff;
    border: none;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    line-height: 1.6;
}

.btn-download:hover {
    background: #c9a84c;
    color: #1e2a4a;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(201, 168, 76, 0.35);
}

.btn-download svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

/* ===== 添加按钮 & 表单 ===== */
.add-area {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 16px;
    padding-top: 18px;
    border-top: 1px dashed #d6cec6;
}

.btn-add {
    background: #c9a84c;
    color: #1e2a4a;
    border: none;
    padding: 8px 26px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.25s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-add:hover {
    background: #b8983a;
    transform: scale(1.02);
    box-shadow: 0 4px 14px rgba(201, 168, 76, 0.35);
}

.btn-add-sm {
    background: #e8e0d8;
    color: #2e2b28;
    border: none;
    padding: 4px 14px;
    border-radius: 16px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-add-sm:hover {
    background: #d6cec6;
}

.btn-del {
    background: transparent;
    color: #b0a098;
    border: none;
    font-size: 16px;
    cursor: pointer;
    padding: 0 6px;
    transition: all 0.2s;
    line-height: 1;
}

.btn-del:hover {
    color: #c0392b;
    transform: scale(1.2);
}

/* ===== 模态框 ===== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-overlay.active {
    display: flex;
}

.modal-box {
    background: #fff;
    border-radius: 20px;
    padding: 32px 38px;
    max-width: 640px;
    width: 94%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalIn 0.25s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-box h2 {
    font-size: 20px;
    color: #1e2a4a;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-box .close-btn {
    margin-left: auto;
    background: none;
    border: none;
    font-size: 26px;
    color: #8a827a;
    cursor: pointer;
    padding: 0 6px;
    transition: 0.2s;
}

.modal-box .close-btn:hover {
    color: #c0392b;
    transform: rotate(90deg);
}

.form-group {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.form-group label {
    font-weight: 500;
    font-size: 14px;
    color: #3a322a;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 9px 14px;
    border: 1px solid #d6cec6;
    border-radius: 10px;
    font-size: 14px;
    background: #faf8f6;
    transition: 0.2s;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #c9a84c;
    box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.15);
    background: #fff;
}

.form-group textarea {
    resize: vertical;
    min-height: 50px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 22px;
}

.modal-actions .btn-primary {
    background: #1e2a4a;
    color: #fff;
    border: none;
    padding: 10px 34px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: 0.25s;
}

.modal-actions .btn-primary:hover {
    background: #c9a84c;
    color: #1e2a4a;
}

.modal-actions .btn-secondary {
    background: #e8e0d8;
    color: #2e2b28;
    border: none;
    padding: 10px 28px;
    border-radius: 30px;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: 0.2s;
}

.modal-actions .btn-secondary:hover {
    background: #d6cec6;
}

/* ===== 第二部分：参考素材 ===== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
    margin-top: 6px;
}

.media-card {
    background: #faf8f6;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid #ede8e2;
    transition: all 0.25s;
    display: flex;
    flex-direction: column;
}

.media-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border-color: #c9a84c;
}

.media-card .media-body {
    padding: 14px 16px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.media-card .media-title {
    font-weight: 600;
    font-size: 15px;
    color: #1e2a4a;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.media-card .media-title .type-tag {
    font-size: 10px;
    background: #1e2a4a;
    color: #f5efe8;
    padding: 1px 10px;
    border-radius: 20px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.media-card .media-title .type-tag.video {
    background: #8e2c3b;
}
.media-card .media-title .type-tag.image {
    background: #2c6b4a;
}

.media-card .media-preview {
    background: #ede8e2;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.media-card .media-preview video,
.media-card .media-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: #1a1a1a;
}

.media-card .media-preview video {
    min-height: 150px;
    max-height: 220px;
    background: #0d0d0d;
}

.media-card .media-preview img {
    min-height: 150px;
    max-height: 220px;
    background: #e8e0d8;
}

.media-card .media-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.media-card .media-actions .btn-download {
    font-size: 12px;
    padding: 4px 16px;
}

.media-card .media-actions .btn-play {
    background: #1e2a4a;
    color: #fff;
    border: none;
    padding: 4px 18px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.media-card .media-actions .btn-play:hover {
    background: #c9a84c;
    color: #1e2a4a;
}

.media-card .file-missing {
    color: #b0a098;
    font-size: 13px;
    padding: 20px 10px;
    text-align: center;
    background: #f4f0eb;
    border-radius: 8px;
    margin: 4px 0;
}

/* ===== 第三部分：工作安排 ===== */
.work-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 24px;
    margin-top: 6px;
}

.work-card {
    background: #faf8f6;
    border-radius: 14px;
    padding: 22px 24px 26px;
    border-left: 6px solid #c9a84c;
    border: 1px solid #ede8e2;
    border-left-width: 6px;
    transition: 0.2s;
}

.work-card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
}

.work-card:nth-child(1) {
    border-left-color: #1e2a4a;
}
.work-card:nth-child(2) {
    border-left-color: #8e2c3b;
}
.work-card:nth-child(3) {
    border-left-color: #2c6b4a;
}

.work-card h3 {
    font-size: 18px;
    color: #1e2a4a;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.work-card .work-lead {
    font-size: 13px;
    color: #7a726a;
    margin-bottom: 10px;
    font-weight: 400;
}

.work-card .work-items {
    list-style: none;
    padding: 0;
    margin: 0;
}

.work-card .work-items li {
    padding: 4px 0 4px 20px;
    position: relative;
    font-size: 14px;
    color: #3a322a;
    border-bottom: 1px dashed #ede8e2;
    padding: 6px 0 6px 22px;
}

.work-card .work-items li:last-child {
    border-bottom: none;
}

.work-card .work-items li::before {
    content: "▸";
    position: absolute;
    left: 0;
    color: #c9a84c;
    font-weight: 600;
}

.work-card .work-items .placeholder {
    color: #b0a098;
    font-style: italic;
    font-size: 13px;
}

/* ===== 底部 ===== */
.footer {
    text-align: center;
    color: #9a928a;
    font-size: 13px;
    padding-top: 30px;
    border-top: 1px solid #e8e0d8;
    margin-top: 20px;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    body {
        padding: 16px 14px 40px;
    }
    .header {
        padding: 22px 20px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .header h1 {
        font-size: 22px;
        flex-wrap: wrap;
    }
    .header h1 small {
        font-size: 13px;
        display: block;
        margin-left: 0;
    }
    .section {
        padding: 18px 16px 22px;
    }
    .section-title {
        font-size: 18px;
    }
    table {
        font-size: 13px;
        min-width: 900px;
    }
    table th,
    table td {
        padding: 8px 10px;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
    .modal-box {
        padding: 24px 18px;
    }
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 16px;
    }
    .work-grid {
        grid-template-columns: 1fr;
    }
    .add-area {
        flex-direction: column;
        align-items: stretch;
    }
    .media-card .media-preview video,
    .media-card .media-preview img {
        min-height: 120px;
        max-height: 170px;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 18px;
    }
    .section-title {
        font-size: 16px;
    }
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    .modal-box {
        padding: 18px 14px;
    }
    table {
        font-size: 12px;
        min-width: 760px;
    }
}

/* ===== 工具类 ===== */
.text-muted {
    color: #b0a098;
}
.text-center {
    text-align: center;
}
.mt-8 {
    margin-top: 8px;
}
.gap-4 {
    gap: 4px;
}
.flex {
    display: flex;
}
.flex-center {
    align-items: center;
}
/* 链接类型标签 */
.media-card .media-title .type-tag.link {
    background: #2c6b4a;
    color: #f5efe8;
}