/* ==========================================================================
   X1 — RINGBD WEB PREMIUM DESIGN POLISH (AUDIT-ONLY PATCH)
   Elite-50 audit, Dipu order 2026-11-21 05:41. Deadline 06:41 Asia/Dhaka.
   --------------------------------------------------------------------------
   INSTALL (parent orchestrator / deploy owner — this file changes NOTHING
   by itself): copy to themes/ringbd/stylesheet/x1-web-polish-patch.css on
   the EC2 host and add ONE <link> in themes/ringbd/layout/container.phtml
   AFTER line 840 (ringbd-mobile.css), with the same filemtime cache-bust:
     <link rel="stylesheet" href=".../stylesheet/x1-web-polish-patch.css?v=<?=filemtime(...)?>">
   Load order today (container.phtml): style.css:195 -> dark.css:502 ->
   rb-2027-premium.css:839 -> ringbd-mobile.css:840. This patch MUST load
   last or its overrides lose. It contains ONLY design-token overrides
   (colour / radius / shadow / font / spacing) on selectors that already
   exist. No layout changes, no new classes, no JS, no DOM edits — it
   cannot collide with the per-feature teams' files.
   --------------------------------------------------------------------------
   EVIDENCE BASE (no fake): live fetch https://ringbd.online/ -> 200,
   /welcome, 149,268 bytes, 2026-11-21 05:43; theme files read read-only
   via SSH from /var/www/ringbd/themes/ringbd/stylesheet/:
   rb-2027-premium.css (1,696 lines, 54,467 B, Nov 20 23:42),
   ringbd-mobile.css (164 lines), ringbd-welcome.css (126 lines),
   style.css (682,078 B), messages-new.css (4,049 B).
   Every rule below cites its live selector + source in its comment.
   Screens NOT renderable by this agent (no live-browser access, no
   login): home feed, messages, profile, settings — audited at code
   level against the served theme files; verify visually after deploy.
   ========================================================================== */

/* ============================ 1. DESIGN TOKENS ============================
   The audit found FOUR greens + THREE blues in live use:
   #4CAF50/#4caf50 x24 (style.css, legacy Material green),
   #006a4e x18 (rb-2027-premium.css, Bangladesh deep green),
   #00a651 (Create circle, feed-tab active, comment send button),
   #31a24c (online dots), #63c666 (messages-new.css online dot),
   blues #2196f3/#2196F3 x29, #1877f2 (story ring), #0ea5e9 (video UI).
   DECISION — two-green system, zero blue: deep green = brand surfaces,
   vivid green = primary actions ONLY. Gold #ffd36b = accent. Red #f42a41
   = alerts / BD flag only. All rules below resolve to these tokens. */
:root {
  --rb-green: #006a4e;
  --rb-green-dark: #004d39;
  --rb-green-deep: #083329;
  --rb-green-vivid: #00a651;
  --rb-green-vivid-dark: #008f45;
  --rb-online: #31a24c;
  --rb-gold: #ffd36b;
  --rb-red: #f42a41;
  --rb-ink: #0f172a;
  --rb-body: #1c1e21;
  --rb-muted: #65676b;
  --rb-line: #e4e6eb;
  --rb-bg: #f0f2f5;
  --rb-card: #ffffff;
  /* Radius scale — replaces 2/3/6/7/8/10/12/14/16/18/20/22px + 2em +
     the 106x Facebook calc() radius in style.css */
  --rb-r-card: 18px;
  --rb-r-card-sm: 16px;
  --rb-r-media: 12px;
  --rb-r-bubble: 16px;
  --rb-r-input: 12px;
  --rb-r-btn: 10px;
  --rb-r-pill: 999px;
  /* Shadow scale — replaces 281 ad-hoc box-shadows in style.css */
  --rb-sh-1: 0 1px 2px rgba(0, 0, 0, 0.08);
  --rb-sh-2: 0 8px 28px rgba(15, 23, 42, 0.06);
  --rb-sh-3: 0 16px 40px rgba(15, 23, 42, 0.10);
  --rb-ring: 0 0 0 3px rgba(0, 106, 78, 0.14);
}
body.night_mode {
  --rb-card: #0f172a;
  --rb-ink: #f8fafc;
  --rb-body: #e2e8f0;
  --rb-muted: #94a3b8;
  --rb-line: rgba(255, 255, 255, 0.10);
  --rb-bg: #0b132b;
  --rb-sh-2: 0 10px 30px rgba(0, 0, 0, 0.35);
  --rb-sh-3: 0 16px 40px rgba(0, 0, 0, 0.45);
}

