/* Enhanced Form Styles */
.form-control,
.form-select {
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    background-color: #ffffff;
}

.form-control:focus,
.form-select:focus {
    border-color: #0c6f4a;
    box-shadow: 0 0 0 0.25rem rgba(12, 111, 74, 0.15);
    background-color: #ffffff;
    outline: none;
}

.form-control:hover,
.form-select:hover {
    border-color: #9ca3af;
}

.form-label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.form-label .text-danger {
    font-size: 1.1rem;
    margin-left: 0.25rem;
}

/* Input Groups */
.input-group {
    border-radius: 10px;
    overflow: hidden;
}

.input-group .form-control {
    border-radius: 0;
    border-left: none;
    border-right: none;
}

.input-group .btn {
    border-radius: 0;
    border: 2px solid #e5e7eb;
    background-color: #f9fafb;
    color: #374151;
    transition: all 0.3s ease;
}

.input-group .btn:hover {
    background-color: #0c6f4a;
    color: white;
    border-color: #0c6f4a;
}

.input-group .btn:first-child {
    border-left: 2px solid #e5e7eb;
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
}

.input-group .btn:last-child {
    border-right: 2px solid #e5e7eb;
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
}

/* Textarea */
textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* Select Dropdown */
.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    padding-right: 2.5rem;
}

.form-select:focus {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%230c6f4a' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
}

/* Form Cards */
.card {
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 2px solid #e5e7eb;
    padding: 1.25rem 1.5rem;
    font-weight: 600;
}

.card-header.bg-primary,
.card-header.bg-success,
.card-header.bg-light {
    border-bottom: none;
}

.card-body {
    padding: 1.5rem;
}

/* Enhanced Table Styles */
.table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    margin-bottom: 0;
}

.table thead th {
    background: linear-gradient(135deg, #0c6f4a 0%, #06422b 100%);
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    padding: 1rem;
    border: none;
    vertical-align: middle;
}

.table thead th:first-child {
    border-top-left-radius: 10px;
}

.table thead th:last-child {
    border-top-right-radius: 10px;
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
    border-top: 1px solid #e5e7eb;
    background-color: #ffffff;
}

.table tbody tr {
    transition: all 0.3s ease;
}

.table tbody tr:hover {
    background-color: #f9fafb;
    transform: scale(1.01);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.table tbody tr:last-child td:first-child {
    border-bottom-left-radius: 10px;
}

.table tbody tr:last-child td:last-child {
    border-bottom-right-radius: 10px;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: #f9fafb;
}

.table-striped tbody tr:nth-of-type(odd):hover {
    background-color: #f3f4f6;
}

/* Badge in Tables */
.table .badge {
    padding: 0.4rem 0.75rem;
    font-weight: 500;
    font-size: 0.8rem;
    border-radius: 6px;
}

/* Action Buttons in Tables */
.table .btn {
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
    border-radius: 6px;
    margin: 0 0.15rem;
}

/* Responsive Tables */
@media (max-width: 768px) {
    .table {
        font-size: 0.85rem;
    }
    
    .table thead th,
    .table tbody td {
        padding: 0.75rem 0.5rem;
    }
    
    .table .btn {
        padding: 0.3rem 0.5rem;
        font-size: 0.75rem;
    }
}

/* Form Validation Styles */
.is-invalid {
    border-color: #dc3545 !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath d='m5.8 3.6 .4.4.4-.4m0 4.8-.4-.4-.4.4'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
    padding-right: calc(1.5em + 0.75rem);
}

.is-valid {
    border-color: #198754 !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73L.6 4.53l1.4-1.4 1.3 1.3 3.4-3.4 1.4 1.4-4.8 4.8z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
    padding-right: calc(1.5em + 0.75rem);
}

.invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #dc3545;
    font-weight: 500;
}

.valid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #198754;
    font-weight: 500;
}

/* Floating Labels Effect */
.form-floating {
    position: relative;
}

.form-floating > .form-control,
.form-floating > .form-select {
    height: calc(3.5rem + 2px);
    padding: 1rem 0.75rem;
}

.form-floating > label {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    padding: 1rem 0.75rem;
    pointer-events: none;
    border: 2px solid transparent;
    transform-origin: 0 0;
    transition: opacity 0.1s ease-in-out, transform 0.1s ease-in-out;
    color: #6b7280;
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label,
.form-floating > .form-select ~ label {
    opacity: 0.65;
    transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
    color: #0c6f4a;
    font-weight: 600;
}

/* Checkbox and Radio Styles */
.form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0.125rem;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.form-check-input:checked {
    background-color: #0c6f4a;
    border-color: #0c6f4a;
}

.form-check-input:focus {
    border-color: #0c6f4a;
    box-shadow: 0 0 0 0.25rem rgba(12, 111, 74, 0.25);
}

.form-check-label {
    margin-left: 0.5rem;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
}

/* File Input */
.form-control[type="file"] {
    padding: 0.5rem;
}

.form-control[type="file"]::-webkit-file-upload-button {
    padding: 0.5rem 1rem;
    margin-right: 1rem;
    background-color: #0c6f4a;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.form-control[type="file"]::-webkit-file-upload-button:hover {
    background-color: #06422b;
}

/* Range Input */
.form-range {
    height: 1.5rem;
}

.form-range::-webkit-slider-thumb {
    width: 1.25rem;
    height: 1.25rem;
    background-color: #0c6f4a;
    border: none;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.form-range::-webkit-slider-thumb:hover {
    background-color: #06422b;
    transform: scale(1.2);
}

.form-range::-moz-range-thumb {
    width: 1.25rem;
    height: 1.25rem;
    background-color: #0c6f4a;
    border: none;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.form-range::-moz-range-thumb:hover {
    background-color: #06422b;
    transform: scale(1.2);
}

/* Loading States */
.form-control:disabled,
.form-select:disabled {
    background-color: #f3f4f6;
    opacity: 0.6;
    cursor: not-allowed;
}

/* Form Groups */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group:last-child {
    margin-bottom: 0;
}

/* Input Icons */
.input-icon-wrapper {
    position: relative;
}

.input-icon-wrapper .form-control {
    padding-left: 2.5rem;
}

.input-icon-wrapper .input-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    pointer-events: none;
}

.input-icon-wrapper .form-control:focus ~ .input-icon {
    color: #0c6f4a;
}

