* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Iconeville Brand Colors - NEW */
    --dark-green: #0A5E2A;         /* Dark Green - Marketing buttons/headers */
    --light-green: #6DAC4F;        /* Light Green - Sidebars only */
    --cream: #EFEFE8;              /* Off-White/Cream - All backgrounds (60%) */
    --bright-red: #FE0000;         /* Bright Red - Admin buttons/headers */
    
    /* Legacy mappings */
    --primary-green: #0A5E2A;
    --secondary-green: #6DAC4F;
    --accent-red: #FE0000;
    --dark-red: #FE0000;
    --light-red: #ffe5e5;
    --white: #FFFFFF;
    
    /* Legacy variable names */
    --primary-orange: #0A5E2A;
    --dark-orange: #6DAC4F;
    --light-orange: #EFEFE8;
    
    /* Neutral Colors */
    --dark-gray: #1a1a1a;
    --light-gray: #f8f9fa;
    --text-dark: #2c2c2c;
    --text-light: #666666;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', sans-serif;
    background-color: #EFEFE8;
    color: var(--text-dark);
    overflow-x: hidden;
}

img,
video,
canvas,
svg,
iframe {
    max-width: 100%;
}

img,
video,
canvas {
    height: auto;
}

table {
    width: 100%;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    width: min(1200px, calc(100% - 40px));
}

/* Navbar */
.navbar {
    background-color: #ffffff;
    padding: 12px 0;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    margin-bottom: 0;
    border-bottom: 3px solid var(--primary-green);
}

.navbar-brand {
    color: var(--primary-green);
    font-size: 24px;
    font-weight: 700;
    margin-left: 20px;
    float: left;
    letter-spacing: -0.5px;
}

.navbar-menu {
    list-style: none;
    float: right;
    margin-right: 20px;
}

.navbar-menu li {
    display: inline-block;
    margin-left: 25px;
}

.navbar-menu a {
    color: var(--text-dark);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.navbar-menu a:hover,
.navbar-menu a.active {
    color: var(--dark-red);
}

/* Forms */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 13px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    font-family: inherit;
    transition: all 0.2s ease;
}

.form-group textarea {
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(34, 65, 24, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.form-row.single {
    grid-template-columns: 1fr;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    font-weight: 600;
}

.btn-primary {
    background-color: var(--primary-green);
    color: white;
}

.btn-primary:hover {
    background-color: var(--secondary-green);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(34, 65, 24, 0.2);
}

.btn-secondary {
    background-color: #e8e8e8;
    color: var(--text-dark);
}

.btn-secondary:hover {
    background-color: #d0d0d0;
}

.btn-info {
    background-color: #6DAC4F;
    color: white;
    padding: 8px 14px;
    font-size: 12px;
}

.btn-info:hover {
    background-color: #0A5E2A;
}

.btn-danger {
    background-color: #FE0000;
    color: white;
    padding: 8px 14px;
    font-size: 12px;
}

.btn-danger:hover {
    background-color: #8a0000;
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
    margin-top: 12px;
}

/* Alerts */
.alert {
    padding: 12px 14px;
    margin-bottom: 18px;
    border-radius: 6px;
    border-left: 4px solid;
    font-size: 13px;
}

.alert-success {
    background-color: #e8f5e9;
    color: #0A5E2A;
    border-color: #0A5E2A;
}

.alert-error {
    background-color: #ffebee;
    color: #FE0000;
    border-color: #FE0000;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    margin-bottom: 18px;
    border-radius: 8px;
    overflow: hidden;
}

.table thead {
    background-color: #EFEFE8;
    border-bottom: 2px solid #0A5E2A;
}

.table th {
    padding: 12px 14px;
    text-align: left;
    font-weight: 600;
    color: #0A5E2A;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table td {
    padding: 12px 14px;
    border-bottom: 1px solid #e8e8e8;
    font-size: 13px;
}

.table tbody tr:hover {
    background-color: #EFEFE8;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.badge-pending {
    background-color: #FFF8E1;
    color: #F57F17;
}

.badge-confirmed {
    background-color: #E8F5E9;
    color: #0A5E2A;
}

.badge-completed {
    background-color: #0A5E2A;
    color: white;
}

.badge-cancelled {
    background-color: #ffebee;
    color: #FE0000;
}

.badge-admin {
    background-color: #0A5E2A;
    color: white;
}

.badge-user {
    background-color: #EFEFE8;
    color: #0A5E2A;
}

.badge-available {
    background-color: #E8F5E9;
    color: #0A5E2A;
}

.badge-sold {
    background-color: #ffebee;
    color: #FE0000;
}

.badge-rented {
    background-color: #FFF8E1;
    color: #F57F17;
}

/* Auth Container */
.auth-container {
    max-width: 420px;
    margin: 60px auto;
    background-color: white;
    padding: 35px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
}

.auth-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 25px;
    border-bottom: 2px solid #e8e8e8;
}

.tab-button {
    flex: 1;
    padding: 12px 18px;
    border: none;
    background-color: transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-light);
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
    text-align: center;
}

