/* Reset defaults */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Form container styling */
.form-container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 8px;
}

/* Row styling for form fields */
.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
    justify-content: space-between; /* Distribute space evenly */
}

/* Column styling for each form group */
.form-column {
    flex: 1 0 300px; /* Increased base width to 300px */
    max-width: 300px; /* Ensure no column exceeds this width */
}

/* Label styling */
.form-label {
    margin-bottom: 5px;
    font-weight: 600;
    display: block;
    color: #495057;
}

/* Standardize inputs, selects, and display divs with fixed width and height */
.form-input,
.form-select,
.form-display {
    width: 300px; /* Increased width to 300px for less congestion */
    height: 65px; /* Consistent height for all input fields */
    padding: 8px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 15px;
    background: #fff;
    box-sizing: border-box;
    line-height: 24px; /* Ensure consistent vertical alignment of text */
}

/* Ensure dropdowns match input height */
.form-select {
    appearance: none; /* Remove default browser styling */
    -webkit-appearance: none;
    -moz-appearance: none;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24"><path fill="currentColor" d="M7 10l5 5 5-5z"/></svg>') no-repeat right 10px center;
    background-color: #fff;
    cursor: pointer;
}

/* Ensure display divs handle long text */
.form-display {
    display: flex;
    align-items: center;
    word-break: break-all; /* Break long words to prevent overflow */
    overflow-wrap: break-word; /* Allow word wrapping for long content */
}

/* Input fields (including readonly) */
.form-input {
    border: 1px solid #ced4da;
    background: #fff;
}

.form-input[readonly] {
    background: #e9ecef;
    color: #495057;
    cursor: not-allowed;
}

/* Button group styling - Moved to right */
.button-group {
    display: flex;
    justify-content: flex-end; /* Align to the right */
    gap: 20px;
    margin-top: 35px;
}

/* Theme button styling */


/* Cancel button styling */
.cancel-btn {
    padding: 12px 40px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
    transition: background 0.3s;
}

.cancel-btn:hover {
    background: #c82333;
}

/* Table styling */
.table-container {
    width: 100%;

    border-collapse: collapse;
    margin-top: 20px;
}

.table-container th,
.table-container td {
    border: 1px solid #ccc;
    padding: 8px;
    text-align: left;
}

.table-container th {
    background: #e9ecef;
}

.table-container tr {
    cursor: pointer;
}

.table-container tr:hover {
    background: #f1f1f1;
}

/* Error message styling */
.error-message {
    color: #dc3545;
    text-align: center;
    padding: 20px;
    background: #fff5f5;
    border-radius: 8px;
    margin: 20px;
    border: 1px solid #ffd6d6;
}

.attachments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding: 10px;
    background-color: #f4f4f4;
    border-radius: 5px;
}

.attachments-list {
    margin-top: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
}

.attachment-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #e0e0e0;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.attachment-item:hover {
    background-color: #f0f0f0;
}

.attachment-icon {
    margin-right: 10px;
    font-size: 20px;
}

.attachment-name {
    flex-grow: 1;
    font-weight: bold;
}

.attachment-date {
    color: #666;
    font-size: 0.8em;
}

