/* Form Styles - Unified across all pages */

/* Form Groups */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.form-group label i {
    color: #6b7280;
    font-size: 14px;
}

/* Form Controls */
.form-control,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="url"],
textarea,
select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
    background: white;
    color: #374151;
}

.form-control:focus,
input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #0F1926;
    box-shadow: 0 0 0 3px rgba(15, 25, 38, 0.1);
}

.form-control:disabled,
input:disabled,
textarea:disabled,
select:disabled {
    background: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
}

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

/* Select */
select {
    appearance: none;
    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='%236b7280' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

/* Form Text */
.form-text {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 6px;
    display: block;
}

/* Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

/* Form Validation States */
.form-control.is-invalid,
input.is-invalid,
textarea.is-invalid,
select.is-invalid {
    border-color: #ef4444;
}

.form-control.is-invalid:focus,
input.is-invalid:focus,
textarea.is-invalid:focus,
select.is-invalid:focus {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-control.is-valid,
input.is-valid,
textarea.is-valid,
select.is-valid {
    border-color: #10b981;
}

.form-control.is-valid:focus,
input.is-valid:focus,
textarea.is-valid:focus,
select.is-valid:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.invalid-feedback {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #ef4444;
}

.valid-feedback {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #10b981;
}

/* Input Groups */
.input-group {
    display: flex;
    gap: 8px;
    align-items: center;
}

.input-group .form-control {
    flex: 1;
}

.input-group-text {
    padding: 10px 14px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    color: #6b7280;
}

/* Checkboxes and Radios */
.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.form-check-input {
    width: 18px;
    height: 18px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.form-check-input:checked {
    background-color: #0F1926;
    border-color: #0F1926;
}

.form-check-input[type="radio"] {
    border-radius: 50%;
}

.form-check-label {
    font-size: 14px;
    color: #374151;
    cursor: pointer;
}

/* Switch */
.form-switch .form-check-input {
    width: 40px;
    height: 22px;
    border-radius: 11px;
    position: relative;
    background-color: #d1d5db;
    border: none;
    transition: background-color 0.2s;
}

.form-switch .form-check-input:checked {
    background-color: #0F1926;
}

.form-switch .form-check-input::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    transition: transform 0.2s;
}

.form-switch .form-check-input:checked::after {
    transform: translateX(18px);
}

/* File Input */
input[type="file"] {
    padding: 8px 12px;
    font-size: 13px;
}

input[type="file"]::file-selector-button {
    padding: 6px 12px;
    margin-right: 12px;
    background: #0F1926;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.2s;
}

input[type="file"]::file-selector-button:hover {
    background: #1a2d3d;
}

/* Required Indicator */
.form-group label .required {
    color: #ef4444;
    margin-left: 2px;
}

/* Form Sections */
.form-section {
    margin-bottom: 24px;
    padding: 20px;
    background: #f9fafb;
    border-radius: 8px;
}

.form-section h3,
.form-section h4 {
    font-size: 18px;
    font-weight: 600;
    color: #0F1926;
    margin-bottom: 16px;
}

/* Responsive */
@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .input-group {
        flex-direction: column;
        align-items: stretch;
    }
}