/* ==================== 2. TYPOGRAPHY — ONE FAMILY ====================
   BEFORE: Segoe UI Historic x87, Lato x20, Roboto x10+, -apple-system
   stacks (style.css grep) vs Plus Jakarta Sans/Inter/Hind Siliguri
   (rb-2027-premium.css §1, body only — components re-declare their own).
   AFTER: every surface inherits the premium stack. Bangla renders in
   Hind Siliguri via that stack. */
body:not(.ringbd-welcome) .post,
body:not(.ringbd-welcome) .publisher-box,
body:not(.ringbd-welcome) .messages-container,
body:not(.ringbd-welcome) .messages-recipients-list,
body:not(.ringbd-welcome) .wo_settings_page,
body:not(.ringbd-welcome) .wo_user_profile,
body:not(.ringbd-welcome) .wow_content,
body:not(.ringbd-welcome) .sidebar,
body:not(.ringbd-welcome) .setting-well,
body:not(.ringbd-welcome) .chat-messages-wrapper .message-group_owner {
  font-family: inherit !important;
}
/* messages-new.css:1 @import Roboto + 'Roboto' on recipient names —
   kill the 4th font; inherits the premium stack above. */
#wo_nw_msg_page .messages-user-name,
.messages-recipients-list .msg_rght_prt > p,
.messages-recipients-list .messages-last-sent.new_msg_lst_lsent {
  font-family: inherit !important;
}
/* Post body text: premium §5 sets 15.5px/1.65 — keep size, lock colour
   to the ink token so it never drifts to #333/#050505 per breakpoint. */
.post .post-description p,
.post .post-description .edited_text {
  color: var(--rb-ink) !important;
}
body.night_mode .post .post-description p,
body.night_mode .post .post-description .edited_text {
  color: var(--rb-body) !important;
}

/* ==================== 3. BUTTONS — ONE SYSTEM ====================
   BEFORE: .btn-main has NO single definition (21 mentions in style.css,
   background lives in minified general-style-plugins.css); heights
   30px (setting-well, style.css:177) vs 33px square (head_name_links,
   style.css:352); .btn-success = #4caf50 tint (style.css:4489);
   welcome CTA is a red gradient (owner-locked, §13 — untouched here). */
.btn-main {
  background: var(--rb-green) !important;
  background-image: none !important;
  border: 1px solid transparent !important;
  border-radius: var(--rb-r-btn) !important;
  color: #fff !important;
  font-weight: 700 !important;
  font-size: 15px !important;
  min-height: 40px !important;
  padding: 8px 18px !important;
  box-shadow: var(--rb-sh-1) !important;
}
@media (hover: hover) {
  .btn-main:hover {
    background: var(--rb-green-dark) !important;
    transform: translateY(-1px) !important;
    box-shadow: var(--rb-sh-2) !important;
  }
}
/* Settings buttons were 30px — below a comfortable touch target. */
.setting-well .btn-main {
  height: 40px !important;
  min-height: 40px !important;
  font-size: 15px !important;
}
/* Header icon button: 33px square, radius 9px -> 36px circle (matches
   the 36px round header icons, rb-2027-premium.css mobile header). */
