* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    background: #f5f6f7;
    color: #333;
}

.container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

.sidebar {
    width: 340px;
    min-width: 280px;
    background: #fff;
    border-right: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    padding: 16px;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    gap: 8px;
}

.sidebar-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.sidebar-toggle {
    background: #f0f2f5;
    border: none;
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    color: #555;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
}

.sidebar-toggle:hover {
    background: #e8eaed;
    color: #1a73e8;
}

.sidebar-toggle svg {
    transition: transform 0.2s;
}

.sidebar h1 {
    margin: 0;
    font-size: 20px;
    color: #1a73e8;
}

.icon-btn {
    background: #e8f0fe;
    border: none;
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    color: #1a73e8;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.icon-btn:hover {
    background: #d2e3fc;
}

.icon-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.icon-btn.spinning svg {
    animation: spin 1s linear infinite;
}

.rebuild-status {
    font-size: 12px;
    color: #1a73e8;
    background: #e8f0fe;
    padding: 6px 10px;
    border-radius: 6px;
    margin-bottom: 10px;
}

.rebuild-status.hidden {
    display: none;
}

#search {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 12px;
    outline: none;
}

#search:focus {
    border-color: #1a73e8;
}

.ppt-list {
    flex: 1;
    overflow-y: auto;
    padding-right: 4px;
}

.group {
    margin-bottom: 12px;
}

.group-title {
    font-size: 12px;
    color: #888;
    padding: 6px 8px;
    background: #f0f2f5;
    border-radius: 6px;
    margin-bottom: 4px;
    font-weight: 600;
}

.ppt-item {
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
    margin-bottom: 4px;
}

.ppt-item:hover {
    background: #e8f0fe;
}

.ppt-item.active {
    background: #1a73e8;
    color: #fff;
}

.ppt-item.active .ppt-meta {
    color: rgba(255, 255, 255, 0.8);
}

.ppt-name {
    font-size: 14px;
    line-height: 1.4;
    word-break: break-all;
}

.ppt-meta {
    font-size: 12px;
    color: #888;
    margin-top: 4px;
}

.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ppt-header {
    background: #fff;
    padding: 16px 24px;
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ppt-header h2 {
    margin: 0 0 6px 0;
    font-size: 22px;
}

.ppt-header .sub {
    color: #666;
    font-size: 14px;
}

.header-left {
    flex: 1;
    min-width: 0;
}

.view-toggle {
    display: flex;
    gap: 4px;
    background: #f0f2f5;
    padding: 4px;
    border-radius: 8px;
}

.view-btn {
    border: none;
    background: transparent;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
}

.view-btn:hover {
    background: rgba(0,0,0,0.05);
}

.view-btn.active {
    background: #fff;
    color: #1a73e8;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.content-area {
    flex: 1;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

.empty-tip {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #999;
    font-size: 16px;
}

.empty-tip.hidden,
.hidden {
    display: none !important;
}

/* 网格视图 */
.slides-grid {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    align-content: start;
}

.slide-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    cursor: zoom-in;
    transition: transform 0.15s, box-shadow 0.15s;
    position: relative;
    height: 180px;
    flex-shrink: 0;
}

.slide-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

.slide-card img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background: #f5f5f5;
}

.slide-number {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 12px;
}

/* PPT 视图 */
.ppt-view {
    height: 100%;
    display: flex;
    background: #e9eaec;
    overflow: hidden;
}

.ppt-main-slide {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.ppt-main-slide img {
    max-width: 100%;
    max-height: 100%;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    cursor: zoom-in;
    background: #fff;
}

.ppt-main-number {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.6);
    color: #fff;
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 14px;
}

.ppt-thumb-list {
    width: 180px;
    min-width: 160px;
    height: 100%;
    max-height: 100%;
    background: #fff;
    border-left: 1px solid #ddd;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ppt-thumb {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    flex-shrink: 0;
    transition: border-color 0.15s, transform 0.15s;
}

.ppt-thumb:hover {
    transform: scale(1.02);
}

