:root {
    --primary-color: #004A99;
    --primary-light: #005bc1;
    --secondary-color: #F07D00;
    --secondary-hover: #d66f00;
    --text-main: #2d3748;
    --text-white: #FFFFFF;
    --text-muted: #525c6a;
    --bg-light: #F8F9FA;
    --bg-white: #FFFFFF;
    --border-color: #E0E0E0;
    --accent-blue: rgb(59 130 246 / 0.5);
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 10px 30px rgba(0, 0, 0, 0.15);
    --radius: 12px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--bg-light);
    color: var(--text-main);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

ul {
    list-style: none;
}

button {
    cursor: pointer;
    border: none;
    outline: none;
    transition: var(--transition);
}

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

/* Typography */
h1,
h2,
h3,
h4 {
    color: var(--primary-color);
    font-weight: 700;
}

.btn {
    padding: 12px 24px;
    border-radius: var(--radius);
    font-weight: 600;
    display: inline-block;
}

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

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

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

.btn-secondary:hover {
    background-color: var(--secondary-hover);
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(240, 125, 0, 0.3);
}

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

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white !important;
    transform: translateY(-2px);
}

.btn-outline-light {
    background-color: white;
    border: 1px solid #e2e8f0;
    color: #475569 !important;
}

.btn-outline-light:hover {
    background-color: #f8fafc;
    border-color: #cbd5e1;
    color: var(--primary-color) !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 11px;
    border-radius: 6px;
    letter-spacing: 0.5px;
}

/* Base Header Styles */
header {
    background-color: var(--primary-color);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-links a {
    color: var(--text-white);
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--secondary-color) !important;
}

.nav-actions {
    display: flex;
    gap: 15px;
}

/* Hero Section */
.mobile-menu-btn,
.dashboard-menu-toggle {
    display: none;
}

/* IMPORTANT: Hide mobile menu by default (for desktop) */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.hero {
    height: 600px;
    background: linear-gradient(rgba(10, 25, 47, 0.7), rgba(10, 25, 47, 0.7)), url('../assets/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}

.hero-content h1 {
    font-size: 48px;
    margin-bottom: 20px;
    color: white;
}

.hero-content p {
    font-size: 18px;
    margin-bottom: 40px;
    opacity: 0.9;
}

/* Search Box */
.search-box {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 24px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    max-width: 1000px;
    margin: -70px auto 0;
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr auto;
    gap: 20px;
    align-items: flex-end;
    position: relative;
    z-index: 10;
}

.search-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.search-field label {
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--primary-color);
}

.search-field input,
.search-field select {
    padding: 14px 16px;
    border: 1px solid rgba(0, 74, 153, 0.1);
    border-radius: 12px;
    font-size: 16px;
    background: #f8faff;
    transition: var(--transition);
}

.search-field input:focus,
.search-field select:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 4px rgba(240, 125, 0, 0.1);
    background: white;
}

/* Contact Page */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-item-block {
    margin-bottom: 20px;
    display: flex;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 12px;
}

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

.contact-map {
    height: 300px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Property Cards */
.listings-section {
    padding: 60px 0 100px;
}

/* Category Navigation Section */
.categories-section {
    padding: 60px 0 100px;
}

.category-grid {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 30px;
}

.category-card {
    flex: 1;
    min-width: 150px;
    background: white;
    padding: 20px 10px;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid transparent;
}

.category-card:hover {
    transform: translateY(-10px);
    border-color: var(--secondary-color);
    box-shadow: var(--shadow-hover);
}

.category-icon {
    font-size: 40px;
    margin-bottom: 15px;
    display: block;
}

.category-card h4 {
    font-size: 16px;
    margin-bottom: 5px;
}

.category-card span {
    font-size: 13px;
    color: var(--text-muted);
}

/* Neighborhood Section */
.neighborhoods-section {
    padding: 80px 0;
    background-color: #f4f7f6;
}

.neighborhood-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 30px;
}

.neighborhood-card {
    height: 250px;
    border-radius: var(--radius);
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    padding: 25px;
    color: white;
    box-shadow: var(--shadow);
    transition: cubic-bezier(0.4, 0, 0.2, 1) 0.5s;
    text-decoration: none;
}

.neighborhood-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.neighborhood-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0, 74, 153, 0.9) 0%, rgba(0, 74, 153, 0.4) 50%, transparent 100%);
    transition: var(--transition);
    z-index: 1;
}

.neighborhood-card:hover::before {
    background: linear-gradient(to top, rgba(0, 74, 153, 0.95) 0%, rgba(240, 125, 0, 0.4) 100%);
}

.neighborhood-card h2,
.neighborhood-card h3,
.neighborhood-card h4 {
    color: white !important;
    font-size: 20px;
    font-weight: 700;
    z-index: 2;
    margin: 0;
    position: relative;
}

