/* Dragonlight CMS - Main Stylesheet */

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --success-color: #27ae60;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --light-bg: #ecf0f1;
    --dark-text: #2c3e50;
    --light-text: #7f8c8d;
    --border-color: #bdc3c7;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--dark-text);
    background-color: #f5f5f5;
}

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

/* ===== LANDING PAGE NAVIGATION ===== */
.navbar {
    background: #2c3e50;
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: #3498db;
}

.btn-nav {
    background: #3498db;
    padding: 0.5rem 1.5rem;
    border-radius: 5px;
    transition: background 0.3s;
}

.btn-nav:hover {
    background: #2980b9;
}

/* ===== AUTHENTICATED PAGES HEADER ===== */
/* Header */
.site-header {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo a {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo img {
    height: 80px;
    width: auto;
}

.logo-img {
    height: 80px;
    width: auto;
}

.tagline {
    font-size: 0.75rem;
    color: #95a5a6;
    display: block;
}

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

.main-nav a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s;
}

.main-nav a:hover {
    opacity: 0.8;
}

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

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

.role-badge {
    background-color: var(--warning-color);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
}

/* Login Page */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-box {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.logo {
    text-align: center;
    margin-bottom: 2rem;
}

.logo h1 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.logo p {
    color: var(--light-text);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
}

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

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #2980b9;
}

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

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

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

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

.btn-block {
    width: 100%;
}

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

/* Alerts */
.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
}

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

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

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

/* Dashboard */
.dashboard-header {
    margin-bottom: 2rem;
}

.subtitle {
    color: var(--light-text);
    font-size: 1.1rem;
}

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

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    font-size: 2.5rem;
}

.stat-content h3 {
    font-size: 2rem;
    margin-bottom: 0.25rem;
    color: var(--primary-color);
}

.stat-content p {
    color: var(--light-text);
    margin: 0;
}

/* Cards */
.card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
}

.card h2 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

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

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

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

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

.data-table tr:hover {
    background-color: #f8f9fa;
}

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

.badge-low {
    background-color: #d1ecf1;
    color: #0c5460;
}

.badge-medium {
    background-color: #fff3cd;
    color: #856404;
}

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

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

.badge-status {
    background-color: var(--light-bg);
    color: var(--dark-text);
}

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

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

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

.badge-warning {
    background-color: #fff3cd;
    color: #856404;
}

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

.badge-info {
    background-color: #d1ecf1;
    color: #0c5460;
}

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

.badge-inactive {
    background-color: #e2e3e5;
    color: #383d41;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    overflow: auto;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

.close {
    color: var(--light-text);
    float: right;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: var(--dark-text);
}

/* Work Orders */
.work-order-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 1rem;
    border-left: 4px solid var(--border-color);
}

.work-order-card.priority-high {
    border-left-color: var(--warning-color);
}

.work-order-card.priority-urgent {
    border-left-color: var(--danger-color);
}

.work-order-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.work-order-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.work-order-body {
    margin-bottom: 1rem;
}

.work-order-details {
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
    margin-top: 1rem;
}

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

.property-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
}

.property-header,
.property-body,
.property-footer {
    padding: 1.5rem;
}

