/* Custom CSS for ROW Management Application - PWT */

/* Global Styles */
:root {
    /* Official MPWT Brand Colors */
    --mpwt-blue: #1e3a8a;
    --mpwt-orange: #ea580c;
    --mpwt-gray: #6b7280;
    --mpwt-dark-gray: #374151;
    --mpwt-light-gray: #f3f4f6;
    
    /* Government Colors */
    --government-navy: #1e3a8a;
    --government-gold: #ea580c;
    
    /* Overriding Bootstrap color variables */
    --bs-primary: var(--mpwt-blue);
    --bs-primary-rgb: 30, 58, 138;
    --bs-secondary: var(--mpwt-gray);
    --bs-secondary-rgb: 107, 114, 128;
    --bs-warning: var(--mpwt-orange);
    --bs-warning-rgb: 234, 88, 12;
    
    /* Aliases for convenience */
    --primary-color: var(--mpwt-blue);
    --secondary-color: var(--mpwt-gray);
    --warning-color: var(--mpwt-orange);
    --success-color: var(--bs-success);
    --danger-color: var(--bs-danger);
    --info-color: var(--bs-info);
    --light-color: var(--bs-light);
    --dark-color: var(--mpwt-dark-gray);
    
    /* Custom colors */
    --card-border-radius: 0.75rem;
    --card-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --transition-speed: 0.3s;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    padding-bottom: 60px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

/* Clean Header Styles */
.header-clean {
    background: white;
    border-bottom: 1px solid #e9ecef;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

.header-left .brand-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
}

.brand-logo {
    height: 50px;
    width: auto;
    margin-right: 1rem;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--mpwt-blue);
    line-height: 1.2;
}

.brand-subtitle {
    font-size: 0.9rem;
    color: var(--mpwt-gray);
    line-height: 1.2;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

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

.nav-link-public:hover {
    background: rgba(30, 58, 138, 0.1);
    color: var(--mpwt-blue);
}

.language-selector .lang-btn {
    background: var(--mpwt-light-gray);
    border: 1px solid var(--mpwt-gray);
    border-radius: 6px;
    padding: 0.5rem 1rem;
    color: var(--mpwt-dark-gray);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.language-selector .lang-btn:hover {
    background: rgba(30, 58, 138, 0.1);
    border-color: var(--mpwt-blue);
}

.login-btn {
    background: var(--mpwt-blue);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid var(--mpwt-blue);
}

.login-btn:hover {
    background: #1e40af;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(30, 58, 138, 0.3);
}

/* Responsive header */
@media (max-width: 768px) {
    .header-clean {
        padding: 0.75rem 0;
    }
    
    .brand-logo {
        height: 40px;
        margin-right: 0.75rem;
    }
    
    .brand-title {
        font-size: 1.2rem;
    }
    
    .brand-subtitle {
        font-size: 0.8rem;
    }
    
    .header-actions {
        gap: 0.5rem;
    }
    
    .lang-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .login-btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    
    .brand-subtitle {
        display: none;
    }
}

/* Modern card styling */
.card {
    border-radius: var(--card-border-radius);
    box-shadow: var(--card-shadow);
    border: none;
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    overflow: hidden;
    background: white;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.2);
}

/* Dashboard specific styling */
.dashboard-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid rgba(30, 58, 138, 0.1);
}

.dashboard-card:hover {
    border-color: var(--mpwt-blue);
    box-shadow: 0 8px 25px rgba(30, 58, 138, 0.15);
}

