/* public/css/style.css */

/* --- 1. 核心布局修复 (解决底部白边问题) --- */
html, body {
    height: 100%;       /* 强制占满高度 */
    margin: 0;
    padding: 0;
    background-color: #f4f6f9; 
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    overflow: hidden;   /* 🚫 禁止整个页面滚动，只让右侧内容区滚动 */
}

.wrapper {
    display: flex;      /* 左右布局 */
    height: 100vh;      /* 🔥 关键：强制容器高度等于屏幕视口高度 */
    width: 100%;
    overflow: hidden;
}

/* --- 2. 左侧导航栏美化 --- */
.sidebar {
    width: 260px;
    /* 🔥 关键：背景色必须铺满 */
    background: linear-gradient(180deg, #2c3e50 0%, #1a252f 100%); 
    color: #fff;
    display: flex;
    flex-direction: column; /* 上中下结构 */
    flex-shrink: 0;         /* 禁止宽度压缩 */
    height: 100%;           /* 🔥 关键：跟随父容器高度 */
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    z-index: 100;
}

/* LOGO 区域 */
.sidebar-header {
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #1a252f; /* 比渐变色更深一点，区分头部 */
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.brand-logo {
    font-size: 1.2rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* 导航菜单区 (撑满中间剩余空间) */
.sidebar-nav {
    flex-grow: 1;        /* 🔥 关键：自动占据中间所有空隙，把 footer 挤到底部 */
    padding: 20px 0;
    overflow-y: auto;    /* 如果菜单太长，允许菜单内部滚动 */
}

/* 导航链接样式 */
.nav-link {
    color: #aeb9c6;
    padding: 15px 25px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
    border-left: 4px solid transparent; /* 左侧高亮条占位 */
    cursor: pointer;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.nav-link.active {
    background-color: rgba(66, 185, 131, 0.15); /* 选中时的背景 */
    color: #42b983; /* 选中时的文字颜色 */
    border-left-color: #42b983; /* 左侧高亮条颜色 */
    font-weight: 600;
}

.nav-icon {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}

/* 底部版本号区 */
.sidebar-footer {
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.2);
    font-size: 0.8rem;
    text-align: center;
    color: #6c757d;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* --- 3. 右侧主内容区 --- */
.main-content {
    flex-grow: 1;       /* 占满剩余宽度 */
    height: 100%;       /* 占满高度 */
    overflow-y: auto;   /* 🔥 关键：内容超出时，只有右侧区域出现滚动条 */
    padding: 30px 40px;
    background-color: #f4f6f9;
}

/* --- 4. 通用组件样式 (保持不变) --- */
.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.card-common {
    border: none;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    margin-bottom: 20px;
}

.btn-primary {
    background-color: #42b983;
    border-color: #42b983;
}
.btn-primary:hover {
    background-color: #3aa876;
    border-color: #3aa876;
}

/* Sidebar 底部区域布局优化 */
.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    background-color: rgba(0,0,0,0.2); /* 稍微深一点的背景 */
}

/* 退出按钮样式 */
.logout-btn {
    width: 100%;
    background-color: #dc3545; /* 红色背景 */
    color: white;
    border: none;
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
    margin-bottom: 10px; /* 和版本号拉开距离 */
}

.logout-btn:hover {
    background-color: #c82333; /* 悬停变深红 */
}

.logout-btn .nav-icon {
    margin-right: 8px;
}

.version-text {
    text-align: center;
    font-size: 12px;
    color: #6c757d;
}

/* 容器与卡片样式 */
.feedback-container { padding: 20px; background: #f4f7f9; min-height: 100%; }
.content-card { 
    background: #fff; border-radius: 12px; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); padding: 24px;
}

/* 头部样式 */
.feedback-header { margin-bottom: 24px; }
.title-section { display: flex; align-items: center; margin-bottom: 20px; }
.title-icon { font-size: 24px; margin-right: 12px; }
.title-section h2 { margin: 0; color: #1a1a1a; font-size: 20px; }

/* 搜索过滤栏 */
.filter-controls { 
    display: flex; gap: 15px; align-items: center; flex-wrap: wrap; 
    background: #fafafa; padding: 15px; border-radius: 8px;
}
.search-box { position: relative; }
.search-box input { 
    padding: 8px 12px 8px 35px; border: 1px solid #ddd; border-radius: 6px; 
    width: 220px; transition: border 0.3s;
}
.icon-search { position: absolute; left: 10px; top: 8px; color: #999; font-style: normal; }
.date-picker-group { display: flex; align-items: center; gap: 8px; }
.date-picker-group input { padding: 7px 10px; border: 1px solid #ddd; border-radius: 6px; }

/* 按钮样式 */
.btn-primary { background: #3498db; color: #fff; border: none; padding: 8px 20px; border-radius: 6px; cursor: pointer; transition: 0.3s; }
.btn-primary:hover { background: #2980b9; }
.btn-light { background: #fff; border: 1px solid #ddd; padding: 8px 20px; border-radius: 6px; cursor: pointer; }

/* 表格样式 */
.custom-table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.custom-table th { background: #f8f9fa; text-align: left; padding: 12px 15px; color: #666; font-weight: 600; border-bottom: 2px solid #edf2f7; }
.table-row:hover { background-color: #f9fbff; }
.custom-table td { padding: 15px; border-bottom: 1px solid #edf2f7; color: #444; font-size: 14px; }

/* 徽章 Badge 样式 */
.type-badge { padding: 4px 10px; border-radius: 50px; font-size: 12px; font-weight: 500; }
.badge-red { background: #fee2e2; color: #ef4444; }
.badge-green { background: #dcfce7; color: #22c55e; }
.badge-yellow { background: #fef9c3; color: #eab308; }
.badge-purple { background: #f3e8ff; color: #a855f7; }
.badge-blue { background: #dbeafe; color: #3b82f6; }

/* 内容截断与标识 */
.content-text { max-width: 400px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sn-tag { background: #f1f5f9; padding: 2px 6px; border-radius: 4px; font-family: monospace; font-size: 12px; color: #64748b; }

/* 分页 */
.pagination-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 25px; }
.page-nav { display: flex; align-items: center; gap: 15px; }
.nav-btn { background: #fff; border: 1px solid #ddd; padding: 6px 15px; border-radius: 4px; cursor: pointer; }
.nav-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.page-indicator span { font-weight: bold; color: #3498db; }