/* ================= AzonLink — Style ================= */
:root {
  --blue: #1b4dff;
  --blue-dark: #0b3fd9;
  --blue-light: #e7efff;
  --navy: #0a1f5c;
  --bg: #f0f2f5;
  --card: #ffffff;
  --text: #050505;
  --muted: #65676b;
  --line: #e4e6eb;
  --hover: #f2f3f5;
  --green: #31a24c;
  --red: #e41e3f;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16,24,40,.07), 0 10px 30px -14px rgba(16,24,40,.22);
  --header: 60px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; background: var(--bg); color: var(--text); font-size: 15px; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
img, video { max-width: 100%; display: block; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.bold { font-weight: 600; }
.row { display: flex; align-items: center; gap: 8px; }
.col { display: flex; flex-direction: column; gap: 8px; }
.grow { flex: 1; min-width: 0; }
.center { text-align: center; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.boot { height: 100vh; display: grid; place-items: center; }
.boot img { width: 80px; animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { transform: scale(.9); opacity: .6; } }

/* ---------- Bouton & antre ---------- */
.btn { border: 0; border-radius: 6px; padding: 8px 14px; font-weight: 600; cursor: pointer; background: var(--hover); display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: filter .15s; }
.btn:hover { filter: brightness(.95); }
.btn:disabled { opacity: .6; cursor: default; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-light { background: var(--blue-light); color: var(--blue); }
.btn-danger { background: var(--red); color: #fff; }
.btn-green { background: #42b72a; color: #fff; }
.btn-block { width: 100%; }
.btn-sm { padding: 5px 10px; font-size: 13px; }
.btn-outline { background: #fff; border: 1px solid var(--blue); color: var(--blue); }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--line); display: grid; place-items: center; cursor: pointer; position: relative; flex-shrink: 0; }
.icon-btn:hover { background: #d8dadf; }
.icon-btn svg { width: 20px; height: 20px; }
.badge { position: absolute; top: -4px; right: -4px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; min-width: 19px; height: 19px; border-radius: 10px; display: grid; place-items: center; padding: 0 5px; }
.input, textarea.input, select.input { width: 100%; padding: 11px 14px; border: 1px solid #dddfe2; border-radius: 6px; background: #fff; outline: none; }
.input:focus { border-color: var(--blue); box-shadow: 0 0 0 2px var(--blue-light); }
textarea.input { resize: vertical; min-height: 80px; }
label.lbl { font-size: 13px; font-weight: 600; color: var(--muted); }

.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 16px; margin-bottom: 16px; }
.card h3 { margin: 0 0 10px; font-size: 17px; }
.avatar { border-radius: 50%; object-fit: cover; background: #ccd; flex-shrink: 0; }
.av-24 { width: 24px; height: 24px; } .av-32 { width: 32px; height: 32px; } .av-36 { width: 36px; height: 36px; }
.av-40 { width: 40px; height: 40px; } .av-60 { width: 60px; height: 60px; } .av-90 { width: 90px; height: 90px; }
.av-wrap { position: relative; display: inline-block; }
.dot-online { position: absolute; right: 0; bottom: 0; width: 11px; height: 11px; border-radius: 50%; background: var(--green); border: 2px solid #fff; }
.verified { color: var(--blue); display: inline-flex; vertical-align: middle; margin-left: 3px; }
.verified svg { width: 14px; height: 14px; }

/* ---------- Header ---------- */
.header { position: fixed; top: 0; left: 0; right: 0; height: var(--header); background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.1); display: flex; align-items: center; padding: 0 16px; z-index: 50; gap: 10px; }
.brand { display: flex; align-items: center; gap: 6px; font-weight: 800; font-size: 26px; letter-spacing: -0.5px; }
.brand img { width: 40px; height: 40px; }
.brand .a { color: var(--blue); } .brand .b { color: var(--navy); }
.search-box { display: flex; align-items: center; gap: 8px; background: var(--hover); border-radius: 50px; padding: 0 14px; height: 40px; width: 240px; }
.search-box input { border: 0; background: transparent; outline: none; width: 100%; }
.search-box svg { width: 16px; color: var(--muted); }
.nav-center { flex: 1; display: flex; justify-content: center; gap: 6px; }
.nav-tab { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 96px; height: var(--header); color: var(--muted); font-size: 13px; border-bottom: 3px solid transparent; position: relative; }
.nav-tab svg { width: 24px; height: 24px; }
.nav-tab:hover { background: var(--hover); border-radius: 8px; height: 52px; }
.nav-tab.active { color: var(--blue); border-bottom-color: var(--blue); }
.nav-right { display: flex; align-items: center; gap: 8px; }

/* ---------- Layout ---------- */
.layout { padding-top: var(--header); display: grid; grid-template-columns: 300px minmax(0, 1fr) 320px; gap: 24px; max-width: 1500px; margin: 0 auto; }
.layout.wide { grid-template-columns: 300px minmax(0, 1fr); }
.layout.full { grid-template-columns: minmax(0, 1fr); }
.sidebar { position: sticky; top: var(--header); height: calc(100vh - var(--header)); overflow-y: auto; padding: 16px 8px; }
.sidebar::-webkit-scrollbar { width: 0; }
.main { padding: 20px 0 80px; min-width: 0; }
.feed-col { max-width: 680px; margin: 0 auto; }
.side-link { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 8px; font-weight: 500; cursor: pointer; }
.side-link:hover, .side-link.active { background: #e4e6e9; }
.side-link .ic { width: 36px; height: 36px; display: grid; place-items: center; }
.side-link .ic svg { width: 28px; height: 28px; }
.side-title { color: var(--muted); font-weight: 600; font-size: 16px; padding: 10px 8px 4px; display: flex; justify-content: space-between; align-items: center; }
.right .card { padding: 12px; }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 8px 0; }

/* ---------- Stories ---------- */
.stories { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 16px; padding-bottom: 4px; }
.stories::-webkit-scrollbar { height: 0; }
.story { flex: 0 0 112px; height: 200px; border-radius: 12px; overflow: hidden; position: relative; cursor: pointer; background: #333; box-shadow: var(--shadow); }
.story img.bg, .story video.bg { width: 100%; height: 100%; object-fit: cover; transition: transform .2s; }
.story:hover img.bg { transform: scale(1.03); }
.story .txtbg { width: 100%; height: 100%; display: grid; place-items: center; color: #fff; font-weight: 700; padding: 10px; text-align: center; font-size: 13px; }
.story::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 55%, rgba(0,0,0,.6)); }
.story .who { position: absolute; top: 10px; left: 10px; border: 3px solid var(--blue); border-radius: 50%; z-index: 2; }
.story .name { position: absolute; bottom: 8px; left: 10px; right: 8px; color: #fff; font-weight: 600; font-size: 13px; z-index: 2; }
.story.create { background: #fff; }
.story.create img.bg { height: 150px; }
.story.create::after { display: none; }
.story.create .plus { position: absolute; top: 132px; left: 50%; transform: translateX(-50%); width: 36px; height: 36px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; border: 4px solid #fff; font-size: 22px; font-weight: 700; }
.story.create .name { color: var(--text); text-align: center; bottom: 8px; }
.story-viewer { position: fixed; inset: 0; background: rgba(0,0,0,.92); z-index: 200; display: grid; place-items: center; }
.story-viewer .frame { width: min(420px, 100vw); height: min(740px, 100vh); position: relative; border-radius: 12px; overflow: hidden; background: #111; }
.story-viewer .frame > img, .story-viewer .frame > video { width: 100%; height: 100%; object-fit: contain; }
.story-viewer .bars { position: absolute; top: 8px; left: 8px; right: 8px; display: flex; gap: 4px; z-index: 3; }
.story-viewer .bars span { flex: 1; height: 3px; background: rgba(255,255,255,.4); border-radius: 2px; overflow: hidden; }
.story-viewer .bars span i { display: block; height: 100%; width: 0; background: #fff; }
.story-viewer .head { position: absolute; top: 20px; left: 12px; right: 12px; z-index: 3; color: #fff; }
.story-viewer .close { position: absolute; top: 16px; right: 16px; z-index: 4; color: #fff; background: none; border: 0; font-size: 28px; cursor: pointer; }
.story-viewer .text-story { width: 100%; height: 100%; display: grid; place-items: center; color: #fff; font-size: 26px; font-weight: 700; padding: 30px; text-align: center; }
.story-viewer .nav { position: absolute; top: 0; bottom: 0; width: 40%; z-index: 2; cursor: pointer; }
.story-viewer .nav.l { left: 0; } .story-viewer .nav.r { right: 0; }

/* ---------- Composer ---------- */
.composer .top { display: flex; gap: 10px; align-items: center; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.composer .fake-input { flex: 1; background: var(--hover); border-radius: 50px; padding: 10px 16px; color: var(--muted); cursor: pointer; }
.composer .fake-input:hover { background: #e4e6e9; }
.composer .actions { display: flex; justify-content: space-around; padding-top: 8px; }
.composer .act { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 8px; cursor: pointer; color: var(--muted); font-weight: 600; }
.composer .act:hover { background: var(--hover); }
.composer .act svg { width: 24px; height: 24px; }

/* ---------- Post ---------- */
.post { padding: 12px 0 4px; }
.post .ph { display: flex; gap: 10px; padding: 0 16px; align-items: flex-start; }
.post .ph .name { font-weight: 600; }
.post .ph .name a:hover { text-decoration: underline; }
.post .meta { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 4px; }
.post .meta svg { width: 12px; height: 12px; }
.post .content { padding: 8px 16px; white-space: pre-wrap; word-wrap: break-word; }
.post .content.big { font-size: 22px; }
.post .media { background: #000; margin-top: 4px; }
.post .media img { width: 100%; max-height: 700px; object-fit: contain; margin: 0 auto; background: #f0f2f5; }
.post .media video { width: 100%; max-height: 700px; }
.post .shared { border: 1px solid var(--line); border-radius: 10px; margin: 6px 16px; overflow: hidden; }
.post .shared .post { padding-top: 10px; }
.post .stats { display: flex; justify-content: space-between; padding: 10px 16px; color: var(--muted); font-size: 14px; }
.post .stats .rx { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.rx-icons { display: flex; }
.rx-icons span { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; border: 2px solid #fff; margin-left: -4px; background: #fff; }
.rx-icons span:first-child { margin-left: 0; }
.post .bar { display: flex; border-top: 1px solid var(--line); margin: 0 16px; padding: 4px 0; }
.post .bar button { flex: 1; background: none; border: 0; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 8px; border-radius: 6px; cursor: pointer; color: var(--muted); font-weight: 600; position: relative; }
.post .bar button:hover { background: var(--hover); }
.post .bar button svg { width: 20px; height: 20px; }
.post .bar button.on { color: var(--blue); }
.post .bar button.love { color: #f33e58; } .post .bar button.haha, .post .bar button.wow, .post .bar button.sad { color: #f7b125; } .post .bar button.angry { color: #e9710f; }
.rx-picker { position: absolute; bottom: 44px; left: 0; background: #fff; border-radius: 30px; box-shadow: 0 2px 12px rgba(0,0,0,.2); padding: 4px 6px; display: flex; gap: 2px; z-index: 10; }
.rx-picker span { font-size: 30px; cursor: pointer; transition: transform .15s; padding: 2px; }
.rx-picker span:hover { transform: scale(1.3) translateY(-4px); }
.comments { padding: 4px 16px 10px; border-top: 1px solid var(--line); margin: 0 16px; padding-left: 0; padding-right: 0; }
.comment { display: flex; gap: 8px; margin-top: 8px; }
.comment .bubble { background: var(--hover); border-radius: 18px; padding: 8px 12px; display: inline-block; max-width: 100%; word-wrap: break-word; white-space: pre-wrap; }
.comment .bubble .bold { display: block; font-size: 13px; }
.comment .tools { font-size: 12px; color: var(--muted); margin: 2px 12px; display: flex; gap: 12px; font-weight: 600; }
.comment .tools span { cursor: pointer; }
.comment.reply { margin-left: 40px; }
.comment-form { display: flex; gap: 8px; margin-top: 10px; align-items: center; }
.comment-form input { flex: 1; background: var(--hover); border: 0; border-radius: 20px; padding: 9px 14px; outline: none; }

/* ---------- Menu deroulan ---------- */
.dropdown { position: fixed; background: #fff; border-radius: 10px; box-shadow: 0 6px 24px rgba(0,0,0,.18); padding: 8px; min-width: 300px; z-index: 120; max-height: calc(100vh - 80px); overflow-y: auto; }
.dropdown .item { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 8px; cursor: pointer; font-weight: 500; }
.dropdown .item:hover { background: var(--hover); }
.dropdown .item .ic { width: 36px; height: 36px; border-radius: 50%; background: var(--line); display: grid; place-items: center; }
.dropdown .item .ic svg { width: 20px; height: 20px; }
.dropdown .item .chev { margin-left: auto; color: var(--muted); }
.dropdown h2 { margin: 6px 10px 10px; font-size: 22px; }
.menu-x { position: relative; }

/* ---------- Modal ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(244,244,244,.8); z-index: 150; display: grid; place-items: center; padding: 16px; }
.modal { background: #fff; border-radius: 10px; box-shadow: 0 12px 28px rgba(0,0,0,.25); width: min(520px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; }
.modal.lg { width: min(760px, 100%); }
.modal .mh { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: center; font-weight: 700; font-size: 19px; position: relative; }
.modal .mh .x { position: absolute; right: 12px; top: 10px; }
.modal .mb { padding: 16px; overflow-y: auto; }
.modal .mf { padding: 12px 16px; border-top: 1px solid var(--line); }
.composer-text { width: 100%; border: 0; outline: none; resize: none; font-size: 22px; min-height: 120px; }
.preview-media { position: relative; border: 1px solid var(--line); border-radius: 8px; padding: 6px; margin-top: 8px; }
.preview-media img, .preview-media video { max-height: 300px; margin: 0 auto; border-radius: 6px; }
.preview-media .x { position: absolute; top: 10px; right: 10px; }
.add-to { display: flex; align-items: center; justify-content: space-between; border: 1px solid var(--line); border-radius: 8px; padding: 8px 14px; margin-top: 12px; }
.add-to .ics { display: flex; gap: 4px; }
.add-to .ics label, .add-to .ics button { cursor: pointer; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: none; border: 0; }
.add-to .ics label:hover, .add-to .ics button:hover { background: var(--hover); }
.add-to svg { width: 24px; height: 24px; }
.privacy-select { font-size: 13px; padding: 3px 8px; border-radius: 6px; background: var(--line); border: 0; font-weight: 600; }

/* ---------- Toast ---------- */
#toast-root { position: fixed; bottom: 20px; left: 20px; z-index: 300; display: flex; flex-direction: column; gap: 8px; }
.toast { background: #fff; padding: 12px 16px; border-radius: 8px; box-shadow: 0 4px 16px rgba(0,0,0,.2); max-width: 340px; animation: slideIn .2s; display: flex; gap: 10px; align-items: center; cursor: pointer; }
.toast.err { border-left: 4px solid var(--red); }
@keyframes slideIn { from { transform: translateY(20px); opacity: 0; } }

/* ---------- Auth ---------- */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; gap: 70px; padding: 40px 24px; flex-wrap: wrap; max-width: 1120px; margin: 0 auto; }
.auth-hero { max-width: 500px; }
.auth-hero .brand { font-size: 56px; }
.auth-hero .brand img { width: min(420px, 100%); height: auto; display: block; }
.auth-hero p { font-size: 29px; line-height: 1.3; margin-top: 8px; }
.auth-card { width: 440px; max-width: 100%; background: #fff; border: 1px solid #e8e9ec; border-radius: 12px; box-shadow: 0 9px 20px rgba(21,27,41,.13), 0 2px 5px rgba(21,27,41,.06); padding: 21px; display: flex; flex-direction: column; gap: 12px; }
.auth-card .input { height: 48px; border-radius: 7px; font-size: 18px; }
.auth-card .btn-primary { font-size: 20px; font-weight: 700; height: 53px; padding: 12px; background: #0646f5; }
.auth-card .btn-green { background: #329c1e; }
.auth-card .err { color: var(--red); font-size: 14px; }

/* ---------- Profile ---------- */
.profile-top { background: #fff; box-shadow: var(--shadow); margin: -20px 0 16px; }
.profile-top .inner { max-width: 1000px; margin: 0 auto; }
.cover { height: 360px; background: linear-gradient(135deg, #2f6bff, #0a1f5c); border-radius: 0 0 10px 10px; position: relative; overflow: hidden; }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover .edit { position: absolute; right: 20px; bottom: 16px; }
.profile-head { display: flex; align-items: flex-end; gap: 16px; padding: 0 30px 16px; margin-top: -40px; position: relative; flex-wrap: wrap; }
.profile-head .pic { width: 168px; height: 168px; border-radius: 50%; border: 4px solid #fff; object-fit: cover; background: #ccd; }
.profile-head .pic-wrap { position: relative; }
.profile-head .pic-wrap .icon-btn { position: absolute; right: 8px; bottom: 8px; }
.profile-head h1 { margin: 0; font-size: 32px; }
.profile-head .acts { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.profile-tabs { display: flex; gap: 4px; border-top: 1px solid var(--line); margin: 0 30px; padding: 4px 0; }
.profile-tabs a { padding: 14px 16px; font-weight: 600; color: var(--muted); border-radius: 6px; cursor: pointer; }
.profile-tabs a.active { color: var(--blue); border-bottom: 3px solid var(--blue); border-radius: 0; }
.profile-body { max-width: 1000px; margin: 0 auto; display: grid; grid-template-columns: 2fr 3fr; gap: 16px; padding: 0 16px; }
.intro-line { display: flex; gap: 10px; align-items: center; margin: 8px 0; color: var(--text); }
.intro-line svg { width: 20px; color: #8c939d; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.grid3 .tile { aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: #ddd; position: relative; }
.grid3 .tile img, .grid3 .tile video { width: 100%; height: 100%; object-fit: cover; }
.grid3 .tile .lab { position: absolute; bottom: 0; left: 0; right: 0; padding: 4px; color: #fff; font-size: 12px; font-weight: 600; background: linear-gradient(transparent, rgba(0,0,0,.7)); }

/* ---------- Kat (friends, groups, marketplace...) ---------- */
.page-title { font-size: 24px; font-weight: 700; margin: 0 0 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-bottom: 20px; }
.ucard { background: #fff; border-radius: 10px; box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; }
.ucard .img { aspect-ratio: 1; background: #dfe3ee; overflow: hidden; }
.ucard .img.wide { aspect-ratio: 16/9; }
.ucard .img img { width: 100%; height: 100%; object-fit: cover; }
.ucard .body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.ucard .body .title { font-weight: 600; font-size: 16px; }
.ucard .body .price { font-weight: 700; font-size: 17px; }
.ucard .body .btns { margin-top: auto; display: flex; flex-direction: column; gap: 6px; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 8px; cursor: pointer; }
.list-item:hover { background: var(--hover); }
.list-item.unread { background: var(--blue-light); }
.tabs { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.tabs button { border: 0; border-radius: 50px; padding: 8px 16px; font-weight: 600; background: #e4e6eb; cursor: pointer; }
.tabs button.active { background: var(--blue-light); color: var(--blue); }
.empty { text-align: center; color: var(--muted); padding: 40px 10px; }
.banner { height: 240px; border-radius: 10px; overflow: hidden; background: linear-gradient(135deg, #2f6bff, #0a1f5c); margin-bottom: 16px; }
.banner img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Messenger ---------- */
.messenger { display: grid; grid-template-columns: 340px 1fr; height: calc(100vh - var(--header)); background: #fff; }
.messenger .convs { border-right: 1px solid var(--line); overflow-y: auto; padding: 12px 8px; }
.messenger .chat { display: flex; flex-direction: column; min-width: 0; }
.messenger .chat-head { padding: 10px 16px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.messenger .msgs { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.msg { max-width: 65%; padding: 8px 12px; border-radius: 18px; background: var(--line); align-self: flex-start; word-wrap: break-word; white-space: pre-wrap; }
.msg.me { background: var(--blue); color: #fff; align-self: flex-end; }
.msg img { border-radius: 12px; max-width: 260px; margin: 2px 0; }
.msg-time { font-size: 11px; color: var(--muted); align-self: center; margin: 10px 0 4px; }
.chat-form { display: flex; gap: 8px; padding: 10px 16px; border-top: 1px solid var(--line); align-items: center; }
.chat-form input[type=text] { flex: 1; background: var(--hover); border: 0; border-radius: 20px; padding: 10px 16px; outline: none; }
.typing { font-size: 12px; color: var(--muted); padding: 0 16px 4px; height: 18px; }

/* ---------- Reels ---------- */
.reels { display: flex; flex-direction: column; align-items: center; gap: 20px; padding: 20px 0; }
.reel { width: min(400px, 100%); aspect-ratio: 9/16; background: #000; border-radius: 12px; overflow: hidden; position: relative; }
.reel video { width: 100%; height: 100%; object-fit: cover; }
.reel .info { position: absolute; bottom: 0; left: 0; right: 0; padding: 16px; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.7)); }

/* ---------- Admin ---------- */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: #fff; border-radius: 10px; padding: 16px; box-shadow: var(--shadow); }
.stat .n { font-size: 28px; font-weight: 800; color: var(--blue); }
.stat .l { color: var(--muted); font-size: 13px; font-weight: 600; }
table.tbl { width: 100%; border-collapse: collapse; background: #fff; font-size: 14px; }
table.tbl th, table.tbl td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
table.tbl th { color: var(--muted); font-size: 12px; text-transform: uppercase; }
.tbl-wrap { overflow-x: auto; background: #fff; border-radius: 10px; box-shadow: var(--shadow); margin-bottom: 16px; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12px; font-weight: 700; background: var(--line); }
.pill.founder { background: #ffe8a3; color: #8a5a00; } .pill.admin { background: #ffd9de; color: #b0122f; }
.pill.moderator { background: #d8f5df; color: #1d7a34; } .pill.active { background: #d8f5df; color: #1d7a34; }
.pill.pending { background: #fff0c2; color: #8a6400; } .pill.rejected, .pill.banned { background: #ffd9de; color: #b0122f; }
.pill.open { background: #fff0c2; color: #8a6400; }
.bars-chart { display: flex; align-items: flex-end; gap: 3px; height: 120px; padding-top: 10px; }
.bars-chart div { flex: 1; background: var(--blue); border-radius: 3px 3px 0 0; min-height: 2px; }

/* ---------- Sponsored ---------- */
.ad { display: flex; gap: 12px; padding: 8px; border-radius: 8px; cursor: pointer; }
.ad:hover { background: var(--hover); }
.ad img { width: 110px; height: 80px; border-radius: 8px; object-fit: cover; background: #ddd; }

/* ---------- Gaming ---------- */
.ttt { display: grid; grid-template-columns: repeat(3, 90px); gap: 6px; justify-content: center; margin: 20px auto; }
.ttt button { height: 90px; font-size: 40px; font-weight: 800; border: 0; border-radius: 10px; background: var(--blue-light); color: var(--blue); cursor: pointer; }

/* ---------- Mobile ---------- */
.bottom-nav { display: none; }
@media (max-width: 1200px) {
  .layout { grid-template-columns: 260px minmax(0, 1fr); }
  .layout > .right { display: none; }
  .search-box { width: 200px; }
}
@media (max-width: 900px) {
  .layout, .layout.wide { grid-template-columns: minmax(0, 1fr); }
  .layout > .left { display: none; }
  .nav-center { display: none; }
  .search-box { flex: 1; width: auto; }
  .header .brand .txt { display: none; }
  .main { padding: 12px 8px 90px; }
  .bottom-nav { display: flex; position: fixed; bottom: 0; left: 0; right: 0; background: #fff; border-top: 1px solid var(--line); z-index: 50; padding-bottom: env(safe-area-inset-bottom); }
  .bottom-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 6px 0; font-size: 11px; color: var(--muted); position: relative; }
  .bottom-nav a svg { width: 24px; height: 24px; }
  .bottom-nav a.active { color: var(--blue); }
  .profile-body { grid-template-columns: 1fr; padding: 0; }
  .cover { height: 200px; }
  .profile-head { justify-content: center; text-align: center; padding: 0 12px 12px; }
  .profile-head .pic { width: 130px; height: 130px; }
  .profile-head .acts { margin: 0 auto; }
  .profile-tabs { margin: 0 8px; overflow-x: auto; }
  .messenger { grid-template-columns: 1fr; height: calc(100vh - var(--header) - 56px); }
  .messenger.in-chat .convs { display: none; }
  .messenger:not(.in-chat) .chat { display: none; }
  .auth-wrap { gap: 20px; }
  .auth-hero { text-align: center; }
  .auth-hero .brand { justify-content: center; font-size: 40px; }
  .auth-hero .brand img { width: min(320px, 100%); margin: 0 auto; }
  .auth-hero p { font-size: 20px; }
  .nav-right .hide-m { display: none; }
}

/* ---------- Ajisteman ---------- */
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.page-title .btn { font-size: 15px; }
.layout.wide .main { padding-right: 24px; }
.bars-chart div { max-width: 40px; }
.composer .act { white-space: nowrap; }
@media (max-width: 900px) {
  .layout.wide .main { padding-right: 8px; }
  .composer .act { padding: 8px 6px; font-size: 13px; gap: 4px; }
  .composer .act svg { width: 20px; height: 20px; }
}

/* ================= DESIGN V2 — finition (2026-11-12) ================= */
body { background: linear-gradient(180deg, #e9eefb 0, var(--bg) 340px); }
::selection { background: var(--blue-light); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #c2cad9; border-radius: 6px; border: 2px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }

.header { box-shadow: 0 1px 3px rgba(16,24,40,.08), 0 10px 30px -18px rgba(16,24,40,.35); }
.brand img { filter: drop-shadow(0 2px 5px rgba(27,77,255,.35)); }
.search-box { background: #edf0f8; transition: box-shadow .15s, background .15s; }
.search-box:focus-within { background: #fff; box-shadow: 0 0 0 2px var(--blue); }
.nav-tab { transition: background .15s, color .15s; margin: 4px 0; height: calc(var(--header) - 8px); border-radius: 10px; border-bottom: 0; }
.nav-tab:hover { height: calc(var(--header) - 8px); }
.nav-tab.active { background: var(--blue-light); box-shadow: inset 0 -3px 0 var(--blue); }
.icon-btn { background: #e8ecf7; transition: background .15s, transform .1s; }
.icon-btn:hover { background: #d9e1f6; }
.icon-btn:active { transform: scale(.94); }
.badge { box-shadow: 0 0 0 2px #fff; }

.btn { border-radius: 8px; transition: filter .15s, transform .1s, box-shadow .15s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: linear-gradient(180deg, #2f62ff, var(--blue-dark)); box-shadow: 0 6px 16px -6px rgba(27,77,255,.55); }
.btn-primary:hover { filter: brightness(1.07); }
.btn-green { box-shadow: 0 6px 16px -6px rgba(50,156,30,.5); }
.input { transition: border-color .15s, box-shadow .15s; }

.card { border: 1px solid #e5e8f1; }
.sidebar .side-link:first-child { font-weight: 600; }
.side-link { padding: 9px 8px; border-radius: 10px; transition: background .13s; }
.side-link .ic { background: #edf1fd; border-radius: 10px; }
.side-link:hover .ic { background: #dde6fd; }

.composer .fake-input { transition: background .15s, box-shadow .15s; }
.composer .fake-input:hover { box-shadow: inset 0 0 0 1px #d3d9e8; }
.composer .act { transition: background .13s; }

.story { border-radius: 14px; }
.story .who { box-shadow: 0 0 0 3px var(--blue), 0 3px 8px rgba(0,0,0,.35); border: 0; }
.story.create .plus { box-shadow: 0 4px 10px rgba(27,77,255,.45); }
.ucard { border: 1px solid #e5e8f1; transition: transform .15s, box-shadow .15s; }
.ucard:hover { transform: translateY(-3px); box-shadow: 0 14px 30px -14px rgba(16,24,40,.3); }
.ad { transition: background .13s; }

.empty { background: linear-gradient(#fff, #fff) padding-box, linear-gradient(90deg, var(--blue), #7aa5ff) border-box; border: 2px solid transparent; border-radius: var(--radius); font-size: 16px; line-height: 1.5; }
.empty a { font-weight: 700; }

.cover { background: radial-gradient(600px 200px at 15% 0%, rgba(122,165,255,.55), transparent 60%), radial-gradient(700px 260px at 90% 110%, rgba(50,156,30,.25), transparent 55%), linear-gradient(135deg, #2f6bff, #0a1f5c); }
.profile-head .pic { box-shadow: 0 10px 30px -10px rgba(16,24,40,.45); }
.dropdown { border-radius: 14px; box-shadow: 0 18px 50px -12px rgba(16,24,40,.35); border: 1px solid #e5e8f1; }
.modal { border-radius: 14px; }
.tabs button { transition: background .13s, color .13s; }
.tabs button.active { box-shadow: 0 4px 10px -4px rgba(27,77,255,.4); }
.bottom-nav { box-shadow: 0 -6px 24px -10px rgba(16,24,40,.25); }
.bottom-nav a.active { box-shadow: inset 0 3px 0 var(--blue); }
.stat .n { background: linear-gradient(180deg, #2f62ff, var(--blue-dark)); -webkit-background-clip: text; background-clip: text; color: transparent; }