.dashboard-stats {
    background: linear-gradient(135deg, var(--mpwt-blue) 0%, #1e40af 100%);
    border: none;
    color: white;
}

.dashboard-stats .card-body {
    padding: 2rem;
}

.dashboard-quick-actions {
    background: linear-gradient(135deg, #ffffff 0%, #f1f3f4 100%);
    border: 1px solid #e0e0e0;
}

.quick-action-btn {
    transition: all 0.3s ease;
    border: none;
    border-radius: 15px;
    padding: 1.5rem;
    text-decoration: none;
    display: block;
    color: inherit;
}

.quick-action-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.btn-collect-data {
    background: linear-gradient(135deg, var(--mpwt-blue) 0%, #1e40af 100%);
    color: white;
}

.btn-register-property {
    background: linear-gradient(135deg, var(--mpwt-orange) 0%, #dc2626 100%);
    color: white;
}

.btn-view-reports {
    background: linear-gradient(135deg, #28a745 0%, #20963d 100%);
    color: white;
}

.card-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-weight: 600;
}

/* Header & Navigation */
.navbar {
    transition: all var(--transition-speed);
}

.navbar-dark .navbar-toggler {
    border-color: transparent;
}

.navbar-dark .navbar-toggler:focus {
    box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.15);
}

.navbar-toggler {
    padding: 0.5rem;
    border-radius: 0.5rem;
}

/* Mobile navigation enhancements */
@media (max-width: 992px) {
    .navbar-nav .nav-item {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .navbar-nav .nav-item:last-child {
        border-bottom: none;
    }
    
    .navbar-collapse {
        background-color: var(--mpwt-blue);
        padding: 1rem;
        border-radius: 0.5rem;
        margin-top: 0.5rem;
        box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem;
        border-radius: 0.5rem;
    }
    
    .navbar-nav .nav-link:hover, 
    .navbar-nav .nav-link:focus {
        background-color: rgba(255, 255, 255, 0.1);
    }
    
    .dropdown-menu {
        padding: 0.5rem 0;
        margin-top: 0.5rem;
        box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    }
    
    .dropdown-item {
        padding: 0.75rem 1.5rem;
    }
}

/* Offline indicator */
#offline-indicator {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--warning-color);
    color: #000;
    padding: 0.5rem;
    text-align: center;
    z-index: 1000;
    font-weight: bold;
    display: none;
}

/* Map styles */
#map-container {
    height: 500px;
    width: 100%;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.map-filters {
    padding: 1rem;
    background-color: var(--light-color);
    border-radius: 5px;
    margin-bottom: 1rem;
}

.custom-map-marker i {
    color: var(--primary-color);
    font-size: 24px;
}

.map-popup {
    max-width: 200px;
}

.map-popup h5 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.map-popup p {
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
}

/* Map message displays */
.map-offline-message,
.map-error-message,
.map-no-data-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 2rem;
    text-align: center;
    background-color: var(--light-color);
    border-radius: 5px;
}

.map-offline-message i,
.map-error-message i,
.map-no-data-message i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.map-offline-message i {
    color: var(--warning-color);
}

.map-error-message i {
    color: var(--danger-color);
}

.map-no-data-message i {
    color: var(--info-color);
}

/* Form styles */
.data-collection-form {
    background-color: var(--bs-dark);
    padding: 2rem;
    border-radius: var(--card-border-radius);
    margin-bottom: 2rem;
    box-shadow: var(--card-shadow);
}

.form-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all var(--transition-speed);
}

.form-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.form-section-title {
    margin-bottom: 1.5rem;
    font-weight: 600;
    color: var(--bs-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.form-section-title::after {
    content: '';
    display: block;
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin-left: 0.5rem;
}

.form-control, .form-select {
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.75rem 1rem;
    color: var(--bs-light);
    transition: all var(--transition-speed);
}

.form-control:focus, .form-select:focus {
    background-color: rgba(0, 0, 0, 0.3);
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.25);
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--bs-gray-300);
}

.image-preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.image-preview-container img {
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform var(--transition-speed);
    max-width: 150px;
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.15);
}

.image-preview-container img:hover {
    transform: scale(1.05);
    cursor: pointer;
}

/* GPS status indicator */
.gps-indicator {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    background-color: rgba(0, 0, 0, 0.3);
    margin-bottom: 1rem;
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all var(--transition-speed);
}

.gps-indicator:hover {
    background-color: rgba(0, 0, 0, 0.4);
}

.gps-indicator span {
    margin-left: 0.5rem;
    font-weight: 500;
}

