/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
    font-size: 14px;
    color: #333;
    background-color: #f5f5f5;
}

/* 登录页面样式 */
.login-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-box {
    background: #fff;
    padding: 40px 50px;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    width: 420px;
}

.login-box h1 {
    text-align: center;
    color: #666;
    font-size: 24px;
    margin-bottom: 30px;
    font-weight: normal;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: #666;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.btn-login {
    width: 100%;
    padding: 12px;
    background: #667eea;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
    margin-top: 10px;
}

.btn-login:hover {
    background: #5a6fd6;
}

/* 头部样式 */
.header {
    background: #4a4a4a;
    height: 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.logo {
    display: flex;
    align-items: center;
    color: #fff;
    font-size: 16px;
}

.header-logo {
    width: 24px;
    height: 24px;
    margin-right: 8px;
    vertical-align: middle;
}

.user-menu {
    position: relative;
}

.user-menu-toggle {
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
}

.user-menu-toggle:hover {
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    min-width: 120px;
    display: none;
    margin-top: 5px;
}

.user-dropdown a {
    display: block;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
    font-size: 13px;
}

.user-dropdown a:hover {
    background: #f5f5f5;
}

.user-dropdown.show {
    display: block;
}

/* 主布局 */
.main-container {
    margin-top: 50px;
    min-height: calc(100vh - 50px);
}

/* 菜单栏 */
.menu-bar {
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    padding: 0 20px;
    position: relative;
}

.menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 0;
    color: #666;
    cursor: pointer;
    font-size: 14px;
}

.menu-toggle:hover {
    color: #667eea;
}

.sidebar {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-top: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    min-width: 180px;
    display: none;
    z-index: 100;
}

.sidebar.show {
    display: block;
}

.sidebar a {
    display: block;
    padding: 12px 20px;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    border-bottom: 1px solid #f0f0f0;
}

.sidebar a:hover,
.sidebar a.active {
    background: #f8f8f8;
    color: #667eea;
}

.sidebar a:last-child {
    border-bottom: none;
}

