/* ===================================================================
   Mybina.biz — Design system
   A trade network for Malaysian construction professionals.
   Palette and structure are drawn from site plans and spec sheets,
   not generic SaaS gradients: dot-grid paper, dimension-line rules,
   ID-badge chips, flat fills.
   =================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@500;700;800&family=Inter:wght@400;500;600&display=swap');

:root {
    /* Brand */
    --brand: #006633;
    --brand-dark: #004d26;
    --brand-light: #e6f2ec;
    --bg: #f4f3ef;

    /* Safety orange: one deliberate accent, used sparingly (site hazard tape) */
    --accent: #d97a1f;
    --accent-light: #fbe9d5;

    /* Neutrals */
    --ink: #1b201d;
    --ink-soft: #4c554e;
    --line: #d8d6cd;
    --line-soft: #e7e5dd;
    --white: #ffffff;

    /* Status */
    --ok: #1a7a43;
    --warn: #b9790a;
    --danger: #b3261e;
    --danger-light: #fbe7e5;

    --radius: 10px;
    --radius-sm: 6px;
    --shadow: 0 1px 2px rgba(27, 32, 29, 0.06), 0 6px 16px rgba(27, 32, 29, 0.06);
    --font-head: 'Manrope', sans-serif;
    --font-body: 'Inter', sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--ink);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

h1, h2, h3, h4 {
    font-family: var(--font-head);
    color: var(--ink);
    line-height: 1.15;
    margin: 0 0 0.5em;
}

h1 { font-size: clamp(2rem, 1.5rem + 2vw, 3.1rem); font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 1.3rem + 1vw, 2.1rem); font-weight: 800; letter-spacing: -0.01em; }
h3 { font-size: 1.2rem; font-weight: 700; }
h4 { font-size: 1rem; font-weight: 700; }

p { margin: 0 0 1em; color: var(--ink-soft); }

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); text-decoration: underline; }

:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

.container {
    width: 100%;
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 24px;
}

.container-narrow {
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------------- Eyebrow / labels (spec-sheet vocabulary) --------- */

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--brand);
}

.eyebrow::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 1px;
    transform: rotate(45deg);
    flex: none;
}

/* ---------------- Buttons ------------------------------------------ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 12px 22px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    line-height: 1.2;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.05s ease;
}

.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--brand); color: var(--white); }
.btn-primary:hover { background: var(--brand-dark); color: var(--white); text-decoration: none; }

.btn-outline { background: transparent; color: var(--brand); border-color: var(--brand); }
.btn-outline:hover { background: var(--brand-light); color: var(--brand-dark); text-decoration: none; }

.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--line-soft); text-decoration: none; }

.btn-danger { background: var(--white); color: var(--danger); border-color: var(--danger-light); }
.btn-danger:hover { background: var(--danger-light); text-decoration: none; }

.btn-sm { padding: 8px 14px; font-size: 0.85rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* ---------------- Site header (public) ------------------------------ */

.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(244, 243, 239, 0.92);
    backdrop-filter: saturate(140%) blur(6px);
    border-bottom: 1px solid var(--line-soft);
}

.site-header .container,
.app-nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.brand-mark {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--ink);
}

.brand-mark:hover { color: var(--ink); text-decoration: none; }

.brand-mark .logo-chip {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: var(--brand);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 0.95rem;
    flex: none;
}

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

.site-nav-links a {
    color: var(--ink-soft);
    font-weight: 500;
    font-size: 0.95rem;
}

.site-nav-links a:hover { color: var(--brand); text-decoration: none; }

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

.nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* ---------------- Hero + signature site-plan graphic ---------------- */

.hero {
    position: relative;
    padding: 72px 0 88px;
    background-image: radial-gradient(var(--line) 1px, transparent 1px);
    background-size: 22px 22px;
    background-position: -11px -11px;
    border-bottom: 1px solid var(--line-soft);
    overflow: hidden;
}

.hero .container {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 48px;
    align-items: center;
}

.hero-copy p.lead {
    font-size: 1.1rem;
    color: var(--ink-soft);
    max-width: 46ch;
}

.hero-actions { display: flex; gap: 14px; margin: 28px 0 30px; flex-wrap: wrap; }

.hero-trust {
    font-size: 0.82rem;
    color: var(--ink-soft);
    letter-spacing: 0.02em;
}

.hero-trust strong { color: var(--ink); font-weight: 600; }