.head_name_links .btn-main {
  width: 36px !important;
  height: 36px !important;
  border-radius: 50% !important;
  padding: 0 !important;
}
/* Legacy Material green tints -> brand green tints. */
.fundings_footer .btn-success {
  background-color: rgba(0, 106, 78, 0.12) !important;
  color: var(--rb-green) !important;
}
.btn-success {
  background: var(--rb-green) !important;
  border-color: var(--rb-green) !important;
}
.btn-danger, .btn-info {
  border-radius: var(--rb-r-btn) !important;
}
/* Keyboard focus everywhere: visible green ring (was inconsistent /
   absent on most controls). */
:focus-visible {
  outline: 2px solid var(--rb-green) !important;
  outline-offset: 2px !important;
}

/* ==================== 4. CARDS — ONE RADIUS, ONE SHADOW ==============
   BEFORE: post card 18px (premium §1 .post .panel) vs 22px (premium §5
   .post-container .post > .panel.panel-white) — same element, two
   values; lightbox 20px; glass image 14px; directory head 16px;
   profile bottom-nav + cover use the Facebook calc() radius
   (style.css:286, :3093, one of 106 occurrences). */
.post .panel,
.wow_content,
.wo_settings_page,
.page-margin .panel,
#publisher-box-focus .panel,
.post-container .post > .panel.panel-white {
  border-radius: var(--rb-r-card) !important;
  box-shadow: var(--rb-sh-2) !important;
}
.post-container .post > .panel.panel-white:hover {
  box-shadow: var(--rb-sh-3) !important;
}
/* Inner media: 16px (premium §5 .post .post-file, #fullsizeimg) -> 12px,
   matching mobile (12px, premium mobile post cards) on all widths. */
.post .post-file,
.post .post-file img.image-file,
.post #fullsizeimg img:not(.fund),
.post .post-shared-from,
.post .wo_shared_doc_post,
.rb-img-glass-wrap,
.rb-glb-stage img {
  border-radius: var(--rb-r-media) !important;
}
/* Lightbox 20px -> card scale 18px. */
.lightbox-content { border-radius: var(--rb-r-card) !important; }
/* Directory + friend cards -> card scale. */
.wo_directory_head,
.wo_directory_head.user,
.wo_directory_head.page,
.wo_directory_head.group,
.wo_directory_head.blog,
.wo_directory_head.market {
  border-radius: var(--rb-r-card) !important;
}
.wow_frnd_usr .fndfrnd_user_wrapper { border-radius: var(--rb-r-card-sm) !important; }
/* Profile: cover = top corners only, tab bar = bottom corners only
   (was the Facebook calc() radius on both, style.css:286/:3093). */
.wow_fcov_image img,
.wow_fcov_image .upload_ad_image {
  border-radius: var(--rb-r-card) var(--rb-r-card) 0 0 !important;
}
.wo_user_profile .user-bottom-nav {
  border-radius: 0 0 var(--rb-r-card) var(--rb-r-card) !important;
  box-shadow: var(--rb-sh-1) !important;
}
/* Comment bubble -> bubble scale (was 16px already; locked). */
.post .comment-body { border-radius: var(--rb-r-bubble) !important; }

/* ==================== 5. BLUE PURGE — ZERO OFF-BRAND BLUE ============
   BEFORE: #1877f2 story ring, #0ea5e9 video progress gradient + play
   button hover + reply-button gradient, sky-blue glow ring on the play
   button, #2196f3 x29 in style.css. AFTER: green + gold only. */
.user-status-home ul.status-list li.not_seen_story .rb-story-avatar {
  border-color: var(--rb-green) !important;
}
.rb-glass-vfill {
  background: linear-gradient(90deg, var(--rb-green), var(--rb-green-vivid), var(--rb-gold)) !important;
}
.rb-glass-vbtn:hover { background: rgba(0, 106, 78, 0.85) !important; }
.rb-sr-reply-btn {
  background: linear-gradient(135deg, var(--rb-green), var(--rb-green-dark)) !important;
  border-color: rgba(255, 211, 107, 0.45) !important;
}
.rb-glass-vcenter {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45), 0 0 0 6px rgba(0, 166, 81, 0.35) !important;
}
/* Header search focus ring: gold is the brand accent on dark green —
   kept, locked so it never drifts to blue. */
