/* public_work_order.css - 客户公开工单页面样式 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f1f5f9;
    color: #1e293b;
    line-height: 1.5;
    padding: 20px 10px;
}

.public-wo-wrapper {
    max-width: 900px;
    margin: 0 auto;
}

/* Header */
.public-wo-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #ffffff;
    border-radius: 16px;
    padding: 24px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.2);
    margin-bottom: 20px;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.brand-logo-icon {
    font-size: 2.2rem;
    background: rgba(255, 255, 255, 0.1);
    width: 54px;
    height: 54px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-text h1 {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.brand-text p {
    font-size: 0.85rem;
    color: #94a3b8;
    margin-top: 2px;
}

.header-badge {
    background: rgba(37, 99, 235, 0.3);
    border: 1px solid #3b82f6;
    color: #60a5fa;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 20px;
}

/* Nav Tabs */
.public-wo-nav {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.nav-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #64748b;
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-tab:hover {
    border-color: #94a3b8;
    color: #1e293b;
}

.nav-tab.active {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

/* Tab Panels */
.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

.panel-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

.panel-header {
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 16px;
    margin-bottom: 24px;
}

.panel-header h2 {
    font-size: 1.25rem;
    color: #0f172a;
    font-weight: 700;
}

.panel-header p {
    font-size: 0.88rem;
    color: #64748b;
    margin-top: 4px;
}

/* Form Styles */
.wo-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-row {
    display: flex;
    gap: 16px;
}

.form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #334155;
}

.required {
    color: #ef4444;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    font-size: 0.9rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
    color: #0f172a;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2563eb;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.form-hint {
    font-size: 0.75rem;
    color: #94a3b8;
}

.form-actions {
    margin-top: 10px;
}

.btn-submit {
    width: 100%;
    background: #2563eb;
    color: #ffffff;
    border: none;
    padding: 14px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s;
}

.btn-submit:hover {
    background: #1d4ed8;
}

/* Success Card */
.success-card {
    text-align: center;
    padding: 30px 20px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    margin-top: 20px;
}

.success-icon {
    font-size: 3rem;
    color: #16a34a;
    margin-bottom: 10px;
}

.success-card h3 {
    font-size: 1.3rem;
    color: #15803d;
    margin-bottom: 8px;
}

.success-card p {
    font-size: 0.9rem;
    color: #374151;
}

.ticket-number-box {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: #ffffff;
    border: 2px dashed #22c55e;
    padding: 10px 20px;
    border-radius: 10px;
    margin: 16px 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #15803d;
    letter-spacing: 1px;
}

.btn-copy {
    background: #dcfce7;
    border: 1px solid #86efac;
    color: #166534;
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

.btn-copy:hover {
    background: #bbf7d0;
}

.success-tip {
    font-size: 0.82rem;
    color: #4b5563;
    max-width: 500px;
    margin: 0 auto 20px;
}

.btn-track {
    background: #16a34a;
    color: #ffffff;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
}

.btn-track:hover {
    background: #15803d;
}

/* Query Form & Result */
.query-form {
    margin-bottom: 24px;
}

.search-input-wrap {
    display: flex;
    align-items: center;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 4px 6px 4px 14px;
    gap: 10px;
}

.search-icon {
    color: #94a3b8;
    width: 20px;
    height: 20px;
}

.search-input-wrap input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 1rem;
    padding: 10px 0;
}

.search-input-wrap input:focus {
    outline: none;
}

.btn-query {
    background: #2563eb;
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
}

.btn-query:hover {
    background: #1d4ed8;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 50px 20px;
    color: #94a3b8;
}

.empty-state i {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
}

/* Work Order Ticket Result View */
.wo-result-card {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    background: #ffffff;
    margin-bottom: 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.wo-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 12px;
    margin-bottom: 14px;
}

.wo-result-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
}

.wo-ticket-tag {
    font-size: 0.78rem;
    font-family: monospace;
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 4px;
    color: #475569;
    margin-left: 8px;
}

.wo-status-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-PENDING { background: #fef3c7; color: #b45309; }
.status-PROCESSING { background: #dbeafe; color: #1d4ed8; }
.status-RESOLVED { background: #dcfce7; color: #15803d; }
.status-CLOSED { background: #f1f5f9; color: #64748b; }
.status-REJECTED { background: #fee2e2; color: #b91c1c; }

.wo-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    background: #f8fafc;
    padding: 12px;
    border-radius: 8px;
    font-size: 0.82rem;
    color: #475569;
    margin-bottom: 14px;
}

.wo-desc-box {
    font-size: 0.88rem;
    color: #334155;
    line-height: 1.6;
    margin-bottom: 16px;
    background: #fafafa;
    padding: 12px;
    border-radius: 8px;
    border-left: 3px solid #cbd5e1;
}

/* Timeline */
.timeline-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.wo-timeline {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
    padding-left: 20px;
}

.wo-timeline::before {
    content: "";
    position: absolute;
    left: 7px;
    top: 4px;
    bottom: 4px;
    width: 2px;
    background: #e2e8f0;
}

.timeline-item {
    position: relative;
}

.timeline-item::before {
    content: "";
    position: absolute;
    left: -17px;
    top: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #2563eb;
    border: 2px solid #ffffff;
    box-shadow: 0 0 0 2px #dbeafe;
}

.timeline-item-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 2px;
}

.timeline-operator {
    font-weight: 600;
    color: #1e293b;
}

.timeline-remark {
    font-size: 0.85rem;
    color: #334155;
    background: #f8fafc;
    padding: 8px 12px;
    border-radius: 6px;
    margin-top: 4px;
    border: 1px solid #f1f5f9;
}

/* Footer */
.public-wo-footer {
    text-align: center;
    font-size: 0.8rem;
    color: #94a3b8;
    margin-top: 30px;
    padding-bottom: 20px;
}

@media (max-width: 640px) {
    .form-row { flex-direction: column; gap: 14px; }
    .wo-meta-grid { grid-template-columns: 1fr; }
}
