/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f7fa;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
}

/* 导航栏样式 */
.navbar {
    background-color: #2c3e50;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.navbar-left h1 {
    font-size: 24px;
    font-weight: 600;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-info {
    font-size: 16px;
}


.page-top-red-box {
    width: 100%;
    height: 60px;
    margin-bottom: 30px;
    position: relative;
    border: 1px solid transparent;
}

/* 登录页面样式 */
.login-form {
    max-width: 500px; /* 调整宽度以适应水平排列的表单 */
    margin: 0 auto;
    padding: 30px 40px 30px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
}

/* 系统标题样式 */
.system-title {
    text-align: center;
    margin-top: 0; /* 向上移动标题，使其接近红框 */
    margin-bottom: 30px;
    color: #2c3e50;
    font-size: 28px;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

/* 表单行样式（水平排列，标签在左边） */
.form-row {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.form-row label {
    width: 80px; /* 固定标签宽度 */
    margin-right: 15px;
    font-weight: 500;
}

.form-row input {
    width: 50%; /* 保持宽度为50% */
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

/* 开发者信息样式 */
.developer-info {
    text-align: center;
    margin-top: 40px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #666;
    font-style: italic;
    position: relative;
}


.page-bottom-red-box {
    width: 100%;
    height: 20px;
    margin-top: 20px;
    position: relative;
    border: 1px solid transparent;
}

.login-form h2 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 30px; /* 减少与下方表单的间距 */
    color: #2c3e50;
    font-size: 28px;
    font-weight: 600;
}

/* 表单样式 */
.form-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 30px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 20px;
}

/* 登录按钮样式调整 */
.login-form .form-group:last-of-type {
    margin-bottom: 10px; /* 调整登录按钮的底部间距 */
    text-align: center; /* 登录按钮居中显示 */
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 18px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: border-color 0.3s;
}

/* 查询表单专用样式 - 水平排列 */
.query-form .form-group {
    margin-bottom: 0;
    flex: 1;
    min-width: 120px;
}

.query-form .form-group label {
    font-size: 14px;
    margin-bottom: 4px;
    white-space: nowrap;
}

.query-form .form-group input,
.query-form .form-group select {
    padding: 8px 12px !important;
    font-size: 14px !important;
    min-height: auto !important;
    height: 36px !important;
}

.query-form .form-row {
    flex-wrap: wrap !important;
}

.query-form .form-group:last-of-type {
    flex: 0;
    align-self: flex-end;
}

/* 转派表单下拉框样式 - 增强优先级 */
form.assign-form select {
    padding: 12px !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    font-size: 16px !important;
    min-width: 120px !important;
    max-width: 150px !important;
    min-height: 40px !important;
    height: auto !important;
    line-height: 16px !important;
    flex: 1 !important;
}

/* 所有下拉框通用样式 - 增强优先级 */
select, 
.form-group select, 
table select, 
td select {
    padding: 20px !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    font-size: 22px !important;
    min-height: 60px !important;
    height: auto !important;
    line-height: 22px !important;
    display: inline-block !important;
    vertical-align: middle !important;
}

/* 记住我选项样式 */
.remember-me {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 25px; /* 增加底部间距，确保与登录按钮有适当距离 */
    margin-top: 5px; /* 减小与输入框的距离，使其在下方偏上位置 */
}

.remember-me input[type="checkbox"] {
    width: auto;
    margin: 0;
    transform: scale(1.2);
}

.remember-me label {
    margin: 0;
    font-weight: normal;
    cursor: pointer;
    font-size: 14px;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #3498db;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* 确保事件陈述框与其他输入框颜色一致 */
#event_description {
    border: 1px solid #ddd !important;
    background-color: white !important;
    color: #333 !important;
}

.hint {
    font-size: 14px;
    color: #777;
    margin-bottom: 15px;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.1s;
    text-decoration: none;
    text-align: center;
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

.btn-success {
    background-color: #27ae60;
    color: white;
}

.btn-success:hover {
    background-color: #229954;
}

.btn-logout {
    background-color: #e74c3c;
    color: white;
}

.btn-logout:hover {
    background-color: #c0392b;
}

.btn-warning {
    background-color: #f39c12;
    color: white;
}

.btn-warning:hover {
    background-color: #e67e22;
}

/* 确保导航栏中的退出登录按钮始终显示为红色 */
.navbar .btn-logout {
    background-color: #e74c3c !important;
    color: white !important;
}

.navbar .btn-logout:hover {
    background-color: #c0392b !important;
}

/* 错误消息样式 */
.error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 20px;
    border: 1px solid #f5c6cb;
    display: block;
}

/* 主内容区域布局 */
.main-content {
    display: flex;
    gap: 0;
    align-items: flex-start;
}

/* 工单列表区域 */
.orders-section {
    flex: 1;
    min-width: 0; /* 防止flex子元素溢出 */
}

/* 章节头部布局 */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

/* 大型按钮样式 */
.btn-large {
    padding: 15px;
    font-size: 16px;
    margin-bottom: 0;
    min-width: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* 图标占位符样式 */
.icon-report {
    display: inline-block;
    width: 20px;
    height: 20px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    position: relative;
}

.icon-report::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    background-color: white;
    border-radius: 2px;
}

/* 页面头部样式 */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

/* 表格样式 */
.orders-list,
.users-list {
    overflow-x: auto;
    margin-top: 20px;
}

.orders-table,
.users-table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.orders-table th,
.orders-table td,
.users-table th,
.users-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

/* 表格列固定宽度 */
.orders-table th:nth-child(1), .orders-table td:nth-child(1) {
    width: 5%; /* 序号 */
}

.orders-table th:nth-child(2), .orders-table td:nth-child(2) {
    width: 11%; /* 工单编号 */
}

.orders-table th:nth-child(3), .orders-table td:nth-child(3) {
    width: 9%; /* 故障类别 */
}

.orders-table th:nth-child(4), .orders-table td:nth-child(4) {
    width: 19%; /* 故障描述 */
}

.orders-table th:nth-child(5), .orders-table td:nth-child(5) {
    width: 7%; /* 状态 */
}

.orders-table th:nth-child(6), .orders-table td:nth-child(6) {
    width: 11%; /* 创建时间 */
}

.orders-table th:nth-child(7), .orders-table td:nth-child(7) {
    width: 11%; /* 转派时间 */
}

.orders-table th:nth-child(8), .orders-table td:nth-child(8) {
    width: 11%; /* 维修人员 */
}

.orders-table th:nth-child(9), .orders-table td:nth-child(9) {
    width: 11%; /* 完成时间 */
}

.orders-table th:nth-child(10), .orders-table td:nth-child(10) {
    width: 7%; /* 完成时长 */
}

.orders-table th:nth-child(10), .orders-table td:nth-child(10) {
    width: 22%; /* 操作 - 进一步增加宽度以显示完整内容 */
}

.orders-table th,
.users-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #555;
    writing-mode: horizontal-tb;
    text-orientation: mixed;
    white-space: nowrap;
}

.orders-table tr:hover,
.users-table tr:hover {
    background-color: #f8f9fa;
}

/* 状态样式 */
.status-reported {
    color: #f39c12;
}

.status-assigned {
    color: #3498db;
}

.status-processing {
    color: #9b59b6;
}

.status-completed {
    color: #27ae60;
}

/* 转派表单样式 */
.assign-form {
    display: flex;
    gap: 10px;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}

/* 转派表单下拉框样式调整 */
.assign-form select {
    flex: 1;
    min-width: 150px;
    max-width: 200px;
    box-sizing: border-box;
}

/* 转派按钮样式调整 */
.assign-form .btn {
    flex: 0 0 auto;
    min-width: 80px;
    padding: 12px 20px !important;
    font-size: 16px !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
    height: auto !important;
    min-height: 40px !important;
    line-height: 16px !important;
}

/* 订单详情样式 */
.order-detail {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.detail-section {
    margin-bottom: 30px;
}

.detail-section h3 {
    margin-bottom: 15px;
    color: #2c3e50;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}

.detail-item {
    margin-bottom: 12px;
    display: flex;
    flex-wrap: wrap;
}

.detail-item .label {
    font-weight: 600;
    margin-right: 10px;
    min-width: 100px;
    color: #555;
}

.detail-item .value {
    flex: 1;
}

/* 用户管理样式 */
.user-management .actions {
    margin-bottom: 20px;
}

.users-list {
    margin-top: 20px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 10px;
    }
    
    .navbar-right {
        flex-direction: column;
        gap: 10px;
    }
    
    .container {
        padding: 10px;
    }
    
    .login-form,
    .form-container,
    .order-detail {
        padding: 20px;
    }
    
    .orders-table,
    .users-table {
        font-size: 14px;
    }
    
    .orders-table th,
    .orders-table td,
    .users-table th,
    .users-table td {
        padding: 8px;
    }
    
    .assign-form {
        flex-direction: column;
        align-items: stretch;
    }
}

/* 公告表格样式 */
.announcement-table {
    width: 100%;
    table-layout: fixed;
    word-wrap: break-word;
    border-collapse: collapse;
    border-spacing: 0;
}

.announcement-table th,
.announcement-table td {
    border: 1px solid #ddd;
    padding: 12px;
    vertical-align: middle;
    text-align: center;
}

.announcement-table .col-serial {
    width: 60px;
    min-width: 60px;
}

.announcement-table .col-author {
    width: 120px;
    min-width: 120px;
}

.announcement-table .col-time {
    width: 180px;
    min-width: 180px;
}

.announcement-table .col-content {
    width: auto;
    min-width: 300px;
}

.announcement-table .col-actions {
    width: 150px;
    min-width: 150px;
}

/* 调整表格内容的垂直对齐方式 */
/* .announcement-table td,
.announcement-table th {
    vertical-align: middle;
} */

/* 统一所有按钮样式与查询按钮一致 */
.btn,
.btn-primary,
.btn-secondary,
.btn-success,
.btn-warning,
.btn-logout {
    background-color: #3498db !important;
    color: white !important;
    padding: 10px 20px !important;
    font-size: 16px !important;
    min-width: auto !important;
    display: inline-block !important;
    width: auto !important;
    height: auto !important;
    min-height: auto !important;
}

.btn:hover,
.btn-primary:hover,
.btn-secondary:hover,
.btn-success:hover,
.btn-warning:hover,
.btn-logout:hover {
    background-color: #2980b9 !important;
}

/* 确保大型按钮样式与基础按钮一致 */
.btn-large {
    padding: 10px 20px !important;
    font-size: 16px !important;
    min-width: auto !important;
    display: inline-block !important;
    gap: 0 !important;
    height: auto !important;
}

/* 已完成工单表格特殊样式优化 */
.orders-table:nth-of-type(3) th:nth-child(1),
.orders-table:nth-of-type(3) td:nth-child(1) { width: 5%; } /* 序号 */
.orders-table:nth-of-type(3) th:nth-child(2),
.orders-table:nth-of-type(3) td:nth-child(2) { width: 12%; } /* 工单编号 */
.orders-table:nth-of-type(3) th:nth-child(3),
.orders-table:nth-of-type(3) td:nth-child(3) { width: 10%; } /* 报修网点 */
.orders-table:nth-of-type(3) th:nth-child(4),
.orders-table:nth-of-type(3) td:nth-child(4) { width: 10%; } /* 报修人姓名 */
.orders-table:nth-of-type(3) th:nth-child(5),
.orders-table:nth-of-type(3) td:nth-child(5) { width: 8%; } /* 故障类别 */
.orders-table:nth-of-type(3) th:nth-child(6),
.orders-table:nth-of-type(3) td:nth-child(6) { 
    width: 15%; 
    text-align: left;
    white-space: normal;
}
.orders-table:nth-of-type(3) th:nth-child(7),
.orders-table:nth-of-type(3) td:nth-child(7) { width: 6%; } /* 状态 */
.orders-table:nth-of-type(3) th:nth-child(8),
.orders-table:nth-of-type(3) td:nth-child(8) { width: 10%; } /* 维修人员 */
.orders-table:nth-of-type(3) th:nth-child(9),
.orders-table:nth-of-type(3) td:nth-child(9) { width: 12%; } /* 提交时间 */
.orders-table:nth-of-type(3) th:nth-child(10),
.orders-table:nth-of-type(3) td:nth-child(10) { width: 12%; } /* 完成时间 */
.orders-table:nth-of-type(3) th:nth-child(11),
.orders-table:nth-of-type(3) td:nth-child(11) { width: 6%; } /* 工单时长 */
.orders-table:nth-of-type(3) th:nth-child(12),
.orders-table:nth-of-type(3) td:nth-child(12) { width: 8%; } /* 操作 */

/* 统一表格样式 */
.orders-table {
    table-layout: fixed; /* 固定表格布局，使列宽设置更精确 */
    font-size: 14px; /* 统一字体大小 */
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.orders-table th,
.orders-table td {
    padding: 8px 10px; /* 统一内边距，使表格更紧凑 */
    text-align: center; /* 统一居中对齐 */
    white-space: nowrap; /* 防止内容换行 */
    overflow: hidden; /* 隐藏溢出内容 */
    text-overflow: ellipsis; /* 溢出内容显示省略号 */
    border: 1px solid #ddd;
    vertical-align: middle;
}

/* 统一故障描述列样式 */
.orders-table th:nth-child(4),
.orders-table td:nth-child(4),
.orders-table th:nth-child(6),
.orders-table td:nth-child(6) {
    text-align: left; /* 故障描述数据左对齐，便于阅读 */
    white-space: normal; /* 允许故障描述换行 */
    word-break: break-word;
}

/* 统一故障描述列表头样式 */
.orders-table th:nth-child(4),
.orders-table th:nth-child(6) {
    text-align: center; /* 表头文字居中 */
}

/* 统一表格头部样式 */
.orders-table th {
    background-color: #e9ecef; /* 使用统一的背景色 */
    font-weight: 700;
    color: #495057;
}

/* 统一表格行悬停效果 */
.orders-table tr:hover {
    background-color: #f8f9fa;
    transform: translateY(-1px); /* 添加轻微上浮效果 */
    transition: transform 0.2s;
}

/* 统一按钮样式 */
.orders-table .btn {
    padding: 6px 10px !important;
    font-size: 12px !important;
    min-width: auto !important;
    margin: 0 2px;
}

/* 统一状态样式 */
.status-reported { color: #f39c12; }
.status-assigned { color: #3498db; }
.status-processing { color: #9b59b6; }
.status-completed { color: #27ae60; }

/* 统一页面布局 */
.container {
    max-width: 98%; /* 增大容器最大宽度 */
    margin: 0 auto;
    padding: 20px;
}

/* 统一页面头部样式 */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

/* 统一章节头部样式 */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

/* 统一主内容区域布局 */
.main-content {
    display: flex;
    gap: 0;
    align-items: flex-start;
}

/* 统一工单列表区域 */
.orders-section {
    flex: 1;
    min-width: 0; /* 防止flex子元素溢出 */
}

/* 统一表格列宽设置 */
.orders-table th:nth-child(1), .orders-table td:nth-child(1) { width: 4%; } /* 序号 */
.orders-table th:nth-child(2), .orders-table td:nth-child(2) { width: 10%; } /* 工单编号 */
.orders-table th:nth-child(3), .orders-table td:nth-child(3) { width: 9%; } /* 故障类别/报修网点 */
.orders-table th:nth-child(4), .orders-table td:nth-child(4) { width: 9%; } /* 故障描述/报修人姓名 */
.orders-table th:nth-child(5), .orders-table td:nth-child(5) { width: 8%; } /* 状态/故障类别 */
.orders-table th:nth-child(6), .orders-table td:nth-child(6) { width: 10.5%; } /* 故障描述 */
.orders-table th:nth-child(7), .orders-table td:nth-child(7) { width: 7%; } /* 状态/创建时间 */
.orders-table th:nth-child(8), .orders-table td:nth-child(8) { width: 11%; } /* 创建时间/维修人员 */
.orders-table th:nth-child(9), .orders-table td:nth-child(9) { width: 11%; } /* 转派时间/完成时间 */
.orders-table th:nth-child(10), .orders-table td:nth-child(10) { width: 10%; } /* 维修人员/完成时长 */
.orders-table th:nth-child(11), .orders-table td:nth-child(11) { width: 7%; } /* 完成时间/操作 */
.orders-table th:nth-child(12), .orders-table td:nth-child(12) { width: 8%; } /* 完成时长/额外操作 */
.orders-table th:nth-child(13), .orders-table td:nth-child(13) { width: 20%; } /* 操作（适用于有更多操作按钮的表格） */