header .navbar-default .search-input input:focus {
  box-shadow: 0 0 0 3px rgba(255, 211, 107, 0.32) !important;
}

/* ==================== 6. ONLINE DOTS — ONE GREEN, ONE SIZE ==========
   BEFORE: #31a24c (header + composer dots, premium) vs #63c666 7px
   (messages-new.css) vs 10px header dot vs 12px composer dot. */
#wo_nw_msg_page .messages-recipients-list .online_dot {
  width: 10px !important;
  height: 10px !important;
  border: 2px solid #fff !important;
}
#wo_nw_msg_page .messages-recipients-list .online_dot .dot {
  width: 10px !important;
  min-width: 10px !important;
  height: 10px !important;
  background: var(--rb-online) !important;
}

/* ==================== 7. POST CARD — LOCK THE WINNING VALUES =========
   BEFORE: .post-heading padding defined TWICE in premium (18px 20px
   12px §5, then 16px 18px 12px) — last wins by accident; comment
   textarea focus green differs between §5 (#006a4e) and the webphoto
   block (#00a651); action row pills (§5, grey #f1f5f9 999px) vs flat
   row (webphoto block, transparent 8px) — last wins by accident. */
.post .post-heading { padding: 16px 18px 12px !important; }
.post .post-description { padding: 4px 20px 14px !important; }
.post .wo_comment_box textarea:focus,
.post .comment-textarea:focus {
  border-color: var(--rb-green) !important;
  box-shadow: var(--rb-ring) !important;
}
/* Flat action row is the premium winner (Facebook-grade, per webphoto
   fix 2026-11-21) — lock it so a future append cannot revive pills. */
.post #wo_post_stat_button .stat-item {
  background: transparent !important;
  border: 0 !important;
  border-radius: 8px !important;
  box-shadow: none !important;
  color: var(--rb-muted) !important;
}
.post #wo_post_stat_button .stat-item:hover {
  background: rgba(0, 0, 0, 0.05) !important;
  transform: none !important;
}
body.night_mode .post #wo_post_stat_button .stat-item:hover {
  background: rgba(255, 255, 255, 0.08) !important;
}
.post .rb-m-counts, .post .stats.post-actions .like-stat {
  color: var(--rb-muted) !important;
}

/* ==================== 8. COMPOSER (DESKTOP) ==========================
   Mobile composer is already premium (premium mobile block: 16px card,
   40px avatar, 999px pill). Desktop publisher-box (60 rules,
   style.css) had no radius/focus system — align it to the same tokens. */
.publisher-box .sun_pub_box,
.publisher-box .panel {
  border-radius: var(--rb-r-card) !important;
  box-shadow: var(--rb-sh-2) !important;
}
.publisher-box textarea.postText {
  border-radius: var(--rb-r-input) !important;
  background: var(--rb-bg) !important;
  border: 1px solid transparent !important;
}
.publisher-box textarea.postText:focus {
  background: var(--rb-card) !important;
  border-color: var(--rb-green) !important;
  box-shadow: var(--rb-ring) !important;
  outline: none !important;
}
.publisher-box .publisher-box-footer .btn {
  border-radius: var(--rb-r-btn) !important;
}

/* ==================== 9. STORIES =====================================
   Mobile story cards 75x140px, radius 14px (premium) -> 16px small-card
   scale; desktop story links inherit the same radius. */
.user-status-home ul.status-list li a,
.story-container .story-img {
  border-radius: var(--rb-r-card-sm) !important;
}
.user-status-home ul.status-list li.create_new a p svg {
  background: var(--rb-green) !important;
}

/* ==================== 10. MESSAGES ===================================
   BEFORE: bubbles 10px (messages-new.css .message) vs 15px
   (.message-text, style.css:1071) vs outgoing tail 2px (style.css:4156);
   avatar 30% (style.css:184 — neither circle nor square); recipient
   active #F7F7F7 (messages-new.css); search button MAROON #a84849 /
   hover #c45a5b (messages-new.css — old WoWonder default, off-brand);
   media 10px. AFTER: one bubble system, green accents. */
