/* Custom styles for RentMan Bootstrap Frontend */

body {
    background-color: #f8f9fa;
}

/* Login Page Styles */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 1rem;
}

.login-container .card {
    max-width: 450px;
    width: 100%;
    border-radius: 1rem;
    border: none;
}

.login-container .card-body {
    padding: 3rem !important;
}

.login-container .display-4 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.login-container .lead {
    margin-bottom: 2rem;
}

.login-container .btn-lg {
    padding: 0.75rem 1.25rem;
    font-size: 1.1rem;
    border-radius: 0.5rem;
}

.login-container .input-group-text {
    background-color: #f8f9fa;
    border-right: none;
    color: #6c757d;
}

.login-container .form-control {
    border-left: none;
    padding-left: 0.5rem;
}

.login-container .form-control:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.login-container .input-group:focus-within .input-group-text {
    border-color: #86b7fe;
    color: #0d6efd;
}

/* Dashboard Styles */
.navbar-brand {
    font-size: 1.5rem;
}

.nav-link {
    border-radius: 0.375rem;
    margin: 0 0.25rem;
    transition: background-color 0.15s ease-in-out;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-link.active {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Dashboard Cards */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: box-shadow 0.15s ease-in-out;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.card-body h3, .card-body h4 {
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.card-title {
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

/* Property Cards */
.property-card {
    margin-bottom: 1.5rem;
}

.property-card .card-header {
    background-color: #fff;
    border-bottom: 1px solid #dee2e6;
    padding: 1rem;
}

.property-card .badge {
    font-size: 0.75em;
}

.property-actions {
    gap: 0.5rem;
}

/* Status badges */
.status-occupied {
    background-color: #198754;
}

.status-vacant {
    background-color: #ffc107;
    color: #000;
}

.status-maintenance {
    background-color: #dc3545;
}

/* Loading spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Coming soon sections */
.content-section .display-1 {
    font-size: 4rem;
    opacity: 0.6;
}

/* Modal enhancements */
.modal-header {
    border-bottom: 1px solid #dee2e6;
    background-color: #f8f9fa;
}

.modal-footer {
    border-top: 1px solid #dee2e6;
    background-color: #f8f9fa;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .login-container .card-body {
        padding: 2rem !important;
    }

    .login-container .display-4 {
        font-size: 2rem;
    }

    .navbar-nav .nav-link {
        margin: 0.25rem 0;
    }

    .card-body h3 {
        font-size: 1.5rem;
    }
}

/* Alert styles */
.alert {
    border-radius: 0.5rem;
    border: none;
}

.alert-success {
    background-color: #d1edff;
    color: #0c5460;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
}

/* Form enhancements */
.form-control:focus,
.form-select:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Button enhancements */
.btn {
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.15s ease-in-out;
}

.btn-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
    transform: translateY(-1px);
}

/* Page transition */
.page {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Chart styling */
.chart-container {
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 0.5rem;
    padding: 1rem;
}

.chart-container canvas {
    border-radius: 0.5rem;
}

/* Chart card header */
.card-header h5 {
    color: #495057;
    font-weight: 600;
}

.card-header .btn-group .btn {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
}

.card-header .btn-group .btn.active {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: white;
}

/* Chart responsive adjustments */
@media (max-width: 768px) {
    .chart-container {
        height: 300px !important;
    }

    .card-header {
        flex-direction: column;
        gap: 1rem;
    }

    .card-header .btn-group {
        align-self: stretch;
    }

    .card-header .btn-group .btn {
        flex: 1;
    }
}

/* Deposit Management Styling */
.deposit-card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.deposit-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.15) !important;
}

.deposit-icon-container {
    transition: transform 0.2s ease-in-out;
}

.deposit-card:hover .deposit-icon-container {
    transform: scale(1.1);
}

.progress {
    overflow: hidden;
    border-radius: 0.5rem;
}

.progress-bar {
    transition: width 0.6s ease;
}

/* Deposit Analysis Card */
.deposit-analysis-indicator {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.7;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Enhanced card shadows */
.card.border-0.shadow-sm {
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.08) !important;
}

.card.border-0.shadow-sm:hover {
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.15) !important;
}

