/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --secondary: #0f172a;
    --accent: #f59e0b;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --radius: 12px;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--gray-800);
    background: var(--gray-50);
    line-height: 1.6;
}

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

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
}

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

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

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--gray-300);
    color: var(--gray-700);
}

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

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

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

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

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

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

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* ===== HEADER ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 1px 3px rgb(0 0 0 / 0.1);
    z-index: 1000;
    height: 70px;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 700;
    color: var(--gray-900);
}

.logo i {
    color: var(--primary);
    font-size: 26px;
}

.logo-accent {
    color: var(--primary);
}

.nav {
    display: flex;
    gap: 32px;
}

.nav-link {
    text-decoration: none;
    color: var(--gray-600);
    font-weight: 500;
    font-size: 15px;
    transition: color 0.2s;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
}

.header-actions {
    display: flex;
    gap: 12px;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--gray-700);
    cursor: pointer;
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: white;
    padding: 20px;
    box-shadow: var(--shadow-lg);
    z-index: 999;
    flex-direction: column;
    gap: 16px;
}

.mobile-menu.active {
    display: flex;
}

.mobile-menu a {
    text-decoration: none;
    color: var(--gray-700);
    font-weight: 500;
    padding: 10px 0;
    border-bottom: 1px solid var(--gray-100);
}

/* ===== HERO ===== */
.hero {
    position: relative;
    min-height: 560px;
    background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 100%);
    display: flex;
    align-items: center;
    padding-top: 70px;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.03" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,144C960,149,1056,139,1152,122.7C1248,107,1344,85,1392,74.7L1440,64L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no bottom;
    background-size: cover;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: white;
    padding: 60px 20px;
}

.hero h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.2;
}

.hero p {
    font-size: 18px;
    color: var(--gray-300);
    max-width: 600px;
    margin: 0 auto 40px;
}

.hero-search {
    display: flex;
    gap: 12px;
    max-width: 900px;
    margin: 0 auto 50px;
    background: white;
    padding: 12px;
    border-radius: 16px;
    box-shadow: var(--shadow-xl);
    flex-wrap: wrap;
}

.search-box {
    flex: 1;
    min-width: 200px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 16px;
    background: var(--gray-50);
    border-radius: 10px;
}

.search-box i {
    color: var(--gray-400);
}

.search-box input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 14px 0;
    font-size: 15px;
    outline: none;
    color: var(--gray-800);
}

.hero-search select {
    padding: 14px 16px;
    border: none;
    background: var(--gray-50);
    border-radius: 10px;
    font-size: 14px;
    color: var(--gray-700);
    cursor: pointer;
    outline: none;
    min-width: 150px;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 36px;
    font-weight: 700;
    color: var(--accent);
}

.stat-label {
    font-size: 14px;
    color: var(--gray-400);
}

/* ===== PROPERTIES ===== */
.properties {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-header h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.section-header p {
    color: var(--gray-500);
    font-size: 16px;
}

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

.property-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    cursor: pointer;
}

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

.property-image {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: var(--gray-200);
}

.property-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.property-card:hover .property-image img {
    transform: scale(1.05);
}

.property-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-aluguel { background: var(--primary); }
.badge-venda { background: var(--success); }
.badge-terreno { background: var(--accent); }
.badge-casa { background: #0ea5e9; }
.badge-estabelecimento { background: #8b5cf6; }
.badge-carro { background: #64748b; }
.badge-moto { background: #f97316; }
.badge-vendido { background: var(--danger); }
.badge-alugado { background: var(--gray-600); }
.badge-pendente { background: var(--warning); }

.property-status {
    position: absolute;
    top: 14px;
    right: 14px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(0,0,0,0.6);
    color: white;
    backdrop-filter: blur(4px);
}

.property-body {
    padding: 20px;
}

.property-price {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 6px;
}

.property-price span {
    font-size: 13px;
    font-weight: 400;
    color: var(--gray-500);
}

.property-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.property-location {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--gray-500);
    font-size: 14px;
    margin-bottom: 16px;
}

.property-features {
    display: flex;
    gap: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--gray-100);
}

.feature {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--gray-600);
}

.feature i {
    color: var(--primary);
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray-400);
}

.no-results i {
    font-size: 48px;
    margin-bottom: 16px;
}

/* ===== PUBLISH ===== */
.publish {
    padding: 80px 0;
    background: white;
}

.publish-card {
    max-width: 800px;
    margin: 0 auto;
    background: var(--gray-50);
    border-radius: 16px;
    padding: 40px;
    box-shadow: var(--shadow);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

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

.form-group label {
    display: block;
    font-weight: 500;
    font-size: 14px;
    color: var(--gray-700);
    margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--gray-200);
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    color: var(--gray-800);
    background: white;
    transition: border-color 0.2s;
    outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group small {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: var(--gray-400);
}

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

.payment-info {
    background: white;
    border: 1.5px solid var(--gray-200);
    border-radius: 12px;
    padding: 24px;
    margin: 24px 0;
}

.payment-info h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: var(--gray-900);
}

.payment-info p {
    font-size: 14px;
    color: var(--gray-600);
    margin-bottom: 8px;
}

.payment-methods {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.payment-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border: 1.5px solid var(--gray-200);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
}

.payment-option:has(input:checked) {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.05);
}

.payment-option input {
    accent-color: var(--primary);
}

.form-actions {
    text-align: center;
    margin-top: 24px;
}

/* ===== ABOUT ===== */
.about {
    padding: 80px 0;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.about-content h2 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 32px;
    color: var(--gray-900);
}