.property-header {
    background-color: var(--light-bg);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.property-header h3 {
    margin: 0;
    color: var(--primary-color);
}

.property-actions {
    display: flex;
    gap: 0.5rem;
}

.property-address {
    color: var(--dark-text);
    margin-bottom: 0.5rem;
}

.property-description {
    color: var(--light-text);
    margin-bottom: 1rem;
}

.property-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

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

.property-stats .label {
    font-size: 0.875rem;
    color: var(--light-text);
}

.property-stats .value {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
}

.property-footer {
    background-color: #f8f9fa;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.lease-info,
.payment-summary {
    margin-bottom: 1rem;
}

.info-row,
.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.info-row .label,
.summary-row span:first-child {
    color: var(--light-text);
}

.info-row .value,
.summary-row .amount {
    font-weight: 600;
    color: var(--dark-text);
}

.rent-amount {
    font-size: 1.5rem;
    color: var(--secondary-color);
}

.summary-row.total {
    border-top: 2px solid var(--primary-color);
    font-size: 1.25rem;
    font-weight: 700;
}

.payment-note {
    margin-top: 1rem;
    text-align: center;
    color: var(--light-text);
}

/* Form Layouts */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

.form-text {
    font-size: 0.875rem;
    color: var(--light-text);
    margin-top: 0.25rem;
}

/* Filters */
.filters {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
}

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

.filters select {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 20px;
    background-color: var(--light-bg);
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: var(--success-color);
    transition: width 0.3s ease;
}

/* Utilities */
.text-muted {
    color: var(--light-text);
}

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

.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--light-text);
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .main-nav ul {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .properties-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== LANDING PAGE STYLES (index.php) ===== */
/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6rem 2rem;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary {
    background: white;
    color: #667eea;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.btn-outline {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-outline:hover {
    background: white;
    color: #667eea;
}

/* Section Styles */
section {
    padding: 4rem 2rem;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
    color: #2c3e50;
}

/* Tenant Portal Section */
.tenant-portal {
    background: #f8f9fa;
}

.portal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.portal-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.portal-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.portal-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.portal-icon.green { color: #27ae60; }
.portal-icon.orange { color: #e67e22; }

.portal-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.portal-card p {
    color: #7f8c8d;
    line-height: 1.8;
}

/* Property Cards on Landing Page */
.property-card .property-image {
    background: linear-gradient(135deg, #b8c6db 0%, #f5f7fa 100%);
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: #95a5a6;
}

.property-card .property-content {
    padding: 1.5rem;
}

.property-card .property-content h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.property-card .property-content p {
    color: #7f8c8d;
    margin-bottom: 1rem;
}

.property-location {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #95a5a6;
    font-size: 0.9rem;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    text-align: center;
}

.cta-section h2 {
    color: white;
    margin-bottom: 1.5rem;
}

.cta-section p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

/* Footer */
footer {
    background: #2c3e50;
    color: white;
    padding: 3rem 2rem 1rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: #3498db;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #95a5a6;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #34495e;
    color: #95a5a6;
}

/* ===== SELL HOUSE PAGE STYLES (sell-house.php) ===== */
.hero-section {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 80px 20px;
    text-align: center;
}

.hero-section h1 {
    font-size: 3em;
    margin-bottom: 20px;
    font-weight: 700;
}

.hero-section .subtitle {
    font-size: 1.5em;
    margin-bottom: 40px;
    opacity: 0.95;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin: 60px 0;
}

.benefit-card {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s;
}

.benefit-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.benefit-card .icon {
    font-size: 3em;
    margin-bottom: 20px;
}

.benefit-card h3 {
    color: #1e3c72;
    margin-bottom: 15px;
}

.form-section {
    background: #f8f9fa;
    padding: 60px 20px;
}

.form-container {
    max-width: 700px;
    margin: 0 auto;
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

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

.form-grid.full {
    grid-template-columns: 1fr;
}

.submit-btn {
    background: #28a745;
    color: white;
    padding: 15px 40px;
    font-size: 18px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    width: 100%;
    font-weight: 600;
    transition: background 0.3s;
}

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

.testimonials {
    padding: 60px 20px;
    background: white;
}

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

.testimonial {
    padding: 30px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #1e3c72;
}

.testimonial .quote {
    font-style: italic;
    margin-bottom: 15px;
    color: #555;
}

.testimonial .author {
    font-weight: 600;
    color: #1e3c72;
}

.stats-section {
    background: #1e3c72;
    color: white;
    padding: 40px 20px;
    text-align: center;
}

.stat .number {
    font-size: 3em;
    font-weight: 700;
    margin-bottom: 10px;
}

.stat .label {
    font-size: 1.1em;
    opacity: 0.9;
}

/* ===== RESPONSIVE OVERRIDES FOR LANDING PAGE ===== */
@media (max-width: 768px) {
    .nav-menu {
        gap: 1rem;
        font-size: 0.9rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }

    .hero-section h1 {
        font-size: 2em;
    }
    
    .hero-section .subtitle {
        font-size: 1.2em;
    }
    
    .portal-grid {
        grid-template-columns: 1fr;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
}