.ppt-thumb.active {
    border-color: #1a73e8;
}

.ppt-thumb img {
    width: 100%;
    height: auto;
    display: block;
}

.ppt-thumb-number {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 10px;
}

.loading, .empty {
    color: #888;
    padding: 20px;
    text-align: center;
}

/* 大图弹窗 */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.lightbox img {
    max-width: 90vw;
    max-height: 85vh;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.lightbox .close {
    position: absolute;
    top: 16px;
    right: 24px;
    color: #fff;
    font-size: 40px;
    cursor: pointer;
    z-index: 1001;
    line-height: 1;
}

.lb-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    transition: background 0.2s;
}

.lb-arrow:hover {
    background: rgba(255,255,255,0.3);
}

.lb-prev { left: 20px; }
.lb-next { right: 20px; }

.lightbox .counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    background: rgba(0,0,0,0.5);
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 14px;
}

@media (max-width: 900px) {
    .container {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        height: 40vh;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
    }
    .ppt-view {
        flex-direction: column;
    }
    .ppt-thumb-list {
        width: 100%;
        height: 140px;
        flex-direction: row;
        border-left: none;
        border-top: 1px solid #ddd;
        overflow-x: auto;
        overflow-y: hidden;
    }
    .ppt-thumb {
        flex-shrink: 0;
        width: 120px;
    }
    .lb-prev, .lb-next {
        width: 40px;
        height: 40px;
    }
    .lb-prev { left: 8px; }
    .lb-next { right: 8px; }
}

/* 登录页 */
.login-body {
    background: #f0f2f5;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
}

.login-box {
    background: #fff;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-box h1 {
    margin: 0 0 8px 0;
    font-size: 24px;
    color: #1a73e8;
}

.login-subtitle {
    color: #888;
    margin: 0 0 24px 0;
    font-size: 14px;
}

.login-form {
    text-align: left;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    color: #555;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    outline: none;
}

.form-group input:focus {
    border-color: #1a73e8;
}

.login-error {
    color: #d93025;
    background: #fce8e6;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 16px;
}

.login-btn {
    width: 100%;
    padding: 12px;
    background: #1a73e8;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s;
}

.login-btn:hover {
    background: #1557b0;
}

.login-tip {
    margin-top: 20px;
    font-size: 13px;
    color: #999;
}

/* 顶部用户栏 */
.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #555;
}

.user-bar .current-user {
    font-weight: 600;
    color: #333;
}

.btn-text {
    color: #1a73e8;
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.15s;
}

.btn-text:hover {
    background: #e8f0fe;
}

/* 管理后台 */
.admin-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px;
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e0e0e0;
}

.admin-header h1 {
    margin: 0;
    font-size: 24px;
    color: #1a73e8;
}

