/* ============================================
   HabitBCN — Mobile-First Stylesheet
   Warm, premium, Barcelona-inspired palette
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --color-bg: #FAF9F6;
    --color-surface: #FFFFFF;
    --color-text: #1B1B18;
    --color-text-secondary: #5C5C56;
    --color-text-muted: #8E8E86;
    --color-accent: #C45D3E;
    --color-accent-light: #FDF0EC;
    --color-accent-hover: #A8432B;
    --color-accent-dark: #8B3420;
    --color-secondary: #2D6A4F;
    --color-secondary-light: #EAF4F0;
    --color-warm: #E8B86D;
    --color-warm-light: #FFF7EB;
    --color-border: #E6E4DF;
    --color-border-light: #F0EDE8;
    --color-warning: #D4A843;
    --color-error: #C44536;
    --color-success: #2D6A4F;
    --color-tag-bg: #F5F3EE;
    --radius: 14px;
    --radius-sm: 8px;
    --radius-lg: 20px;
    --shadow-sm: 0 1px 3px rgba(27,27,24,0.04);
    --shadow-md: 0 4px 16px rgba(27,27,24,0.07);
    --shadow-lg: 0 12px 40px rgba(27,27,24,0.10);
    --shadow-card: 0 2px 8px rgba(27,27,24,0.04), 0 0 0 1px rgba(27,27,24,0.03);
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'DM Serif Display', Georgia, serif;
    --transition: 0.2s ease;
    --transition-slow: 0.35s ease;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: var(--font-main);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--color-accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-accent-hover); }
img { max-width: 100%; height: auto; display: block; }

/* --- Typography --- */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 400; line-height: 1.2; color: var(--color-text); }
h1 { font-size: 2rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.25rem; }
.text-secondary { color: var(--color-text-secondary); }
.text-muted { color: var(--color-text-muted); }
.text-sm { font-size: 0.875rem; }

/* --- Layout --- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }
.container-narrow { max-width: 800px; margin: 0 auto; padding: 0 1rem; }

/* --- Navigation --- */
.nav {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
    background: rgba(255,255,255,0.95);
}
.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}
.nav-logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--color-text);
    letter-spacing: -0.02em;
}
.nav-logo span { color: var(--color-accent); }
.nav-links { display: flex; align-items: center; gap: 1.25rem; }
.nav-links a {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    font-weight: 500;
    transition: color var(--transition);
}
.nav-links a:hover { color: var(--color-text); }
.nav-links .btn-nav {
    background: var(--color-accent);
    color: white;
    padding: 0.5rem 1.1rem;
    border-radius: 100px;
    font-weight: 600;
    font-size: 0.85rem;
}
.nav-links .btn-nav:hover { background: var(--color-accent-hover); color: white; }

/* Mobile nav toggle */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}
.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--color-text);
    margin: 5px 0;
    border-radius: 2px;
    transition: var(--transition);
}

@media (max-width: 768px) {
    .nav-toggle { display: block; }
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--color-surface);
        flex-direction: column;
        padding: 1rem;
        border-bottom: 1px solid var(--color-border);
        box-shadow: var(--shadow-md);
        gap: 0.75rem;
    }
    .nav-links.open { display: flex; }
    .nav-links a { padding: 0.5rem 0; font-size: 1rem; }
}

