/* ====== workorder-create.css ======
   Styles for the standalone workorder create page.
   Uses the same sidebar layout as other user-center pages.
   Scope: .wo-create-page / .wo-create-panel
*/

/* ---------- Panel layout ---------- */
.wo-create-page .wo-create-panel {
    border-radius: 8px;
    overflow: hidden;
}

/* ---------- Panel header ---------- */
.wo-create-page .wo-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 14px;
    border-bottom: 1px solid #f0f0f0;
    gap: 16px;
}

.wo-create-page .wo-list-title-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.wo-create-page .wo-back-link {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: #f5f7fa;
    border: 1px solid #e4e8ee;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #5a6a7e;
    transition: all 0.2s ease;
    text-decoration: none;
}

.wo-create-page .wo-back-link:hover {
    background: #1e9fff;
    border-color: #1e9fff;
    color: #fff;
}

.wo-create-page .wo-list-title {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: #1a2234;
    line-height: 1.3;
}

.wo-create-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #1e9fff 0%, #0970d8 100%);
    color: #fff;
    border-radius: 6px;
    font-size: 13px;
    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: 14px;
}
.wo-create-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(30, 159, 255, 0.35);
    color: #fff;
}

/* ---------- Form area ---------- */
.wo-form-body {
    padding: 20px 20px 24px;
}

/* ---------- Form items ---------- */
.wo-create-page .layui-form-item {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    margin-bottom: 20px;
    position: relative;
}

.wo-create-page .layui-form-label {
    float: none;
    display: block;
    width: 100% !important;
    padding: 0 0 8px 0 !important;
    margin: 0 !important;
    font-size: 14px;
    color: #3a4558;
    font-weight: 500;
    text-align: left !important;
    box-sizing: border-box;
}

.wo-create-page .layui-form-label i {
    margin-right: 5px;
    color: #8a9ab5;
}

.wo-create-page .layui-input-block.wo-form-block {
    width: 100%;
    margin: 0 !important;
    padding: 0;
    clear: both;
}

/* Select option text overflow ellipsis */
.wo-create-page .wo-form-block .layui-form-select .layui-select-title,
.wo-create-page .wo-form-block .layui-form-select dl dd {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Limit the dropdown <dl> width to match the select input */
.wo-create-page .layui-form-select dl {
    max-width: var(--select-width, 100%);
    overflow-x: hidden;
    word-break: break-all;
}

.wo-create-page .layui-input,
.wo-create-page .layui-textarea,
.wo-create-page .layui-select {
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 9px 12px;
    font-size: 14px;
    color: #1a2234;
    background: #fafbfc;
    transition: all 0.2s ease;
}

.wo-create-page .layui-input:focus,
.wo-create-page .layui-textarea:focus,
.wo-create-page .layui-select:focus {
    border-color: #1e9fff;
    background: #fff;
    box-shadow: 0 0 0 2px rgba(30, 159, 255, 0.1);
}

.wo-create-page .layui-textarea {
    min-height: 120px;
    resize: vertical;
    line-height: 1.6;
}

/* Select arrow */
.wo-create-page .wo-form-block .layui-form-select {
    padding-left: 0;
}

.wo-create-page .wo-form-block .layui-input {
    height: 38px;
    line-height: 38px;
}

/* ---------- Optional field ---------- */
.wo-form-item-optional .wo-optional-tag {
    font-size: 11px;
    color: #8a9ab5;
    background: #f0f3f8;
    border-radius: 4px;
    padding: 1px 6px;
    margin-left: 4px;
    font-weight: 500;
}

/* ---------- Character count ---------- */
.wo-char-count {
    position: absolute;
    right: 8px;
    top: 8px;
    font-size: 12px;
    color: #b0bec5;
}

.wo-char-count-bottom {
    right: 8px;
    top: auto;
    bottom: 8px;
}

/* ---------- Form actions ---------- */
.wo-form-actions .wo-form-block {
    display: flex;
    justify-content: center;
    margin-top: 4px;
}

.wo-create-page .wo-submit-btn {
    background: linear-gradient(135deg, #1e9fff 0%, #0970d8 100%);
    border: none;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(30, 159, 255, 0.28);
}

.wo-create-page .wo-submit-btn:hover {
    background: linear-gradient(135deg, #2da8ff 0%, #1e9fff 100%);
    box-shadow: 0 4px 14px rgba(30, 159, 255, 0.38);
    transform: translateY(-1px);
}

.wo-create-page .wo-submit-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(30, 159, 255, 0.22);
}

.wo-create-page .wo-submit-btn[disabled] {
    opacity: 0.7;
    cursor: not-allowed;
}

/* ---------- Tips card ---------- */
.wo-tips-card {
    background: #f8fafc;
    border: 1px solid #eef0f4;
    border-radius: 8px;
    padding: 16px 18px;
    margin-top: 20px;
}

.wo-create-page .wo-tips-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #5a6a7e;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wo-create-page .wo-tips-header i {
    color: #1e9fff;
}

.wo-create-page .wo-tips-list {
    margin: 0;
    padding: 0 0 0 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.wo-create-page .wo-tips-list li {
    font-size: 13px;
    color: #5a6a7e;
    line-height: 1.5;
    list-style: disc;
}

.wo-create-page .wo-tips-list li strong {
    color: #1e9fff;
}

/* ---------- Responsive: Mobile ---------- */
@media (max-width: 768px) {
    .wo-create-page .wo-list-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 14px 14px 12px;
    }

    .wo-create-page .wo-list-title-group {
        display: flex;
        align-items: center;
        gap: 10px;
        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;
    }

    .wo-form-body {
        padding: 14px 14px 18px;
    }

    .wo-create-page .wo-form-item {
        margin-bottom: 20px;
    }

    .wo-create-page .layui-input,
    .wo-create-page .layui-select {
        height: 40px;
        line-height: 40px;
        font-size: 14px;
    }

    .wo-create-page .layui-textarea {
        font-size: 14px;
        padding: 10px 12px;
    }

    .wo-form-actions .wo-form-block {
        justify-content: center;
    }

    .wo-create-page .wo-submit-btn {
        height: 44px;
        border-radius: 8px;
        min-width: 120px;
    }

    .wo-create-page .layui-btn.layui-btn-primary {
        height: 44px;
        border-radius: 8px;
        font-size: 15px;
        min-width: 80px;
    }

    .wo-tips-card {
        padding: 14px 14px;
        border-radius: 8px;
    }
}

/* ---------- Responsive: Large desktop ---------- */
@media (min-width: 769px) {
    .wo-form-body {
        padding: 24px 24px 28px;
        max-width: 100%;
    }
}