.admin-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-main {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.admin-section {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.admin-section h2 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.admin-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.add-user-form {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.add-user-form input[type="text"],
.add-user-form input[type="password"] {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    min-width: 160px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #555;
    cursor: pointer;
}

.btn-primary,
.btn-secondary,
.btn-danger {
    border: none;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s, opacity 0.2s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: #1a73e8;
    color: #fff;
}

.btn-primary:hover {
    background: #1557b0;
}

.btn-secondary {
    background: #e8f0fe;
    color: #1a73e8;
}

.btn-secondary:hover {
    background: #d2e3fc;
}

.btn-danger {
    background: #fce8e6;
    color: #d93025;
    padding: 6px 12px;
    font-size: 13px;
}

.btn-danger:hover {
    background: #f9d2cf;
}

.form-msg {
    margin-top: 10px;
    font-size: 14px;
    min-height: 20px;
}

.form-msg.success {
    color: #188038;
}

.form-msg.error {
    color: #d93025;
}

.table-wrap {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.admin-table th,
.admin-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.admin-table th {
    background: #f8f9fa;
    color: #555;
    font-weight: 600;
}

.admin-table tr:hover td {
    background: #f8f9fa;
}

.muted {
    color: #999;
    font-size: 13px;
}

@media (max-width: 900px) {
    .admin-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .add-user-form {
        flex-direction: column;
        align-items: stretch;
    }
    .header-right {
        flex-wrap: wrap;
        gap: 10px;
    }
    .user-bar {
        width: 100%;
        justify-content: flex-end;
    }
}

/* 角色标签 */
.role-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
}

.role-level-3 {
    background: #fce8e6;
    color: #d93025;
}

.role-level-2 {
    background: #e8f0fe;
    color: #1a73e8;
}

.role-level-1 {
    background: #e6f4ea;
    color: #188038;
}

.role-level-0 {
    background: #f1f3f4;
    color: #5f6368;
}

/* 角色选择下拉框 */
.role-select {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
    outline: none;
    min-width: 120px;
}

.role-select:focus {
    border-color: #1a73e8;
}

/* ================= 第一阶段新增：可折叠侧边栏与功能面板 ================= */

/* 侧边栏布局微调 */
.sidebar {
    padding: 12px;
}

.sidebar-header h1 {
    font-size: 18px;
}

/* Accordion */
.accordion {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 8px;
    flex: 1;
    min-height: 0;
}

.accordion-item {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.accordion-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: #f0f2f5;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    transition: background 0.15s;
    flex-shrink: 0;
}

.accordion-header:hover {
    background: #e8eaed;
}

.accordion-header.active {
    background: #e8f0fe;
    color: #1a73e8;
}

.accordion-icon {
    font-size: 12px;
    transition: transform 0.2s;
}

.accordion-header.active .accordion-icon {
    transform: rotate(90deg);
}

.accordion-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    padding-top: 6px;
}

.accordion-body.collapsed {
    display: none;
}

.weeks-search {
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 13px;
    outline: none;
    margin-bottom: 6px;
    flex-shrink: 0;
}

.weeks-search:focus {
    border-color: #1a73e8;
}

/* 功能菜单 */
.menu-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    transition: background 0.15s;
}

.menu-item:hover {
    background: #f0f2f5;
}

.menu-item.active {
    background: #e8f0fe;
    color: #1a73e8;
    font-weight: 600;
}

.menu-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

/* 周资料树 */
.weeks-tree {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 4px 0;
}

.week-group {
    margin-bottom: 4px;
}

.week-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #444;
    transition: background 0.15s;
}

.week-header:hover {
    background: #f0f2f5;
}

.week-toggle {
    font-size: 10px;
    color: #888;
    transition: transform 0.2s;
    width: 12px;
    text-align: center;
}

.week-group.open > .week-header .week-toggle {
    transform: rotate(90deg);
}

.week-count {
    margin-left: auto;
    font-size: 11px;
    color: #888;
    font-weight: 400;
}

.week-body {
    padding-left: 14px;
    display: none;
}

.week-group.open > .week-body {
    display: block;
}

.week-section-title {
    font-size: 11px;
    color: #888;
    padding: 6px 8px 2px;
    font-weight: 600;
    text-transform: uppercase;
}

.ppt-item, .meeting-item {
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    margin-bottom: 3px;
    transition: background 0.15s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ppt-item:hover, .meeting-item:hover {
    background: #e8f0fe;
}

.ppt-item.active, .meeting-item.active {
    background: #1a73e8;
    color: #fff;
}

.ppt-item .ppt-meta {
    font-size: 11px;
    color: #888;
    margin-top: 2px;
}

.ppt-item.active .ppt-meta {
    color: rgba(255,255,255,0.8);
}

.item-icon {
    font-size: 14px;
    flex-shrink: 0;
}

.item-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 主内容面板切换 */
.panel {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.panel.hidden {
    display: none;
}

/* 会议纪要表单/详情/搜索通用卡片 */
.card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    padding: 24px;
    margin: 20px;
    overflow-y: auto;
}

.card h2 {
    margin: 0 0 20px 0;
    font-size: 20px;
    color: #1a73e8;
}

.panel .form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.panel .form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

.panel .form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    color: #555;
    font-weight: 500;
}

.panel .form-group input,
.panel .form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    font-family: inherit;
}