/* CTA Advertise Section */
.cta-advertise {
    padding: 100px 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, #002d5e 100%);
    color: white;
    margin-top: 0;
}

.cta-container {
    display: flex;
    align-items: center;
    gap: 60px;
}

.cta-text {
    flex: 1.2;
}

.cta-text h2 {
    color: white;
    font-size: 48px;
    line-height: 1.1;
    margin-bottom: 25px;
}

.cta-text h2 span {
    color: var(--secondary-color);
}

.cta-text p {
    font-size: 18px;
    color: #ffffff;
    margin-bottom: 40px;
}

.cta-actions {
    display: flex;
    gap: 20px;
}

.cta-image {
    flex: 1;
}

.cta-image img {
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 50px;
}

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

.card {
    display: block;
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
    border-bottom: 3px solid var(--secondary-color);
}

.card-img {
    height: 240px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.card-img-container img {
    transition: transform 0.6s ease;
}

.card:hover .card-img-container img {
    transform: scale(1.1);
}

.badge {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 6px 12px;
    background: var(--secondary-color);
    color: white;
    border-radius: 5px;
    font-weight: 600;
    font-size: 12px;
}

.card-content {
    padding: 20px;
}

.price {
    color: var(--secondary-color);
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 5px;
}

.title {
    font-size: 18px;
    margin-bottom: 10px;
}

.location {
    font-size: 14px;
    color: #4b5563;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.features {
    display: flex;
    gap: 20px;
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
    font-size: 14px;
    color: var(--text-muted);
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Dashboard Sidebar */
.dashboard-container {
    display: flex;
    min-height: calc(100vh - 74px);
}

.sidebar {
    width: 280px;
    background: var(--primary-color);
    color: white;
    padding: 30px 0;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 30px;
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition);
}

.sidebar-link:hover,
.sidebar-link.active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-left: 4px solid var(--secondary-color);
}

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

.page-title-standard {
    margin-top: 0;
    margin-bottom: 30px;
    color: var(--primary-color);
    font-weight: 700;
}

/* Content Pages - Standardized Padding */
.content-page {
    padding: 30px 20px !important;
    margin-bottom: 30px !important;
    /* Space before footer */
}

.content-page .container {
    padding-left: 20px !important;
    padding-right: 20px !important;
}

/* Force space before footer - EXCEPT on homepage */
body:not(.homepage) footer {
    margin-top: 30px !important;
}

/* Tables for Admin */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

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

.data-table th {
    background: #f8f9fa;
    font-weight: 600;
}

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

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

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

/* Footer */
footer {
    background: var(--primary-color);
    color: white;
    padding: 60px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    color: white;
    margin-bottom: 20px;
    font-size: 16px;
}

.footer-col ul li {
    margin-bottom: 10px;
    opacity: 0.8;
    font-size: 14px;
}

.footer-col ul li a:hover {
    opacity: 1;
    color: var(--secondary-color);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 25px;
    text-align: center;
    opacity: 0.7;
    font-size: 14px;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    font-size: 32px;
    color: white;
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
    padding: 10px;
}

