/* ====== workorder-list.css ======
   Styles for the standalone workorder list page.
   Scope: .workorder-page / .wo-list-panel
*/
.layui-badge {
    height: 22px;
    line-height: 22px;
	border-radius: 4px;
}
.layui-bg-black {
    background-color: #727578 !important;
    color: #fff !important;
}
/* ---------- Panel layout ---------- */
.workorder-page .wo-list-panel {
    border-radius: 8px;
    overflow: hidden;
}
/* 自定义状态颜色 */
.layui-bg-status-processing {
  background-color: #ff5722 !important;
  color: #fff !important;
}

.layui-bg-status-needinfo {
  background-color: #cb9800 !important;
  color: #fff !important;
}
/* ---------- Panel header ---------- */
.wo-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 14px;
    border-bottom: 1px solid #f0f0f0;
    gap: 16px;
}

.wo-list-title-group {
    flex: 1;
    min-width: 0;
}

.wo-list-title {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: #1a2234;
    line-height: 1.3;
}

.wo-list-subtitle {
    margin: 3px 0 0;
    font-size: 12px;
    color: #aab0bc;
}

/* create button */
.wo-create-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #1e9fff 0%, #0970d8 100%);
    color: #fff;
    border-radius: 6px;
    font-size: 13px !important;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.22s ease;
    box-shadow: 0 2px 8px rgba(30, 159, 255, 0.25);
    white-space: nowrap;
}
.wo-create-btn .layui-icon {
    font-size: 13px !important;
	margin-top: 1px;
}
.wo-create-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(30, 159, 255, 0.35);
    color: #fff;
}

.wo-create-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(30, 159, 255, 0.2);
}

/* ---------- Table ---------- */
.wo-table-wrap {
    padding: 0;
    overflow-x: auto;
}

.workorder-page .layui-table {
    border: none;
    margin: 0;
    border-radius: 0;
}

.workorder-page .layui-table thead th {
    background: #f8f9fb;
    border: none;
    border-bottom: 1px solid #eef0f4;
    color: #8896ab;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    padding: 12px 10px;
}

.workorder-page .layui-table tbody td {
    border: none;
    border-bottom: 1px solid #f4f5f7;
    color: #3a4558;
    font-size: 14px;
    text-align: center;
    padding: 12px 10px;
    vertical-align: middle;
}

.workorder-page .layui-table tbody tr:hover td {
    background: #f8fafc;
}

.workorder-page .layui-table tbody td:first-child {
    color: #aab0bc;
    font-size: 13px;
}

/* ---------- Mobile cards (uses .workorder-card to match original workorder-modern.css) ---------- */
.workorder-mobile-cards {
    display: none;
    padding: 15px;
}

@media (max-width: 768px) {
    .workorder-page .layui-table {
        display: none;
    }
    .workorder-mobile-cards {
        display: block;
    }
}

.workorder-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    margin-bottom: 12px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    transition: all 0.2s ease;
}

.workorder-card:hover {
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

.workorder-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
    gap: 10px;
}

.workorder-card-title {
    font-size: 15px;
    font-weight: 500;
    color: #333;
    margin: 0;
    flex: 1;
}

.workorder-card-meta {
    font-size: 12px;
    color: #888;
    margin: 4px 0;
    line-height: 1.4;
}

.workorder-card-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
}

.workorder-page .workorder-card-actions {
    margin-top: 12px;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    padding: 0 14px 12px;
}

.workorder-page .workorder-card-actions .layui-btn {
    flex: 1;
    margin: 0;
    padding: 0 4px;
    font-size: 12px;
    height: 30px;
    line-height: 30px;
    min-width: 0;
}

/* ---------- Pagination ---------- */
#workOrderPagination {
    padding: 16px 20px 0px;
    text-align: center;
}

#workOrderPagination .layui-laypage {
    display: inline-flex;
    align-items: center;
	margin: 0px 0;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
}