/* 内容区域 */
.content {
    padding: 14px 20px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.page-title {
    font-size: 18px;
    color: #333;
    font-weight: normal;
}

/* 按钮样式 */
.btn {
    padding: 8px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: #667eea;
    color: #fff;
}

.btn-primary:hover {
    background: #5a6fd6;
}

.btn-secondary {
    background: #95a5a6;
    color: #fff;
    margin-left: 10px;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.btn-link {
    color: #667eea;
    text-decoration: none;
    background: none;
    padding: 0;
}

.btn-link:hover {
    text-decoration: underline;
}

/* 卡片样式 */
.card {
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 20px;
}

/* 工具栏 */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-size {
    position: relative;
}

.page-size-select {
    padding: 6px 30px 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    appearance: none;
    font-size: 13px;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-box input {
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 180px;
    font-size: 13px;
}

/* 表格样式 */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.data-table th {
    color: #666;
    font-weight: normal;
    font-size: 13px;
}

.data-table tbody tr:hover {
    background: #f8f8f8;
}

.expand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    margin-right: 8px;
    font-size: 12px;
}

.expand-icon.plus {
    background: #667eea;
    color: #fff;
}

.expand-icon.minus {
    background: #e74c3c;
    color: #fff;
}

.status-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    margin-right: 5px;
}

.status-waiting {
    background: #f39c12;
}

/* 展开行样式 */
.expand-row td {
    background: #fafafa;
    padding: 15px;
}

.expand-content {
    color: #666;
    font-size: 13px;
}

.expand-content p {
    margin-bottom: 8px;
}

/* 展开行详细信息样式 */
.detail-row {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px dashed #e0e0e0;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    color: #666;
    font-weight: bold;
    min-width: 100px;
    margin-right: 20px;
}

.detail-value {
    color: #333;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.pagination-info {
    color: #666;
    font-size: 13px;
}

.pagination-nav {
    display: flex;
    align-items: center;
    gap: 5px;
}

.pagination-nav a {
    padding: 5px 10px;
    color: #666;
    text-decoration: none;
    border-radius: 4px;
}

.pagination-nav a:hover {
    background: #f0f0f0;
}

.pagination-nav .current {
    background: #667eea;
    color: #fff;
}

.pagination-nav .disabled {
    color: #ccc;
    cursor: not-allowed;
    padding: 5px 10px;
}

.pagination-nav span:not(.disabled) {
    color: #999;
    padding: 5px 10px;
}

/* 表单样式 */
.form-section {
    max-width: 600px;
}

.form-row {
    margin-bottom: 20px;
}

.form-row label {
    display: block;
    color: #666;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-row label .required {
    color: #e74c3c;
    margin-right: 4px;
}

.form-row input,
.form-row select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-row input:read-only,
.form-row input[disabled] {
    background: #f5f5f5;
    color: #999;
}

.form-actions {
    margin-top: 30px;
}

/* 操作链接 */
.action-links a {
    color: #667eea;
    text-decoration: none;
    margin-right: 10px;
}

.action-links a:hover {
    text-decoration: underline;
}

.action-links a.danger {
    color: #e74c3c;
}

/* 搜索筛选区域 */
.search-filter {
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    margin-bottom: 15px;
}

.filter-row {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.filter-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-item span {
    color: #666;
    font-size: 13px;
}

.filter-input {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    width: 120px;
}

.filter-select {
    padding: 6px 25px 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    background: #fff;
}

/* 表格容器 - 横向滚动 */
.table-container {
    position: relative;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

.table-scroll {
    overflow-x: auto;
    overflow-y: hidden;
}

.table-scroll .data-table {
    min-width: 1500px;
    border: none;
}

/* 固定列样式 */
.sticky-col {
    position: sticky;
    left: 0;
    background: #fff;
    z-index: 10;
    border-right: 1px solid #eee;
}

.action-col {
    position: sticky;
    right: 0;
    background: #fff;
    z-index: 10;
    border-left: 1px solid #eee;
    min-width: 200px;
}

.table-scroll .data-table th.sticky-col,
.table-scroll .data-table th.action-col {
    background: #fafafa;
    z-index: 11;
}

.table-scroll .data-table tbody tr:hover .sticky-col,
.table-scroll .data-table tbody tr:hover .action-col {
    background: #f8f8f8;
}

/* 操作按钮 */
.action-btns {
    display: flex;
    gap: 5px;
    justify-content: center;
}

.btn-action {
    padding: 4px 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
    background: #fff;
    color: #666;
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
}

.btn-action:hover {
    background: #f5f5f5;
    border-color: #ccc;
}

.btn-action.dropdown {
    padding-right: 6px;
}

/* 表脚样式 */
.data-table tfoot td {
    background: #f5f5f5;
    font-weight: bold;
    color: #666;
}

.data-table tfoot .sticky-col,
.data-table tfoot .action-col {
    background: #f5f5f5;
}

/* 分页输入框 */
.page-input {
    width: 40px;
    padding: 4px 6px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
    margin: 0 5px;
}

/* 头部操作按钮 */
.header-actions {
    display: flex;
    gap: 10px;
}

/* 证件类型Tab导航 */
.doc-type-tabs {
    display: flex;
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 20px;
    overflow-x: auto;
}

.tab-item {
    padding: 12px 20px;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}

.tab-item:hover {
    color: #667eea;
}

.tab-item.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background: #f8f8f8;
}

/* 证件翻译表单 */
.doc-content {
    padding: 10px;
}

.card-inner {
    padding: 15px;
}

.translation-form {
    max-width: 800px;
}

.translation-form.dual-column {
    display: flex;
    gap: 30px;
    max-width: 100%;
}

.translation-form.dual-column .column {
    flex: 1;
}

.translation-form.dual-column .col-header {
    text-align: center;
    padding: 15px;
    background: #f5f5f5;
    margin-bottom: 20px;
    border-radius: 4px;
    font-weight: bold;
    color: #666;
}

/* 上传区域 */
.upload-row {
    border: 1px dashed #ddd;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.upload-area {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.upload-tip {
    color: #e74c3c;
    font-size: 12px;
}

/* 表单分区 */
.form-section {
    background: #fafafa;
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 20px;
}

/* 居中文本 */
.text-center {
    text-align: center;
}

/* 无数据提示 */
.no-data {
    text-align: center;
    color: #999;
    padding: 30px !important;
}

/* 更多菜单 */
.more-menu-wrapper {
    position: relative;
}

.more-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    min-width: 120px;
    display: none;
    z-index: 200;
    margin-top: 5px;
}

.more-dropdown.show {
    display: block;
}

.more-dropdown a {
    display: block;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
    font-size: 13px;
}

.more-dropdown a:hover {
    background: #f5f5f5;
}

/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.modal-large {
    align-items: flex-start;
    padding-top: 50px;
}

.modal-content {
    background: #fff;
    border-radius: 4px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
}

.modal-header h3 {
    font-size: 16px;
    font-weight: normal;
    color: #333;
}

.modal-close {
    font-size: 24px;
    color: #999;
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover {
    color: #666;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    padding: 15px 20px;
    border-top: 1px solid #e0e0e0;
}

/* 日期选择器 */
.date-picker {
    position: relative;
}

/* 下拉框选项样式 */
.filter-select option {
    padding: 8px;
}

.filter-select option:first-child {
    color: #00c853;
}

/* 表格单元格不换行（除留言内容外） */
.data-table td {
    white-space: nowrap;
}

.data-table td.message-content {
    white-space: normal;
    word-wrap: break-word;
    max-width: 300px;
}

/* 留言表格样式 */
.message-table {
    table-layout: fixed;
}

.message-table th,
.message-table td {
    overflow: hidden;
    text-overflow: ellipsis;
}

.message-table td:last-child {
    overflow: visible;
    white-space: nowrap;
}
