/* 工单系统样式 - 移动端优化版 */

/* 通用样式 */
body {
    background-color: #f5f5f5;
    font-family: "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    padding-bottom: 60px;
}

.container {
    padding: 10px;
    width: 100%;
    box-sizing: border-box;
    max-width: 100%;
}

/* 工单列表页 */
.panel {
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 15px;
}

.panel-heading {
    border-bottom: 1px solid #eee;
    padding: 12px 15px;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.panel-title {
    font-size: 16px;
    font-weight: bold;
    margin: 0;
    line-height: 1.5;
}

.filter-box {
    margin-bottom: 15px;
    padding: 12px;
    background-color: #fff;
    border-radius: 8px;
    border: 1px solid #eee;
}

.filter-box .form-group {
    margin-right: 0;
    margin-bottom: 10px;
    width: 100%;
}

.filter-box label {
    display: block;
    margin-bottom: 5px;
    font-weight: normal;
}

.filter-box .form-control {
    width: 100%;
    height: 36px;
}

.filter-box button {
    width: 100%;
    margin-top: 5px;
}

.table-responsive {
    border: 0;
    margin-bottom: 15px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    margin-bottom: 0;
    min-width: 600px; /* 确保表格内容在小屏幕上可以滚动 */
}

.table > thead > tr > th {
    border-bottom: 2px solid #ddd;
    font-weight: bold;
    background-color: #f5f5f5;
    white-space: nowrap;
    padding: 10px 8px;
}

.table > tbody > tr > td {
    vertical-align: middle;
    padding: 10px 8px;
}

.table > tbody > tr:hover {
    background-color: #f9f9f9;
}

.table .label {
    display: inline-block;
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 4px;
    white-space: nowrap;
}

.table .btn-xs {
    margin-right: 5px;
    margin-bottom: 5px;
    padding: 4px 8px;
}

.pagination-container {
    text-align: center;
}

.pagination {
    display: inline-block;
    padding-left: 0;
    margin: 15px 0;
    border-radius: 4px;
}

.pagination > li {
    display: inline;
}

.pagination > li > a,
.pagination > li > span {
    position: relative;
    float: left;
    padding: 6px 12px;
    margin-left: -1px;
    line-height: 1.42857143;
    color: #337ab7;
    text-decoration: none;
    background-color: #fff;
    border: 1px solid #ddd;
}

.pagination > .active > a,
.pagination > .active > span,
.pagination > .active > a:hover,
.pagination > .active > span:hover,
.pagination > .active > a:focus,
.pagination > .active > span:focus {
    z-index: 3;
    color: #fff;
    cursor: default;
    background-color: #337ab7;
    border-color: #337ab7;
}

/* 模态框样式 */
.modal-dialog {
    margin: 10px;
    width: auto;
    max-width: 500px;
}

.modal-content {
    border-radius: 8px;
}

.modal-header {
    background-color: #f5f5f5;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    padding: 12px 15px;
}

.modal-title {
    font-weight: bold;
    font-size: 16px;
}

.modal-body {
    padding: 15px;
}

.modal-footer {
    background-color: #f9f9f9;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    padding: 12px 15px;
}

.form-control-static {
    padding-top: 0;
    padding-bottom: 0;
    min-height: auto;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    margin-bottom: 0;
    font-weight: normal;
    text-align: center;
    vertical-align: middle;
    touch-action: manipulation;
    cursor: pointer;
    background-image: none;
    border: 1px solid transparent;
    white-space: nowrap;
    padding: 8px 12px;
    font-size: 14px;
    line-height: 1.42857143;
    border-radius: 4px;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
    line-height: 1.5;
    border-radius: 3px;
}

.btn-xs {
    padding: 3px 6px;
    font-size: 12px;
    line-height: 1.5;
    border-radius: 3px;
}

.btn-primary {
    background-color: #337ab7;
    border-color: #2e6da4;
    color: #fff;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: #286090;
    border-color: #204d74;
    color: #fff;
}

.btn-info {
    background-color: #5bc0de;
    border-color: #46b8da;
    color: #fff;
}

.btn-info:hover,
.btn-info:focus,
.btn-info:active {
    background-color: #31b0d5;
    border-color: #269abc;
    color: #fff;
}

.btn-success {
    background-color: #5cb85c;
    border-color: #4cae4c;
    color: #fff;
}

.btn-success:hover,
.btn-success:focus,
.btn-success:active {
    background-color: #449d44;
    border-color: #398439;
    color: #fff;
}

/* 标签样式 */
.label {
    display: inline;
    padding: .2em .6em .3em;
    font-size: 75%;
    font-weight: bold;
    line-height: 1;
    color: #fff;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: .25em;
}

.label-default {
    background-color: #777;
}

.label-primary {
    background-color: #337ab7;
}

.label-success {
    background-color: #5cb85c;
}

.label-info {
    background-color: #5bc0de;
}

.label-warning {
    background-color: #f0ad4e;
}

.label-danger {
    background-color: #d9534f;
}

/* 工单详情页 */
.work-order-info {
    margin-bottom: 20px;
    background-color: #fff;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.work-order-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    word-break: break-all;
}

.work-order-meta {
    margin-bottom: 15px;
}

.work-order-meta .label {
    margin-right: 5px;
    margin-bottom: 5px;
    display: inline-block;
}

.work-order-user {
    margin-bottom: 15px;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 4px;
    border: 1px solid #eee;
}

.user-info {
    margin-bottom: 5px;
}

.user-label {
    font-weight: bold;
    margin-right: 5px;
}

.work-order-content {
    margin-top: 15px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 4px;
    border: 1px solid #eee;
    line-height: 1.6;
}

/* 客户信息部分样式 */
.customer-info-section {
    margin: 15px 0;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.customer-info-section h5 {
    margin-top: 0;
    margin-bottom: 15px;
    font-weight: 600;
    color: #495057;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 8px;
}

.customer-info-section .info-item {
    margin-bottom: 8px;
}

.customer-info-section .info-label {
    font-weight: 600;
    color: #6c757d;
    margin-right: 5px;
}

.customer-info-section .info-value {
    color: #212529;
}

/* 响应式调整 */
@media (max-width: 767px) {
    .panel-heading .row .col-md-6 {
        text-align: center;
        margin-bottom: 10px;
    }
    
    .panel-heading .row .col-md-6:last-child {
        text-align: center;
    }
    
    .filter-box .form-group {
        display: block;
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .filter-box .form-control {
        display: block;
        width: 100%;
    }
    
    .table-responsive {
        border: 1px solid #ddd;
        margin-bottom: 15px;
    }
    
    .modal-dialog {
        margin: 10px auto;
    }
    
    .work-order-actions .btn {
        display: block;
        width: 100%;
        margin-bottom: 10px;
    }
}

/* 警告和提示信息 */
.alert {
    border-radius: 4px;
    margin-bottom: 15px;
    padding: 12px 15px;
}

.alert-info {
    background-color: #d9edf7;
    border-color: #bce8f1;
    color: #31708f;
}

/* 工单创建页面 */
.form-horizontal .control-label {
    text-align: left;
    margin-bottom: 5px;
}

.required:after {
    content: " *";
    color: #d9534f;
}

/* 附件上传区域 */
.upload-area {
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 4px;
    border: 1px dashed #ddd;
    margin-bottom: 15px;
}

.upload-area .btn {
    margin-right: 10px;
    margin-bottom: 10px;
}

.attachment-list {
    margin-top: 15px;
}

.attachment-item {
    margin-bottom: 10px;
    padding: 10px;
    background-color: #fff;
    border-radius: 4px;
    border: 1px solid #eee;
}

.attachment-item img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.attachment-item video {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.attachment-item .btn-remove {
    margin-left: 10px;
    color: #d9534f;
    cursor: pointer;
}

/* 工单日志时间线 */
.timeline {
    position: relative;
    padding: 20px 0;
}

.timeline:before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 15px;
    width: 2px;
    background-color: #eee;
}

.timeline-item {
    position: relative;
    margin-bottom: 20px;
}

.timeline-badge {
    position: absolute;
    top: 0;
    left: 15px;
    width: 20px;
    height: 20px;
    margin-left: -9px;
    color: #fff;
    text-align: center;
    background-color: #337ab7;
    border-radius: 50%;
    z-index: 1;
}

.timeline-badge i {
    font-size: 10px;
    line-height: 20px;
}

.timeline-panel {
    position: relative;
    margin-left: 40px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 4px;
    border: 1px solid #eee;
}

.timeline-panel:before {
    content: '';
    position: absolute;
    top: 10px;
    left: -10px;
    width: 0;
    height: 0;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-right: 10px solid #f9f9f9;
}

.timeline-title {
    margin-top: 0;
    font-weight: bold;
    font-size: 14px;
}

/* 头部导航 */
.navbar {
    margin-bottom: 15px;
    border-radius: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: bold;
    font-size: 16px;
    height: auto;
    padding: 15px;
}

.navbar-nav > li > a {
    padding: 15px;
}

.navbar-default {
    background-color: #fff;
    border-color: #e7e7e7;
}

.navbar-default .navbar-brand {
    color: #337ab7;
}

.navbar-default .navbar-nav > .active > a,
.navbar-default .navbar-nav > .active > a:hover,
.navbar-default .navbar-nav > .active > a:focus {
    color: #555;
    background-color: #f8f8f8;
}

.navbar-toggle {
    margin-top: 8px;
    margin-bottom: 8px;
}

/* 底部样式 */
.footer {
    margin-top: 20px;
    padding: 15px 0;
    background-color: #f8f8f8;
    border-top: 1px solid #e7e7e7;
    text-align: center;
    color: #777;
    font-size: 12px;
}

.footer p {
    margin-bottom: 0;
}

/* 企业微信特定样式 */
/* 适应企业微信的安全区域 */
@supports (padding-top: constant(safe-area-inset-top)) {
    body {
        padding-top: constant(safe-area-inset-top);
        padding-bottom: constant(safe-area-inset-bottom);
        padding-left: constant(safe-area-inset-left);
        padding-right: constant(safe-area-inset-right);
    }
}

@supports (padding-top: env(safe-area-inset-top)) {
    body {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }
}

/* 触摸反馈效果 */
.btn:active,
.table > tbody > tr:active,
.attachment-item:active,
.navbar-nav > li > a:active {
    background-color: rgba(0, 0, 0, 0.05);
}

/* 下拉刷新提示 */
.pull-to-refresh {
    text-align: center;
    height: 40px;
    line-height: 40px;
    color: #999;
    font-size: 14px;
}

/* 基础样式 */
body {
    font-family: "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    background-color: #f5f5f5;
    padding-bottom: 60px;
}

.container {
    padding: 10px;
    max-width: 100%;
    box-sizing: border-box;
}

/* 导航栏样式 */
.navbar {
    margin-bottom: 10px;
    border-radius: 0;
}

.navbar-brand {
    font-size: 16px;
    font-weight: bold;
}

.navbar-default .navbar-toggle {
    border-color: transparent;
}

.navbar-default .navbar-toggle:focus, 
.navbar-default .navbar-toggle:hover {
    background-color: transparent;
}

/* 筛选框样式 */
.filter-box {
    background-color: #fff;
    border-radius: 5px;
    padding: 10px;
    margin-bottom: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.filter-box .form-group {
    margin-bottom: 10px;
}

.filter-box label {
    display: block;
    font-size: 12px;
    margin-bottom: 5px;
    color: #666;
}

.filter-box .form-control {
    height: 34px;
    font-size: 14px;
}

.filter-box button {
    margin-top: 5px;
}

/* 创建按钮容器 */
.create-btn-container {
    margin-bottom: 15px;
}

/* 工单列表样式 */
.work-order-list {
    margin-bottom: 15px;
}

.work-order-item {
    background-color: #fff;
    border-radius: 5px;
    padding: 12px;
    margin-bottom: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: relative;
}

.work-order-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 12px;
    color: #999;
}

.work-order-id {
    font-weight: bold;
}

.work-order-time {
    text-align: right;
}

.work-order-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 10px;
    word-break: break-all;
}

.work-order-title a {
    color: #333;
    text-decoration: none;
}

.work-order-info {
    margin-bottom: 10px;
    font-size: 13px;
}

.info-item {
    display: flex;
    margin-bottom: 5px;
}

.info-label {
    color: #666;
    width: 60px;
    flex-shrink: 0;
}

.work-order-users {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 10px;
    font-size: 13px;
    border-top: 1px solid #eee;
    padding-top: 8px;
}

.user-item {
    width: 50%;
    margin-bottom: 5px;
}

.user-label {
    color: #666;
}

.work-order-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* 标签样式 */
.label {
    display: inline-block;
    padding: 3px 6px;
    font-size: 12px;
    font-weight: normal;
    border-radius: 3px;
}

.label-default {
    background-color: #999;
}

.label-primary {
    background-color: #337ab7;
}

.label-success {
    background-color: #5cb85c;
}

.label-info {
    background-color: #5bc0de;
}

.label-warning {
    background-color: #f0ad4e;
}

.label-danger {
    background-color: #d9534f;
}

/* 按钮样式 */
.btn {
    border-radius: 4px;
    font-size: 14px;
    padding: 6px 12px;
    transition: all 0.2s ease;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

.btn-primary {
    background-color: #337ab7;
    border-color: #2e6da4;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: #286090;
    border-color: #204d74;
}

.btn-info {
    background-color: #5bc0de;
    border-color: #46b8da;
}

.btn-info:hover,
.btn-info:focus {
    background-color: #31b0d5;
    border-color: #269abc;
}

.btn-success {
    background-color: #5cb85c;
    border-color: #4cae4c;
}

.btn-success:hover,
.btn-success:focus {
    background-color: #449d44;
    border-color: #398439;
}

/* 模态框样式 */
.modal-dialog {
    margin: 10px auto;
    width: auto;
    max-width: 95%;
}

.modal-content {
    border-radius: 5px;
}

.modal-header {
    padding: 10px 15px;
    border-bottom: 1px solid #e5e5e5;
}

.modal-title {
    font-size: 18px;
}

.modal-body {
    padding: 15px;
}

.modal-footer {
    padding: 10px 15px;
    text-align: right;
    border-top: 1px solid #e5e5e5;
}

/* 分页样式 */
.pagination-container {
    text-align: center;
    margin-top: 15px;
}

.pagination {
    display: inline-block;
    margin: 0;
}

.pagination > li > a,
.pagination > li > span {
    padding: 6px 12px;
    color: #337ab7;
    background-color: #fff;
    border: 1px solid #ddd;
}

.pagination > .active > a,
.pagination > .active > a:focus,
.pagination > .active > a:hover,
.pagination > .active > span,
.pagination > .active > span:focus,
.pagination > .active > span:hover {
    background-color: #337ab7;
    border-color: #337ab7;
}

/* 底部样式 */
.footer {
    position: fixed;
    bottom: 0;
    width: 100%;
    background-color: #f8f8f8;
    border-top: 1px solid #e7e7e7;
    padding: 10px 0;
    text-align: center;
    font-size: 12px;
    color: #777;
    z-index: 1000;
}

/* 响应式调整 */
@media (min-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .modal-dialog {
        width: 600px;
        margin: 30px auto;
    }
    
    .work-order-item {
        padding: 15px;
    }
}

/* 触摸反馈效果 */
.btn:active,
.work-order-item:active {
    transform: scale(0.98);
}

/* 下拉刷新提示 */
.pull-to-refresh {
    text-align: center;
    height: 40px;
    line-height: 40px;
    color: #999;
    font-size: 14px;
}

/* 安全区适配 */
@supports (padding-bottom: constant(safe-area-inset-bottom)) {
    body {
        padding-bottom: calc(60px + constant(safe-area-inset-bottom));
    }
    
    .footer {
        padding-bottom: calc(10px + constant(safe-area-inset-bottom));
    }
}

@supports (padding-bottom: env(safe-area-inset-bottom)) {
    body {
        padding-bottom: calc(60px + env(safe-area-inset-bottom));
    }
    
    .footer {
        padding-bottom: calc(10px + env(safe-area-inset-bottom));
    }
} 