/* Deposit metrics responsive */
@media (max-width: 576px) {
    .deposit-metrics .col-md-6.col-xl-3 {
        margin-bottom: 1rem;
    }
}

/* Trust account overview styling */
.deposit-analysis-card .card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.deposit-summary-item {
    padding: 1rem;
    border-radius: 0.5rem;
    background: rgba(248, 249, 250, 0.5);
    transition: background-color 0.2s ease-in-out;
}

.deposit-summary-item:hover {
    background: rgba(248, 249, 250, 0.8);
}

/* Pie Chart Styling */
.chart-container-pie {
    min-height: 280px;
    position: relative;
}

.chart-container-pie canvas {
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.chart-container-pie:hover canvas {
    transform: scale(1.05);
}

/* Data visualization cards */
.data-viz-card {
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
}

.data-viz-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.15) !important;
}

.data-viz-card .card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.data-viz-card .card-body {
    padding: 1.5rem;
}

/* Chart legend styles */
.chart-legend {
    display: flex;
    justify-content: space-around;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.chart-legend-item {
    text-align: center;
    flex: 1;
}

.chart-legend-item .legend-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 0.5rem;
}

/* Trust account overview enhancements */
.trust-account-overview .card-body {
    background: linear-gradient(135deg, rgba(25, 135, 84, 0.03) 0%, rgba(13, 110, 253, 0.03) 100%);
}

.metric-item {
    transition: transform 0.2s ease;
}

.metric-item:hover {
    transform: scale(1.02);
}

.metric-icon {
    transition: all 0.3s ease;
}

.metric-item:hover .metric-icon {
    transform: scale(1.1);
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.15);
}

/* Responsive pie charts */
@media (max-width: 992px) {
    .chart-container-pie {
        min-height: 250px;
    }

    .chart-container-pie canvas {
        max-width: 200px;
        max-height: 200px;
    }
}

@media (max-width: 768px) {
    .chart-container-pie {
        min-height: 220px;
    }

    .chart-container-pie canvas {
        max-width: 180px;
        max-height: 180px;
    }

    .data-viz-card {
        margin-bottom: 1.5rem;
    }
}

/* Google Maps Autocomplete z-index fix for modals */
.pac-container {
    z-index: 100000 !important;
}

/* Avatar Circle for Tenant Display */
.avatar-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 16px;
    text-transform: uppercase;
    flex-shrink: 0;
}

/* Tenant table hover effects */
#lease-tenants-table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Table responsive improvements */
.table-responsive {
    border-radius: 0.375rem;
}

.table th {
    font-weight: 600;
    font-size: 0.875rem;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
}

.table td {
    vertical-align: middle;
    padding: 0.75rem;
}

/* Tenant Toggle Button Styling */
.btn-outline-success {
    border-color: #28a745;
    color: #28a745;
}

.btn-outline-success:hover {
    background-color: #28a745;
    color: white;
    transform: scale(1.05);
    transition: all 0.2s ease-in-out;
}

.btn-outline-danger {
    border-color: #dc3545;
    color: #dc3545;
}

.btn-outline-danger:hover {
    background-color: #dc3545;
    color: white;
    transform: scale(1.05);
    transition: all 0.2s ease-in-out;
}

/* Enhanced toggle button with gradient for active state */
.btn.btn-outline-success i.bi-toggle-on {
    color: #28a745;
    text-shadow: 0 0 5px rgba(40, 167, 69, 0.3);
}

.btn.btn-outline-danger i.bi-toggle-off {
    color: #dc3545;
    text-shadow: 0 0 5px rgba(220, 53, 69, 0.3);
}

