/* ─── Greek Property Platform — Dark Theme ─────────────────────────────── */

:root {
    --bg: #0a0e17;
    --bg-card: #111827;
    --bg-card-hover: #1a2332;
    --bg-nav: #0f1520;
    --border: #1e293b;
    --border-hover: #334155;
    --text: #e2e8f0;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --green: #22c55e;
    --yellow: #eab308;
    --red: #ef4444;
    --orange: #f97316;
    --xe-color: #8b5cf6;
    --gh-color: #06b6d4;
    --gv-color: #f59e0b;
    --radius: 12px;
    --radius-sm: 8px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

/* ─── Navigation ──────────────────────────────────────────────────────── */

.nav {
    background: var(--bg-nav);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-size: 1.25rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--text);
    letter-spacing: -0.5px;
}

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

.nav-links {
    display: flex;
    gap: 8px;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--text);
    background: rgba(59, 130, 246, 0.1);
}

.nav-links a.active {
    color: var(--accent);
}

/* ─── Container ──────────────────────────────────────────────────────── */

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

/* ─── Hero ────────────────────────────────────────────────────────────── */

.hero {
    text-align: center;
    padding: 60px 0 40px;
}

.hero h1 {
    font-size: 2.75rem;
    font-weight: 800;
    letter-spacing: -1.5px;
    line-height: 1.15;
    margin-bottom: 16px;
}

.hero h1 span {
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    color: var(--text-muted);
    font-size: 1.15rem;
    max-width: 600px;
    margin: 0 auto 32px;
}

.hero-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ─── Buttons ─────────────────────────────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

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

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

.btn-outline {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-outline:hover {
    border-color: var(--border-hover);
    background: var(--bg-card);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.85rem;
    background: var(--bg-card);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.btn-sm:hover {
    color: var(--text);
    border-color: var(--border-hover);
}

/* ─── Stats Grid ──────────────────────────────────────────────────────── */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 48px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    transition: all 0.2s;
}

.stat-card:hover {
    border-color: var(--border-hover);
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: 4px;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.stat-sub {
    color: var(--text-dim);
    font-size: 0.8rem;
}

/* ─── Section ─────────────────────────────────────────────────────────── */

.section {
    margin-bottom: 48px;
}

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

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
}

.section-desc {
    color: var(--text-muted);
    margin-bottom: 24px;
}

.total-badge {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ─── Property Grid ───────────────────────────────────────────────────── */

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

.property-card {
    display: block;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    text-decoration: none;
    color: var(--text);
    position: relative;
    transition: all 0.2s;
}

.property-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.1);
}

.card-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-badge.xe {
    background: rgba(139, 92, 246, 0.15);
    color: #a78bfa;
}

.card-badge.goldenhome {
    background: rgba(6, 182, 212, 0.15);
    color: #22d3ee;
}

.card-badge.gv {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    margin-left: 4px;
}

.card-type {
    font-size: 0.8rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.card-price {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: 4px;
}

.card-meta {
    display: flex;
    gap: 12px;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.card-location {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.card-gv {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gv-color);
    margin-bottom: 6px;
}

.card-yield {
    font-size: 0.85rem;
    color: var(--green);
}

/* ─── Filters ─────────────────────────────────────────────────────────── */

.filters {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 24px;
}

.filter-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.filter-group label {
    font-size: 0.8rem;
    color: var(--text-dim);
}

.filter-group select,
.filter-group input {
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-family: inherit;
    min-width: 120px;
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: var(--accent);
}

.filter-checkbox {
    justify-content: flex-end;
}

.filter-checkbox label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text);
    font-size: 0.9rem;
    cursor: pointer;
}

.filter-checkbox input {
    min-width: auto;
}