#workOrderPagination .layui-laypage a,
#workOrderPagination .layui-laypage span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 28px;
    padding: 0 8px;
    border: 1px solid #e4e8ee;
    border-radius: 5px;
    background: #fff;
    color: #5a6a7e;
    font-size: 13px;
    transition: all 0.18s ease;
    text-decoration: none;
}

#workOrderPagination .layui-laypage a:hover {
    background: #1e9fff;
    border-color: #1e9fff;
    color: #fff;
}

#workOrderPagination .layui-laypage .layui-laypage-curr {
    background: #1e9fff;
    border-color: #1e9fff;
    color: #fff;
}

#workOrderPagination .layui-laypage .layui-laypage-prev,
#workOrderPagination .layui-laypage .layui-laypage-next {
    padding: 0 12px;
}

/* ---------- Drawer ---------- */
.wo-drawer {
    position: fixed;
    right: 0;
    top: 0;
    height: 100%;
    width: 440px;
    max-width: 100%;
    background: #fff;
    box-shadow: -8px 0 32px rgba(0,0,0,0.08);
    transform: translateX(100%);
    transition: transform 260ms ease;
    z-index: 1200;
    display: flex;
    flex-direction: column;
}

.wo-drawer.open {
    transform: translateX(0);
}

.wo-drawer .drawer-header {
    padding: 14px 18px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    color: #1a2234;
    font-size: 15px;
}

.wo-drawer .drawer-body {
    padding: 14px 18px;
    overflow: auto;
    flex: 1 1 auto;
}

.wo-drawer .drawer-footer {
    border-top: 1px solid #eee;
    padding: 10px 12px;
    background: #fafafa;
}

.wo-drawer .drawer-close {
    background: transparent;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #8896ab;
    width: 30px;
    height: 30px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.wo-drawer .drawer-close:hover {
    background: #f0f2f5;
    color: #3a4558;
}

/* messages */
.messages-list {
    background: #f8f9fb;
    border: 1px solid #eaecf0;
    border-radius: 10px;
    padding: 10px;
    margin-top: 12px;
    max-height: 320px;
    overflow-y: auto;
}

.message {
    background: #fff8e1;
    border-left: 3px solid #ffb300;
    border-radius: 6px;
    margin-bottom: 10px;
    padding: 10px 12px;
}

.message.admin {
    background: #e8f4ff;
    border-left-color: #1e9fff;
}

.message .meta {
    color: #8896ab;
    font-size: 12px;
    margin-bottom: 5px;
    font-weight: 500;
}

.message .body {
    color: #2c3447;
    font-size: 14px;
    line-height: 1.6;
}

/* reply input */
.detail-reply .reply-input {
    margin-bottom: 10px;
}

.detail-reply .reply-input textarea {
    width: 100%;
    box-sizing: border-box;
    min-height: 80px;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1.5px solid #e2e8f0;
    resize: vertical;
    font-size: 14px;
    line-height: 1.5;
    font-family: inherit;
    transition: border-color 0.2s;
    outline: none;
    background: #fafbfc;
}

.detail-reply .reply-input textarea:focus {
    border-color: #1e9fff;
    background: #fff;
}

.detail-reply .reply-input .btn-row {
    text-align: right;
    margin-top: 8px;
}

/* ---------- Responsive: Mobile ---------- */
@media (max-width: 768px) {
    .wo-list-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 14px 14px 12px;
    }

    .wo-list-title-group {
        align-self: stretch;
        width: auto;
    }

    .wo-create-btn {
        align-self: stretch;
        width: auto;
        justify-content: center;
        padding: 10px 16px;
        font-size: 14px;
        border-radius: 8px;
    }

    .workorder-mobile-cards {
        padding: 0px;
    }

    .workorder-card {
        padding: 12px 14px;
    }

    #workOrderPagination {
        padding: 0px;
    }

    .wo-drawer {
        width: 100%;
    }
}

/* ---------- Responsive: Large desktop ---------- */
@media (min-width: 992px) {
    .wo-list-header {
        padding: 20px 28px 18px;
    }

    .wo-list-title {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .uc-card .uc-card-body {
        padding: 12px;
    }
}