.tab-button.active {
    color: #0A5E2A;
    border-bottom-color: #0A5E2A;
}

.tab-button:hover {
    color: #0A5E2A;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.tab-content h2 {
    margin-bottom: 22px;
    color: #0A5E2A;
    font-size: 22px;
    font-weight: 700;
}

.help-text {
    margin-top: 12px;
    padding: 10px;
    background-color: #EFEFE8;
    border-left: 4px solid #0A5E2A;
    border-radius: 4px;
    font-size: 12px;
    color: #666;
}

/* Properties Grid */
.properties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 22px;
    margin-top: 25px;
}

.property-card {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid #f0f0f0;
}

.property-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.property-image,
.property-image-placeholder {
    width: 100%;
    height: 180px;
    background-color: #EFEFE8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: var(--text-light);
    object-fit: cover;
}

.property-info {
    padding: 18px;
}

.property-info h3 {
    margin-bottom: 8px;
    color: #0A5E2A;
    font-size: 16px;
    font-weight: 700;
}

.location {
    margin-bottom: 8px;
    font-size: 12px;
    color: var(--text-light);
}

.price {
    font-size: 20px;
    color: #0A5E2A;
    font-weight: 700;
    margin-bottom: 10px;
}

.property-details {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
    font-size: 12px;
    color: var(--text-light);
}

.property-details span {
    background-color: #EFEFE8;
    padding: 5px 10px;
    border-radius: 4px;
}

.description {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 12px;
    line-height: 1.5;
}