.gps-indicator .badge {
    padding: 0.5rem 0.75rem;
    border-radius: 50px;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 0.7rem;
}

/* Data card styles */
.data-card {
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.data-card-header {
    padding: 1rem;
    background-color: var(--light-color);
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
}

.data-card-body {
    padding: 1rem;
}

/* Dashboard styles */
.dashboard-stat-card {
    border-radius: var(--card-border-radius);
    padding: 1.75rem;
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    min-height: 180px;
    position: relative;
    overflow: hidden;
    z-index: 1;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    border: none;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.dashboard-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%);
    z-index: -1;
    transition: opacity 0.3s;
}

.dashboard-stat-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 60%);
    z-index: -1;
    opacity: 0.5;
    pointer-events: none;
    transform: scale(0);
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.dashboard-stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.2);
}

.dashboard-stat-card:hover::after {
    transform: scale(1);
}

.dashboard-stat-card .stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.dashboard-stat-card .stat-icon {
    font-size: 2.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    margin-bottom: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.dashboard-stat-card .stat-icon i {
    position: relative;
    z-index: 2;
    background: linear-gradient(135deg, var(--pwt-blue) 0%, var(--pwt-yellow) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dashboard-stat-card .stat-icon::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 162, 232, 0.1) 0%, rgba(255, 222, 0, 0.1) 100%);
    z-index: 1;
}

.dashboard-stat-card .stat-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: center;
}

.dashboard-stat-card .stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1;
    letter-spacing: -0.5px;
}

.dashboard-stat-card .stat-label {
    font-size: 1rem;
    color: var(--bs-gray-400);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0.25rem;
}

.dashboard-stat-card .stat-footer {
    margin-top: auto;
    font-size: 0.875rem;
}

.dashboard-stat-card .stat-footer .badge {
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Modern table styles */
.modern-table .table {
    border-collapse: separate;
    border-spacing: 0;
}

.modern-table .table-dark th {
    border-bottom: none;
    padding-top: 1rem;
    padding-bottom: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    background-color: rgba(0, 0, 0, 0.5);
}

.modern-table .table-hover tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.05);
    cursor: pointer;
}

.modern-table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.2s;
}

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

/* Status indicators */
.status-indicator {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.status-indicator.synced {
    background-color: rgba(40, 167, 69, 0.15);
    color: #2ecc71;
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.status-indicator.pending {
    background-color: rgba(255, 222, 0, 0.15);
    color: #f39c12;
    border: 1px solid rgba(243, 156, 18, 0.3);
}

.status-indicator i {
    margin-right: 0.25rem;
}

/* Empty state styling */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
}

.empty-state-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--mpwt-blue) 0%, var(--mpwt-orange) 100%);
    font-size: 2rem;
    color: white;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    margin-bottom: 1.5rem;
}

/* System status list styling */
.system-status-list {
    padding: 1rem 0;
}

.status-item {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background-color 0.2s;
}

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

.status-item:hover {
    background-color: rgba(255, 255, 255, 0.03);
}

.status-item-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(30, 58, 138, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    color: var(--mpwt-blue);
    font-size: 1.25rem;
    flex-shrink: 0;
}

.status-item-content {
    flex-grow: 1;
}

.status-item-label {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: var(--bs-gray-400);
}

.status-item-value {
    font-weight: 600;
    color: white;
}

.status-item-detail {
    font-size: 0.875rem;
    color: var(--bs-gray-300);
}

/* Modern carousel enhancements */
.modern-carousel {
    border-radius: var(--card-border-radius);
    overflow: hidden;
}

.carousel-image-wrapper {
    position: relative;
    overflow: hidden;
    height: 100%;
}

.carousel-image-wrapper img {
    height: 300px;
    object-fit: cover;
}

.carousel-caption {
    background: linear-gradient(0deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 100%);
    border-radius: 0 0 var(--card-border-radius) var(--card-border-radius);
    padding: 2rem 1rem 1rem;
    left: 0;
    right: 0;
    bottom: 0;
    text-align: left;
}