/* MOBILE RESPONSIVE - S24 ULTRA OPTIMIZED */
@media (max-width: 768px) {

    /* Global Reset */
    html,
    body {
        position: relative;
        width: 100%;
        margin: 0;
        padding: 0;
        /* Force font size to prevent auto-zoom on inputs */
        -webkit-text-size-adjust: 100%;
    }

    .container {
        padding: 0 20px !important;
        width: 100% !important;
        max-width: 100vw !important;
        box-sizing: border-box !important;
        overflow: visible !important;
        margin: 0 auto !important;
    }

    /* Fixed Header for Menu */
    header {
        position: sticky !important;
        top: 0 !important;
        z-index: 9999 !important;
        height: auto !important;
        padding: 10px 0 !important;
        overflow: visible !important;
    }

    /* Navigation */
    .mobile-menu-btn {
        display: block !important;
        z-index: 10001 !important;
        color: white !important;
        font-size: 28px !important;
        background: none !important;
        border: none !important;
        cursor: pointer !important;
        padding: 5px !important;
    }

    /* Hide Desktop Navigation - NUCLEAR OPTION */
    .nav-container .nav-links,
    .nav-container .nav-actions,
    header .nav-container .nav-links,
    header .nav-container .nav-actions,
    header nav.nav-links,
    header div.nav-actions,
    nav.nav-links,
    div.nav-actions {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
        position: absolute !important;
        left: -9999px !important;
        width: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
        clip: rect(0, 0, 0, 0) !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Mobile Menu Overlay - BLUE BACKGROUND */
    #menuOverlay,
    .mobile-menu-overlay {
        display: none !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        background-color: #003a7a !important;
        background: #003a7a !important;
        z-index: 99998 !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
        transform: translateX(-100%) !important;
        /* Extra failsafe */
    }

    #menuOverlay.active,
    .mobile-menu-overlay.active {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        transform: translateX(0) !important;
    }

    .mobile-menu-nav {
        display: flex;
        flex-direction: column;
        padding: 100px 30px 40px;
        gap: 5px;
        width: 100%;
        box-sizing: border-box;
    }

    .mobile-menu-nav a {
        color: white !important;
        font-size: 22px !important;
        font-weight: 700 !important;
        padding: 20px 15px !important;
        text-align: center !important;
        text-decoration: none !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
        transition: background 0.2s;
        display: block !important;
    }

    /* Action Buttons - Highly Visible */
    .mobile-menu-nav .menu-btn-secondary {
        background: #f07d00 !important;
        /* Orange */
        border-radius: 12px !important;
        margin-top: 40px !important;
        /* More space */
        border: none !important;
        padding: 18px 20px !important;
        font-size: 18px !important;
        font-weight: 800 !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
        border-bottom: none !important;
        /* Remove border for buttons */
    }

    /* Dashboard Fixes - SIDEBAR SANDWICH */
    .dashboard-container {
        display: block !important;
        position: relative;
    }

    /* Sidebar Mobile - Hidden by default */
    .sidebar {
        position: fixed !important;
        top: 0 !important;
        left: -280px !important;
        /* Start hidden */
        width: 280px !important;
        height: 100% !important;
        background: #0f172a !important;
        /* Dark Slate to match site standard */
        z-index: 10000 !important;
        transition: left 0.3s ease !important;
        display: block !important;
        /* Stack vertically */
        padding: 20px 0 !important;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2) !important;
        overflow-y: auto !important;
        white-space: normal !important;
    }

    /* Class to show sidebar */
    .sidebar.active {
        left: 0 !important;
    }

    /* Individual links in sidebar */
    .sidebar-link {
        display: block !important;
        padding: 15px 25px !important;
        border-right: none !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
        text-align: left !important;
    }

    .sidebar div {
        display: block !important;
        /* Show "Menu Principal" label */
        padding-left: 25px !important;
    }

    /* Dashboard Toggle Button (Visible on Mobile) */
    .dashboard-menu-toggle {
        display: block !important;
        background: none;
        border: none;
        color: white;
        font-size: 24px;
        cursor: pointer;
        margin-right: 15px;
    }

    /* Dashboard Overlay */
    .dashboard-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 9999;
    }

    .dashboard-overlay.active {
        display: block;
    }

    .main-content {
        padding: 20px 15px !important;
        width: 100% !important;
    }

    /* Make tables scrollable */
    table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Adjust cards */
    .card {
        padding: 20px !important;
    }

    /* Adjust forms */
    .form-group {
        width: 100% !important;
    }

    form div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }



    /* Mobile Menu Button */
    .mobile-menu-btn {
        display: block !important;
        z-index: 99999 !important;
        color: white !important;
        font-size: 28px !important;
        background: none !important;
        border: none !important;
        cursor: pointer !important;
        padding: 5px !important;
        position: relative !important;
    }

    /* Hero & Search - REDUCED SIZE */
    .hero {
        height: auto !important;
        min-height: 220px !important;
        /* REDUCED from 350px */
        padding: 60px 15px 100px !important;
        /* REDUCED padding */
        display: flex !important;
        align-items: center !important;
        overflow: hidden !important;
    }

    .hero-content h1 {
        font-size: 24px !important;
        line-height: 1.2 !important;
    }

    .search-box {
        margin: -80px auto 40px auto !important;
        width: calc(100% - 40px) !important;
        max-width: 100% !important;
        background: white !important;
        padding: 25px 20px !important;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
        border-radius: 16px !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 20px !important;
        z-index: 100 !important;
        position: relative !important;
        box-sizing: border-box !important;
    }

    .search-field {
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
    }

    .search-field label {
        font-weight: 700 !important;
        font-size: 14px !important;
        text-transform: uppercase !important;
        letter-spacing: 0.5px !important;
        color: var(--primary-color) !important;
        margin-bottom: 5px !important;
    }

    .search-field select,
    .search-field input {
        width: 100% !important;
        padding: 16px !important;
        border: 2px solid rgba(0, 74, 153, 0.2) !important;
        border-radius: 12px !important;
        font-size: 16px !important;
        background: #f8faff !important;
        box-sizing: border-box !important;
        -webkit-appearance: none !important;
        appearance: none !important;
    }

    .search-box button[type="submit"] {
        width: 100% !important;
        padding: 18px !important;
        font-size: 16px !important;
        font-weight: 700 !important;
        border-radius: 12px !important;
        margin-top: 10px !important;
        height: auto !important;
    }

    /* Distances & Spacing */
    .listings-section {
        padding: 40px 20px 0 !important;
        margin-bottom: 0 !important;
    }

    .categories-section {
        margin-top: 50px !important;
        padding: 40px 20px !important;
        border-top: 1px solid rgba(0, 0, 0, 0.05);
    }

    .neighborhoods-section {
        padding: 50px 0 !important;
    }

    .section-header {
        margin-bottom: 30px !important;
        text-align: center !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 10px !important;
    }

    .section-header h2 {
        font-size: 24px !important;
        margin-bottom: 8px !important;
        text-align: center !important;
    }

    .section-header p {
        text-align: center !important;
        font-size: 14px !important;
    }

    .section-header a {
        margin-top: 10px !important;
    }

    /* Grids */
    .category-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
        width: 100% !important;
    }

    .category-card {
        padding: 20px 10px !important;
        min-width: 0 !important;
    }

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

    .neighborhood-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    .neighborhood-card {
        height: 200px !important;
        background-size: cover !important;
        background-position: center !important;
    }

    /* Contact Page Mobile */
    .contact-grid {
        grid-template-columns: 1fr !important;
        gap: 40px !important;
        display: flex !important;
        flex-direction: column !important;
    }

    .contact-form-wrapper {
        order: 1 !important;
    }

    .contact-info-wrapper {
        order: 2 !important;
    }

    .contact-item-block {
        margin-bottom: 15px !important;
        padding: 20px !important;
    }

    /* CTA Advertise Mobile */
    .cta-advertise {
        padding: 50px 0 !important;
    }

    .cta-container {
        flex-direction: column !important;
        gap: 30px !important;
    }

    .cta-text h2 {
        font-size: 28px !important;
        line-height: 1.2 !important;
    }

    .cta-text p {
        font-size: 16px !important;
    }

    .cta-image {
        width: 100% !important;
    }

    .cta-image img {
        border-radius: 12px !important;
    }

    /* Property Grid with Margins */
    .grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .card {
        margin: 0 !important;
        width: 100% !important;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr !important;
        text-align: center !important;
    }
}