/* --- Hero --- */
.hero {
    padding: 3.5rem 0 3rem;
    text-align: center;
    background: linear-gradient(180deg, #FDF5F0 0%, var(--color-bg) 100%);
}
.hero h1 {
    font-size: 2.4rem;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
    color: var(--color-text);
}
.hero p {
    color: var(--color-text-secondary);
    font-size: 1.1rem;
    max-width: 520px;
    margin: 0 auto 1.75rem;
    line-height: 1.6;
}
@media (min-width: 768px) {
    .hero { padding: 5rem 0 4rem; }
    .hero h1 { font-size: 3.2rem; }
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 100px;
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    font-family: var(--font-main);
    text-align: center;
}
.btn-primary {
    background: var(--color-accent);
    color: white;
    box-shadow: 0 2px 8px rgba(196,93,62,0.25);
}
.btn-primary:hover { background: var(--color-accent-hover); color: white; box-shadow: 0 4px 16px rgba(196,93,62,0.3); transform: translateY(-1px); }
.btn-secondary {
    background: var(--color-surface);
    color: var(--color-text);
    border: 1.5px solid var(--color-border);
}
.btn-secondary:hover { border-color: var(--color-text-muted); background: var(--color-tag-bg); }
.btn-outline {
    background: transparent;
    color: var(--color-accent);
    border: 1.5px solid var(--color-accent);
}
.btn-outline:hover { background: var(--color-accent-light); }
.btn-green {
    background: var(--color-secondary);
    color: white;
    box-shadow: 0 2px 8px rgba(45,106,79,0.25);
}
.btn-green:hover { opacity: 0.9; }
.btn-sm { padding: 0.4rem 0.9rem; font-size: 0.8rem; }
.btn-lg { padding: 0.9rem 2rem; font-size: 1rem; }
.btn-full { width: 100%; }
.btn-danger { background: var(--color-error); color: white; }
.btn-danger:hover { opacity: 0.9; }
.btn-warning { background: var(--color-warning); color: white; }
.btn-whatsapp {
    background: #25D366;
    color: white;
    box-shadow: 0 2px 8px rgba(37,211,102,0.3);
}
.btn-whatsapp:hover { background: #1DA851; color: white; }

/* --- Cards --- */
.listing-card {
    background: var(--color-surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: all var(--transition-slow);
    display: flex;
    flex-direction: column;
}
.listing-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}
.listing-card-image {
    position: relative;
    aspect-ratio: 16/11;
    overflow: hidden;
    background: var(--color-border-light);
}
.listing-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}
.listing-card:hover .listing-card-image img {
    transform: scale(1.04);
}
.listing-card-image .placeholder-img {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #FDF0EC, #F0EDE8);
    color: var(--color-text-muted);
    font-size: 2rem;
}
.listing-card-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(8px);
    padding: 0.25rem 0.65rem;
    border-radius: 100px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-text);
}
.listing-card-body {
    padding: 1.1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.listing-card-neighborhood {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-accent);
    margin-bottom: 0.25rem;
}
.listing-card-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    margin-bottom: 0.35rem;
    line-height: 1.3;
}
.listing-card-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 0.5rem;
}
.listing-card-price span {
    font-weight: 400;
    font-size: 0.82rem;
    color: var(--color-text-muted);
}
.listing-card-meta {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid var(--color-border-light);
}
.listing-card-meta .meta-item {
    font-size: 0.78rem;
    color: var(--color-text-secondary);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* --- Listing Grid --- */
.listings-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}
@media (min-width: 550px) {
    .listings-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
    .listings-grid { grid-template-columns: repeat(3, 1fr); }
}

/* --- Filters --- */
.filters-bar {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 1rem 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.filters-bar::-webkit-scrollbar { display: none; }
.filter-chip {
    flex-shrink: 0;
    padding: 0.45rem 1rem;
    border-radius: 100px;
    border: 1.5px solid var(--color-border);
    background: var(--color-surface);
    font-size: 0.82rem;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
    font-family: var(--font-main);
    font-weight: 500;
}
.filter-chip:hover, .filter-chip.active {
    border-color: var(--color-accent);
    color: var(--color-accent);
    background: var(--color-accent-light);
}

/* --- Filters Panel --- */
.filters-panel {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow-sm);
}
.filters-panel .filter-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}
@media (min-width: 550px) {
    .filters-panel .filter-row { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
    .filters-panel .filter-row { grid-template-columns: repeat(4, 1fr); }
}

/* --- Forms --- */
.form-group { margin-bottom: 1rem; }
.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    margin-bottom: 0.35rem;
}
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-family: var(--font-main);
    color: var(--color-text);
    background: var(--color-surface);
    transition: border-color var(--transition), box-shadow var(--transition);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px var(--color-accent-light);
}
.form-group textarea { min-height: 100px; resize: vertical; }
.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}
@media (min-width: 550px) {
    .form-row { grid-template-columns: repeat(2, 1fr); }
}
.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.form-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--color-accent);
}

/* --- Listing Detail --- */
.detail-hero {
    position: relative;
    aspect-ratio: 16/10;
    max-height: 420px;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--color-border-light);
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-md);
}
.detail-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.detail-header { margin-bottom: 1.5rem; }
.detail-header .neighborhood-label {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-accent);
    margin-bottom: 0.3rem;
}
.detail-header h1 { font-size: 1.8rem; margin-bottom: 0.3rem; }
.detail-price {
    font-size: 1.6rem;
    font-weight: 700;
}
.detail-price span {
    font-weight: 400;
    font-size: 1rem;
    color: var(--color-text-muted);
}
.detail-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}
@media (min-width: 768px) {
    .detail-grid { grid-template-columns: 2fr 1fr; }
}
.detail-section { margin-bottom: 1.5rem; }
.detail-section h3 {
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--color-border-light);
}
.detail-specs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}
.spec-item {
    padding: 0.8rem;
    background: var(--color-tag-bg);
    border-radius: var(--radius-sm);
}
.spec-item .spec-label {
    font-size: 0.72rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.15rem;
    font-weight: 600;
}
.spec-item .spec-value { font-weight: 700; font-size: 0.95rem; }
.detail-sidebar { position: sticky; top: 5rem; }
.sidebar-cta {
    background: var(--color-surface);
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
}
.sidebar-cta h3 { margin-bottom: 0.5rem; font-size: 1.1rem; }
.sidebar-cta p { color: var(--color-text-secondary); font-size: 0.9rem; margin-bottom: 1rem; }

