.eocm-edit-order-wrap {
    max-width: 900px;
    margin: 0 auto;
}

.eocm-edit-order-wrap h2 {
    margin-bottom: 1.5em;
    padding-bottom: 0.5em;
    border-bottom: 2px solid #eee;
}

.eocm-section {
    margin-bottom: 2em;
    padding: 1.5em;
    background: #fafafa;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
}

.eocm-section h3 {
    margin: 0 0 1em;
    padding-bottom: 0.5em;
    border-bottom: 1px solid #ddd;
    font-size: 1.2em;
}

.eocm-section h4 {
    margin: 1em 0 0.5em;
    font-size: 1.05em;
}

.eocm-fields-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1em;
}

@media (max-width: 600px) {
    .eocm-fields-grid {
        grid-template-columns: 1fr;
    }
}

.eocm-field {
    display: flex;
    flex-direction: column;
}

.eocm-field label {
    font-weight: 600;
    margin-bottom: 0.3em;
    font-size: 0.9em;
}

.eocm-field label .required {
    color: #e2401c;
}

.eocm-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 0.95em;
    box-sizing: border-box;
}

.eocm-input:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 0 1px #0073aa;
}

.eocm-textarea {
    resize: vertical;
    min-height: 80px;
}

.eocm-items-table {
    width: 100%;
    border-collapse: collapse;
}

.eocm-items-table th,
.eocm-items-table td {
    padding: 10px;
    text-align: left;
    vertical-align: middle;
    border-bottom: 1px solid #eee;
}

.eocm-items-table thead th {
    background: #f5f5f5;
    font-weight: 600;
    font-size: 0.9em;
}

.eocm-col-thumb {
    width: 60px;
}

.eocm-product-thumb img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 3px;
}

.eocm-col-qty {
    width: 80px;
}

.eocm-qty-input {
    width: 70px;
    padding: 6px 8px;
    text-align: center;
    border: 1px solid #ccc;
    border-radius: 3px;
}

.eocm-col-actions {
    width: 50px;
    text-align: center;
}

.eocm-remove-item {
    color: #a00 !important;
    border-color: #a00 !important;
    font-size: 1.2em;
    line-height: 1;
    padding: 4px 10px !important;
    cursor: pointer;
}

.eocm-remove-item:hover {
    background: #a00 !important;
    color: #fff !important;
}

.eocm-item-meta {
    margin: 0.5em 0 0;
    font-size: 0.85em;
    color: #666;
}

.eocm-item-meta dt {
    display: inline;
    font-weight: 600;
}

.eocm-item-meta dd {
    display: inline;
    margin: 0 1em 0 0;
}

.eocm-item-row.eocm-item-removed {
    opacity: 0.4;
    text-decoration: line-through;
}

.eocm-add-product-wrap {
    margin-top: 1.5em;
    padding-top: 1em;
    border-top: 1px solid #ddd;
}

.eocm-add-product-row {
    position: relative;
    max-width: 400px;
}

#eocm-product-search {
    width: 100%;
}

.eocm-search-results {
    position: absolute;
    z-index: 100;
    width: 100%;
    max-height: 300px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #ccc;
    border-top: none;
    border-radius: 0 0 3px 3px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.eocm-search-result-item {
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.9em;
}

.eocm-search-result-item:hover {
    background: #f0f7ff;
}

.eocm-search-result-item:last-child {
    border-bottom: none;
}

.eocm-remove-new-product {
    color: #a00 !important;
    border-color: #a00 !important;
    cursor: pointer;
}

.eocm-remove-new-product:hover {
    background: #a00 !important;
    color: #fff !important;
}

.eocm-summary-table {
    width: 100%;
    max-width: 300px;
    margin-left: auto;
}

.eocm-summary-table th,
.eocm-summary-table td {
    padding: 6px 0;
}

.eocm-summary-table th {
    text-align: left;
    font-weight: 600;
}

.eocm-summary-table td {
    text-align: right;
}

.eocm-total-row {
    border-top: 2px solid #333;
}

.eocm-total-row td {
    font-size: 1.1em;
}

.eocm-recalc-note {
    text-align: right;
    font-size: 0.85em;
    color: #666;
    margin-top: 0.5em;
}

.eocm-actions {
    display: flex;
    gap: 1em;
    justify-content: flex-end;
    margin-top: 1.5em;
    padding-top: 1.5em;
    border-top: 2px solid #eee;
}

.eocm-save-btn {
    min-width: 160px;
}

.eocm-cancel-btn {
    min-width: 100px;
    text-align: center;
}

.eocm-notice-area .eocm-notice {
    padding: 12px 16px;
    margin-bottom: 1em;
    border-radius: 4px;
    font-size: 0.95em;
}

.eocm-notice.eocm-notice-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.eocm-notice.eocm-notice-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.eocm-notice.eocm-notice-info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

.eocm-radio-group,
.eocm-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.4em;
}

.eocm-radio-label,
.eocm-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5em;
    font-weight: normal !important;
    cursor: pointer;
}

.eocm-gf-sub-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5em;
}

.eocm-gf-sub-field label {
    font-size: 0.85em;
    color: #555;
    font-weight: normal;
}

.eocm-file-notice {
    font-style: italic;
    color: #666;
    font-size: 0.9em;
}

.eocm-current-file {
    font-size: 0.85em;
    color: #333;
}

.eocm-edit-order-btn-wrap {
    margin: 1.5em 0;
}

.eocm-edit-order-btn {
    display: inline-block;
    padding: 10px 24px !important;
    font-weight: 600;
}

.eocm-save-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.eocm-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #ccc;
    border-top-color: #333;
    border-radius: 50%;
    animation: eocm-spin 0.6s linear infinite;
    margin-left: 8px;
    vertical-align: middle;
}

@keyframes eocm-spin {
    to { transform: rotate(360deg); }
}

.eocm-gf-locked-field {
    padding: 8px 12px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 3px;
    color: #555;
    font-size: 0.95em;
    cursor: not-allowed;
}

.eocm-gf-locked-field .eocm-gf-price {
    color: #888;
    font-size: 0.9em;
}

.eocm-gf-qty-field {
    width: 90px;
    text-align: center;
}

.eocm-gf-item-total {
    margin-top: 1em;
    padding-top: 0.75em;
    border-top: 1px solid #ddd;
    text-align: right;
    font-size: 1.05em;
}

.eocm-gf-total-value {
    margin-left: 0.5em;
}