.carousel-caption h5 {
    font-weight: 700;
    margin-bottom: 0.25rem;
    font-size: 1.2rem;
}

.carousel-caption p {
    font-size: 0.875rem;
    margin-bottom: 0;
    opacity: 0.8;
}

.carousel-indicators {
    margin-bottom: 0.5rem;
}

.carousel-indicators [data-bs-target] {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    border: none;
    margin: 0 4px;
}

.carousel-indicators .active {
    background-color: var(--pwt-blue);
}

/* Activity row animations */
.activity-row {
    animation: fadeIn 0.5s ease-in-out;
}

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

/* Sync styles */
.sync-item {
    transition: background-color 0.3s;
}

.sync-item.syncing {
    background-color: rgba(23, 162, 184, 0.1);
}

.sync-item.sync-success {
    background-color: rgba(40, 167, 69, 0.1);
}

.sync-item.sync-error {
    background-color: rgba(220, 53, 69, 0.1);
}

/* Language selector */
.language-selector {
    margin-left: 1rem;
}

/* Mobile touch interaction enhancements */
@media (max-width: 992px) {
    /* Increase touch target sizes */
    .btn, button, .nav-link, a.list-group-item, .form-check-label {
        cursor: pointer;
        touch-action: manipulation;
    }
    
    /* Add active state for touch */
    .btn:active, .nav-link:active, a.list-group-item:active {
        transform: scale(0.97);
        transition: transform 0.1s;
    }
    
    /* Ensure form elements are easily tappable */
    .form-control, .form-select, input, select, textarea {
        min-height: 3rem;
        font-size: 1rem;
    }
    
    /* Improve button spacing on mobile */
    .btn {
        padding: 0.625rem 1.25rem;
        margin-bottom: 0.5rem;
    }
    
    /* Ensure form labels are visible */
    .form-label {
        margin-bottom: 0.5rem;
        font-size: 1rem;
    }
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .container {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
    
    .data-collection-form {
        padding: 1.5rem;
    }
    
    .form-section {
        margin-bottom: 1.5rem;
        padding-bottom: 1rem;
    }
    
    .dashboard-stat-card {
        min-height: 150px;
    }
}

@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    #map-container {
        height: 300px;
    }
    
    .dashboard-stat-card {
        min-height: 120px;
    }
    
    .dashboard-stat-card i {
        font-size: 2rem;
    }
    
    .dashboard-stat-card .stat-value {
        font-size: 1.5rem;
    }
    
    .navbar-brand span {
        display: none;
    }
    
    .card-header {
        padding: 0.75rem 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .btn-group-sm > .btn, .btn-sm {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
}

@media (max-width: 576px) {
    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    h1, .h1 {
        font-size: 1.75rem;
    }
    
    h2, .h2 {
        font-size: 1.5rem;
    }
    
    h3, .h3 {
        font-size: 1.25rem;
    }
    
    .dashboard-stat-card {
        min-height: 100px;
        padding: 1.25rem 1rem;
    }
    
    .dashboard-stat-card i {
        font-size: 1.75rem;
        margin-bottom: 0.75rem;
    }
    
    .dashboard-stat-card .stat-value {
        font-size: 1.25rem;
    }
    
    .dashboard-stat-card .stat-label {
        font-size: 0.875rem;
    }
    
    .data-collection-form {
        padding: 1.25rem;
    }
    
    .image-preview-container img {
        max-width: 100px;
    }
    
    .navbar-nav .nav-link {
        padding: 0.5rem 0.75rem;
    }
}

/* Simple Dropdown Menu */
.simple-dropdown {
    position: absolute !important;
    top: 100% !important;
    right: 0 !important;
    left: auto !important;
    z-index: 1000 !important;
    background-color: #ffffff !important;
    border: 1px solid #dee2e6 !important;
    border-radius: 0.375rem !important;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
    min-width: 160px !important;
    padding: 0.5rem 0 !important;
    margin: 0.125rem 0 0 !important;
    font-size: 0.875rem !important;
    color: #212529 !important;
}

.simple-dropdown .dropdown-item {
    display: block !important;
    width: 100% !important;
    padding: 0.375rem 1rem !important;
    clear: both !important;
    font-weight: 400 !important;
    color: #212529 !important;
    text-align: inherit !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    background-color: transparent !important;
    border: 0 !important;
    cursor: pointer !important;
}

.simple-dropdown .dropdown-item:hover {
    background-color: #e9ecef !important;
    color: #1e2125 !important;
}

.simple-dropdown .dropdown-divider {
    height: 0 !important;
    margin: 0.5rem 0 !important;
    overflow: hidden !important;
    border-top: 1px solid #dee2e6 !important;
}

/* Fix parent container overflow */
.card .dropdown {
    overflow: visible !important;
}

.card .dropdown .dropdown-menu {
    overflow: visible !important;
}

/* Ensure card body doesn't clip dropdown */
.card-body {
    overflow: visible !important;
}

.card {
    overflow: visible !important;
}

/* Property card specific overflow fixes */
.property-card {
    overflow: visible !important;
    z-index: 1;
    margin-bottom: 1rem !important;
}

.property-card:hover {
    z-index: 10;
}

.property-card .dropdown {
    overflow: visible !important;
}

.property-card .dropdown-menu {
    overflow: visible !important;
}

/* Add spacing between property cards to accommodate dropdown */
.property-card + .property-card {
    margin-top: 1rem !important;
}

/* Owner card container overflow fixes */
.owner-card {
    overflow: visible !important;
}

.owner-card .card-body {
    overflow: visible !important;
}

/* Row and column overflow fixes */
.row {
    overflow: visible !important;
}

.col-12 {
    overflow: visible !important;
}

.col-md-6 {
    overflow: visible !important;
}

.col-lg-4 {
    overflow: visible !important;
}

.dropdown-item {
    padding: 0.5rem 1rem;
    transition: background-color 0.15s ease-in-out;
    display: block;
    width: 100%;
    clear: both;
    font-weight: 400;
    color: #212529;
    text-align: inherit;
    text-decoration: none;
    white-space: nowrap;
    background-color: transparent;
    border: 0;
}

.dropdown-item:hover, .dropdown-item:focus {
    background-color: rgba(0, 162, 232, 0.1);
    color: #1e2125;
}

.dropdown-item.text-danger:hover, .dropdown-item.text-danger:focus {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.dropdown-divider {
    margin: 0.5rem 0;
    height: 0;
    overflow: hidden;
    border-top: 1px solid rgba(0, 0, 0, 0.125);
}

/* Ensure dropdowns appear above other elements */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    padding: 0.375rem 0.75rem;
    border: 1px solid rgba(0, 162, 232, 0.3);
    background-color: transparent;
    color: #0d6efd;
    border-radius: 0.375rem;
    transition: all 0.15s ease-in-out;
}

.dropdown-toggle:hover {
    background-color: rgba(0, 162, 232, 0.1);
    border-color: rgba(0, 162, 232, 0.5);
}

.dropdown-toggle::after {
    display: none;
}

.dropdown-toggle:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 162, 232, 0.25);
}

