/* ========================================
   最新公告展示页面样式
   参考设计风格
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    color: #333;
    background-color: #f5f6f7;
    line-height: 1.5;
    min-width: 900px;
}

/* ========== 头部 ========== */
.header {
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.header-content h1 {
    font-size: 22px;
    font-weight: 600;
    color: #1a1a1a;
    letter-spacing: 1px;
}

.header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.date-badge {
    display: inline-block;
    background: #e8f4fd;
    color: #1565c0;
    padding: 4px 14px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
}

.count-badge {
    display: inline-block;
    background: #f0f0f0;
    color: #666;
    padding: 4px 14px;
    border-radius: 4px;
    font-size: 13px;
}

.count-badge strong {
    color: #e65100;
    font-size: 16px;
    margin: 0 2px;
}

/* ========== 主体容器 ========== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 24px;
}

/* ========== 筛选栏 ========== */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.search-input {
    width: 320px;
    height: 38px;
    padding: 0 14px;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    font-size: 14px;
    color: #333;
    background: #fff;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input:focus {
    border-color: #1565c0;
    box-shadow: 0 0 0 2px rgba(21,101,192,0.1);
}

.search-input::placeholder {
    color: #bbb;
}

.filter-hint {
    font-size: 12px;
    color: #999;
}

.expand-all-label {
    margin-left: auto;
    font-size: 13px;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    user-select: none;
}

.expand-all-label input[type="checkbox"] {
    cursor: pointer;
    width: 16px;
    height: 16px;
}

/* ========== 表格区域 ========== */
.table-wrapper {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
    overflow: hidden;
}

.anno-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.anno-table thead {
    background: #fafafa;
}

.anno-table th {
    padding: 13px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    color: #666;
    border-bottom: 2px solid #e8e8e8;
    white-space: nowrap;
    user-select: none;
}

.col-code   { width: 110px; }
.col-name   { width: 110px; }
.col-bond   { width: 100px; }
.col-title  { /* 自适应 */ }
.col-time   { width: 160px; }

/* 发布时间表头：可点击排序 */
.anno-table th.sortable {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}
.anno-table th.sortable:hover {
    color: #3478f6;
}
.anno-table th.sortable .sort-ind {
    font-size: 11px;
    color: #3478f6;
    margin-left: 2px;
}

.anno-table td {
    padding: 12px;
    border-bottom: 1px solid #f2f2f2;
    vertical-align: middle;
}

.anno-table tbody tr {
    transition: background-color 0.15s;
}

.anno-table tbody tr:hover {
    background-color: #f8faff;
}

/* 分组行高亮 */
.anno-table tbody tr.group-row {
    background-color: #fff;
}

.anno-table tbody tr.group-row:hover {
    background-color: #f8faff;
}

/* 子公告行 */
.anno-table tbody tr.sub-row {
    background-color: #fafbfc;
}

.anno-table tbody tr.sub-row:hover {
    background-color: #f0f4ff;
}

/* 股票代码 */
.stock-code-text {
    font-family: "Consolas", "Courier New", monospace;
    font-size: 14px;
    font-weight: 600;
    color: #1565c0;
    letter-spacing: 0.5px;
}

/* 股票名称 */
.stock-name-text {
    font-size: 14px;
    color: #333;
}

/* 公告标题列 */
.col-title {
    position: relative;
}

/* 公告链接 */
.anno-link {
    color: #1565c0;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s;
    display: inline;
    word-break: break-all;
}

.anno-link:hover {
    color: #e65100;
    text-decoration: underline;
}

.anno-text {
    color: #999;
    font-size: 13px;
    word-break: break-all;
}

/* 子公告缩进 */
.sub-title {
    padding-left: 24px !important;
    position: relative;
}

.sub-title::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 50%;
    width: 6px;
    height: 6px;
    background: #ccc;
    border-radius: 50%;
    transform: translateY(-50%);
}

/* 展开/折叠按钮 */
.expand-toggle {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    background: #e8f4fd;
    color: #1565c0;
    font-size: 12px;
    border-radius: 10px;
    cursor: pointer;
    white-space: nowrap;
    user-select: none;
    transition: all 0.2s;
}

.expand-toggle:hover {
    background: #1565c0;
    color: #fff;
}

/* 公告时间 */
.col-time {
    font-size: 13px;
    color: #888;
    white-space: nowrap;
}

/* 空行 */
.empty-row {
    text-align: center;
    color: #bbb;
    padding: 40px 0 !important;
    font-size: 15px;
}

/* 搜索高亮 */
.anno-row.highlight {
    background-color: #fff8e1 !important;
}

/* 底部 */
.footer-bar {
    margin-top: 12px;
    display: flex;
    justify-content: flex-end;
    font-size: 12px;
    color: #999;
}

/* ========== 响应式 ========== */
@media (max-width: 1024px) {
    .col-time { width: 120px; }
    .search-input { width: 240px; }
}

@media (max-width: 768px) {
    body { min-width: auto; }
    .header-content { padding: 12px 16px; }
    .header-content h1 { font-size: 18px; }
    .container { padding: 12px 10px; }
    .anno-table th, .anno-table td { padding: 8px 6px; font-size: 12px; }
    .col-code { width: 70px; }
    .col-name { width: 70px; }
    .col-time { width: 100px; }
    .expand-all-label { margin-left: 0; }
}