.text-sender-container .message-model .message,
.chat-messages-wrapper .incoming .message-text,
.chat-messages-wrapper .outgoing .message-text {
  border-radius: 18px !important;
  padding: 10px 14px !important;
}
.text-sender-container .outgoing .message-model {
  border-bottom-right-radius: 4px !important;
}
.text-sender-container .incoming .message-model {
  border-bottom-left-radius: 4px !important;
}
.text-sender-container .outgoing .message-model .message {
  background: var(--rb-green) !important;
}
.text-sender-container .incoming .message-model .message,
.chat-messages-wrapper .incoming .message-text {
  background: var(--rb-bg) !important;
  color: var(--rb-body) !important;
}
.message-user-image img {
  border-radius: 50% !important;
}
.messages-recipients-list { border-radius: var(--rb-r-input) !important; }
.messages-recipients-list.active {
  background: rgba(0, 106, 78, 0.07) !important;
}
#wo_nw_msg_page .msg_under_hood .mobilerightpane .messages-search-users-form .inner-addon .msg_srch_innr input {
  border-radius: var(--rb-r-input) !important;
  background: var(--rb-bg) !important;
}
#wo_nw_msg_page .msg_under_hood .mobilerightpane .messages-search-users-form .inner-addon .btn_contr {
  background: var(--rb-green) !important;
  border-radius: var(--rb-r-input) !important;
}
#wo_nw_msg_page .msg_under_hood .mobilerightpane .messages-search-users-form .inner-addon button.btn:hover {
  background: var(--rb-green-dark) !important;
}
.messages-container .message-media img,
.messages-container .message-media video,
.message-media audio {
  border-radius: var(--rb-r-media) !important;
}

/* ==================== 11. PROFILE + SETTINGS ==========================
   Settings page card already 18px (premium §1) — lock + give its
   inputs the same 12px/focus system as composer + comments. */
.wo_settings_page input,
.wo_settings_page select,
.wo_settings_page textarea,
.setting-well input,
.setting-well select,
.setting-well textarea {
  border-radius: var(--rb-r-input) !important;
}
.wo_settings_page input:focus,
.wo_settings_page select:focus,
.wo_settings_page textarea:focus,
.setting-well input:focus,
.setting-well select:focus,
.setting-well textarea:focus {
  border-color: var(--rb-green) !important;
  box-shadow: var(--rb-ring) !important;
  outline: none !important;
}
/* Settings tab strip: active tab = green pill (was unstyled grey text
   row on desktop; mobile already scrolls it, premium @768px block). */
.setting-well .setting-panel li.active a,
.setting-well .setting-panel li a.active {
  background: var(--rb-green) !important;
  color: #fff !important;
  border-radius: var(--rb-r-pill) !important;
}

/* ==================== 12. REELS + VIDEO ==============================
   Reels already fill the frame (webaudit 2026-11-20: 100dvh-60px,
   object-fit cover). Remaining premium gap: the glass stage keeps its
   18px card radius inside a full-bleed frame (corner gaps). */
.wo_reels_cont .rb-glass-video-stage {
  border-radius: 0 !important;
  border: none !important;
  box-shadow: none !important;
}

/* ==================== 13. WELCOME — LOCK, DO NOT RECOLOR =============
   The red login (CTA gradient #ff4d5e->#e8364a, eye #e8364a, gold
   #ffd36b accents) is OWNER-LOCKED design (ringbd-welcome.css:
   "HUBU LOCK v2", "owner design file"). Recolouring it green would
   override Dipu's locked design. This section only FREEZES the final
   cascade values so later appends cannot drift them: card radius was
   redefined 22px -> 28px -> 34px in one file (last wins 34px desktop,
   26px <=900px); eye button had gradient vs flat #e8364a (last wins
   flat); input/button height 58px. */