.panel .form-group input:focus,
.panel .form-group textarea:focus {
    border-color: #1a73e8;
}

.panel .form-group textarea {
    resize: vertical;
    min-height: 200px;
    line-height: 1.5;
}

.panel .form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 20px;
}

.panel .btn {
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.15s, opacity 0.15s;
}

.panel .btn-primary {
    background: #1a73e8;
    color: #fff;
}

.panel .btn-primary:hover {
    background: #1557b0;
}

.panel .btn-secondary {
    background: #f0f2f5;
    color: #333;
}

.panel .btn-secondary:hover {
    background: #e0e2e5;
}

.panel .btn-danger {
    background: #d93025;
    color: #fff;
}

.panel .btn-danger:hover {
    background: #b31412;
}

.panel .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 搜索面板 */
.search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.search-bar input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
}

.search-bar input:focus {
    border-color: #1a73e8;
}

.list-item {
    background: #fff;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    cursor: pointer;
    transition: box-shadow 0.15s;
}

.list-item:hover {
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}

.list-item-title {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}

.list-item-meta {
    font-size: 12px;
    color: #888;
}

/* 会议纪要详情 */
.meeting-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.meeting-detail-title {
    font-size: 22px;
    margin: 0;
    color: #333;
}

.meeting-detail-meta {
    color: #666;
    font-size: 14px;
    margin-top: 6px;
}

.meeting-detail-content {
    line-height: 1.7;
    white-space: pre-wrap;
    color: #333;
    background: #f8f9fa;
    padding: 16px;
    border-radius: 8px;
    min-height: 120px;
}

.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #888;
    font-size: 16px;
}

.msg {
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 16px;
}

.msg.success {
    background: #e6f4ea;
    color: #1e8e3e;
}

.msg.error {
    background: #fce8e6;
    color: #d93025;
}

/* 管理后台表单宽度自适应 */
.add-user-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.add-user-form input,
.add-user-form select {
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

/* 第一阶段问题修复：可滚动搜索网格 */

.card-flex {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.card-flex h2,
.card-flex .search-bar {
    flex-shrink: 0;
}

.search-grid {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    align-content: start;
    padding-right: 4px;
}

.search-card {
    background: #fff;
    border-radius: 10px;
    padding: 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    cursor: pointer;
    transition: box-shadow 0.15s, transform 0.15s;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border: 1px solid transparent;
}

.search-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    transform: translateY(-2px);
    border-color: #e8f0fe;
}

.search-card-title {
    font-size: 15px;
    font-weight: 600;
    color: #1a73e8;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-card-meta {
    font-size: 12px;
    color: #888;
}

.search-card-snippet {
    font-size: 13px;
    color: #555;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.search-summary {
    grid-column: 1 / -1;
    font-size: 13px;
    color: #666;
    margin-bottom: 4px;
}

/* 第二阶段：周报相关样式 */

.filter-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-shrink: 0;
}

.filter-tab {
    padding: 6px 14px;
    border: 1px solid #ddd;
    border-radius: 20px;
    background: #fff;
    color: #555;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
}

.filter-tab:hover {
    border-color: #1a73e8;
    color: #1a73e8;
}

.filter-tab.active {
    background: #e8f0fe;
    border-color: #1a73e8;
    color: #1a73e8;
    font-weight: 600;
}

.weekly-detail-content {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    line-height: 1.7;
    color: #333;
    padding-right: 4px;
}

.weekly-detail-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 12px;
}

.weekly-detail-section-title {
    font-size: 13px;
    font-weight: 600;
    color: #1a73e8;
    margin-bottom: 6px;
}

.weekly-comments {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e0e0e0;
    flex-shrink: 0;
    max-height: 260px;
    display: flex;
    flex-direction: column;
}

.weekly-comments h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: #333;
    flex-shrink: 0;
}

#weekly-comments-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding-right: 4px;
}

.comment-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 8px;
}

.comment-meta {
    font-size: 12px;
    color: #888;
    margin-bottom: 4px;
}