.site-plan {
    width: 100%;
    height: auto;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.site-plan .grid-line { stroke: var(--line-soft); stroke-width: 1; }
.site-plan .link-line { stroke: var(--brand); stroke-width: 1.5; opacity: 0.55; }
.site-plan .node circle { fill: var(--white); stroke: var(--brand); stroke-width: 2; }
.site-plan .node.you circle { fill: var(--accent); stroke: var(--accent); }
.site-plan .node text {
    font-family: var(--font-body);
    font-size: 9.5px;
    font-weight: 600;
    fill: var(--ink);
}
.site-plan .node.you text { fill: var(--accent); font-weight: 700; }
.site-plan .frame-label {
    font-family: var(--font-body);
    font-size: 9px;
    letter-spacing: 0.12em;
    fill: var(--ink-soft);
    text-transform: uppercase;
}

/* ---------------- Dimension-line divider (blueprint vernacular) ----- */

.dim-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--ink-soft);
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin: 0 0 40px;
}

.dim-divider::before,
.dim-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--line);
    background-image: linear-gradient(90deg, var(--line) 0 1px, transparent 1px);
    background-size: 8px 1px;
}

/* ---------------- Stat strip ---------------------------------------- */

.stat-strip { background: var(--brand-dark); color: #fff; padding: 40px 0; }
.stat-strip .container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    text-align: center;
}
.stat-strip .stat-num {
    font-family: var(--font-head);
    font-size: 2rem;
    font-weight: 800;
}
.stat-strip .stat-label {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.75);
    letter-spacing: 0.04em;
}

/* ---------------- Sections ------------------------------------------ */

.section { padding: 88px 0; }
.section-alt { background: var(--brand-light); }
.section-head { max-width: 620px; margin: 0 0 44px; }
.section-head p { font-size: 1.02rem; }

/* ---------------- Feature grid --------------------------------------- */

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.feature-card {
    background: var(--white);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    padding: 26px;
}

.feature-icon {
    width: 42px;
    height: 42px;
    border-radius: 9px;
    background: var(--brand-light);
    color: var(--brand);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    flex: none;
}

.feature-card h3 { margin-bottom: 6px; }
.feature-card p { margin: 0; font-size: 0.94rem; }

/* ---------------- How it works (real sequence -> numbered) ----------- */

.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    position: relative;
}

.step { padding: 0 20px; position: relative; }

.step:not(:first-child)::before {
    content: '';
    position: absolute;
    left: 0;
    top: 22px;
    width: 100%;
    height: 1px;
    background-image: linear-gradient(90deg, var(--line) 0 6px, transparent 6px 12px);
    background-size: 12px 1px;
    transform: translateX(-50%);
}

.step-num {
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 0.85rem;
    color: var(--brand);
    background: var(--white);
    border: 1.5px solid var(--brand);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    position: relative;
}

/* ---------------- Role chips ----------------------------------------- */

.chip-row { display: flex; flex-wrap: wrap; gap: 10px; }

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--white);
    border: 1px solid var(--line);
    color: var(--ink);
    font-size: 0.86rem;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: 999px;
}

.chip.chip-active { background: var(--brand-light); border-color: var(--brand); color: var(--brand-dark); }
.chip.chip-accent { background: var(--accent-light); border-color: var(--accent); color: #8a4c10; }

/* ---------------- CTA band -------------------------------------------- */

.cta-band {
    background: var(--brand);
    color: #fff;
    padding: 64px 0;
    text-align: center;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,0.85); }
