.so-form {
    max-width: 100%;
    overflow-x: auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #1e1e1e;
}

.so-section {
    background: #fff;
    border: 1px solid #e2e2e2;
    border-radius: 10px;
    padding: 28px 32px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.so-section h2 {
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 700;
    color: #061380;
    border-bottom: 3px solid #061380;
    padding-bottom: 10px;
    letter-spacing: 0.3px;
}

.so-hint {
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 16px;
    font-style: italic;
}

.required {
    color: #dc2626;
    font-weight: 700;
    margin-left: 1px;
}

.so-field {
    margin-bottom: 18px;
}

.so-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 13px;
    color: #374151;
    letter-spacing: 0.2px;
}

.so-field input[type="text"],
.so-field input[type="number"],
.so-field select,
.so-field textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fafafa;
}

.so-field input:focus,
.so-field select:focus,
.so-field textarea:focus {
    border-color: #061380;
    outline: none;
    box-shadow: 0 0 0 3px rgba(6, 19, 128, 0.12);
}

.so-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.so-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .so-grid-2,
    .so-grid-3 {
        grid-template-columns: 1fr;
    }

    .so-section {
        padding: 20px 16px;
    }
}

.so-table-wrapper {
    margin-bottom: 16px;
    border: 1px solid #e2e2e2;
    border-radius: 8px;
    overflow: visible;
}

.so-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    min-width: 1200px;
}

.so-table thead th {
    background: #061380;
    color: #ffffff;
    padding: 10px 8px;
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: sticky;
    top: 0;
    z-index: 1;
}

.so-table thead th:first-child {
    border-radius: 7px 0 0 0;
}

.so-table thead th:last-child {
    border-radius: 0 7px 0 0;
}

.so-table td {
    padding: 8px 6px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: top;
    background: #fff;
}

.so-table tbody tr:hover td {
    background: #f7f8ff;
}

.so-table tbody tr:last-child td {
    border-bottom: none;
}

.so-table thead th .required {
    color: #ffc107;
}

.so-table select,
.so-table input {
    width: 100%;
    padding: 6px 8px;
    border: 1.5px solid #d1d5db;
    border-radius: 4px;
    font-size: 12px;
    box-sizing: border-box;
    transition: border-color 0.2s;
    background: #fafafa;
}

.so-table select:focus,
.so-table input:focus {
    border-color: #061380;
    outline: none;
    box-shadow: 0 0 0 2px rgba(6, 19, 128, 0.1);
}

.so-num {
    width: 36px;
    text-align: center;
    font-weight: 700;
    color: #061380;
    font-size: 13px;
}

.so-product-col {
    min-width: 220px;
}

.so-other-col {
    min-width: 110px;
}

.so-product-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 8px center !important;
    padding-right: 24px !important;
}

.so-other-input:disabled {
    background: #f5f5f5;
    color: #aaa;
    cursor: not-allowed;
}

.so-table-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 14px;
}

.so-row-count {
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
}

.so-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
    letter-spacing: 0.3px;
}

.so-btn-primary {
    background: #061380;
    color: #ffffff;
}

.so-btn-primary:hover {
    background: #050d5f;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(6, 19, 128, 0.25);
}

.so-btn-submit {
    background: #0eb40d;
    color: #ffffff;
    font-size: 16px;
    padding: 14px 40px;
    border-radius: 8px;
}

.so-btn-submit:hover {
    background: #0a8f0a;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(14, 180, 13, 0.3);
}

.so-btn-submit:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.so-btn-danger {
    background: #ef4444;
    color: #ffffff;
    padding: 5px 12px;
    font-size: 17px;
    line-height: 1;
    border-radius: 4px;
}

.so-btn-danger:hover {
    background: #dc2626;
}

.so-submit-section {
    text-align: center;
    padding: 28px 0 12px;
}

.so-success {
    background: #ecfdf5;
    border: 2px solid #0eb40d;
    border-radius: 12px;
    padding: 40px 32px;
    text-align: center;
    max-width: 580px;
    margin: 40px auto;
}

.so-success h2 {
    color: #065f46;
    margin: 0 0 12px 0;
    font-size: 22px;
}

.so-success p {
    color: #374151;
    font-size: 15px;
}

.so-success a {
    color: #0eb40d;
    font-weight: 600;
    text-decoration: none;
}

.so-success a:hover {
    text-decoration: underline;
}

.so-error {
    background: #fef2f2;
    border: 2px solid #ef4444;
    border-radius: 10px;
    padding: 20px 28px;
    color: #991b1b;
    max-width: 580px;
    margin: 40px auto;
    font-size: 14px;
}

.so-error a {
    color: #dc2626;
    font-weight: 600;
}

::-webkit-scrollbar {
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}