/* Fix for dropdown positioning in card layouts */
.card .dropdown {
    position: relative;
}

.card .dropdown-menu {
    position: absolute;
    will-change: transform;
}

/* Force dropdown to stay in place */
.dropdown-menu.show {
    display: block;
    position: absolute;
    inset: 0px auto auto 0px;
    margin: 0;
    transform: translate(0px, 38px);
}

/* Right-aligned dropdown menu */
.dropdown-menu-end {
    --bs-position: end;
    right: 0 !important;
    left: auto !important;
}

.dropdown-menu.dropdown-menu-end.show {
    position: absolute;
    inset: 0px 0px auto auto;
    margin: 0;
    transform: translate(0px, 38px);
}

/* Ensure proper positioning for property card dropdowns */
.card .dropdown .dropdown-menu {
    position: absolute;
    z-index: 1000;
    min-width: 10rem;
    padding: 0.5rem 0;
    margin: 0.125rem 0 0;
    font-size: 0.875rem;
    color: #212529;
    text-align: left;
    list-style: none;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 0.375rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Footer */
footer {
    margin-top: 2rem;
    padding: 1rem 0;
    background-color: var(--light-color);
    text-align: center;
    font-size: 0.875rem;
    color: var(--secondary-color);
}

/* Lao language specific adjustments */
[lang="lo"] {
    font-family: 'Phetsarath OT', 'Saysettha OT', 'Lao UI', sans-serif;
    line-height: 1.6;
}

/* Accessibility focus states */
a:focus, button:focus, input:focus, select:focus, textarea:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* MPWT branded buttons */
.btn-yellow {
    background-color: var(--mpwt-orange);
    color: white;
    border: none;
    font-weight: 600;
}

.btn-yellow:hover, .btn-yellow:focus {
    background-color: #dc2626;
    color: white;
    filter: brightness(1.1);
    box-shadow: 0 4px 12px rgba(234, 88, 12, 0.5);
}

.btn-mpwt-blue {
    background-color: var(--mpwt-blue);
    color: white;
    border: none;
    font-weight: 600;
}

.btn-mpwt-blue:hover, .btn-mpwt-blue:focus {
    background-color: #1e40af;
    color: white;
    filter: brightness(1.1);
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.5);
}