.cta-band .btn-primary { background: #fff; color: var(--brand-dark); }
.cta-band .btn-primary:hover { background: var(--accent-light); }

/* ---------------- Footer ------------------------------------------------ */

.site-footer { background: var(--brand-dark); color: rgba(255,255,255,0.8); padding: 56px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 40px; }
.site-footer .brand-mark { color: #fff; }
.site-footer .brand-mark .logo-chip { background: #fff; color: var(--brand-dark); }
.site-footer p { color: rgba(255,255,255,0.65); font-size: 0.9rem; }
.site-footer h4 { color: #fff; font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.site-footer a { color: rgba(255,255,255,0.75); font-size: 0.92rem; }
.site-footer a:hover { color: #fff; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.15);
    padding-top: 24px;
    font-size: 0.82rem;
    color: rgba(255,255,255,0.55);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

/* ---------------- Auth / form pages -------------------------------------- */

.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

/* Pinned to the viewport: the sign-up form is taller than one screen, and
   a stretched panel would push the quote below the fold on page load. */
.auth-side {
    position: sticky;
    top: 0;
    align-self: start;
    height: 100vh;
    background-color: var(--brand-dark);
    background-size: cover;
    background-position: center;
    color: #fff;
    padding: 48px 56px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow: hidden;
}

.auth-side::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 51, 26, 0.78);
}

.auth-side > * { position: relative; z-index: 1; }

/* Dark wordmark/chip disappear against the photo — invert both. */
.auth-side .brand-mark { color: #fff; }
.auth-side .brand-mark .logo-chip { background: #fff; color: var(--brand-dark); }

/* auto top/bottom margins center the quote in the space left below the
   logo, so it stays put whatever the panel height. */
.auth-side blockquote {
    font-size: 1.15rem;
    font-family: var(--font-head);
    font-weight: 700;
    max-width: 40ch;
    margin: auto 0;
}
.auth-side cite { font-size: 0.85rem; opacity: 0.75; font-style: normal; }

.auth-form-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
}

.auth-card { width: 100%; max-width: 420px; }
.auth-card h1 { font-size: 1.6rem; }
.auth-card .muted-link { text-align: center; margin-top: 18px; font-size: 0.92rem; color: var(--ink-soft); }

.card {
    background: var(--white);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    padding: 26px;
    box-shadow: var(--shadow);
}

.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: 0.88rem; margin-bottom: 6px; }
.field .hint { font-size: 0.8rem; color: var(--ink-soft); margin-top: 4px; }

.input, select.input, textarea.input {
    width: 100%;
    font-family: var(--font-body);
    font-size: 0.96rem;
    padding: 11px 13px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--white);
    color: var(--ink);
}

.input:focus, select.input:focus, textarea.input:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-light);
}

textarea.input { resize: vertical; min-height: 90px; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.checkbox-row { display: flex; align-items: flex-start; gap: 10px; font-size: 0.88rem; color: var(--ink-soft); }
.checkbox-row input { margin-top: 3px; }

/* ---------------- Alerts / flash ----------------------------------------- */

.alert {
    padding: 13px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    margin-bottom: 18px;
    border: 1px solid transparent;
}
.alert-success { background: var(--brand-light); color: var(--brand-dark); border-color: #bfe0cf; }
.alert-error { background: var(--danger-light); color: var(--danger); border-color: #f2c6c2; }
.alert-info { background: #eef4fb; color: #245b8a; border-color: #cfe1f2; }
.alert-warn { background: #fdf3e1; color: var(--warn); border-color: #f3ddab; }

/* ---------------- App shell (logged-in member area) ----------------------- */

.app-nav {
    background: var(--white);
    border-bottom: 1px solid var(--line-soft);
    position: sticky;
    top: 0;
    z-index: 40;
}

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

.app-nav-links a {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: var(--ink-soft);
    font-weight: 500;
    font-size: 0.92rem;
}

.app-nav-links a:hover { background: var(--brand-light); color: var(--brand-dark); text-decoration: none; }
.app-nav-links a.active { background: var(--brand-light); color: var(--brand-dark); }

.badge-dot {
    background: var(--accent);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    min-width: 17px;
    height: 17px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

.user-menu { position: relative; }
.avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--brand);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    overflow: hidden;
    flex: none;
    cursor: pointer;
    border: none;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }

.avatar-lg { width: 96px; height: 96px; font-size: 1.8rem; }
.avatar-sm { width: 32px; height: 32px; font-size: 0.75rem; }

.dropdown-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    background: var(--white);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    min-width: 200px;
    padding: 6px;
    display: none;
    z-index: 50;
}
.dropdown-menu.open { display: block; }
.dropdown-menu a, .dropdown-menu button {
    display: block;
    width: 100%;
    text-align: left;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    color: var(--ink);
    font-size: 0.9rem;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
}
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--line-soft); text-decoration: none; }
.dropdown-menu hr { border: none; border-top: 1px solid var(--line-soft); margin: 6px 0; }

.app-main { padding: 36px 0 80px; min-height: calc(100vh - 73px); }

.app-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 24px;
    align-items: start;
}

.app-layout.with-aside { grid-template-columns: 1fr 300px; }

.side-card { position: sticky; top: 92px; }
.side-card + .side-card { margin-top: 20px; }