.filter-action {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

/* ─── Pagination ──────────────────────────────────────────────────────── */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 32px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ─── Empty State ─────────────────────────────────────────────────────── */

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state h2 {
    font-size: 2rem;
    margin-bottom: 12px;
}

.empty-state p {
    font-size: 1.1rem;
    margin-bottom: 24px;
}

/* ─── Detail Page ─────────────────────────────────────────────────────── */

.back-link {
    margin-bottom: 24px;
}

.detail-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.detail-header {
    padding: 32px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.detail-price {
    font-size: 2.25rem;
    font-weight: 700;
    letter-spacing: -1.5px;
}

.detail-price-sqm {
    text-align: right;
    color: var(--text-muted);
    font-size: 0.95rem;
}

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

.detail-section {
    padding: 24px 32px;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.detail-section:nth-child(2n) {
    border-right: none;
}

.detail-section h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--accent);
}

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

.info-table tr {
    border-bottom: 1px solid rgba(30, 41, 59, 0.5);
}

.info-table tr:last-child {
    border-bottom: none;
}

.info-table td {
    padding: 10px 0;
    font-size: 0.9rem;
}

.info-table td:first-child {
    color: var(--text-dim);
    width: 50%;
}

.value-good { color: var(--green); font-weight: 600; }
.value-ok { color: var(--yellow); font-weight: 600; }
.value-bad { color: var(--red); }
.value-neutral { color: var(--text); }

.features-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.feature-tag {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
}

.ai-summary {
    line-height: 1.7;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.description {
    line-height: 1.7;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.detail-actions {
    padding: 24px 32px;
    border-top: 1px solid var(--border);
}

/* ─── Golden Visa ─────────────────────────────────────────────────────── */

.gv-tiers {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.gv-tier-card {
    flex: 1;
    min-width: 180px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
}

.gv-tier-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gv-color);
    letter-spacing: -1px;
}

.gv-tier-count {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 4px;
}

.gv-info {
    background: rgba(245, 158, 11, 0.05);
    border: 1px solid rgba(245, 158, 11, 0.15);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin-bottom: 24px;
}

.gv-info p {
    font-weight: 600;
    margin-bottom: 8px;
}

.gv-info ul {
    list-style: none;
    padding: 0;
}

.gv-info li {
    padding: 4px 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.gv-info li::before {
    content: "• ";
    color: var(--gv-color);
}

/* ─── Benchmarks Table ────────────────────────────────────────────────── */

.benchmark-table-wrapper {
    overflow-x: auto;
}

.benchmark-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.benchmark-table th {
    background: rgba(30, 41, 59, 0.5);
    padding: 14px 20px;
    text-align: left;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.benchmark-table td {
    padding: 12px 20px;
    border-top: 1px solid var(--border);
    font-size: 0.9rem;
}

.benchmark-table tbody tr:hover {
    background: rgba(59, 130, 246, 0.03);
}

.area-cell {
    font-weight: 600;
}

.num-cell {
    font-family: 'Inter', monospace;
}

.price-cell {
    color: var(--accent);
    font-weight: 600;
}

.type-pill {
    background: rgba(59, 130, 246, 0.1);
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
}

/* ─── Admin Result ────────────────────────────────────────────────────── */

.admin-result {
    max-width: 640px;
    margin: 60px auto;
    text-align: center;
}

.admin-result h2 {
    margin-bottom: 24px;
}

.admin-result pre {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    text-align: left;
    overflow-x: auto;
    margin-bottom: 24px;
    font-size: 0.85rem;
}

/* ─── Footer ──────────────────────────────────────────────────────────── */

.footer {
    border-top: 1px solid var(--border);
    padding: 32px 0;
    margin-top: 48px;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    text-align: center;
    color: var(--text-dim);
    font-size: 0.85rem;
}

.footer-meta {
    margin-top: 4px;
    font-size: 0.75rem;
}

/* ─── Responsive ──────────────────────────────────────────────────────── */

@media (max-width: 768px) {
    .hero h1 { font-size: 2rem; }
    .filter-row { flex-direction: column; }
    .detail-header { flex-direction: column; gap: 16px; }
    .detail-price-sqm { text-align: left; }
    .detail-grid { grid-template-columns: 1fr; }
    .detail-section { border-right: none; }
    .nav-links a { font-size: 0.8rem; padding: 6px 12px; }
}