/* ChoosePanama Admin Shared Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Choose Panama Brand Colors */
    --primary-color: #2B9FBF;        /* Primary teal from logo */
    --primary-dark: #1E2A54;         /* Navy blue from script text */
    --primary-light: #5CBAD3;        /* Light blue accent */
    --secondary-color: #6c757d;
    --secondary-dark: #545b62;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #2B9FBF;           /* Using brand teal for info */
    --light-color: #f8f9fa;
    --dark-color: #1E2A54;           /* Using brand navy for dark text */
    --white: #ffffff;
    --border-radius: 8px;
    --shadow: 0 4px 6px rgba(43, 159, 191, 0.15);    /* Teal shadow */
    --shadow-lg: 0 10px 25px rgba(43, 159, 191, 0.2);

    /* Brand-specific colors */
    --brand-teal: #2B9FBF;
    --brand-navy: #1E2A54;
    --brand-light-blue: #5CBAD3;
    --brand-gradient: linear-gradient(135deg, #2B9FBF 0%, #1E2A54 100%);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--brand-gradient);
    min-height: 100vh;
    color: var(--dark-color);
    line-height: 1.6;
}

/* Layout Components */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Property Card Enhancements */
.property-badges {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.building-badge {
    background: var(--primary-color);
    color: white;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 600;
}

.apartment-badge {
    background: var(--primary-dark);
    color: white;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

.sync-badge {
    font-size: 10px;
    padding: 2px 5px;
    border-radius: 3px;
    font-weight: 500;
}

.sync-badge.lodgify-synced {
    background: #e3f2fd;
    color: #0d47a1;
    border: 1px solid #bbdefb;
}

.sync-badge.not-synced {
    background: #fff3e0;
    color: #e65100;
    border: 1px solid #ffcc02;
}


.occupancy-status {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.current-guest {
    font-size: 11px;
    color: var(--secondary-color);
    font-style: italic;
}

.card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.card-header {
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--dark-color);
}

/* Navigation */
.navbar {
    background: var(--white);
    box-shadow: var(--shadow);
    padding: 1rem 0;
    margin-bottom: 2rem;
}

.navbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.navbar-center {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex: 1;
    justify-content: center;
}

/* Language Toggle Button */
.language-toggle {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
    min-width: 70px;
    flex-shrink: 0;
    margin-left: 1rem;
}

.language-toggle:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

.language-toggle:active {
    transform: scale(0.95);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
}

.navbar-brand img {
    height: 40px;
    width: auto;
    transition: all 0.3s ease;
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

.navbar-nav {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--dark-color);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    background: var(--primary-color);
    color: var(--white);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

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

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

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--secondary-color);
    color: var(--white);
}

.btn-secondary:hover {
    background: var(--secondary-dark);
}

.btn-success {
    background: var(--success-color);
    color: var(--white);
}

.btn-danger {
    background: var(--danger-color);
    color: var(--white);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: var(--white);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

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

.form-control {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    border: 2px solid #dee2e6;
    border-radius: var(--border-radius);
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.form-control.is-invalid {
    border-color: var(--danger-color);
}

.invalid-feedback {
    display: block;
    color: var(--danger-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Grid System */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: -0.75rem;
    align-items: stretch; /* Ensures equal height columns */
    width: 100%;
    box-sizing: border-box;
}

.col {
    flex: 1;
    padding: 0.75rem;
}

.col-auto {
    flex: 0 0 auto;
    padding: 0.75rem;
}

.col-2 { flex: 0 0 16.666667%; padding: 0.75rem; box-sizing: border-box; }
.col-3 { flex: 0 0 25%; padding: 0.75rem; box-sizing: border-box; }
.col-4 { flex: 0 0 33.333333%; padding: 0.75rem; display: flex; flex-direction: column; box-sizing: border-box; }
.col-6 { flex: 0 0 50%; padding: 0.75rem; box-sizing: border-box; }
.col-8 { flex: 0 0 66.666667%; padding: 0.75rem; box-sizing: border-box; }
.col-9 { flex: 0 0 75%; padding: 0.75rem; box-sizing: border-box; }
.col-12 { flex: 0 0 100%; padding: 0.75rem; box-sizing: border-box; }

/* Utilities */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }

.p-2 { padding: 0.5rem; }
.p-3 { padding: 1rem; }
.p-4 { padding: 1.5rem; }

.d-flex { display: flex; }
.align-items-center { align-items: center; }
.justify-content-between { justify-content: space-between; }
.justify-content-center { justify-content: center; }

/* Status Indicators */
.status-indicator {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 50px;
    text-transform: uppercase;
}

.status-occupied {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.status-vacant {
    background: #d4edda;
    color: #155724;
    border: 1px solid #b8daff;
}

.status-maintenance {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Loading States */
.loading {
    display: inline-block;
    width: 40px;
    height: 40px;
    position: relative;
    font-size: 24px;
    animation: float 2s ease-in-out infinite;
}

.loading::before {
    content: "🏠";
    position: absolute;
    top: 0;
    left: 0;
    animation: pulse 1.5s ease-in-out infinite;
}

.loading::after {
    content: "🔑";
    position: absolute;
    top: 0;
    left: 0;
    font-size: 14px;
    animation: keySwing 1.5s ease-in-out infinite;
    transform-origin: top center;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

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

@keyframes keySwing {
    0%, 100% { transform: translateX(22px) translateY(5px) rotate(-10deg); }
    50% { transform: translateX(22px) translateY(5px) rotate(10deg); }
}

/* Legacy spin animation for compatibility */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Cache notification */
.cache-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--primary-color);
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: slideInRight 0.3s ease-out;
    max-width: 300px;
}

.cache-notification.success {
    background: #28a745;
}

.cache-notification.warning {
    background: #ffc107;
    color: #212529;
}

.cache-notification.error {
    background: #dc3545;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Import functionality styles */
.upload-area {
    margin: 20px 0;
}

.file-drop-zone {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    background: #f8f9fa;
    transition: all 0.3s ease;
    cursor: pointer;
}

.file-drop-zone:hover,
.file-drop-zone.drag-over {
    border-color: var(--primary-color);
    background: #f0f8ff;
}

.drop-zone-content .drop-zone-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.file-info {
    background: #e8f5e8;
    border: 1px solid #c3e6c3;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.csv-format-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.csv-format-info code {
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
}

.table-container {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.table {
    margin-bottom: 0;
}

.table th {
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
}

.validation-results {
    margin: 20px 0;
}

.alert {
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
}

.alert-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.alert-danger {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.import-progress {
    padding: 20px;
}

.progress-bar-container {
    background: #e9ecef;
    border-radius: 8px;
    height: 20px;
    margin-bottom: 20px;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, var(--primary-color), #28a745);
    height: 100%;
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 8px;
}

.import-log {
    max-height: 300px;
    overflow-y: auto;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
}

.log-entry {
    padding: 5px 0;
    border-bottom: 1px solid #eee;
}

.log-entry:last-child {
    border-bottom: none;
}

.log-entry.success {
    color: #28a745;
}

.log-entry.warning {
    color: #ffc107;
}

.log-entry.error {
    color: #dc3545;
}

.results-summary {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.error-detail {
    background: #fff2f2;
    border-left: 4px solid #dc3545;
    padding: 10px;
    margin-bottom: 5px;
}

/* Status indicators */
.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.active {
    background: #d4edda;
    color: #155724;
}

.status-badge.inactive {
    background: #f8d7da;
    color: #721c24;
}

/* Inactive property styling */
.property-card.inactive-property {
    opacity: 0.7;
    border: 2px dashed #dc3545;
}

.property-card.inactive-property:hover {
    opacity: 0.9;
}

.property-card.inactive-property .property-image {
    filter: grayscale(30%);
}

/* Ownership History Styles */
.ownership-timeline {
    padding: 20px 0;
}

.ownership-record {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    background: #f8f9fa;
    transition: all 0.3s ease;
}

.ownership-record:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ownership-record.current-owner {
    border-left: 4px solid var(--primary-color);
    background: #f0f8ff;
}

.ownership-header {
    display: flex;
    justify-content: between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.ownership-info {
    flex: 1;
}

.ownership-info h4 {
    margin: 0 0 5px 0;
    color: var(--primary-dark);
}

.ownership-actions {
    display: flex;
    gap: 5px;
}

.ownership-details p {
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.current-owner-card {
    background: #f0f8ff;
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    padding: 15px;
}

.current-owner-card h5 {
    color: var(--primary-dark);
    margin-bottom: 8px;
}

.current-owner-card p {
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.current-owner-card a {
    color: var(--primary-color);
    text-decoration: none;
}

.current-owner-card a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Base container */
    .container {
        padding: 0 15px;
        max-width: 100%;
    }

    /* Navigation improvements */
    .navbar {
        padding: 0.75rem 0;
        margin-bottom: 1rem;
    }

    .navbar-content {
        flex-direction: column;
        gap: 1rem;
    }

    .navbar-center {
        flex-direction: column;
        width: 100%;
        gap: 1rem;
    }

    /* Language toggle adjustments for mobile */
    .language-toggle {
        width: auto;
        align-self: center;
    }

    .navbar-brand {
        font-size: 1.25rem;
    }

    .navbar-brand img {
        height: 35px;
    }

    .navbar-nav {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
        width: 100%;
    }

    .nav-link {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }

    /* Grid system improvements */
    .row {
        margin: -0.5rem;
    }

    .col {
        padding: 0.5rem;
    }

    .col-sm-12 {
        flex: 0 0 100%;
    }

    /* All columns stack on mobile */
    .col-2, .col-3, .col-4, .col-6, .col-8, .col-9 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    /* Button improvements */
    .btn {
        width: 100%;
        margin-bottom: 0.75rem;
        padding: 0.875rem 1rem;
        font-size: 1rem;
    }

    .btn:last-child {
        margin-bottom: 0;
    }

    .btn-group {
        flex-direction: column;
        width: 100%;
    }

    .btn-group .btn {
        border-radius: var(--border-radius);
        margin-bottom: 0.5rem;
    }

    .btn-group .btn:last-child {
        margin-bottom: 0;
    }

    /* Card improvements */
    .card {
        margin-bottom: 1rem;
        padding: 1rem;
    }

    .card-header {
        padding-bottom: 0.75rem;
        margin-bottom: 0.75rem;
    }

    .card-title {
        font-size: 1.1rem;
    }

    /* Property cards */
    .property-card {
        margin-bottom: 1rem;
    }

    .property-image {
        height: 180px;
    }

    .property-details {
        padding: 0.875rem;
    }

    /* Form improvements */
    .form-control {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 0.875rem;
    }

    .form-group {
        margin-bottom: 1.25rem;
    }

    /* Auth card */
    .auth-card {
        padding: 2rem;
        margin: 1rem;
        max-width: none;
        width: calc(100% - 2rem);
    }

    .logo {
        font-size: 2rem;
        margin-bottom: 1rem;
    }

    /* Property list improvements */
    .property-list-content {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    .property-list-thumbnail {
        width: 100%;
        height: 120px;
        align-self: center;
        max-width: 200px;
    }

    .property-list-info {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    .property-list-name {
        text-align: center;
        white-space: normal;
        margin-right: 0;
    }

    .property-list-status,
    .property-list-availability {
        text-align: center;
    }

    /* Status badges */
    .status-indicator,
    .status-badge {
        font-size: 0.8rem;
        padding: 0.3rem 0.6rem;
    }
}

/* Authentication Specific */
.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
}

.auth-card {
    background: var(--white);
    border-radius: 15px;
    box-shadow: var(--shadow-lg);
    padding: 3rem;
    width: 100%;
    max-width: 400px;
}

.logo {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-align: center;
}

.logo img {
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.subtitle {
    color: var(--secondary-color);
    font-size: 1.1rem;
    margin-bottom: 2rem;
    text-align: center;
}

/* Property Cards */
.property-card {
    border: 1px solid #dee2e6;
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
}

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

.property-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--light-color);
}

.property-details {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.property-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.property-meta {
    color: var(--secondary-color);
    font-size: 0.875rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.occupancy-status {
    margin-top: auto;
}

/* Reservation List */
.reservation-item {
    border-left: 4px solid var(--info-color);
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: var(--light-color);
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.reservation-dates {
    font-weight: 500;
    color: var(--dark-color);
}

.reservation-guest {
    color: var(--secondary-color);
    font-size: 0.875rem;
}

.days-until {
    font-size: 0.75rem;
    color: var(--info-color);
    font-weight: 500;
}

/* Enhanced Property Interface Styles */

/* View Mode Toggle */
.btn-group {
    display: flex;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.btn-group .btn {
    border-radius: 0;
    margin: 0;
}

.btn-group .btn:first-child {
    border-top-left-radius: var(--border-radius);
    border-bottom-left-radius: var(--border-radius);
}

.btn-group .btn:last-child {
    border-top-right-radius: var(--border-radius);
    border-bottom-right-radius: var(--border-radius);
}

/* List View Styles */
.property-list-item {
    border: 1px solid #dee2e6;
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
    margin-bottom: 0.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--white);
}

.property-list-item:hover {
    box-shadow: var(--shadow);
    transform: translateX(4px);
}

.property-list-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.property-list-thumbnail {
    width: 60px;
    height: 45px;
    flex-shrink: 0;
    border-radius: var(--border-radius);
    overflow: hidden;
    background: var(--light-color);
}

.property-list-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--border-radius);
    background: var(--light-color);
    display: block;
}

.property-list-info {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-width: 0; /* Allow text to truncate */
}

.property-list-name {
    font-weight: 600;
    color: var(--dark-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    margin-right: 1rem;
}

.property-list-availability {
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    white-space: nowrap;
}

.property-list-availability.status-occupied {
    background: #fef2f2;
    color: #dc2626;
}

.property-list-availability.status-vacant {
    background: #f0f9ff;
    color: #0284c7;
}
.property-list-status.status-active {
    background: #f0fdf4;
    color: #16a34a;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    white-space: nowrap;
}
.property-list-status.status-inactive {
    background: #fef2f2;
    color: #dc2626;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    white-space: nowrap;
}

.property-list-details {
    flex: 1;
}

.property-list-title {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.25rem;
}

.property-list-meta {
    color: var(--secondary-color);
    font-size: 0.875rem;
}

.property-list-status {
    text-align: right;
}

/* Tab System */
.nav-tabs {
    display: flex;
    border-bottom: 2px solid #dee2e6;
    margin-bottom: 1.5rem;
}

.nav-tab {
    background: none;
    border: none;
    padding: 1rem 1.5rem;
    font-weight: 500;
    color: var(--secondary-color);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.nav-tab:hover {
    color: var(--primary-color);
    background: var(--light-color);
}

.nav-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background: var(--light-color);
}

.tab-content {
    min-height: 400px;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* Utility Cards */
.utility-card {
    border: 1px solid #dee2e6;
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 1rem;
    background: var(--white);
    transition: all 0.3s ease;
}

.utility-card:hover {
    box-shadow: var(--shadow);
}

.utility-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.utility-type {
    font-weight: 600;
    color: var(--dark-color);
    text-transform: capitalize;
}

.utility-provider {
    color: var(--secondary-color);
    font-size: 0.875rem;
}

.utility-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.utility-detail {
    display: flex;
    justify-content: space-between;
    padding: 0.25rem 0;
}

.utility-label {
    font-weight: 500;
    color: var(--secondary-color);
}

.utility-value {
    color: var(--dark-color);
}

/* Copy Button */
.copy-btn {
    background: var(--info-color);
    color: var(--white);
    border: none;
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 0.5rem;
}

.copy-btn:hover {
    background: #138496;
    transform: scale(1.05);
}

.copy-btn:active {
    transform: scale(0.95);
}

/* Insurance Cards */
.insurance-card {
    padding: 1.5rem;
}

.insurance-status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.insurance-active {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.insurance-expiring {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.insurance-expired {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.insurance-details {
    display: grid;
    gap: 0.75rem;
}

.insurance-detail {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #dee2e6;
}

.insurance-detail:last-child {
    border-bottom: none;
}

.insurance-label {
    font-weight: 500;
    color: var(--secondary-color);
}

.insurance-value {
    color: var(--dark-color);
    text-align: right;
}

/* Insurance Files Section */
.insurance-files-section {
    border-top: 1px solid #dee2e6;
    padding-top: 15px;
    margin-top: 15px;
}

.insurance-file-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    margin-bottom: 8px;
    background: #f8f9fa;
    transition: all 0.2s ease;
}

.insurance-file-item:hover {
    background: #e9ecef;
    border-color: var(--primary-color);
}

.file-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.file-info {
    flex: 1;
    min-width: 0;
}

.file-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-meta {
    font-size: 12px;
    color: #6c757d;
}

.file-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.file-actions .btn-sm {
    padding: 4px 8px;
    font-size: 14px;
    min-width: 32px;
}

/* Maintenance Items */
.maintenance-item {
    border: 1px solid #dee2e6;
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 1rem;
    background: var(--white);
    position: relative;
}

.maintenance-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

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

.maintenance-due {
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.maintenance-due.overdue {
    background: #f8d7da;
    color: #721c24;
}

.maintenance-due.due-soon {
    background: #fff3cd;
    color: #856404;
}

.maintenance-due.current {
    background: #d4edda;
    color: #155724;
}

.maintenance-description {
    color: var(--secondary-color);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.maintenance-details {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
}

.maintenance-last {
    color: var(--secondary-color);
}

.maintenance-next {
    color: var(--primary-color);
    font-weight: 500;
}

/* General Info Grid */
.general-info-grid {
    padding: 1rem;
    display: grid;
    gap: 0.5rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.2rem 0;
    border-bottom: 1px solid #dee2e6;
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 500;
    color: var(--secondary-color);
}

.info-value {
    color: var(--dark-color);
    text-align: right;
    max-width: 60%;
}

.lockbox-code {
    font-family: 'Courier New', monospace;
    background: var(--light-color);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: bold;
}

/* WiFi Info */
.wifi-info {
    background: var(--light-color);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin: 0.5rem 0;
}

.wifi-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.wifi-detail:last-child {
    margin-bottom: 0;
}

.wifi-label {
    font-weight: 500;
    color: var(--secondary-color);
}

.wifi-value {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Courier New', monospace;
    font-weight: bold;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    /* Table responsiveness */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .table {
        font-size: 0.875rem;
        min-width: 600px;
    }

    .table th,
    .table td {
        padding: 0.5rem 0.25rem;
        white-space: nowrap;
    }

    /* Tab system */
    .nav-tabs {
        flex-wrap: wrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .nav-tab {
        flex: 0 0 auto;
        min-width: 100px;
        text-align: center;
        padding: 0.75rem 0.5rem;
        font-size: 0.875rem;
    }

    /* Utility grids */
    .utility-details {
        grid-template-columns: 1fr;
    }

    .general-info-grid {
        padding: 0.75rem;
    }

    .info-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 0.5rem 0;
        border-bottom: 1px solid #dee2e6;
    }

    .info-label {
        margin-bottom: 0.25rem;
        font-size: 0.875rem;
    }

    .info-value {
        text-align: left;
        max-width: 100%;
        font-size: 0.9rem;
    }

    /* WiFi info */
    .wifi-detail {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 0.75rem;
    }

    .wifi-label {
        margin-bottom: 0.25rem;
    }

    .wifi-value {
        width: 100%;
        justify-content: flex-start;
    }

    /* Insurance and maintenance cards */
    .insurance-detail,
    .maintenance-details {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .insurance-value,
    .maintenance-next,
    .maintenance-last {
        text-align: left;
        margin-top: 0.25rem;
    }

    /* Copy buttons */
    .copy-btn {
        margin: 0.25rem 0 0 0;
        padding: 0.5rem 1rem;
        width: auto;
        align-self: flex-start;
    }

    .property-list-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .property-list-status {
        text-align: left;
        margin-top: 0.5rem;
    }
}

/* Property Image Styling */
.property-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    transition: all 0.3s ease;
}

/* POPUP WINDOW SYSTEM */
/* WORKING POPUP SYSTEM - PROPER OVERLAY CENTERING */
.popup-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0, 0, 0, 0.7) !important;
    z-index: 10000 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

.popup-window {
    background: var(--white) !important;
    border-radius: var(--border-radius) !important;
    box-shadow: var(--shadow-lg) !important;
    border: 2px solid var(--primary-color) !important;
    max-width: 500px !important;
    width: 90% !important;
    max-height: 85vh !important;
    overflow-y: auto !important;
    z-index: 10001 !important;
    position: relative !important;
}

@media (max-width: 768px) {
    .popup-window {
        width: 95% !important;
        max-width: none !important;
        max-height: 90vh !important;
        margin: 1rem !important;
    }

    .popup-header {
        padding: 1rem;
    }

    .popup-title {
        font-size: 1.1rem;
    }

    .popup-body {
        padding: 1rem;
    }

    .popup-actions {
        padding: 1rem;
        flex-direction: column;
        gap: 0.5rem;
    }

    .popup-actions .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .popup-actions .btn:last-child {
        margin-bottom: 0;
    }
}

.popup-header {
    padding: 1.5rem;
    border-bottom: 2px solid var(--primary-color);
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.popup-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--white);
}

.popup-close {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid var(--white);
    font-size: 20px;
    cursor: pointer;
    color: var(--white);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: bold;
}

.popup-close:hover {
    background: var(--white);
    color: var(--primary-color);
    transform: scale(1.1);
}

.popup-body {
    padding: 1.5rem;
    background: var(--white);
}

.popup-actions {
    padding: 1.5rem;
    border-top: 2px solid var(--primary-color);
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-secondary {
    background-color: var(--secondary-color);
    color: white;
}

/* Additional mobile breakpoints for smaller screens */
@media (max-width: 480px) {
    /* Extra small screens */
    .container {
        padding: 0 10px;
    }

    .navbar-brand {
        font-size: 1.1rem;
    }

    .navbar-brand img {
        height: 30px;
    }

    .nav-link {
        padding: 0.3rem 0.6rem;
        font-size: 0.85rem;
    }

    .card {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
    }

    .card-title {
        font-size: 1rem;
    }

    .btn {
        padding: 0.75rem 0.875rem;
        font-size: 0.9rem;
    }

    .form-control {
        padding: 0.75rem;
        font-size: 16px;
    }

    .popup-window {
        width: 98% !important;
        margin: 0.5rem !important;
    }

    .popup-header,
    .popup-body,
    .popup-actions {
        padding: 0.875rem;
    }

    .popup-title {
        font-size: 1rem;
    }

    /* Table adjustments for very small screens */
    .table {
        font-size: 0.75rem;
    }

    .table th,
    .table td {
        padding: 0.25rem 0.125rem;
    }

    /* Property cards on small screens */
    .property-image {
        height: 150px;
    }

    .property-details {
        padding: 0.75rem;
    }

    .property-title {
        font-size: 0.95rem;
    }

    .property-meta {
        font-size: 0.8rem;
    }

    /* Status indicators */
    .status-indicator,
    .status-badge {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }

    /* Navigation tabs */
    .nav-tab {
        min-width: 80px;
        padding: 0.6rem 0.4rem;
        font-size: 0.8rem;
    }

    /* Property list items */
    .property-list-thumbnail {
        height: 100px;
        max-width: 150px;
    }

    .property-list-name {
        font-size: 0.9rem;
    }

    .property-list-meta {
        font-size: 0.8rem;
    }
}

/* Landscape orientation adjustments */
@media (max-width: 768px) and (orientation: landscape) {
    .navbar-content {
        flex-direction: row;
        justify-content: space-between;
    }

    .navbar-nav {
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 0.25rem;
    }

    .nav-link {
        padding: 0.25rem 0.5rem;
        font-size: 0.8rem;
    }

    .popup-window {
        max-height: 95vh !important;
    }
}

/* High DPI screen adjustments */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .property-image,
    .property-list-image {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }

    .navbar-brand img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Touch-friendly improvements for mobile */
@media (max-width: 768px) {
    /* Ensure minimum touch target size of 44px */
    .btn,
    .nav-link,
    .nav-tab,
    .copy-btn {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Improve spacing for finger navigation */
    .property-card:hover,
    .property-list-item:hover {
        transform: none; /* Disable hover transforms on mobile */
    }

    /* Better focus states for keyboard navigation */
    .btn:focus,
    .form-control:focus,
    .nav-link:focus {
        outline: 2px solid var(--primary-color);
        outline-offset: 2px;
    }

    /* Prevent zoom on input focus for iOS */
    select,
    textarea,
    input[type="text"],
    input[type="password"],
    input[type="datetime"],
    input[type="datetime-local"],
    input[type="date"],
    input[type="month"],
    input[type="time"],
    input[type="week"],
    input[type="number"],
    input[type="email"],
    input[type="url"],
    input[type="search"],
    input[type="tel"],
    input[type="color"] {
        font-size: 16px !important;
    }

    /* Improve scrolling on mobile */
    .table-container,
    .nav-tabs {
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }

    /* Hide webkit scrollbars on mobile */
    .table-container::-webkit-scrollbar,
    .nav-tabs::-webkit-scrollbar {
        height: 4px;
    }

    .table-container::-webkit-scrollbar-thumb,
    .nav-tabs::-webkit-scrollbar-thumb {
        background: var(--primary-color);
        border-radius: 2px;
    }
}

/* Property Search Panel Styling */
.property-search-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.search-row {
    display: flex;
    width: 100%;
    gap: 0;
}

.search-row .search-input {
    flex: 1;
    border-radius: 8px 0 0 8px;
    border-right: none;
    min-height: 44px;
    font-size: 16px;
    padding: 10px 15px;
}

.search-row .search-btn {
    border-radius: 0 8px 8px 0;
    min-width: 50px;
    min-height: 44px;
    padding: 0 15px;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--primary-color);
    background: var(--primary-color);
    transition: all 0.2s;
    flex-shrink: 0;
}

.search-row .search-btn:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: scale(1.05);
}

/* Filter Row - Compact Dropdown Layout */
.filter-row-compact {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-select-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 140px;
}

.filter-select-group .filter-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--dark-color);
    margin: 0;
    white-space: nowrap;
}

.filter-select-group .filter-select {
    flex: 1;
    min-height: 38px;
    font-size: 14px;
    border-radius: 6px;
    border: 1px solid #ced4da;
    padding: 6px 12px;
    background-color: white;
    cursor: pointer;
}

.filter-select-group .filter-select:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(43, 159, 191, 0.25);
}

/* Mobile Responsive - Optimized for smaller screens */
@media (max-width: 768px) {
    .property-search-panel {
        gap: 10px;
    }

    .search-row {
        display: flex;
        align-items: stretch;
    }

    .search-row .search-input {
        font-size: 16px !important; /* Prevent zoom on iOS */
        padding: 10px 12px;
        flex: 1;
        width: auto;
    }

    .search-row .search-btn {
        width: 50px;
        padding: 0;
        font-size: 20px;
        flex-shrink: 0;
    }

    .filter-row-compact {
        gap: 8px;
        width: 100%;
    }

    .filter-select-group {
        flex: 1;
        min-width: 0;
    }

    .filter-select-group .filter-label {
        font-size: 13px;
        min-width: 52px;
    }

    .filter-select-group .filter-select {
        font-size: 14px;
        min-height: 40px;
    }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
    .filter-select-group .filter-label {
        font-size: 12px;
        min-width: 48px;
    }

    .filter-select-group .filter-select {
        font-size: 13px;
    }

    .search-row .search-btn {
        width: 48px;
        font-size: 18px;
    }
}