/* Animate the toggle icon */
.btn i.bi-toggle-on,
.btn i.bi-toggle-off {
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

/* Button group enhancements for tenant actions */
.tenant-actions .btn-group .btn {
    border-radius: 0.25rem;
    margin-left: 2px;
}

.tenant-actions .btn-group .btn:first-child {
    margin-left: 0;
}

/* Loading button animation */
.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn i.bi-hourglass-split {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.1);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Status badge improvements with gradients and shadows */
.badge.bg-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.badge.bg-danger {
    background: linear-gradient(135deg, #dc3545 0%, #e74c3c 100%) !important;
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.badge.bg-info {
    background: linear-gradient(135deg, #17a2b8 0%, #3498db 100%) !important;
    box-shadow: 0 2px 4px rgba(23, 162, 184, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.badge.bg-warning {
    background: linear-gradient(135deg, #ffc107 0%, #f39c12 100%) !important;
    box-shadow: 0 2px 4px rgba(255, 193, 7, 0.2);
    color: #212529 !important;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Enhanced tenant card styling */
.tenant-card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.tenant-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1) !important;
}

/* Action button spacing and styling */
.tenant-actions .btn-group {
    gap: 2px;
}

/* Toggle button special effects */
.btn-outline-success:focus,
.btn-outline-success:active {
    background-color: #28a745 !important;
    color: white !important;
    box-shadow: 0 0 10px rgba(40, 167, 69, 0.5);
}

.btn-outline-danger:focus,
.btn-outline-danger:active {
    background-color: #dc3545 !important;
    color: white !important;
    box-shadow: 0 0 10px rgba(220, 53, 69, 0.5);
}

/* Registration Modal Styling */
#registrationModal .modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom: none;
}

#registrationModal .modal-header .btn-close {
    filter: brightness(0) invert(1);
}

#registrationModal .modal-body {
    padding: 2rem;
}

#registrationModal .form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #495057;
}

#registrationModal .input-group-text {
    background-color: #f8f9fa;
    border-color: #ced4da;
}

#registrationModal .form-select:focus,
#registrationModal .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

#registrationModal .form-check-input:checked {
    background-color: #667eea;
    border-color: #667eea;
}

#registrationModal .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    font-weight: 600;
}

#registrationModal .btn-primary:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6a4c93 100%);
    transform: translateY(-1px);
}

/* Password strength indicator */
.password-strength {
    margin-top: 0.25rem;
    font-size: 0.75rem;
}

.password-strength.weak {
    color: #dc3545;
}

.password-strength.medium {
    color: #ffc107;
}

.password-strength.strong {
    color: #28a745;
}

/* Reference section animation */
#reference-section {
    transition: all 0.3s ease-in-out;
}

/* Form validation styling */
.is-invalid {
    border-color: #dc3545 !important;
}

.invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #dc3545;
}

/* Profile Creation Page Styling */
#profile-creation-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

#profile-creation-page .card {
    border: none;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

#profile-creation-page .card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-bottom: none;
}

#profile-creation-page .bg-gradient-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

#profile-creation-page .progress-bar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

#profile-creation-page .form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

#profile-creation-page .input-group-text {
    background-color: #f8f9fa;
    border-color: #ced4da;
}

#profile-creation-page .form-control:focus,
#profile-creation-page .form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

#profile-creation-page .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    font-weight: 600;
}

#profile-creation-page .btn-primary:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6a4c93 100%);
    transform: translateY(-1px);
}

#profile-creation-page .btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border: none;
    font-weight: 600;
}

#profile-creation-page .btn-success:hover {
    background: linear-gradient(135deg, #218838 0%, #1ea085 100%);
    transform: translateY(-1px);
}

/* Profile step animations */
.profile-step {
    transition: all 0.3s ease-in-out;
}

/* Progress bar animation */
#profile-progress {
    transition: width 0.5s ease-in-out;
}

/* Step indicator styling */
#profile-creation-page .text-primary {
    color: #667eea !important;
}

/* Responsive improvements for profile creation */
@media (max-width: 768px) {
    #profile-creation-page .card-body {
        padding: 1.5rem !important;
    }

    #profile-creation-page .d-flex.justify-content-between {
        flex-direction: column;
        gap: 1rem;
    }

    #profile-creation-page .ms-auto {
        margin-left: 0 !important;
        align-self: stretch;
    }
}

/* Social Login Styles */
.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1rem 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #dee2e6;
}

.divider-text {
    padding: 0 1rem;
    color: #6c757d;
    font-size: 0.875rem;
    font-weight: 500;
}

.social-login .btn {
    transition: all 0.2s ease-in-out;
}

.social-login .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
}

.social-login .btn i {
    font-size: 1.1rem;
}