/* ==========================================================
   YewaConnect — Design System
   Dark UI, gold accent, mobile-first
   ========================================================== */

:root {
    --bg: #14161a;
    --bg-alt: #1b1e24;
    --bg-card: #1e2128;
    --bg-elevated: #262a33;
    --border: #2c303a;
    --text: #f2f2f0;
    --text-muted: #9aa0ac;
    --text-faint: #666c78;
    --gold: #e3a23d;
    --gold-dim: #b9822f;
    --gold-tint: rgba(227, 162, 61, 0.12);
    --green: #4caf6f;
    --red: #e5555a;
    --blue: #4a9eda;
    --radius-sm: 8px;
    --radius: 14px;
    --radius-lg: 22px;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    --font: 'Plus Jakarta Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --max: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 { margin: 0 0 .5em; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0 0 1em; color: var(--text-muted); }
.container { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5em;
    padding: 12px 22px; border-radius: 999px; border: 1px solid transparent;
    font-weight: 600; font-size: .95rem; cursor: pointer; transition: all .15s ease;
    white-space: nowrap;
}
.btn-primary { background: linear-gradient(135deg, var(--gold), var(--gold-dim)); color: #16171a; }
.btn-primary:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-outline { background: transparent; border-color: var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--gold); color: var(--gold); }
.btn-ghost { background: var(--bg-elevated); color: var(--text); }
.btn-sm { padding: 8px 16px; font-size: .85rem; }
.btn-block { width: 100%; }
.btn-whatsapp { background: #25d366; color: #0c1a10; }
.btn-danger { background: var(--red); color: #fff; }

/* ---------- Top navigation ---------- */
.navbar {
    position: sticky; top: 0; z-index: 50;
    background: rgba(20, 22, 26, 0.92); backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}
.navbar-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; gap: 20px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 1.35rem; font-weight: 800; }
.brand .dot { color: var(--gold); }
.nav-links { display: flex; gap: 22px; align-items: center; }
.nav-links a { color: var(--text-muted); font-weight: 600; font-size: .92rem; }
.nav-links a:hover, .nav-links a.active { color: var(--gold); }
.nav-actions { display: flex; gap: 10px; align-items: center; }
.nav-toggle { display: none; background: none; border: none; color: var(--text); font-size: 1.4rem; cursor: pointer; }

/* ---------- Hero / search ---------- */
.hero {
    background:
        radial-gradient(ellipse at top right, var(--gold-tint), transparent 55%),
        linear-gradient(180deg, var(--bg-alt), var(--bg));
    padding: 64px 0 40px; text-align: center; border-bottom: 1px solid var(--border);
}
.hero h1 { font-size: clamp(1.9rem, 4vw, 3rem); max-width: 780px; margin: 0 auto .4em; }
.hero .accent { color: var(--gold); }
.hero .subtitle { max-width: 560px; margin: 0 auto 28px; font-size: 1.05rem; }
.search-box {
    max-width: 720px; margin: 0 auto; display: flex; gap: 8px;
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 999px; padding: 6px;
    box-shadow: var(--shadow);
}
.search-box input {
    flex: 1; background: none; border: none; color: var(--text); padding: 12px 18px; font-size: 1rem; outline: none;
}
.search-box select {
    background: var(--bg-elevated); border: none; color: var(--text-muted); border-radius: 999px; padding: 0 14px;
}
.module-pills { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 26px; }
.module-pill {
    background: var(--bg-card); border: 1px solid var(--border); padding: 9px 18px; border-radius: 999px;
    font-size: .88rem; font-weight: 600; color: var(--text-muted); display: flex; align-items: center; gap: 6px;
}
.module-pill:hover { border-color: var(--gold); color: var(--gold); }

/* ---------- Town strip ---------- */
.town-strip { display: flex; gap: 10px; overflow-x: auto; padding: 18px 0; }
.town-chip {
    flex: 0 0 auto; background: var(--bg-card); border: 1px solid var(--border);
    padding: 8px 16px; border-radius: 999px; font-size: .85rem; color: var(--text-muted); font-weight: 600;
}
.town-chip:hover { color: var(--gold); border-color: var(--gold); }

/* ---------- Section headers ---------- */
.section { padding: 46px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 22px; flex-wrap: wrap; gap: 10px; }
.section-head h2 { font-size: 1.5rem; }
.section-head .see-all { color: var(--gold); font-weight: 600; font-size: .9rem; }
.section-alt { background: var(--bg-alt); }

/* ---------- Grid & cards ---------- */
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.card {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
    overflow: hidden; transition: transform .15s ease, border-color .15s ease;
    display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-3px); border-color: var(--gold-dim); }
.card-media { position: relative; aspect-ratio: 4/3; background: var(--bg-elevated); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-badges { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.card-body { padding: 16px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.card-title { font-size: 1.02rem; font-weight: 700; margin: 0; }
.card-meta { font-size: .82rem; color: var(--text-faint); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.card-price { color: var(--gold); font-weight: 700; font-size: 1.05rem; }
.card-actions { display: flex; gap: 8px; padding: 0 16px 16px; }

/* ---------- Badges ---------- */
.badge {
    display: inline-flex; align-items: center; gap: 4px; font-size: .68rem; font-weight: 800;
    text-transform: uppercase; letter-spacing: .03em; padding: 4px 9px; border-radius: 999px;
}
.badge-verified { background: rgba(76, 175, 111, .18); color: var(--green); }
.badge-featured { background: var(--gold-tint); color: var(--gold); }
.badge-new { background: rgba(74, 158, 218, .18); color: var(--blue); }
.badge-status-pending { background: rgba(227, 162, 61, .15); color: var(--gold); }
.badge-status-active { background: rgba(76, 175, 111, .15); color: var(--green); }
.badge-status-rejected, .badge-status-suspended { background: rgba(229, 85, 90, .15); color: var(--red); }

/* ---------- Stars ---------- */
.stars { color: var(--gold); letter-spacing: 1px; }
.review-count { color: var(--text-faint); font-size: .82rem; }

/* ---------- Stat blocks ---------- */
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; margin: 20px 0; }
.stat { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; text-align: center; }
.stat .value { font-size: 1.7rem; font-weight: 800; color: var(--gold); }
.stat .label { font-size: .82rem; color: var(--text-muted); margin-top: 2px; }

/* ---------- Forms ---------- */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: .85rem; font-weight: 700; margin-bottom: 6px; color: var(--text-muted); }
.form-control {
    width: 100%; background: var(--bg-elevated); border: 1px solid var(--border); color: var(--text);
    padding: 12px 14px; border-radius: var(--radius-sm); font-size: .95rem; font-family: inherit;
}
.form-control:focus { outline: none; border-color: var(--gold); }
textarea.form-control { resize: vertical; min-height: 110px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-hint { font-size: .78rem; color: var(--text-faint); margin-top: 4px; }
.auth-card {
    max-width: 440px; margin: 60px auto; background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 36px; box-shadow: var(--shadow);
}

/* ---------- Alerts ---------- */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: .9rem; }
.alert-success { background: rgba(76, 175, 111, .12); color: var(--green); border: 1px solid rgba(76,175,111,.3); }
.alert-error { background: rgba(229, 85, 90, .12); color: var(--red); border: 1px solid rgba(229,85,90,.3); }
.alert-info { background: rgba(74, 158, 218, .12); color: var(--blue); border: 1px solid rgba(74,158,218,.3); }

/* ---------- Pagination ---------- */
.pagination { display: flex; gap: 6px; justify-content: center; margin: 30px 0; }
.page-link { padding: 8px 14px; border-radius: 8px; border: 1px solid var(--border); color: var(--text-muted); font-weight: 600; font-size: .88rem; }
.page-link.active, .page-link:hover { border-color: var(--gold); color: var(--gold); }

/* ---------- Dashboard shell (admin + subscriber) ---------- */
.dash { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.dash-sidebar { background: var(--bg-alt); border-right: 1px solid var(--border); padding: 22px 16px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.dash-sidebar .brand { margin-bottom: 26px; padding: 0 8px; }
.dash-nav a {
    display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: var(--radius-sm);
    color: var(--text-muted); font-weight: 600; font-size: .9rem; margin-bottom: 2px;
}
.dash-nav a:hover, .dash-nav a.active { background: var(--gold-tint); color: var(--gold); }
.dash-nav .group-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-faint); margin: 18px 0 6px 12px; }
.dash-main { padding: 30px 34px; max-width: 1100px; }
.dash-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 26px; }
.dash-topbar h1 { font-size: 1.4rem; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); }
table.data-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
table.data-table th { text-align: left; padding: 12px 16px; background: var(--bg-elevated); color: var(--text-muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; }
table.data-table td { padding: 12px 16px; border-top: 1px solid var(--border); }
table.data-table tr:hover td { background: rgba(255,255,255,.02); }

/* ---------- Profile / mini website ---------- */
.profile-hero { background: var(--bg-card); border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); margin-bottom: 26px; }
.profile-cover { height: 220px; background: var(--bg-elevated); position: relative; }
.profile-cover img { width: 100%; height: 100%; object-fit: cover; }
.profile-info { padding: 20px 26px 26px; display: flex; gap: 18px; align-items: flex-end; margin-top: -50px; position: relative; flex-wrap: wrap; }
.profile-logo { width: 96px; height: 96px; border-radius: var(--radius); border: 4px solid var(--bg-card); background: var(--bg-elevated); overflow: hidden; flex: 0 0 auto; }
.profile-logo img { width: 100%; height: 100%; object-fit: cover; }
.profile-actions { display: flex; gap: 10px; margin-left: auto; flex-wrap: wrap; }
.tab-bar { display: flex; gap: 6px; border-bottom: 1px solid var(--border); margin-bottom: 22px; overflow-x: auto; }
.tab-link { padding: 12px 18px; font-weight: 700; font-size: .9rem; color: var(--text-muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.tab-link.active { color: var(--gold); border-color: var(--gold); }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.gallery-grid img { aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-sm); }
.review-item { border-bottom: 1px solid var(--border); padding: 16px 0; }
.review-item:last-child { border-bottom: none; }
.owner-reply { background: var(--bg-elevated); border-radius: var(--radius-sm); padding: 12px 14px; margin-top: 10px; font-size: .88rem; }

/* ---------- Plan cards (monetization) ---------- */
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.plan-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; text-align: center; }
.plan-card.highlight { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.plan-card .price { font-size: 1.8rem; font-weight: 800; color: var(--gold); margin: 10px 0; }
.plan-card ul { text-align: left; margin: 16px 0; font-size: .86rem; color: var(--text-muted); }
.plan-card li { padding: 5px 0; display: flex; gap: 8px; align-items: flex-start; }

/* ---------- Footer ---------- */
footer { background: var(--bg-alt); border-top: 1px solid var(--border); padding: 46px 0 24px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; margin-bottom: 30px; }
.footer-grid h4 { font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-faint); margin-bottom: 12px; }
.footer-grid a { display: block; color: var(--text-muted); font-size: .88rem; padding: 4px 0; }
.footer-grid a:hover { color: var(--gold); }
.footer-bottom { text-align: center; color: var(--text-faint); font-size: .82rem; border-top: 1px solid var(--border); padding-top: 20px; }

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

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
    .nav-links { display: none; }
    .nav-toggle { display: block; }
    .form-row { grid-template-columns: 1fr; }
    .dash { grid-template-columns: 1fr; }
    .dash-sidebar { display: none; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
    .search-box { flex-direction: column; border-radius: var(--radius); }
    .search-box select { width: 100%; }
    .footer-grid { grid-template-columns: 1fr; }
}