/* --- Tags --- */
.tag {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 100px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}
.tag-green { background: #E8F5E8; color: #2D6A4F; }
.tag-yellow { background: #FFF3D6; color: #8B6914; }
.tag-blue { background: #E8F0FE; color: #1A56DB; }
.tag-red { background: #FEE8E8; color: #C44536; }
.tag-gray { background: var(--color-tag-bg); color: var(--color-text-secondary); }
.tag-orange { background: #FDF0EC; color: #C45D3E; }

/* --- Section --- */
.section { padding: 2.5rem 0; }
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}
.section-header h2 { margin: 0; }

/* --- CTA Banner --- */
.cta-banner {
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-dark) 100%);
    color: white;
    padding: 2.5rem 1.75rem;
    border-radius: var(--radius-lg);
    text-align: center;
    margin: 2rem 0;
    box-shadow: 0 8px 32px rgba(196,93,62,0.2);
}
.cta-banner h2 { color: white; margin-bottom: 0.5rem; }
.cta-banner p { opacity: 0.92; margin-bottom: 1.25rem; max-width: 500px; margin-left: auto; margin-right: auto; }
.cta-banner .btn { background: white; color: var(--color-accent); font-weight: 700; }
.cta-banner .btn:hover { opacity: 0.95; box-shadow: 0 4px 16px rgba(255,255,255,0.3); }
.cta-banner-dark {
    background: linear-gradient(135deg, #1B1B18 0%, #2A2A26 100%);
}

/* --- How It Works --- */
.steps {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 1.5rem;
}
@media (min-width: 550px) {
    .steps { grid-template-columns: repeat(3, 1fr); }
}
.step {
    text-align: center;
    padding: 1.75rem 1rem;
    background: var(--color-surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
}
.step-number {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--color-accent-light);
    color: var(--color-accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
    margin-bottom: 0.75rem;
}
.step h3 { font-size: 1.05rem; margin-bottom: 0.4rem; }
.step p { font-size: 0.9rem; color: var(--color-text-secondary); }

/* --- Email Gate / Unlock Modal --- */
.gate-overlay {
    position: fixed;
    inset: 0;
    background: rgba(27,27,24,0.5);
    backdrop-filter: blur(6px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.gate-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    max-width: 440px;
    width: 100%;
    text-align: center;
    box-shadow: var(--shadow-lg);
    animation: gateSlideUp 0.3s ease;
}
@keyframes gateSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.gate-card h2 { margin-bottom: 0.5rem; }
.gate-card p { color: var(--color-text-secondary); margin-bottom: 1.5rem; font-size: 0.95rem; }
.gate-card .form-group { text-align: left; }
.gate-card .benefits {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    text-align: left;
}
.gate-card .benefit-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.88rem;
    color: var(--color-text-secondary);
}
.gate-card .benefit-check {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--color-secondary-light);
    color: var(--color-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* --- Trust bar --- */
.trust-bar {
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--color-border-light);
}
.trust-items {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: var(--color-text-secondary);
}
.trust-items strong { color: var(--color-accent); font-weight: 700; }

/* --- Footer --- */
.footer {
    background: var(--color-text);
    color: rgba(255,255,255,0.7);
    padding: 2.5rem 0;
    margin-top: 3rem;
}
.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
}
.footer .nav-logo { color: white; }
.footer .nav-logo span { color: var(--color-accent); }
.footer-links { display: flex; gap: 1.25rem; flex-wrap: wrap; justify-content: center; }
.footer-links a { font-size: 0.85rem; color: rgba(255,255,255,0.6); }
.footer-links a:hover { color: white; }
.footer-copy { font-size: 0.8rem; color: rgba(255,255,255,0.35); }

/* --- Empty State --- */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--color-text-muted);
}
.empty-state h3 { margin-bottom: 0.5rem; }

/* --- Flash Messages --- */
.flash-messages { max-width: 1200px; margin: 0 auto; padding: 0.5rem 1rem; }
.flash {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
}
.flash-success { background: #E8F5E8; color: #2D6A4F; }
.flash-error { background: #FEE8E8; color: #C44536; }
.flash-warning { background: #FFF3D6; color: #8B6914; }
.flash-info { background: #E8F0FE; color: #1A56DB; }

/* ============================================
   ADMIN STYLES
   ============================================ */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar {
    width: 240px;
    background: #1B1B18;
    color: white;
    padding: 1.5rem 0;
    flex-shrink: 0;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    overflow-y: auto;
    z-index: 50;
}
.admin-sidebar-logo {
    font-family: var(--font-display);
    font-size: 1.3rem;
    color: white;
    padding: 0 1.25rem;
    margin-bottom: 2rem;
}
.admin-sidebar-logo span { color: var(--color-accent); }
.admin-sidebar nav a {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.65rem 1.25rem;
    color: rgba(255,255,255,0.55);
    font-size: 0.88rem;
    font-weight: 500;
    transition: all var(--transition);
}
.admin-sidebar nav a:hover { color: white; background: rgba(255,255,255,0.06); }
.admin-sidebar nav a.active { color: white; background: rgba(255,255,255,0.1); border-right: 3px solid var(--color-accent); }
.admin-sidebar nav .nav-section {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.25);
    padding: 1.5rem 1.25rem 0.5rem;
    font-weight: 700;
}

.admin-main {
    flex: 1;
    margin-left: 240px;
    padding: 1.5rem;
    min-height: 100vh;
    background: var(--color-bg);
}
.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.admin-header h1 { font-size: 1.5rem; }

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}
@media (min-width: 768px) {
    .stats-grid { grid-template-columns: repeat(4, 1fr); }
}
.stat-card {
    background: var(--color-surface);
    border-radius: var(--radius);
    padding: 1.1rem;
    box-shadow: var(--shadow-card);
}
.stat-card .stat-value {
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--color-text);
}
.stat-card .stat-label {
    font-size: 0.78rem;
    color: var(--color-text-muted);
    margin-top: 0.1rem;
    font-weight: 500;
}

/* Table */
.table-wrapper {
    background: var(--color-surface);
    border-radius: var(--radius);
    overflow-x: auto;
    box-shadow: var(--shadow-card);
}
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}
.admin-table th {
    text-align: left;
    padding: 0.75rem 1rem;
    background: var(--color-tag-bg);
    font-weight: 700;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-muted);
    border-bottom: 1px solid var(--color-border);
    white-space: nowrap;
}
.admin-table td {
    padding: 0.7rem 1rem;
    border-bottom: 1px solid var(--color-border-light);
    vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: var(--color-tag-bg); }