.steps {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.step {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.step-number {
    width: 44px;
    height: 44px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    flex-shrink: 0;
}

.step-content h4 {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--gray-900);
}

.step-content p {
    font-size: 14px;
    color: var(--gray-500);
}

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

.feature-card {
    background: white;
    padding: 28px 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.2s;
}

.feature-card:hover {
    transform: translateY(-4px);
}

.feature-card i {
    font-size: 32px;
    color: var(--primary);
    margin-bottom: 14px;
}

.feature-card h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--gray-900);
}

.feature-card p {
    font-size: 13px;
    color: var(--gray-500);
}

/* ===== CONTACT ===== */
.contact {
    padding: 80px 0;
    background: white;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 48px;
    max-width: 900px;
    margin: 0 auto;
}

.contact-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 28px;
}

.contact-item i {
    width: 48px;
    height: 48px;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.contact-item h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 2px;
}

.contact-item p {
    font-size: 14px;
    color: var(--gray-500);
}

.contact-form {
    background: var(--gray-50);
    padding: 32px;
    border-radius: 16px;
}

/* ===== FOOTER ===== */
.footer {
    background: var(--gray-900);
    color: var(--gray-300);
    padding: 60px 0 0;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--gray-800);
}

.footer-brand .logo {
    color: white;
    margin-bottom: 16px;
}

.footer-brand p {
    font-size: 14px;
    line-height: 1.7;
    max-width: 280px;
}

.footer-links h4,
.footer-social h4 {
    color: white;
    font-size: 15px;
    margin-bottom: 16px;
}

.footer-links a {
    display: block;
    color: var(--gray-400);
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 10px;
    transition: color 0.2s;
}

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

.social-icons {
    display: flex;
    gap: 12px;
}

.social-icons a {
    width: 40px;
    height: 40px;
    background: var(--gray-800);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-400);
    transition: all 0.2s;
    text-decoration: none;
}

.social-icons a:hover {
    background: var(--primary);
    color: white;
}

.footer-bottom {
    text-align: center;
    padding: 24px 0;
    font-size: 13px;
    color: var(--gray-500);
}

/* ===== MODALS ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(4px);
    overflow-y: auto;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 16px;
    padding: 32px;
    max-width: 480px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalIn 0.3s ease;
}

.modal-content.modal-lg {
    max-width: 700px;
}

.modal-content.modal-xl {
    max-width: 1000px;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--gray-100);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    color: var(--gray-600);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.modal-close:hover {
    background: var(--gray-200);
}

.modal-subtitle {
    color: var(--gray-500);
    margin-bottom: 24px;
    font-size: 14px;
}

.login-hint {
    font-size: 13px;
    color: var(--gray-400);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Property Detail */
.detail-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 24px;
}

.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.detail-price {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
}

.detail-badges {
    display: flex;
    gap: 8px;
}

.detail-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--gray-900);
}

.detail-location {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--gray-500);
    margin-bottom: 24px;
}

.detail-features {
    display: flex;
    gap: 32px;
    padding: 20px;
    background: var(--gray-50);
    border-radius: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

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

.detail-feature i {
    font-size: 24px;
    color: var(--primary);
    margin-bottom: 6px;
}

.detail-feature span {
    display: block;
    font-size: 13px;
    color: var(--gray-500);
}

.detail-feature strong {
    display: block;
    font-size: 18px;
    color: var(--gray-900);
}

.detail-description {
    margin-bottom: 24px;
}

.detail-description h4 {
    font-size: 16px;
    margin-bottom: 8px;
}

.detail-description p {
    color: var(--gray-600);
    line-height: 1.7;
}

.detail-contact {
    background: var(--gray-50);
    padding: 20px;
    border-radius: 12px;
}

.detail-contact h4 {
    margin-bottom: 12px;
}

.detail-contact p {
    font-size: 14px;
    color: var(--gray-600);
    margin-bottom: 4px;
}

/* Admin Panel */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.admin-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--gray-100);
    padding-bottom: 0;
}

.tab-btn {
    padding: 12px 20px;
    background: none;
    border: none;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-500);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-btn .badge {
    background: var(--danger);
    color: white;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
}

.admin-property {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: var(--gray-50);
    border-radius: 12px;
    margin-bottom: 12px;
    align-items: center;
}

.admin-property-img {
    width: 100px;
    height: 70px;
    border-radius: 8px;
    object-fit: cover;
    background: var(--gray-200);
    flex-shrink: 0;
}

.admin-property-info {
    flex: 1;
    min-width: 0;
}

.admin-property-info h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-property-info p {
    font-size: 13px;
    color: var(--gray-500);
}

.admin-property-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.admin-empty {
    text-align: center;
    padding: 40px;
    color: var(--gray-400);
}

/* Toast */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--gray-900);
    color: white;
    padding: 16px 24px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-xl);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 3000;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast i {
    color: var(--success);
    font-size: 20px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .nav, .header-actions {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .hero h1 {
        font-size: 32px;
    }

    .hero-search {
        flex-direction: column;
    }

    .hero-stats {
        gap: 30px;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

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

    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }

    .publish-card {
        padding: 24px;
    }

    .admin-property {
        flex-direction: column;
        align-items: flex-start;
    }

    .admin-property-actions {
        width: 100%;
    }
}

@media (max-width: 600px) {
    .hero h1 {
        font-size: 26px;
    }

    .hero-stats {
        flex-direction: column;
        gap: 16px;
    }

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

    .about-features {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .detail-features {
        gap: 16px;
    }
}
