/* Main Stylesheet for Rental Property Portal */

:root {
    --primary-color: #667eea;
    --primary-dark: #5568d3;
    --secondary-color: #764ba2;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-bg: #f8f9fa;
    --dark-text: #333;
    --light-text: #666;
    --border-color: #e0e0e0;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-lg: 0 4px 16px rgba(0,0,0,0.15);
    --transition: all 0.3s ease;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--dark-text);
    background-color: #ffffff;
    overflow-y: scroll;
}

/* Layout */
.wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

/* Header */
header {
    background: white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 70px;
}

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

.logo {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
}

/* Navigation */
nav ul {
    list-style: none;
    display: flex;
    gap: 10px;
    align-items: center;
}

nav li {
    position: relative;
}

nav a {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    color: var(--dark-text);
    text-decoration: none;
    border-radius: 5px;
    transition: var(--transition);
}

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

nav .dropdown {
    position: relative;
}

nav .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 200px;
    box-shadow: var(--shadow-lg);
    border-radius: 5px;
    padding: 5px 0;
    margin-top: 0;
    z-index: 1001;
}

nav .dropdown:hover .dropdown-menu {
    display: block;
}

nav .dropdown-menu a {
    display: block;
    padding: 10px 20px;
    border-radius: 0;
}

nav .dropdown-menu a:hover {
    background: var(--primary-color);
    color: white;
}

.notification-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background: var(--danger-color);
    color: white;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 10px;
}

/* Mobile Menu */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--dark-text);
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        box-shadow: var(--shadow);
        padding: 20px;
    }
    
    nav.active {
        display: block;
    }
    
    nav ul {
        flex-direction: column;
        gap: 0;
        width: 100%;
    }
    
    nav li {
        width: 100%;
    }
    
    nav a {
        width: 100%;
        border-bottom: 1px solid var(--border-color);
    }
    
    nav .dropdown-menu {
        position: static;
        display: block;
        box-shadow: none;
        margin: 0;
        background: var(--light-bg);
    }
}

/* Main Content */
main {
    flex: 1;
    padding: 40px 0;
}

.page-header {
    margin-bottom: 30px;
}

.page-header h1 {
    font-size: 32px;
    margin-bottom: 10px;
}

.page-header p {
    color: var(--light-text);
    font-size: 16px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: var(--transition);
}

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

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

.btn-secondary:hover {
    background: #693e8e;
}

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

.btn-success:hover {
    background: #218838;
}

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

.btn-danger:hover {
    background: #c82333;
}

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

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

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--dark-text);
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-size: 16px;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-control:disabled,
.form-control[readonly] {
    background-color: var(--light-bg);
    color: var(--text-color);
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.help-text {
    font-size: 14px;
    color: var(--light-text);
    margin-top: 5px;
}

.error-message {
    color: var(--danger-color);
    font-size: 14px;
    margin-top: 5px;
}

/* Cards */
.card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.card-header {
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.card-header h2 {
    font-size: 24px;
}

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

table {
    width: 100%;
    border-collapse: collapse;
}

table th,
table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

table th {
    background: var(--light-bg);
    font-weight: 600;
}

table tr:hover {
    background: var(--light-bg);
}

table .actions {
    white-space: nowrap;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

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

.badge-ongoing {
    background: var(--warning-color);
    color: var(--dark-text);
}

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

.badge-closed {
    background: var(--light-text);
    color: white;
}

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

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

.badge-maintenance,
.badge-unavailable {
    background: var(--light-text);
    color: white;
}

/* Property Grid */
.property-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.property-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

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

.property-card-content {
    padding: 20px;
}

.property-card h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.property-card .address {
    font-weight: 600;
    margin-bottom: 15px;
}

.property-card .meta {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
    font-size: 14px;
    color: var(--light-text);
}

.property-card .meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.property-card .description {
    color: var(--dark-text);
    margin-bottom: 15px;
}

.property-card .price {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
}

/* Footer */
footer {
    background: var(--dark-text);
    color: white;
    padding: 40px 0;
    margin-top: 60px;
}

footer .container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

footer h4 {
    margin-bottom: 15px;
    color: white;
}

footer a {
    color: #ccc;
    text-decoration: none;
    transition: var(--transition);
}

footer a:hover {
    color: white;
}

footer ul {
    list-style: none;
}

footer ul li {
    margin-bottom: 10px;
}

/* Alerts */
.alert {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

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

.alert-error {
    background: #f8d7da;
    border: 1px solid var(--danger-color);
    color: #721c24;
}

.alert-info {
    background: #d1ecf1;
    border: 1px solid var(--info-color);
    color: #0c5460;
}

.alert-warning {
    background: #fff3cd;
    border: 1px solid var(--warning-color);
    color: #856404;
}

/* Floating Contact Button */
.floating-contact {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    z-index: 999;
}

.floating-contact:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    padding: 20px;
    border-bottom: 2px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--light-text);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 20px;
    border-top: 2px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 3000;
}

.toast {
    min-width: 300px;
    padding: 15px 20px;
    margin-bottom: 10px;
    background: white;
    border-radius: 5px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 15px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast-icon {
    font-size: 24px;
}

.toast-success .toast-icon {
    color: var(--success-color);
}

.toast-error .toast-icon {
    color: var(--danger-color);
}

.toast-info .toast-icon {
    color: var(--info-color);
}

/* Loading Spinner */
.spinner {
    border: 3px solid var(--light-bg);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }

.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }

.hidden {
    display: none;
}

/* Feature Table */
.feature-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.feature-table tr {
    border-bottom: 1px solid var(--border-color);
}

.feature-table td {
    padding: 15px;
    vertical-align: middle;
}

.feature-table td:first-child {
    width: 50px;
    text-align: center;
}

.feature-icon {
    font-size: 24px;
    color: var(--primary-color);
}

.feature-name {
    font-weight: 500;
}

.feature-included {
    color: var(--success-color);
    font-weight: 600;
}

.feature-not-included {
    color: var(--light-text);
}

/* Dashboard Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: var(--shadow);
    text-align: center;
}

.stat-card .stat-value {
    font-size: 32px;
    font-weight: bold;
    color: var(--primary-color);
}

.stat-card .stat-label {
    color: var(--light-text);
    margin-top: 5px;
}

/* Responsive */
@media (max-width: 768px) {
    .property-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    main {
        padding: 20px 0;
    }
}