/* Match Score */
.match-score {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-weight: 800;
    font-size: 0.9rem;
}
.match-score.high { background: #E8F5E8; color: #2D6A4F; }
.match-score.medium { background: #FFF3D6; color: #8B6914; }
.match-score.low { background: #FEE8E8; color: #C44536; }

.match-bar {
    height: 6px;
    border-radius: 3px;
    background: var(--color-border-light);
    overflow: hidden;
    margin-top: 0.3rem;
}
.match-bar-fill { height: 100%; border-radius: 3px; transition: width 0.5s ease; }
.match-bar-fill.high { background: var(--color-secondary); }
.match-bar-fill.medium { background: var(--color-warm); }
.match-bar-fill.low { background: var(--color-error); }

/* Admin mobile */
.admin-sidebar-toggle {
    display: none;
    position: fixed;
    bottom: 1rem; right: 1rem;
    z-index: 60;
    width: 48px; height: 48px;
    border-radius: 50%;
    background: var(--color-accent);
    color: white;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
}
@media (max-width: 768px) {
    .admin-sidebar { transform: translateX(-100%); transition: transform 0.3s ease; }
    .admin-sidebar.open { transform: translateX(0); }
    .admin-main { margin-left: 0; }
    .admin-sidebar-toggle { display: block; }
}

/* --- Page Title Bar --- */
.page-title-bar { padding: 2rem 0 1rem; }
.page-title-bar h1 { font-size: 1.8rem; margin-bottom: 0.3rem; }
.page-title-bar p { color: var(--color-text-secondary); font-size: 0.95rem; }

/* --- Results count --- */
.results-count { font-size: 0.88rem; color: var(--color-text-muted); padding: 0.75rem 0; }

/* --- Utility --- */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.flex-gap { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.hidden { display: none !important; }

/* --- WhatsApp badge in admin --- */
.wa-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.72rem;
    color: #25D366;
    font-weight: 600;
}
