/* Form Container (Editable View) */
.form-container {
    width: 100%;
    min-height: 297mm;
    height: auto;
    overflow: visible;
    margin: 0 auto;
    background: white;
    padding: 3.5rem;
    box-shadow: 0 0 0.9375rem rgba(0,0,0,0.1);
    box-sizing: border-box;
    display: block;
    position: relative;
    margin-bottom: 1.25rem;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    padding-bottom: 3.125rem;
}

.form-actions {
    margin-top: 30px;
    padding-top: 20px;
    text-align: center;
}

.form-container * {
    box-sizing: border-box;
}

/* Form Styles */
.form-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px dashed #e5e7eb;
}

.section-title {
    font-size: 14px;
    text-transform: uppercase;
    color: #9a3412;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: 0.5px;
}

.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

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

.form-section > .form-group {
    margin-bottom: 12px;
}

.form-section > .form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 6px;
    font-weight: 500;
}

input[type="text"],
input[type="number"],
input[type="date"],
textarea,
select {
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    width: 100%;
}

/* Hide arrow/spinners in number inputs */
input[type=number]::-webkit-inner-spin-button, 
input[type=number]::-webkit-outer-spin-button { 
    -webkit-appearance: none; 
    margin: 0; 
}

input[type=number] {
    -moz-appearance: textfield;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #f97316;
    box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.1);
}

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

.input-sm {
    padding: 6px 8px;
    font-size: 13px;
    width: 100%;
    box-sizing: border-box;
    height: 34px;
}

.date-picker-container {
    width: 280px;
}

.date-picker-container input {
    width: 100%;
}

/* Input Table Styles */
.input-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 12px;
    margin-bottom: 15px;
    table-layout: auto;
}

.input-table th {
    text-align: left;
    padding: 8px;
    background: #f9fafb;
    border-bottom: 2px solid #e5e7eb;
    color: #6b7280;
    font-size: 12px;
    font-weight: 600;
}

.input-table td {
    padding: 12px;
    vertical-align: top;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
    background: #ffffff;
    font-size: 13px;
}

.input-table thead {
    display: none;
}

.input-table tbody tr td + td {
    border-left: none;
}

.input-table tbody tr td:first-child {
    border-radius: 12px 0 0 12px;
    border-left: 1px solid #e5e7eb;
}

.input-table tbody tr td:last-child {
    border-radius: 0 12px 12px 0;
    border-right: 1px solid #e5e7eb;
}

.input-table tbody tr td:not(:last-child) {
    border-right: none;
}

.field-label {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 6px;
    font-weight: 500;
}

.item-label {
    font-size: 13px;
    color: #111827;
    margin-bottom: 8px;
    font-weight: 600;
}

.unit-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    font-size: 13px;
}

.unit-group label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    min-width: 60px;
    height: 28px;
    border: 1px solid #d1d5db;
    background: #f3f4f6;
    color: #374151;
    cursor: pointer;
}

.unit-group input[type="radio"] {
    display: none;
}

.unit-group label:has(input[type="radio"]:checked) {
    background: #111827;
    border-color: #111827;
    color: #ffffff;
}

.input-table td.desc-col { width: 45%; min-width: 360px; }
.input-table td.hsn-col { width: 204px; }
.input-table td.rate-col { width: 120px; }
.input-table td.qty-col { width: 100px; }
.input-table td.unit-col { width: 80px; }
.input-table td.gst-col { width: 100px; }
.input-table td.action-col { width: 40px; text-align: right; }