.side-profile { text-align: center; padding: 26px 20px; }
.side-profile h3 { margin: 12px 0 2px; }
.side-profile .role { color: var(--ink-soft); font-size: 0.88rem; margin-bottom: 14px; }
.side-stat-row { display: flex; justify-content: space-around; margin-top: 16px; border-top: 1px solid var(--line-soft); padding-top: 14px; }
.side-stat-row div { text-align: center; }
.side-stat-row strong { display: block; font-family: var(--font-head); font-size: 1.1rem; }
.side-stat-row span { font-size: 0.75rem; color: var(--ink-soft); }

/* ---------------- Feed / posts ------------------------------------------- */

.composer textarea { min-height: 70px; }
.composer-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }

.post { padding: 22px; margin-bottom: 18px; }
.post-head { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.post-head .who { font-weight: 700; font-size: 0.94rem; }
.post-head .meta { font-size: 0.8rem; color: var(--ink-soft); }
.post-body { font-size: 0.96rem; color: var(--ink); white-space: pre-wrap; margin-bottom: 12px; }
.post-image { border-radius: var(--radius-sm); margin-bottom: 12px; border: 1px solid var(--line-soft); }
.post-actions { display: flex; gap: 6px; border-top: 1px solid var(--line-soft); padding-top: 10px; }
.post-actions button {
    background: none; border: none; cursor: pointer;
    display: flex; align-items: center; gap: 6px;
    color: var(--ink-soft); font-size: 0.86rem; font-weight: 600;
    padding: 7px 10px; border-radius: var(--radius-sm); font-family: var(--font-body);
}
.post-actions button:hover { background: var(--brand-light); color: var(--brand-dark); }
.post-actions button.liked { color: var(--accent); }
.comment-list { margin-top: 12px; border-top: 1px solid var(--line-soft); padding-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.comment { display: flex; gap: 10px; }
.comment-bubble { background: var(--bg); border-radius: var(--radius-sm); padding: 8px 12px; font-size: 0.88rem; flex: 1; }
.comment-bubble .who { font-weight: 700; margin-right: 6px; }
.comment-form { display: flex; gap: 10px; margin-top: 12px; }
.comment-form input { flex: 1; }

/* ---------------- Member cards / directory --------------------------------- */

.member-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.member-card { padding: 22px; text-align: center; }
.member-card .name { font-weight: 700; margin-top: 12px; }
.member-card .role { font-size: 0.85rem; color: var(--ink-soft); margin-bottom: 4px; }
.member-card .state { font-size: 0.78rem; color: var(--ink-soft); }
.member-card .btn { margin-top: 14px; width: 100%; }

.filter-bar { display: flex; gap: 12px; margin-bottom: 24px; flex-wrap: wrap; }
.filter-bar .input { max-width: 220px; }
.filter-bar input[type=text] { max-width: 260px; }

/* ---------------- Profile page ------------------------------------------- */

.profile-cover { height: 160px; background: var(--brand-light); border-radius: var(--radius) var(--radius) 0 0; position: relative; overflow: hidden; }
.profile-cover img { width: 100%; height: 100%; object-fit: cover; }
.profile-head { padding: 0 26px 22px; margin-top: -44px; }
.profile-head .avatar-lg { border: 4px solid var(--white); }
.profile-head h1 { font-size: 1.5rem; margin: 14px 0 2px; }
.skill-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }

/* ---------------- Network / connections ------------------------------------ */

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line-soft); margin-bottom: 24px; }
.tabs a {
    padding: 12px 18px; font-weight: 600; font-size: 0.92rem; color: var(--ink-soft);
    border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs a.active { color: var(--brand); border-color: var(--brand); }
.tabs a:hover { text-decoration: none; color: var(--brand); }

.conn-row {
    display: flex; align-items: center; gap: 14px; padding: 16px 20px;
    background: var(--white); border: 1px solid var(--line-soft); border-radius: var(--radius); margin-bottom: 10px;
}
.conn-row .info { flex: 1; }
.conn-row .name { font-weight: 700; }
.conn-row .role { font-size: 0.84rem; color: var(--ink-soft); }
.conn-row .actions { display: flex; gap: 8px; }

/* ---------------- Messages ------------------------------------------------- */

.msg-shell { display: grid; grid-template-columns: 300px 1fr; height: 68vh; border: 1px solid var(--line-soft); border-radius: var(--radius); overflow: hidden; background: var(--white); }
.msg-list { border-right: 1px solid var(--line-soft); overflow-y: auto; }
.msg-list a { display: flex; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line-soft); color: var(--ink); }
.msg-list a:hover, .msg-list a.active { background: var(--brand-light); text-decoration: none; }
.msg-list .name { font-weight: 700; font-size: 0.9rem; }
.msg-list .preview { font-size: 0.8rem; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 190px; }
.msg-thread { display: flex; flex-direction: column; height: 100%; }
.msg-thread-head { padding: 14px 20px; border-bottom: 1px solid var(--line-soft); font-weight: 700; display:flex; align-items:center; gap:10px; }
.msg-scroll { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.msg-bubble { max-width: 70%; padding: 10px 14px; border-radius: 14px; font-size: 0.9rem; }
.msg-bubble.mine { align-self: flex-end; background: var(--brand); color: #fff; border-bottom-right-radius: 4px; }
.msg-bubble.theirs { align-self: flex-start; background: var(--bg); border-bottom-left-radius: 4px; }
.msg-bubble .time { display: block; font-size: 0.68rem; opacity: 0.7; margin-top: 4px; }
.msg-compose { display: flex; gap: 10px; padding: 14px; border-top: 1px solid var(--line-soft); }
.msg-compose input { flex: 1; }
.msg-empty { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--ink-soft); flex-direction: column; gap: 10px; }

/* ---------------- Admin --------------------------------------------------- */

.admin-shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.admin-sidebar { background: var(--brand-dark); color: #fff; padding: 24px 16px; }
.admin-sidebar .brand-mark { color: #fff; margin-bottom: 30px; padding: 0 8px; }
.admin-sidebar .brand-mark .logo-chip { background: #fff; color: var(--brand-dark); }
.admin-sidebar nav a {
    display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: var(--radius-sm);
    color: rgba(255,255,255,0.78); font-weight: 500; font-size: 0.92rem; margin-bottom: 2px;
}
.admin-sidebar nav a:hover { background: rgba(255,255,255,0.08); color: #fff; text-decoration: none; }
.admin-sidebar nav a.active { background: rgba(255,255,255,0.14); color: #fff; }
.admin-main { padding: 32px 36px 60px; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; }

.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 32px; }
.stat-card { padding: 20px; }
.stat-card .num { font-family: var(--font-head); font-size: 1.9rem; font-weight: 800; }
.stat-card .label { font-size: 0.85rem; color: var(--ink-soft); }

.table-card { padding: 0; overflow: hidden; }
table.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: 13px 18px; text-align: left; font-size: 0.9rem; border-bottom: 1px solid var(--line-soft); }
.data-table th { background: var(--bg); font-weight: 700; font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-soft); }
.data-table tr:last-child td { border-bottom: none; }
.data-table td.actions { display: flex; gap: 8px; }

.status-pill {
    display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px;
    font-size: 0.76rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em;
}
.status-pending { background: #fdf3e1; color: var(--warn); }
.status-active { background: var(--brand-light); color: var(--brand-dark); }
.status-rejected, .status-suspended { background: var(--danger-light); color: var(--danger); }

.empty-state { text-align: center; padding: 60px 20px; color: var(--ink-soft); }
.empty-state .feature-icon { margin: 0 auto 16px; }

/* ---------------- Pagination-ish / misc ------------------------------------ */

.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.muted { color: var(--ink-soft); }
.flex { display: flex; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.w-full { width: 100%; }

/* ---------------- Responsive ------------------------------------------------ */

@media (max-width: 960px) {
    .feature-grid { grid-template-columns: repeat(2, 1fr); }
    .member-grid { grid-template-columns: repeat(2, 1fr); }
    .stat-strip .container { grid-template-columns: repeat(2, 1fr); row-gap: 24px; }
    .app-layout, .app-layout.with-aside { grid-template-columns: 1fr; }
    .side-card { position: static; }
    .admin-shell { grid-template-columns: 1fr; }
    .admin-sidebar { display: none; }
}

@media (max-width: 860px) {
    .hero .container { grid-template-columns: 1fr; }
    .hero-visual { order: -1; }
    .auth-shell { grid-template-columns: 1fr; }
    .auth-side { display: none; }
}

@media (max-width: 700px) {
    .site-nav-links { display: none; }
    .nav-toggle { display: flex; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .steps { grid-template-columns: 1fr; gap: 28px; }
    .step:not(:first-child)::before { display: none; }
    .stat-cards { grid-template-columns: 1fr 1fr; }
    .field-row { grid-template-columns: 1fr; }
    .msg-shell { grid-template-columns: 1fr; height: auto; }
    .msg-list { max-height: 220px; }
}

@media (max-width: 520px) {
    .feature-grid, .member-grid, .stat-cards { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .hero { padding: 48px 0 60px; }
    .section { padding: 56px 0; }
}
