/* ========================================
   Beautiful Form Layout Improvements
   Better spacing, no overlap, clean design
   ======================================== */

/* Container Improvements */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--space-4) var(--space-6);
}

/* Remove Extra Spacing */
.card-modern {
    margin-bottom: var(--space-6);
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border-radius: var(--radius-lg);
}

.card-body {
    padding: var(--space-6) !important;
}

/* Fix Text Overlap Issues */
.form-group {
    margin-bottom: var(--space-4);
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: var(--space-2);
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.form-control,
input,
select,
textarea {
    width: 100%;
    min-height: 38px;
    line-height: 1.5;
}

/* Prevent Label Overlap */
.row {
    margin-left: -8px;
    margin-right: -8px;
}

.row>[class*="col-"] {
    padding-left: 8px;
    padding-right: 8px;
}

/* Beautiful Section Headers */
.section-header-beautiful {
    color: #3b82f6;
    font-weight: 600;
    font-size: 1.125rem;
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-3);
    border-bottom: 2px solid #e5e7eb;
    display: flex;
    align-items: center;
}

.section-header-beautiful i {
    margin-right: var(--space-2);
    color: #3b82f6;
}

/* Beautiful Cards */
.card-beautiful {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    margin-bottom: var(--space-4);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.card-beautiful:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

/* Compact Form Layout */
.form-compact .form-group {
    margin-bottom: var(--space-3);
}

.form-compact label {
    font-size: 0.8125rem;
    margin-bottom: var(--space-1);
}

/* Better Input Spacing */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="date"],
input[type="time"],
select,
textarea {
    padding: 0.5rem 0.75rem;
    font-size: 0.9375rem;
}

/* Remove Unnecessary Margins */
.mb-4 {
    margin-bottom: 1rem !important;
}

.mb-3 {
    margin-bottom: 0.75rem !important;
}

/* Rejected Files Button */
.rejected-files-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 50px;
    padding: 14px 24px;
    font-weight: 600;
    font-size: 0.9375rem;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 8px;
}

.rejected-files-btn:hover {
    background: #dc2626;
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.5);
    transform: translateY(-2px);
}

.rejected-files-btn .badge {
    background: white;
    color: #ef4444;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}

/* Rejected Files Modal/Section */
.rejected-files-section {
    background: #fef2f2;
    border: 2px solid #ef4444;
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    margin-top: var(--space-6);
}

.rejected-files-header {
    background: #ef4444;
    color: white;
    padding: var(--space-4);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-4);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.rejected-files-list {
    background: white;
    border-radius: var(--radius-md);
    padding: var(--space-4);
}

.rejected-file-item {
    padding: var(--space-3);
    border-bottom: 1px solid #fee2e2;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.rejected-file-item:last-child {
    border-bottom: none;
}

.rejected-file-item:hover {
    background: #fef2f2;
}

/* Beautiful Reports Layout */
.report-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.report-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-color: #3b82f6;
}

.report-header {
    font-size: 0.875rem;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: var(--space-2);
}

.report-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
}

/* Grid Layout for Forms */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-4);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .container {
        padding: var(--space-3);
    }

    .card-body {
        padding: var(--space-4) !important;
    }

    .rejected-files-btn {
        bottom: 16px;
        right: 16px;
        padding: 12px 20px;
        font-size: 0.875rem;
    }
}