/* Vertalia CRM Custom Styles */

:root {
    --primary-color: #4f46e5;
    --primary-light: #6366f1;
    --primary-dark: #3730a3;
    --secondary-color: #6b7280;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --light-color: #f9fafb;
    --dark-color: #111827;
    --sidebar-width: 280px;
    --border-radius: 12px;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #ffffff;
    min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    background: #ffffff;
    border-right: 1px solid #e5e7eb;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    width: var(--sidebar-width);
    overflow-y: auto;
}

.sidebar-brand {
    padding: 1.5rem;
    border-bottom: 1px solid #e3e6f0;
}

.sidebar-brand h4 {
    margin: 0;
    color: var(--dark-color);
    font-weight: 600;
}

.sidebar .nav-link {
    display: flex;
    align-items: center;
    padding: 0.875rem 1.5rem;
    margin: 0.25rem 1rem;
    color: #6b7280;
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: var(--border-radius);
    font-weight: 500;
    position: relative;
}

.sidebar .nav-link i {
    width: 20px;
    margin-right: 0.75rem;
    text-align: center;
    font-size: 1.1em;
}

.sidebar .nav-link:hover {
    color: var(--primary-color);
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1) 0%, rgba(99, 102, 241, 0.1) 100%);
    transform: translateX(4px);
}

.sidebar .nav-link.active {
    color: var(--primary-color);
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.15) 0%, rgba(99, 102, 241, 0.15) 100%);
    font-weight: 600;
    border: 1px solid rgba(79, 70, 229, 0.2);
}

/* Main Content */
main {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    padding: 2rem;
    background: #ffffff;
    width: calc(100% - var(--sidebar-width));
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    main {
        margin-left: 0;
        width: 100%;
        padding: 1rem;
    }
}

/* Cards */
.card {
    border: 1px solid #e5e7eb;
    border-radius: var(--border-radius);
    background: #ffffff;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card-header {
    background: rgba(255, 255, 255, 0.8);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    font-weight: 600;
    backdrop-filter: blur(10px);
}

/* Property Cards */
.property-card {
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.property-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.05) 0%, rgba(99, 102, 241, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.property-card:hover::before {
    opacity: 1;
}

.property-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.property-card .card-img-top {
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    transition: all 0.4s ease;
    height: 200px;
    object-fit: cover;
}

.property-card:hover .card-img-top {
    transform: scale(1.1);
}

.property-card .card-body {
    position: relative;
    z-index: 2;
}

/* Badges */
.badge {
    font-weight: 500;
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
}

/* Buttons */
.btn {
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-primary {
    background-color: var(--primary-color);
    border: none;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
}

/* Forms */
.form-control, .form-select {
    border-radius: 0.375rem;
    border: 1.5px solid #e2e8f0;
    transition: all 0.2s;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

/* Modal */
.modal {
    z-index: 1055;
}

.modal-backdrop {
    z-index: 1050;
}

.modal-content {
    border: none;
    border-radius: 1rem;
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175);
    background-color: #ffffff;
}

.modal-header {
    border-bottom: 1px solid #e3e6f0;
    background-color: #f8f9fa;
    border-radius: 1rem 1rem 0 0;
}

.modal-title {
    font-weight: 600;
    color: var(--dark-color);
}

.modal-body {
    background-color: #ffffff;
}

/* Toast */
.toast {
    border-radius: 0.5rem;
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.toast-header {
    background-color: #fff;
    border-bottom: 1px solid #e3e6f0;
}

/* Pagination */
.pagination .page-link {
    border-radius: 0.375rem;
    margin: 0 2px;
    border: 1px solid #e2e8f0;
    color: var(--dark-color);
    transition: all 0.2s;
}

.pagination .page-link:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Loading States */
.loading {
    position: relative;
}

.loading::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .card-columns {
        column-count: 1;
    }
    
    .btn-toolbar .btn {
        margin-bottom: 0.5rem;
    }
    
    .modal-dialog {
        margin: 1rem 0.5rem;
    }
}

/* Empty states */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.empty-state h5 {
    margin-bottom: 0.5rem;
    color: #495057;
}

/* File upload preview */
.file-preview {
    margin-top: 1rem;
}

.file-preview img {
    max-width: 200px;
    max-height: 200px;
    object-fit: cover;
    border-radius: 0.375rem;
    border: 2px solid #e2e8f0;
}

/* Search and filters */
.search-filters {
    background: white;
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

/* Status indicators */
.status-active {
    background-color: #d4edda;
    color: #155724;
}

.status-inactive {
    background-color: #fff3cd;
    color: #856404;
}

/* Price display */
.price-display {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

.price-suffix {
    font-size: 0.875rem;
    font-weight: 400;
    color: #6c757d;
}

/* Amenities display */
.amenity-tag {
    display: inline-block;
    background-color: #e9ecef;
    color: #495057;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    margin: 0.125rem;
}

/* Page header */
.page-header {
    border-bottom: 1px solid #e3e6f0;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
}

.page-header h1 {
    margin: 0;
    font-weight: 600;
    color: var(--dark-color);
}

/* Utility classes */
.text-primary-light {
    color: #6c84ff !important;
}

.bg-primary-light {
    background-color: #f0f3ff !important;
}

.shadow-sm-hover:hover {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}