body.ringbd-welcome .login_innre {
  border-radius: 34px !important;
  max-width: 560px !important;
  padding: 44px 42px 36px !important;
}
@media (max-width: 900px) {
  body.ringbd-welcome .login_innre {
    border-radius: 26px !important;
    padding: 30px 22px !important;
  }
}
body.ringbd-welcome .rb-eye { background: #e8364a !important; }
body.ringbd-welcome .wow_form_fields input {
  height: 58px !important;
  border-radius: 14px !important;
}
body.ringbd-welcome .login_innre .btn-main {
  height: 58px !important;
  border-radius: 14px !important;
}

/* ==================== 14. MOBILE POLISH ==============================
   Mobile post card 14px (premium) -> 16px small-card scale, matching
   stories (16px) and the 12px media inside it. Bottom-nav labels were
   #4b5563 (Tailwind grey) vs #65676b post meta grey — unify to muted. */
@media (max-width: 767px) {
  .post .panel-white {
    border-radius: var(--rb-r-card-sm) !important;
    box-shadow: var(--rb-sh-1) !important;
  }
  .rb-mobile-bottom-nav .rb-mbn-item { color: var(--rb-muted) !important; }
  .rb-mobile-bottom-nav .rb-mbn-item.active { color: var(--rb-green) !important; }
  .rb-feed-tabs { box-shadow: var(--rb-sh-1) !important; }
  a, button {
    -webkit-tap-highlight-color: transparent;
  }
}

/* ==================== 15. MOTION + ACCESSIBILITY ======================
   Premium hover lifts (translateY -2px, scale 1.03-1.22) stick on touch
   after a tap and must never run for reduced-motion users. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    transform: none !important;
  }
  body.ringbd-welcome .login_innre { animation: none !important; }
}
@media (hover: none) {
  .post-container .post > .panel.panel-white:hover,
  .wow_frnd_usr .fndfrnd_user_wrapper:hover,
  .post .post-heading .image .avatar.wow_post_usr_ava:hover img {
    transform: none !important;
  }
}

/* ==================== 16. DARK-MODE REPAIR ============================
   BUG: rb-2027-premium.css styles dark mode with THREE different hooks
   — body.night_mode (cards, §1/§5) AND [data-theme="dark"] AND
   body.active (header gradient, directory head, post title). The live
   hook is body.night_mode (javascript/rb-voice-player.js:126 checks
   body.classList.contains("night_mode"); dark.css loads as
   #night-mode-css, container.phtml:502). The [data-theme]/body.active
   rules NEVER match, so in night mode the header stays light-green,
   directory heads stay light, and post titles stay dark ink. Mirror
   those three rules under the live hook. VERIFY after deploy: toggle
   night mode in a live browser and confirm the header goes dark navy. */
body.night_mode header .navbar-default,
body.night_mode .navbar-default {
  background: linear-gradient(135deg, #0b132b 0%, #0f172a 60%, #1e293b 100%) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}
body.night_mode .wo_directory_head,
body.night_mode .wo_directory_head.user,
body.night_mode .wo_directory_head.page,
body.night_mode .wo_directory_head.group,
body.night_mode .wo_directory_head.blog,
body.night_mode .wo_directory_head.market {
  background: rgba(15, 23, 42, 0.6) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: #fff !important;
}
body.night_mode .wo_directory_head > h2 { color: #fff !important; }
body.night_mode .post .post-heading .meta .title a b,
body.night_mode .post .post-heading .meta .title b {
  color: #f8fafc !important;
}
body.night_mode .post .post-footer .stats .stat-item,
body.night_mode .post #wo_post_stat_button .stat-item {
  color: var(--rb-body) !important;
}
body.night_mode .messages-recipients-list.active {
  background: rgba(255, 255, 255, 0.08) !important;
}
body.night_mode #wo_nw_msg_page .messages-recipients-list .online_dot {
  border-color: #0f172a !important;
}
/* END X1 PATCH — 16 sections, ~60 rules. No layout/JS/DOM changes. */
