/* Custom styles */

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
}

.notification-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 0.7rem;
}

.property-card {
    transition: transform 0.2s;
    height: 100%;
}

.property-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.property-image {
    height: 200px;
    object-fit: cover;
}

.amenity-badge {
    margin: 2px;
}

.status-badge {
    font-size: 0.85rem;
}

.search-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.monitoring-enabled {
    color: #28a745;
}

.monitoring-disabled {
    color: #6c757d;
}

.monitoring-failed {
    color: #dc3545;
}

.password-requirements {
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.password-requirements li {
    color: #6c757d;
}

.password-requirements li.valid {
    color: #28a745;
}

.password-requirements li.invalid {
    color: #dc3545;
}

.notification-item {
    transition: background-color 0.2s;
}

.notification-item.unread {
    background-color: #f8f9fa;
    font-weight: 500;
}

.notification-item:hover {
    background-color: #e9ecef;
}

.agent-info {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-top: 1rem;
}

.energy-rating {
    font-size: 1.2rem;
    font-weight: bold;
}

.history-timeline {
    position: relative;
    padding-left: 30px;
}

.history-timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #dee2e6;
}

.history-item {
    position: relative;
    margin-bottom: 1.5rem;
}

.history-item::before {
    content: '';
    position: absolute;
    left: -25px;
    top: 5px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #007bff;
    border: 2px solid #fff;
}

/* Hidden properties styling */
.hidden-property {
    opacity: 0.5;
    filter: grayscale(50%);
}

.hidden-property:hover {
    opacity: 0.7;
}

/* Notes textarea */
.property-notes {
    font-size: 0.875rem;
    resize: vertical;
}

.notes-counter {
    float: right;
    color: #6c757d;
}

/* Calculated metrics badges */
.calculated-metrics .badge {
    margin-right: 4px;
    margin-bottom: 4px;
}

.price-per-sqm {
    background-color: #17a2b8 !important;
}

.payback-period {
    background-color: #ffc107 !important;
}

/* Table view styles */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-compact th,
.table-compact td {
    padding: 0.5rem 0.75rem;
    vertical-align: top;
}

.table-grouped td {
    white-space: normal;
}

.cell-stack {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.cell-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.cell-label {
    font-size: 0.8rem;
    color: #6c757d;
    letter-spacing: 0.01em;
}

.grouped-input .form-control {
    min-width: 0;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 0.25rem 0.75rem;
}

.kpi-line {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
}

.kpi-line span:last-child {
    text-align: right;
}

.table-property-image {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

.table tbody tr.hidden-property {
    opacity: 0.5;
    background-color: rgba(0, 0, 0, 0.02);
}

.table .property-notes {
    min-width: 150px;
}

/* View mode buttons */
.view-mode-btn.active {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

/* Responsive adjustments for table view */
@media (max-width: 768px) {
    .table-responsive {
        border: 1px solid #dee2e6;
        border-radius: 0.25rem;
    }
    
    .table thead {
        position: sticky;
        top: 0;
        background: white;
        z-index: 10;
    }
    
    .table td, .table th {
        white-space: normal;
    }

    .table-compact th,
    .table-compact td {
        padding: 0.45rem 0.5rem;
    }

    .kpi-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
}

/* Settings card styling */
.card-body .row.align-items-center {
    gap: 1rem 0;
}

/* Toggle switch styling */
.form-check-input:checked {
    background-color: #28a745;
    border-color: #28a745;
}

/* Button group improvements */
.btn-group-vertical.btn-group-sm {
    gap: 2px;
}

/* Property item transitions */
.property-item {
    transition: opacity 0.3s ease, display 0.3s ease;
}

/* Sort / filter layout */
.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
}

.filter-field .input-group-text {
    background: #f8f9fa;
}

.filter-field label {
    font-size: 0.9rem;
}