/* MPWT outline buttons */
.btn-outline-mpwt-orange {
    color: var(--mpwt-orange);
    border: 2px solid var(--mpwt-orange);
    background-color: transparent;
    font-weight: 600;
}

.btn-outline-mpwt-orange:hover, .btn-outline-mpwt-orange:focus {
    background-color: var(--mpwt-orange);
    color: white;
    box-shadow: 0 4px 12px rgba(234, 88, 12, 0.3);
}

.btn-outline-mpwt-blue {
    color: var(--mpwt-blue);
    border: 2px solid var(--mpwt-blue);
    background-color: transparent;
    font-weight: 600;
}

.btn-outline-pwt-blue:hover, .btn-outline-pwt-blue:focus {
    background-color: var(--pwt-blue);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 162, 232, 0.3);
}

/* PWT gradient styles */
.bg-gradient-pwt {
    background: linear-gradient(135deg, var(--pwt-blue) 0%, var(--pwt-blue) 50%, var(--pwt-yellow) 150%);
}

.text-gradient-pwt {
    background: linear-gradient(135deg, var(--pwt-blue) 0%, var(--pwt-yellow) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Mobile-First Responsive Styles */
@media (max-width: 768px) {
    .container-fluid {
        padding: 0.5rem;
    }
    
    .card {
        margin-bottom: 1rem;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    
    .form-floating {
        margin-bottom: 1rem;
    }
    
    .nav-tabs {
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .nav-tabs::-webkit-scrollbar {
        display: none;
    }
    
    .nav-tabs .nav-link {
        display: inline-block;
        min-width: 120px;
        text-align: center;
        font-size: 0.875rem;
        padding: 0.5rem 0.75rem;
        flex-shrink: 0;
    }
    
    .tab-content {
        padding: 1rem 0.5rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1.1rem;
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .form-control, .form-select {
        font-size: 16px; /* Prevents zoom on iOS */
        min-height: 48px; /* Touch-friendly size */
    }
    
    .btn {
        min-height: 44px;
        margin-bottom: 0.5rem;
    }
    
    #map {
        height: 250px !important;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .table th, .table td {
        padding: 0.5rem;
        vertical-align: middle;
    }
    
    .d-grid .btn {
        width: 100%;
    }
}

/* Touch-friendly improvements */
.btn-group-vertical .btn {
    border-radius: 6px !important;
    margin-bottom: 0.25rem;
}

/* Photo capture mobile styles */
.camera-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    background: #000;
}

.camera-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.camera-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
}

/* Mobile dashboard cards */
.dashboard-stat-card {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
}

.stat-label {
    font-size: 0.875rem;
    opacity: 0.9;
}
