/* ============================================================
   ENHANCED FORM STYLES (Reference: edit-rental.php)
   Shared across all admin pages for consistent form/card UI
   ============================================================ */

/* --- Form Sections --- */
.form-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 28px;
    margin-bottom: 28px;
    border-left: 6px solid #071d3a;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: all 0.3s ease;
}

.form-section:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border-left-color: #c9952e;
}

.form-section-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 22px;
    color: #071d3a;
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 16px;
    border-bottom: 3px solid #e2e8f0;
}

.form-section-title i {
    font-size: 1.5rem;
    color: #071d3a;
    background: rgba(201, 149, 46, 0.1);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

/* --- Form Groups (Enhanced) --- */
.form-group-enhanced {
    margin-bottom: 18px;
}

.form-group-enhanced label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #132033;
    font-size: 0.95rem;
    text-transform: capitalize;
}

.form-group-enhanced input,
.form-group-enhanced select,
.form-group-enhanced textarea {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background: white;
}

.form-group-enhanced input:focus,
.form-group-enhanced select:focus,
.form-group-enhanced textarea:focus {
    outline: none;
    border-color: #071d3a;
    box-shadow: 0 0 0 3px rgba(7, 29, 58, 0.1);
    background: #ffffff;
}

/* --- Form Rows (Enhanced) --- */
.form-row-enhanced {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.form-row-enhanced .form-group-enhanced {
    margin-bottom: 0;
}

/* --- Checkbox Group --- */
.checkbox-group {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    padding: 15px;
    background: rgba(7, 29, 58, 0.03);
    border-radius: 8px;
    margin-bottom: 18px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 600;
    color: #132033;
    margin: 0;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #071d3a;
}

/* --- Enhanced Submit Button --- */
.btn-submit-enhanced {
    background: linear-gradient(135deg, #071d3a 0%, #0b2a4f 100%);
    color: white;
    padding: 16px 32px;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(7, 29, 58, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-submit-enhanced:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(7, 29, 58, 0.3);
    background: linear-gradient(135deg, #0b2a4f 0%, #132a5f 100%);
}

.btn-submit-enhanced:active {
    transform: translateY(0);
}

/* --- Image Manager --- */
.image-manager {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.image-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #ddd;
}

.image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.btn-delete-img {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #ef4444;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 0.8rem;
}

.image-preview-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.image-preview-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

/* --- File Error --- */
.file-error {
    color: #c53030;
    font-size: 0.85rem;
    margin-top: 5px;
    display: none;
}

/* --- Pricing Sections --- */
.pricing-section {
    display: none;
}

.pricing-section.active {
    display: block;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .form-section {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .form-section-title {
        font-size: 1.2rem;
        margin-bottom: 18px;
        padding-bottom: 12px;
    }
    
    .form-row-enhanced {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .checkbox-group {
        flex-direction: column;
        gap: 12px;
    }
}

/* ============================================================
   ENHANCED CARD STYLES (applied to all .card in admin)
   ============================================================ */

/* Override admin-template.css .card for better consistency */
.card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    margin-bottom: 30px;
    width: 100%;
    flex: 1;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.card-header h2 {
    font-size: 1.3rem;
    color: var(--primary-color);
}

/* --- Section Title (for cards that don't use form-section) --- */
.section-title-enhanced {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 22px;
    color: #071d3a;
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 16px;
    border-bottom: 3px solid #e2e8f0;
}

.section-title-enhanced i {
    font-size: 1.5rem;
    color: #071d3a;
    background: rgba(201, 149, 46, 0.1);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

/* --- Enhanced Form Group (backward compatible) --- */
.card .form-group-enhanced {
    margin-bottom: 18px;
}

.card .form-group-enhanced label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #132033;
    font-size: 0.95rem;
    text-transform: capitalize;
}

.card .form-group-enhanced input,
.card .form-group-enhanced select,
.card .form-group-enhanced textarea {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background: white;
}

.card .form-group-enhanced input:focus,
.card .form-group-enhanced select:focus,
.card .form-group-enhanced textarea:focus {
    outline: none;
    border-color: #071d3a;
    box-shadow: 0 0 0 3px rgba(7, 29, 58, 0.1);
    background: #ffffff;
}

/* --- Enhanced Form Row (backward compatible) --- */
.card .form-row-enhanced {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.card .form-row-enhanced .form-group-enhanced {
    margin-bottom: 0;
}

/* --- Modal Overlay --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    transform: translateY(20px);
    transition: all 0.3s ease;
    border: none;
}

.modal-content h3 {
    margin-top: 0;
}

.modal-body p strong {
    color: var(--primary-color);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h3 {
    font-size: 1.25rem;
    color: var(--primary-color);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
}

/* --- File Upload Design --- */
.file-upload-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 20px;
}

.file-upload-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.file-upload-design {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    border: 2px dashed var(--border);
    border-radius: 12px;
    background: #f8fafc;
    transition: all 0.3s ease;
}

.file-upload-wrapper:hover .file-upload-design {
    border-color: var(--accent-color);
    background: #fff;
}

.file-upload-design i {
    font-size: 2rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.file-upload-design p {
    font-weight: 500;
    color: var(--text-dark);
}

.file-upload-design .browse-btn {
    margin-top: 10px;
    color: var(--accent-color);
    font-weight: 600;
}

/* --- Date Input Polish --- */
input[type="date"], input[type="time"] {
    appearance: none;
    -webkit-appearance: none;
    background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23718096' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E") no-repeat right 15px center;
    background-size: 18px;
}

/* --- Scrollbar Polish --- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* --- Status Badges --- */
.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
}

.status-available { background: #e6fffa; color: #319795; }
.status-reserved { background: #fef5e7; color: #d68910; }
.status-sold, .status-sold-out { background: #fff5f5; color: #c53030; }
.status-for-lease { background: #e8f4f8; color: #1e7e8f; }
.status-pending { background: #fffaf0; color: #dd6b20; }
.status-contacted { background: #ebf8ff; color: #3182ce; }
.status-closed { background: #f0fff4; color: #38a169; }
.status-featured { background: #fef9e7; color: #c9952e; }
.status-promo { background: #fce4ec; color: #c2185b; }

/* --- Action Buttons --- */
.action-btns {
    display: flex;
    gap: 12px;
}

.action-btns a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1.1rem;
    transition: 0.3s;
}

.action-btns a:hover {
    color: var(--accent-color);
}

.btn-edit { color: #4299e1; }
.btn-delete { color: #f56565; }

/* --- Buttons --- */
.btn-add {
    background: var(--accent-color);
    color: white;
    padding: 12px 24px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: 0.3s;
    border: none;
    cursor: pointer;
}

.btn-add:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255,107,0,0.2);
}

.btn-primary {
    background: var(--accent-color);
    color: white;
    padding: 12px 24px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: 0.3s;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(201, 149, 46, 0.2);
}

/* --- Alert/Message Boxes --- */
.success-alert {
    background: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    border-left: 4px solid #28a745;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.error-alert {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    border-left: 4px solid #dc3545;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.info-alert {
    background: #d1ecf1;
    color: #0c5460;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    border-left: 4px solid #17a2b8;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.warning-alert {
    background: #fff3cd;
    color: #856404;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    border-left: 4px solid #ffc107;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* --- Back Button --- */
.btn-back {
    background: #718096;
    color: white;
    padding: 12px 24px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: 0.3s;
    border: none;
    cursor: pointer;
}

.btn-back:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(113, 128, 150, 0.2);
}
