/* Professional Color Scheme Variables */
:root {
    --primary-dark: #1a365d;
    --primary-medium: #2d3748;
    --primary-light: #4a5568;
    --accent-blue: #3182ce;
    --accent-blue-hover: #2c5282;
    --success-green: #38a169;
    --warning-yellow: #d69e2e;
    --error-red: #e53e3e;
    --background-light: #f7fafc;
    --card-white: #ffffff;
    --text-primary: #2d3748;
    --text-secondary: #718096;
    --border-light: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background-light);
}

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

.dashboard-container {
    min-height: 100vh;
    background-color: var(--background-light);
}

/* Header */
.dashboard-header {
    background-color: var(--primary-dark);
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
}

.dashboard-header h1 {
    margin: 0;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Navigation */
.dashboard-nav {
    background-color: var(--primary-medium);
    padding: 0;
    border-bottom: 1px solid var(--border-light);
}

.dashboard-nav ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

.dashboard-nav li {
    margin: 0;
}

.dashboard-nav a {
    display: block;
    padding: 1rem 2rem;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

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

/* Main Content */
.dashboard-main {
    padding: 2rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--card-white);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    text-align: center;
    border: 1px solid var(--border-light);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px -8px rgba(0, 0, 0, 0.2);
}

.stat-card h3 {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin: 0;
}

/* Tables */
.table-container {
    background: var(--card-white);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow-x: auto;
    margin-bottom: 2rem;
    border: 1px solid var(--border-light);
}

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

.data-table th,
.data-table td {
    padding: 1rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.data-table th {
    background-color: var(--background-light);
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table tr:hover {
    background-color: var(--background-light);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* Forms */
.form-container {
    background: var(--card-white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    max-width: 600px;
    margin: 2rem auto;
}

.login-form,
.register-form {
    max-width: 400px;
    margin: 2rem auto;
}

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

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-light);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: var(--card-white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-blue-hover));
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--accent-blue-hover), var(--primary-dark));
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(49, 130, 206, 0.3);
}

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

.btn-secondary:hover {
    background-color: var(--primary-medium);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(74, 85, 104, 0.3);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

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

.btn-danger:hover {
    background-color: #c53030;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(229, 62, 62, 0.3);
}

/* Messages */
.error-messages,
.success-message {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid;
    font-weight: 500;
}

.error-messages {
    background-color: #fed7d7;
    border-color: var(--error-red);
    color: #c53030;
}

.success-message {
    background-color: #c6f6d5;
    border-color: var(--success-green);
    color: #22543d;
}

.alert {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid;
    font-weight: 500;
}

.alert-warning {
    background-color: #fef5e7;
    border-color: var(--warning-yellow);
    color: #744210;
}

/* Status */
.status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
}

.status-paid {
    background-color: var(--success-green);
    color: white;
}

.status-pending {
    background-color: var(--warning-yellow);
    color: var(--text-primary);
}

.status-overdue {
    background-color: var(--error-red);
    color: white;
}

/* Property Cards */
.property-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.property-card {
    background: var(--card-white);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.property-card h4 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 600;
}

.property-card p {
    margin-bottom: 0.25rem;
    color: var(--text-secondary);
}

/* Properties Overview */
.properties-overview {
    background: var(--card-white);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    margin-bottom: 2rem;
}

.properties-overview h3 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    font-weight: 600;
}

.properties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.property-card .property-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--accent-blue);
}

.property-card .property-header h4 {
    margin: 0;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.1rem;
}

.property-type {
    background: var(--accent-blue);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.property-details .detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-light);
}

.property-details .detail-row:last-child {
    border-bottom: none;
}

.property-details .detail-row strong {
    color: var(--text-primary);
    font-weight: 600;
    min-width: 120px;
}

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

.status-occupied {
    background-color: var(--warning-yellow);
    color: var(--text-primary);
}

.status-maintenance {
    background-color: var(--error-red);
    color: white;
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.info-grid div {
    background: var(--background-light);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-light);
}

/* Recent Activity */
.recent-activity,
.recent-maintenance,
.recent-payments {
    background: var(--card-white);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    margin-bottom: 2rem;
}

.recent-activity h3,
.recent-maintenance h3,
.recent-payments h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-weight: 600;
}

.recent-activity ul {
    list-style: none;
    padding: 0;
}

.recent-activity li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-light);
}