.comment-content {
    font-size: 13px;
    color: #333;
    line-height: 1.5;
}

.weekly-card .search-card-title {
    font-size: 14px;
}

/* 修复：周报每日记录输入框高度减半 */
.weekly-daily-input {
    min-height: 80px !important;
}

/* 第三阶段：待办事项样式 */

.meeting-actions {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.meeting-actions h3 {
    margin: 0 0 12px 0;
    font-size: 16px;
    color: #333;
}

.action-add-form {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 16px;
    margin-top: 12px;
}

.action-add-form textarea {
    min-height: 80px !important;
}

.action-add-form select,
.action-add-form input[type="date"] {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-right: 8px;
}

.action-card .search-card-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 14px;
    color: #333;
}

.action-buttons {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.btn-small {
    padding: 5px 12px;
    font-size: 12px;
    border-radius: 6px;
}

/* ----------------- 通知中心 ----------------- */
.notification-wrapper {
    position: relative;
}

.notification-bell {
    position: relative;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #555;
    padding: 6px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
}

.notification-bell:hover {
    background: #f0f2f5;
    color: #1a73e8;
}

.notification-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    font-size: 11px;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
    background: #ea4335;
    color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 0 1.5px #fff;
}

.notification-badge.hidden {
    display: none;
}

.notification-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 360px;
    max-width: calc(100vw - 24px);
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    max-height: 480px;
    overflow: hidden;
}

.notification-dropdown.hidden {
    display: none;
}

.notification-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    background: #fafafa;
    border-radius: 10px 10px 0 0;
}

.notification-dropdown-header .notification-title {
    font-weight: 600;
    font-size: 15px;
    color: #333;
}

.notification-list {
    overflow-y: auto;
    padding: 8px 0;
}

.notification-item {
    padding: 12px 16px;
    cursor: pointer;
    border-left: 3px solid transparent;
    transition: background 0.15s;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.notification-item:hover {
    background: #f5f7fa;
}

.notification-item.unread {
    background: #f0f7ff;
    border-left-color: #1a73e8;
}

.notification-item.unread:hover {
    background: #e4effd;
}

.notification-item .notification-item-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 6px;
}

.notification-item .notification-item-content {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

.notification-item .notification-item-time {
    font-size: 12px;
    color: #999;
}

.notification-empty {
    padding: 24px 16px;
    text-align: center;
    color: #999;
    font-size: 14px;
}

@media (max-width: 600px) {
    .notification-dropdown {
        width: 300px;
    }
}

/* ----------------- 侧边栏折叠 ----------------- */
.sidebar.collapsed {
    width: 64px;
    min-width: 64px;
    padding: 12px 8px;
    align-items: center;
}

.sidebar.collapsed .sidebar-header {
    justify-content: center;
    flex-direction: column;
    gap: 6px;
}

.sidebar.collapsed .sidebar-logo-text {
    display: none;
}

.sidebar.collapsed .sidebar-header-actions {
    flex-direction: column;
}

.sidebar.collapsed .icon-btn {
    padding: 6px;
}

.sidebar.collapsed .sidebar-toggle svg {
    transform: rotate(180deg);
}

.sidebar.collapsed .rebuild-status {
    display: none;
}

.sidebar.collapsed .accordion {
    flex: 0 0 auto;
    min-height: auto;
}

.sidebar.collapsed .accordion-header {
    justify-content: center;
    padding: 10px;
}

.sidebar.collapsed .accordion-text,
.sidebar.collapsed .accordion-icon,
.sidebar.collapsed .accordion-body,
.sidebar.collapsed .weeks-search {
    display: none;
}

.sidebar.collapsed .menu-list {
    width: 100%;
}

.sidebar.collapsed .menu-item {
    justify-content: center;
    padding: 10px;
}

.sidebar.collapsed .menu-text {
    display: none;
}

.main {
    transition: flex-basis 0.2s;
}

@media (max-width: 768px) {
    .sidebar.collapsed {
        width: 0;
        min-width: 0;
        padding: 0;
        border: none;
        overflow: hidden;
    }
}
