/* ========================
   FORM & CRUD PAGES
======================== */

.form-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.form-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: white;
    padding: 2rem;
    border-radius: 0.75rem;
    margin-bottom: 2rem;
    text-align: center;
}

.form-header h1 {
    color: white;
    margin-bottom: 0.5rem;
}

.form-header p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0;
}

.form-card {
    background: white;
    border-radius: 0.75rem;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.form-section {
    margin-bottom: 2rem;
}

.form-section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.form-section-title i {
    color: #2563eb;
    font-size: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-label.required::after {
    content: " *";
    color: #ef4444;
}

.form-input,
.form-select,
.form-textarea {
    padding: 0.75rem 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-family: var(--font-sans);
    transition: all 250ms ease-in-out;
    background: white;
    color: #0f172a;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: #94a3b8;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: #2563eb;
    background: #f0f9ff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-input.error,
.form-select.error,
.form-textarea.error {
    border-color: #ef4444;
    background: #fef2f2;
}

.form-input.error:focus,
.form-select.error:focus,
.form-textarea.error:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-error {
    font-size: 0.75rem;
    color: #ef4444;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.form-help {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.form-checkbox-group,
.form-radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.form-checkbox,
.form-radio {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.form-checkbox input,
.form-radio input {
    width: 1.25rem;
    height: 1.25rem;
    cursor: pointer;
    accent-color: #2563eb;
}

.form-checkbox label,
.form-radio label {
    cursor: pointer;
    margin: 0;
    font-size: 0.875rem;
    color: #334155;
}

.file-input-wrapper {
    position: relative;
    overflow: hidden;
    display: inline-block;
    width: 100%;
}

.file-input-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 2rem;
    background: #f0f9ff;
    border: 2px dashed #2563eb;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 250ms ease-in-out;
    text-align: center;
}

.file-input-label:hover {
    background: #e0f2fe;
    border-color: #1d4ed8;
}

.file-input-label i {
    font-size: 2rem;
    color: #2563eb;
}

input[type="file"] {
    display: none;
}

.file-list {
    margin-top: 1rem;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    border-left: 4px solid #2563eb;
}

.file-item-name {
    font-size: 0.875rem;
    color: #0f172a;
    font-weight: 500;
}

.file-item-size {
    font-size: 0.75rem;
    color: #64748b;
}

.file-item-remove {
    background: #fee2e2;
    color: #ef4444;
    border: none;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 150ms ease-in-out;
}

.file-item-remove:hover {
    background: #ef4444;
    color: white;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
}

.btn-submit {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 250ms ease-in-out;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px rgba(37, 99, 235, 0.3);
}

.btn-cancel {
    background: #f1f5f9;
    color: #334155;
    padding: 0.75rem 2rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 250ms ease-in-out;
    text-decoration: none;
}

.btn-cancel:hover {
    background: #e2e8f0;
    border-color: #94a3b8;
}

.form-info-box {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-left: 4px solid #2563eb;
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
}

.form-info-box h4 {
    color: #0c4a6e;
    margin-bottom: 0.5rem;
}

.form-info-box p {
    color: #064e7b;
    font-size: 0.875rem;
    margin: 0;
}

.form-warning-box {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border-left: 4px solid #f59e0b;
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
}

.form-warning-box h4 {
    color: #92400e;
    margin-bottom: 0.5rem;
}

.form-warning-box p {
    color: #b45309;
    font-size: 0.875rem;
    margin: 0;
}

/* Create/Edit Page Specific */
.property-create-hero {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: white;
    padding: 2rem;
    border-radius: 0.75rem;
    margin-bottom: 2rem;
    text-align: center;
}

.property-create-hero h1 {
    color: white;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.property-create-hero p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0;
}

/* Delete Page */
.delete-confirmation {
    background: #fee2e2;
    border-left: 4px solid #ef4444;
    padding: 2rem;
    border-radius: 0.75rem;
    margin-bottom: 2rem;
}

.delete-icon {
    font-size: 3rem;
    color: #ef4444;
    margin-bottom: 1rem;
}

.delete-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #991b1b;
    margin-bottom: 1rem;
}

.delete-message {
    color: #7c2d12;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.delete-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.btn-delete {
    background: #ef4444;
    color: white;
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 250ms ease-in-out;
}

.btn-delete:hover {
    background: #dc2626;
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .form-container {
        padding: 1rem;
    }

    .form-card {
        padding: 1.5rem;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions > * {
        width: 100%;
    }

    .delete-actions {
        flex-direction: column;
    }

    .delete-actions > * {
        width: 100%;
    }
}

/* Validation Styles */
.input-valid {
    border-color: #22c55e !important;
    background: #f0fdf4 !important;
}

.input-valid:focus {
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1) !important;
}

/* Success Message */
.success-banner {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-left: 4px solid #10b981;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    color: #065f46;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.success-banner i {
    font-size: 1.25rem;
}