/* Utilities */
.card {
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.form-control:focus {
    transform: translateY(-1px);
    transition: all 0.2s;
}

.card-img {
    aspect-ratio: 16 / 9;
    height: auto;
}

/* Standardized Page Titles */
.page-title-standard {
    color: var(--primary-color) !important;
    font-size: 32px !important;
    font-weight: 800 !important;
    margin-top: 40px !important;
    margin-bottom: 30px !important;
    text-align: center !important;
    line-height: 1.2 !important;
    width: 100% !important;
}

@media (max-width: 768px) {
    .page-title-standard {
        font-size: 24px !important;
        margin-top: 30px !important;
        margin-bottom: 20px !important;
    }
}

/* Dashboard Panels - Standardized Style added via Agent */
.card-panel {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02), 0 1px 3px rgba(0, 0, 0, 0.05) !important;
    /* Sombra moderna */
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid #f1f5f9;
    /* Slate 100 */
    position: relative;
    max-width: 100%;
}

/* Force standard background on dashboards */
body:not(.homepage) {
    background-color: #f8fafc !important;
    /* Slate 50 - Very clean */
}

@media (max-width: 768px) {
    .card-panel {
        padding: 20px;
        border-radius: 12px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
    }
}

/* --- GLOBAL STANDARDIZATION (Added by Agent) --- */

/* 1. Standard Data Table */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    /* Radius matches buttons */
    overflow: hidden;
    margin-top: 10px;
}

.data-table thead tr {
    background-color: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
}

.data-table th {
    padding: 15px;
    text-align: left;
    font-weight: 700;
    color: #475569;
    /* Slate 600 */
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table td {
    padding: 16px 15px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    /* Slate 700 */
    font-size: 14px;
    vertical-align: middle;
}

.data-table tr:hover {
    background-color: #f8fafc;
    /* Subtle hover */
}

/* 2. Standard Form Controls */
.form-control,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 12px 16px;
    /* Comfortable padding */
    border: 1px solid #cbd5e1;
    /* Slate 300 */
    border-radius: 8px;
    /* Consistent radius 8px */
    font-size: 15px;
    color: #1e293b;
    background-color: white;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    /* Very subtle shadow */
}

.form-control:focus,
input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(0, 74, 153, 0.1);
    /* Focus ring */
    outline: none;
}

/* 3. Standard Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-weight: 600;
    font-size: 15px;
    border-radius: 8px;
    /* Match inputs */
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 6px rgba(0, 74, 153, 0.2);
}

.btn-primary:hover {
    background-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 74, 153, 0.3);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
    box-shadow: 0 4px 6px rgba(240, 125, 0, 0.2);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(240, 125, 0, 0.3);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 6px;
}