.recent-activity li:last-child {
    border-bottom: none;
}

/* Lease Info */
.lease-info {
    background: var(--card-white);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    margin-bottom: 2rem;
}

/* Payment Summary */
.payment-summary {
    background: var(--card-white);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    margin-bottom: 2rem;
}

.summary-stats {
    display: flex;
    gap: 2rem;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-dark);
}

/* Property Info */
.property-info {
    background: var(--background-light);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-light);
    margin-bottom: 1.5rem;
}

/* Reports Styles */
.reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.report-card {
    background: var(--card-white);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
}

.report-card h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1.2rem;
    font-weight: 600;
}

.report-card.full-width {
    grid-column: 1 / -1;
}

.stats-list {
    list-style: none;
    padding: 0;
}

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

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

.stat-item span:first-child {
    font-weight: 500;
    color: var(--text-secondary);
}

.stat-item span:last-child {
    font-weight: 700;
    color: var(--primary-dark);
}

.occupancy-chart {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

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

.revenue-chart {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 1rem 0;
}

.revenue-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 60px;
}

.bar-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
}

.bar-container {
    height: 150px;
    width: 30px;
    background-color: #ecf0f1;
    border-radius: 4px 4px 0 0;
    position: relative;
    display: flex;
    align-items: flex-end;
}

.bar {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-blue-hover));
    border-radius: 4px 4px 0 0;
    min-height: 5px;
    transition: width 0.3s ease;
}

.bar-value {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-top: 0.5rem;
}

/* Landlord specific styles */
.period-selector {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background: var(--card-white);
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
}

.period-links {
    display: flex;
    gap: 1rem;
}

.reports-summary {
    background: var(--card-white);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    margin-bottom: 2rem;
}

.report-links {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.report-info {
    color: var(--text-secondary);
    font-style: italic;
}

.period-income {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.income-item {
    background: var(--background-light);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-light);
    text-align: center;
}

.income-item h4 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 600;
}

.income-amount {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--success-green);
    margin-bottom: 0.25rem;
}

.income-period {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.property-status {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.property-status-item {
    background: var(--background-light);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-light);
}

.property-status-item h4 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 600;
}

.property-status-item p {
    margin-bottom: 0.25rem;
    color: var(--text-secondary);
}

.tenant-info {
    background: var(--background-light);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-light);
    margin-bottom: 1.5rem;
}

.tenant-info h3 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 600;
}

.tenant-info p {
    margin-bottom: 0.25rem;
    color: var(--text-secondary);
}

.form-row {
    display: flex;
    gap: 1rem;
}

.form-row .form-group {
    flex: 1;
}

/* Charts Section */
.charts-section {
    margin-top: 40px;
}

.charts-section h3 {
    color: var(--text-primary);
    margin-bottom: 25px;
    font-size: 28px;
    font-weight: 600;
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.chart-card {
    background: var(--card-white);
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.chart-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px -8px rgba(0, 0, 0, 0.2);
}

.chart-card h4 {
    color: var(--text-primary);
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: 600;
    text-align: center;
}

.chart-card canvas {
    max-height: 300px;
}

/* Enhanced Professional Styling */
.dashboard-main {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    min-height: calc(100vh - 200px);
}

.stat-card {
    background: linear-gradient(135deg, var(--card-white) 0%, #f8fafc 100%);
    border: 1px solid var(--border-light);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-blue), var(--success-green));
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-blue-hover));
    box-shadow: 0 4px 15px rgba(49, 130, 206, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--accent-blue-hover), var(--primary-dark));
    box-shadow: 0 6px 20px rgba(49, 130, 206, 0.4);
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .dashboard-nav ul {
        flex-direction: column;
    }

    .dashboard-nav a {
        padding: 0.75rem 1rem;
    }

    .dashboard-main {
        padding: 1rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .reports-grid {
        grid-template-columns: 1fr;
    }

    .summary-stats {
        flex-direction: column;
        gap: 1rem;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .property-list {
        grid-template-columns: 1fr;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .revenue-chart {
        gap: 0.25rem;
    }

    .revenue-bar {
        min-width: 40px;
    }

    .bar-container {
        height: 100px;
        width: 20px;
    }

    .charts-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .chart-card {
        padding: 20px;
    }

    .chart-card h4 {
        font-size: 18px;
    }

    .chart-card canvas {
        max-height: 250px;
    }
}