/* Modern Property Management System Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

/* Login Page Styles */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-form {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
}

.login-form h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
    font-size: 28px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-secondary {
    background: #6c757d;
}

.btn-danger {
    background: #dc3545;
}

.btn-success {
    background: #28a745;
}

.alert {
    padding: 12px 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    font-weight: 500;
}

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

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

/* Dashboard Layout */
.dashboard {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background: white;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    padding: 20px 0;
}

.sidebar-header {
    padding: 0 20px 20px;
    border-bottom: 1px solid #e1e5e9;
    margin-bottom: 20px;
}

.sidebar-header h3 {
    color: #333;
    font-size: 20px;
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu li {
    margin-bottom: 5px;
}

.sidebar-menu a {
    display: block;
    padding: 12px 20px;
    color: #666;
    text-decoration: none;
    transition: all 0.3s ease;
}

.sidebar-menu a:hover, .sidebar-menu a.active {
    background: #667eea;
    color: white;
}

.main-content {
    flex: 1;
    padding: 30px;
    background: #f8f9fa;
}

.page-header {
    background: white;
    padding: 20px 30px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.page-header h1 {
    color: #333;
    font-size: 24px;
}

.content-card {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Form Styles */
.header-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    align-items: center;
    justify-content: space-between;
}

.export-buttons {
    display: flex;
    gap: 10px;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-col {
    flex: 1;
}

/* Table Styles */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e1e5e9;
}

th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

tr:hover {
    background: #f8f9fa;
}

.status-badge {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

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

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

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

.status-rented {
    background: #d1ecf1;
    color: #0c5460;
}

.action-buttons {
    display: flex;
    gap: 5px;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
    border-radius: 5px;
    text-decoration: none;
    display: inline-block;
}

.search-box {
    margin-bottom: 20px;
}

.search-box input {
    max-width: 300px;
}

/* Search Form Styles */
.search-form {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 30px;
    border: 1px solid #e9ecef;
}

/* Enhanced Search Box Styles */
.search-box {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 25px;
    border: 1px solid #e9ecef;
}

.search-container {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    min-width: 250px;
    padding: 14px 18px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.search-input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-btn {
    padding: 14px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    min-width: 120px;
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

.clear-btn {
    padding: 14px 20px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.clear-btn:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .search-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .search-input {
        min-width: 100%;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .search-btn, .clear-btn {
        width: 100%;
        padding: 16px;
        font-size: 16px;
    }
    
    .search-box {
        padding: 15px;
        margin-bottom: 20px;
    }
}

.search-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.pagination-info {
    color: #6c757d;
    font-size: 14px;
}

.no-results {
    text-align: center;
    padding: 40px;
    color: #6c757d;
    font-size: 18px;
}

/* Pagination Styles */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 30px;
}

.pagination-btn {
    padding: 8px 15px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #495057;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.pagination-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.pagination-btn.active {
    background: #007bff;
    border-color: #007bff;
    color: white;
}

/* Status Badge Styles */
.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
}

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

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

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

/* User Role Styles */
.user-role {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
}

.role-admin {
    background: #dc3545;
    color: white;
}

.role-agent {
    background: #28a745;
    color: white;
}

/* Action Button Styles */
.btn-view {
    background: #17a2b8;
    border: 1px solid #17a2b8;
    color: white;
    padding: 4px 8px;
    font-size: 11px;
    margin: 1px;
    border-radius: 3px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    min-width: 50px;
    text-align: center;
}

.btn-view:hover {
    background: #138496;
    border-color: #117a8b;
    color: white;
    text-decoration: none;
}

.btn-edit {
    background: #28a745;
    border: 1px solid #28a745;
    color: white;
    padding: 4px 8px;
    font-size: 11px;
    margin: 1px;
    border-radius: 3px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    min-width: 50px;
    text-align: center;
}

.btn-edit:hover {
    background: #218838;
    border-color: #1e7e34;
    color: white;
    text-decoration: none;
}

.btn-delete {
    background: #dc3545;
    border: 1px solid #dc3545;
    color: white;
    padding: 4px 8px;
    font-size: 11px;
    margin: 1px;
    border-radius: 3px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    min-width: 50px;
    text-align: center;
}

.btn-delete:hover {
    background: #c82333;
    border-color: #bd2130;
    color: white;
    text-decoration: none;
}

.actions {
    white-space: nowrap;
    text-align: center;
    width: 180px;
}

.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    justify-content: center;
    align-items: center;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 20px;
    font-size: 22px;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 101;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    letter-spacing: 2px;
}

.mobile-menu-toggle:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.3);
}

.mobile-menu-toggle:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Buyer Status Badge Styles */
.status-interested {
    background: #d4edda;
    color: #155724;
}

.status-visited {
    background: #d1ecf1;
    color: #0c5460;
}

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

.status-left-without-interest {
    background: #f8d7da;
    color: #721c24;
}

/* Responsive Design */
@media (max-width: 768px) {
    .dashboard {
        flex-direction: column;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .sidebar {
        width: 100%;
        order: 1;
        background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        max-height: 0;
        overflow: hidden;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        border-radius: 0 0 15px 15px;
    }
    
    .sidebar.show {
        max-height: 800px;
        box-shadow: 0 8px 20px rgba(0,0,0,0.25);
    }
    
    .sidebar-header {
        padding: 15px;
    }
    
    .sidebar-header h3,
    .sidebar-header p {
        color: white !important;
    }
    
    .sidebar-menu {
        padding-bottom: 15px;
    }
    
    .main-content {
        order: 2;
        padding: 20px;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .table-container {
        font-size: 14px;
    }
}