.rating-info {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.rating-stars {
    color: #ffc107;
    font-size: 14px;
}

/* Property Detail */
.property-detail {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.property-detail-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.property-detail-image,
.property-detail-image-placeholder {
    width: 100%;
    height: 400px;
    background-color: var(--light-gray);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--text-light);
    object-fit: cover;
}

.property-detail-info h1 {
    margin-bottom: 20px;
    color: var(--text-dark);
    font-size: 32px;
    font-weight: 700;
}

.property-detail-info .location {
    margin-bottom: 15px;
    font-size: 16px;
}

.property-detail-info .price {
    font-size: 28px;
    margin-bottom: 25px;
}

.property-specs {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
    margin-bottom: 25px;
    padding: 20px;
    background-color: var(--light-gray);
    border-radius: 8px;
}

.spec {
    font-size: 14px;
}

.spec strong {
    color: var(--text-dark);
    display: block;
    margin-bottom: 4px;
}

/* Sections */
.section {
    background-color: white;
    padding: 30px;
    margin-bottom: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.section h2 {
    margin-bottom: 25px;
    color: var(--text-dark);
    border-bottom: 2px solid var(--primary-orange);
    padding-bottom: 12px;
    font-size: 22px;
    font-weight: 700;
}

.section h3 {
    margin-bottom: 15px;
    color: var(--text-dark);
    font-size: 18px;
    font-weight: 600;
}

.form-section {
    background-color: white;
    padding: 30px;
    margin-bottom: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.properties-section {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Dashboard */
.dashboard h1 {
    margin-bottom: 30px;
    color: var(--text-dark);
    font-size: 28px;
    font-weight: 700;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, var(--primary-orange) 0%, var(--dark-orange) 100%);
    color: white;
    padding: 28px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(255, 165, 0, 0.2);
}

.stat-card:nth-child(2) {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

.stat-card:nth-child(3) {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.2);
}

.stat-value {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 14px;
    opacity: 0.95;
    font-weight: 600;
}

/* Rating */
.rating-summary {
    display: flex;
    align-items: center;
    gap: 30px;
    padding: 24px;
    background-color: var(--light-gray);
    border-radius: 10px;
    margin-bottom: 25px;
}

.rating-avg-large {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.rating-value {
    font-size: 48px;
    font-weight: 700;
    color: var(--primary-orange);
}

.rating-label {
    font-size: 24px;
    color: var(--text-light);
}

.rating-details {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rating-details .rating-stars {
    font-size: 24px;
    color: #ffc107;
}

.add-rating-form {
    background-color: var(--light-gray);
    padding: 24px;
    border-radius: 10px;
    margin-bottom: 30px;
    border-left: 4px solid var(--primary-orange);
}

.add-rating-form h3 {
    margin-bottom: 18px;
}

.reviews-list {
    margin-top: 30px;
}

.reviews-list h3 {
    margin-bottom: 20px;
}

.review-item {
    background-color: var(--light-gray);
    padding: 18px;
    border-left: 4px solid var(--primary-orange);
    margin-bottom: 16px;
    border-radius: 6px;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.review-header strong {
    color: var(--text-dark);
    font-weight: 600;
}

.review-item p {
    margin-bottom: 10px;
    line-height: 1.6;
    color: var(--text-light);
    font-size: 14px;
}

.review-item small {
    color: var(--text-light);
    font-size: 12px;
}

.rating-section {
    background-color: white;
    padding: 30px;
    margin-bottom: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.rating-section h3 {
    margin-bottom: 20px;
    border-bottom: 2px solid var(--primary-orange);
    padding-bottom: 10px;
}

.rating-summary {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.rating-avg {
    font-size: 32px;
    font-weight: bold;
    color: #ffc107;
}

.rating-count {
    color: #666;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        width: calc(100% - 30px);
        padding: 15px 0;
    }

    .navbar-menu {
        float: none;
        margin-right: 0;
        clear: both;
        margin-top: 15px;
    }

    .navbar-brand {
        float: none;
        margin-left: 0;
        display: block;
        text-align: center;
    }

    .navbar-menu {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    .navbar-menu li {
        display: block;
        margin-left: 0;
        margin-bottom: 12px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .properties-grid {
        grid-template-columns: 1fr;
    }

    .property-detail-header {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .property-specs {
        grid-template-columns: 1fr;
    }

    .stat-card {
        min-width: 100%;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .rating-summary {
        flex-direction: column;
        align-items: flex-start;
    }

    .property-detail-image,
    .property-detail-image-placeholder {
        height: 250px;
    }

    .table {
        font-size: 12px;
    }

    .table th,
    .table td {
        padding: 10px;
    }

    .form-section,
    .properties-section,
    .section {
        padding: 15px;
    }

    .auth-container {
        margin: 40px 20px;
        padding: 25px;
    }

    .container {
        padding: 15px;
    }

    .properties-grid,
    .projects-grid,
    .phases-grid,
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .project-actions,
    .table-actions {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 14px;
    }

    .container {
        width: calc(100% - 20px);
        padding: 12px 0;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    .form-group input,
    .form-group textarea,
    .form-group select {
        font-size: 16px;
    }

    .table th,
    .table td {
        padding: 8px;
    }
}

/* Headings */
h1 {
    color: var(--text-dark);
    margin-bottom: 25px;
    font-size: 28px;
    font-weight: 700;
}

h2 {
    color: var(--text-dark);
    margin-bottom: 18px;
    font-size: 22px;
    font-weight: 700;
}

h3 {
    color: var(--text-dark);
    margin-bottom: 12px;
    font-size: 18px;
    font-weight: 600;
}

p {
    line-height: 1.6;
    color: var(--text-light);
}
