/* ============================================
   MODERN THEME — Material Design
   Purple-Blue gradient (#667eea -> #764ba2)
   Toggle: add/remove .modern-theme on <html>
   ============================================ */

/* --- Base & Variables --- */
.modern-theme {
  --bg: #f0f2f5;
  --card: #ffffff;
  --primary: #667eea;
  --primary-dark: #5a6fd6;
  --secondary: #764ba2;
  --text: #1a1a2e;
  --text-muted: #6b7280;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  --radius: 12px;
  --radius-sm: 8px;
}

.modern-theme body {
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* --- Logo area --- */
.modern-theme ul#topnaq {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  overflow: hidden;
}

.modern-theme ul#topnaq a img {
  background: transparent !important;
  display: block;
  filter: brightness(1.1);
}

/* --- Navigation --- */
.modern-theme ul#topnav {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: var(--shadow-md);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

.modern-theme ul#topnav li a {
  color: rgba(255,255,255,0.9);
  font-weight: 500;
  transition: background 0.2s;
}

.modern-theme ul#topnav li a:hover {
  background: rgba(255,255,255,0.15);
  color: #fff;
}

.modern-theme ul#topnav li#logoutBtn {
  float: right;
}

.modern-theme ul#topnav li#logoutBtn a {
  font-weight: 600;
}

/* --- Layout --- */
.modern-theme td.left {
  background: transparent;
  border: none;
  padding: 12px 0 12px 12px;
  width: 220px;
  min-width: 220px;
}

.modern-theme td.right {
  background: transparent;
  border: none;
  padding: 12px;
  min-width: auto;
}

.modern-theme td.right > div {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 16px;
  margin-bottom: 12px;
}

/* --- Block Titles --- */
.modern-theme .blTitle {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border: none;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  padding: 10px 14px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.modern-theme .avatar_my img {
  overflow: hidden;
    padding: 3px;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-sm);
    transition: transform .2s, box-shadow .2s;
    max-width: 100%;
}
.modern-theme .chat_header_image img {
   overflow: hidden;
    padding: 3px;
    border: 1px solid var(--border) !important;
    transition: transform .2s, box-shadow .2s;
    max-width: 100%;
}
/* --- Page name --- */
.modern-theme .page_name {
  background: var(--card);
  border: none;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 12px 16px;
  margin-bottom: 12px;
  font-size: 14px;
}

/* --- Page header --- */
.modern-theme .page_header {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  padding: 12px 16px;
  margin-bottom: 12px;
  font-size: 16px;
  box-shadow: var(--shadow-sm);
}

.modern-theme .page_header .is_stat {
  color: rgba(255,255,255,0.7);
}

/* --- Action links --- */
.modern-theme .ya.actions {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 8px;
  margin-bottom: 12px;
  margin-left: 0;
  margin-right: 0;
}

.modern-theme .ya.actions li a {
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  transition: background 0.2s;
}

.modern-theme .ya.actions li a:hover {
  background: rgba(102,126,234,0.1);
}

/* --- Status block (stena) --- */
.modern-theme .stena {
  background: var(--card);
  border: none;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 16px;
}

/* --- Tabs container --- */
.modern-theme ul.tabs {
  border: none;
  background: transparent;
  height: auto;
  margin: 0;
  padding: 0;
  width: 100%;
}

.modern-theme .tabs_alt {
  background: transparent;
  margin: 0;
  padding: 0;
}

.modern-theme .tabs_alt > ul {
  border: none;
  padding: 4px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  text-align: left;
}

.modern-theme .tabs_alt > ul > li {
  display: inline-block;
  margin: 0;
  padding: 0;
}

.modern-theme .tabs_alt > ul > li a {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  transition: all 0.2s;
  display: inline-block;
  border: none;
}

.modern-theme .tabs_alt > ul > li.tab_active a,
.modern-theme .tabs_alt > ul > li.active a {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  border: none;
  box-shadow: var(--shadow-sm);
  position: static;
}

.modern-theme .tabs_alt > ul > li a:hover {
  background: rgba(102,126,234,0.1);
}

/* --- Tab content --- */
.modern-theme .tab_content {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 16px;
  margin-top: 8px;
}

/* --- Gifts tab --- */
.modern-theme #tab4 #listawards {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  padding: 12px 0;
}

.modern-theme #tab4 #listawards img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  border-radius: 8px;
  background: var(--bg);
  padding: 4px;
  transition: transform 0.2s;
}

.modern-theme #tab4 #listawards img:hover {
  transform: scale(1.15);
}

/* --- Profile info fieldsets --- */
.modern-theme fieldset {
  border: none;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 16px;
  margin: 12px 0;
}

.modern-theme legend {
  font-weight: 600;
  color: var(--primary);
  font-size: 13px;
  padding: 0 8px;
}

.modern-theme .infoPageText {
  color: var(--text-muted);
  font-weight: 500;
  padding: 6px 4px;
  width: auto;
}

.modern-theme .infoPageValue {
  color: var(--text);
  padding: 6px 4px;
}

/* --- Buttons --- */
.modern-theme .button_blue {
  border: none;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}

.modern-theme .button_blue:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.modern-theme .button_blue button {
  background: transparent !important;
  border: none !important;
  color: #fff !important;
  text-shadow: none !important;
  background-image: none !important;
  cursor: pointer !important;
  font-family: inherit !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  padding: 8px 20px !important;
  border-radius: 8px !important;
}

.modern-theme .button_blue button:hover {
  background-position: 0 0;
}

.modern-theme .button_gray {
  border: 1px solid rgba(0,0,0,.08);
  background: var(--card);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
  border-radius: 6px;
}

.modern-theme .button_gray:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.modern-theme .button_gray button {
  background: transparent !important;
  border: none !important;
  color: var(--text-muted) !important;
  text-shadow: none !important;
  background-image: none !important;
  cursor: pointer !important;
  font-family: inherit !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  padding: 8px 16px !important;
}

/* --- Rating/Rep bars --- */
.modern-theme .rateline {
  position: relative;
  height: 0;
  padding: 0;
  border: none;
  margin: 0;
  z-index: 3;
  cursor: pointer;
}

.modern-theme .rateline::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 40px;
  z-index: -1;
}

.modern-theme .rep-number {
  position: absolute;
  top: 6px;
  left: 0;
  right: 0;
  margin: auto;
  width: 200px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  z-index: 1;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
  padding-top: 0;
}

.modern-theme .rateline + div {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 6px 16px 12px;
  margin-bottom: 12px;
  pointer-events: none;
}

.modern-theme .rep-row td {
  border-radius: 4px;
  overflow: hidden;
}

.modern-theme .rep-bar {
  height: 18px;
}

.modern-theme #rep_1 { background: linear-gradient(90deg, #667eea, #764ba2); border: none; border-radius: 4px 0 0 4px; }
.modern-theme #rep_2 { background: #e5e7eb; border: none; border-radius: 0 4px 4px 0; }
.modern-theme #rep_3 { background: linear-gradient(90deg, #764ba2, #9b59b6); border: none; }
.modern-theme #rep_4 { background: #e5e7eb; border: none; }
.modern-theme #rep_5 { background: linear-gradient(90deg, #5a6fd6, #667eea); border: none; }
.modern-theme #rep_6 { background: #e5e7eb; border: none; }
.modern-theme #rep_7 { background: linear-gradient(90deg, #4a5fc6, #5a6fd6); border: none; }
.modern-theme #rep_8 { background: #e5e7eb; border: none; }
.modern-theme #rep_9 { background: linear-gradient(90deg, #3a4fb6, #4a5fc6); border: none; }
.modern-theme #rep_10 { background: #e5e7eb; border: none; }
.modern-theme #rep_11 { background: linear-gradient(90deg, #2a3fa6, #3a4fb6); border: none; }
.modern-theme #rep_12 { background: #e5e7eb; border: none; }

/* --- Page switcher --- */
.modern-theme .switch_page_user {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 10px;
  margin-bottom: 12px;
}

.modern-theme .switch_page_user .l a,
.modern-theme .switch_page_user .r a {
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  opacity: 1;
  transition: transform 0.2s, box-shadow 0.2s;
}

.modern-theme .switch_page_user .l a:hover,
.modern-theme .switch_page_user .r a:hover {
  transform: scale(1.15);
  box-shadow: var(--shadow-sm);
}

.modern-theme .switch_page_user .c span {
  font-size: 11px;
  color: var(--text-muted);
  opacity: 1;
}

/* --- Footer --- */
.modern-theme .footer {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: none;
  margin-top: 12px;
  padding: 16px;
}

/* --- Links --- */
.modern-theme a {
  color: var(--primary);
  transition: color 0.2s;
}

.modern-theme a:hover {
  color: var(--secondary);
}

/* --- mbord / borders --- */
.modern-theme .mbord {
  border: none;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s;
}

.modern-theme .mbord:hover {
  box-shadow: var(--shadow-md);
  border: none;
}

/* --- catPages4 --- */
.modern-theme .catPages4 {
  border: none;
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  transition: background 0.2s;
  display: inline-block;
}

.modern-theme .catPages4:hover {
  background: rgba(102,126,234,0.1);
  border: none;
}

/* --- Info selector --- */
.modern-theme .info_selector {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 16px;
  margin-bottom: 12px;
  border: none;
}

/* --- Profile closed / warnings --- */
.modern-theme .profile_closed {
  border: none !important;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  background: #fff8e6 !important;
}

/* --- Ban blocks --- */
.modern-theme div[style*="border-color: rgb(204, 204, 204)"] {
  border: none !important;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

/* --- Online users --- */
.modern-theme span.Apple-style-span div[style*="background-color: rgb(252, 252, 252)"] {
  background: var(--card) !important;
  border: none !important;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}

/* --- Textareas & Inputs --- */
.modern-theme textarea {
  border: 1px solid #d1d5db;
  border-radius: var(--radius-sm);
  padding: 10px;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
}

.modern-theme textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(102,126,234,0.15);
  outline: none;
}

.modern-theme input[type="text"],
.modern-theme input[type="password"],
.modern-theme input[type="email"] {
  border: 1px solid #d1d5db;
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.modern-theme input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(102,126,234,0.15);
  outline: none;
}

/* --- Award medals --- */
.modern-theme .MedalImg {
  background: var(--card) !important;
  border: none !important;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 12px !important;
}

.modern-theme .MedalImg img {
  transition: transform 0.2s;
}

.modern-theme .MedalImg a:hover img {
  opacity: 1 !important;
  transform: scale(1.1);
}

/* --- Widget bar --- */
.modern-theme .un_widget_yavdr {
  background: linear-gradient(135deg, var(--primary), var(--secondary)) !important;
  box-shadow: var(--shadow-lg) !important;
  border-radius: 8px 8px 0 0 !important;
}

/* --- Badge / award links --- */
.modern-theme span[style*="background: #4a8396"] {
  background: linear-gradient(135deg, var(--primary), var(--secondary)) !important;
  border-color: transparent !important;
  border-radius: var(--radius-sm);
}

/* --- AJAX windows (_uWnd) --- */
.modern-theme .xw-tl,
.modern-theme .xw-tc,
.modern-theme .xw-tr,
.modern-theme .xw-bl,
.modern-theme .xw-bc,
.modern-theme .xw-br {
  background: transparent !important;
}

.modern-theme .xw-tc {
  background: linear-gradient(135deg, var(--primary), var(--secondary)) !important;
  border-radius: var(--radius) var(--radius) 0 0;
}

.modern-theme .xw-mc {
  background: var(--card) !important;
  border: none !important;
  box-shadow: var(--shadow-lg);
  border-radius: 0 0 var(--radius) var(--radius);
}

.modern-theme .xw-ml,
.modern-theme .xw-mr {
  background: var(--card) !important;
  padding: 0 !important;
}

.modern-theme .xw-hdr {
  height: 32px;
  padding: 6px 8px 0 !important;
}

.modern-theme .xw-hdr-text {
  font: bold 13px -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  line-height: 24px !important;
  vertical-align: middle !important;
}

.modern-theme .xw-body {
  padding: 0 12px 12px !important;
  color: var(--text) !important;
  font-size: 13px !important;
  line-height: 1.5 !important;
}

.modern-theme .xw-body * {
  color: var(--text) !important;
}

.modern-theme .xw-body > div[style*="overflow:scroll"] {
  height: auto !important;
  overflow: visible !important;
}

.modern-theme .xw-body .myWinCont {
  overflow: visible !important;
  height: auto !important;
}

.modern-theme .xw-body b,
.modern-theme .xw-body strong {
  color: var(--text) !important;
}

.modern-theme .xw-body a {
  color: var(--primary) !important;
}

.modern-theme .xw-bc,
.modern-theme .xw-bl,
.modern-theme .xw-br {
  height: 0;
}

.modern-theme .xw-bcm {
  background: transparent !important;
  height: 0 !important;
}

.modern-theme .xw-blank {
  background: transparent !important;
  opacity: 1 !important;
}

.modern-theme .xw-sps {
  display: none;
}

.modern-theme .xw-tsps {
  display: none;
}

.modern-theme .xw-plain .xw-mc {
  background: var(--card) !important;
  border: none !important;
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius);
}

.modern-theme .xw-plain .xw-body {
  padding: 12px !important;
  border: none !important;
  background: transparent !important;
}

.modern-theme .xt {
  background-image: none !important;
  width: 20px;
  height: 20px;
  margin: 2px 2px 0 0;
  border-radius: 50%;
  transition: background 0.2s, transform 0.2s;
  position: relative;
}

.modern-theme .xt-close {
  background: rgba(255,255,255,0.2) !important;
}

.modern-theme .xt-close::before,
.modern-theme .xt-close::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 2px;
  background: #fff;
  border-radius: 1px;
}

.modern-theme .xt-close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.modern-theme .xt-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.modern-theme .xt-close-over {
  background: rgba(255,255,255,0.35) !important;
  transform: scale(1.15);
}

.modern-theme .xt-mini,
.modern-theme .xt-maxi,
.modern-theme .xt-rest {
  display: none !important;
}

.modern-theme .xw-icon {
  display: none;
}

.modern-theme .xw-draggable {
  cursor: move;
}

.modern-theme .xw-draging .xw-bcm {
  opacity: 0.9 !important;
}

.modern-theme .xw-resize .xw-tl { cursor: nw-resize; }
.modern-theme .xw-resize .xw-tr { cursor: ne-resize; }
.modern-theme .xw-resize .xw-sps { cursor: n-resize; }
.modern-theme .xw-resize .xw-ml { cursor: w-resize; }
.modern-theme .xw-resize .xw-mr { cursor: e-resize; }
.modern-theme .xw-resize .xw-bl { cursor: sw-resize; }
.modern-theme .xw-resize .xw-br { cursor: se-resize; }
.modern-theme .xw-resize .xw-bc { cursor: s-resize; }

/* --- Inline Reply Form --- */
.modern-theme .vk-inline-reply {
  background: var(--card) !important;
  border-color: rgba(0,0,0,0.08) !important;
  box-shadow: var(--shadow-sm);
}
.modern-theme .vk-ir-header {
  background: var(--bg) !important;
  border-bottom-color: rgba(0,0,0,0.06) !important;
}
.modern-theme .vk-inline-reply textarea {
  font-family: inherit !important;
  background: var(--card) !important;
  color: var(--text) !important;
}
.modern-theme .vk-ir-smileys {
  background: var(--bg) !important;
  border-top-color: rgba(0,0,0,0.06) !important;
}
.modern-theme .vk-ir-smileys::-webkit-scrollbar {
  width: 6px;
}
.modern-theme .vk-ir-smileys::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 3px;
}
.modern-theme .vk-ir-smileys::-webkit-scrollbar-track {
  background: transparent;
}
.modern-theme .vk-ir-preview {
  border-top-color: rgba(0,0,0,0.06) !important;
}
.modern-theme .vk-ir-footer {
  background: var(--bg) !important;
  border-top-color: rgba(0,0,0,0.06) !important;
}
.modern-theme .vk-ir-submit {
  background: linear-gradient(135deg, var(--primary), var(--secondary)) !important;
  border: none !important;
  border-radius: var(--radius-sm) !important;
  color: #fff !important;
  font-weight: 700 !important;
  box-shadow: var(--shadow-sm);
}
.modern-theme .vk-ir-submit:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.modern-theme .vk-ir-cancel {
  border-color: rgba(0,0,0,0.15) !important;
  background: var(--card) !important;
  color: var(--text) !important;
}

/* --- AJAX overlay --- */
.modern-theme .u-overlay,
.modern-theme div[id*="overlay"] {
  background: rgba(0,0,0,0.4) !important;
  backdrop-filter: blur(2px);
}

/* --- Alert windows (_uWnd.alert) --- */
.modern-theme .xw-blank .xw-mc {
  background: var(--card) !important;
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius);
  border: none !important;
}

.modern-theme .xw-blank .xw-body {
  padding: 16px !important;
  color: var(--text);
  font-size: 12px;
  line-height: 1.5;
}

/* --- Activity Points Widget --- */
.modern-theme .ap-widget {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 12px;
  overflow: hidden;
}

.modern-theme .ap-head {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  padding: 8px 14px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.modern-theme .ap-body {
  padding: 10px 14px 12px;
}

.modern-theme .ap-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3px 0;
  font-size: 12px;
}

.modern-theme .ap-label {
  color: var(--text-muted);
}

.modern-theme .ap-val {
  font-weight: 700;
  color: var(--primary);
}

.modern-theme .ap-balance {
  font-size: 16px;
  color: var(--secondary);
}

.modern-theme .ap-bonus {
  color: #4ade80;
}

.modern-theme .ap-divider {
  height: 1px;
  background: #eee;
  margin: 6px 0;
}

.modern-theme .ap-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 4px;
}

.modern-theme .ap-btn {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 11px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  font-family: inherit;
}

.modern-theme .ap-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.modern-theme .ap-btn:active {
  transform: translateY(0);
}

.modern-theme .ap-info {
  color: var(--text-muted);
}

/* ============================================
   PRIVATE MESSAGES
   ============================================ */

/* --- Page container --- */
.modern-theme table[cellpadding="0"][cellspacing="0"] {
  max-width: 1200px;
  margin: 0 auto;
  background: transparent !important;
  border-collapse: collapse;
  width: 100%;
}

/* --- Left sidebar --- */
.modern-theme td.left {
  width: 220px !important;
  vertical-align: top;
  padding: 20px 0 20px 16px;
  background: transparent !important;
}

.modern-theme #sideBar {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.modern-theme .infPage {
  border: none !important;
  background: linear-gradient(135deg, var(--primary), var(--secondary)) !important;
  color: #fff;
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.modern-theme .infTable {
  border-collapse: collapse;
  width: 100%;
}

.modern-theme .infTable td,
.modern-theme .infTable tr {
  padding: 6px 10px;
  font-size: 11px;
  color: var(--text);
  background: var(--card);
  border-bottom: 1px solid #f0f0f0;
}

.modern-theme .infTable a {
  color: var(--primary);
  text-decoration: none;
}

.modern-theme .infTable a:hover {
  text-decoration: underline;
}

/* --- Right content area --- */
.modern-theme td.right {
  vertical-align: top;
  padding: 20px 16px;
  background: transparent !important;
}

.modern-theme .page_header {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  padding: 16px 20px;
  border-radius: var(--radius);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

/* --- Category links (Входящие, Отправленные, etc.) --- */
.modern-theme .pmCatLink,
.modern-theme .pmCatLinkActive {
  background: var(--card) !important;
  border: 1px solid rgba(0,0,0,0.08) !important;
  border-radius: var(--radius-sm) !important;
  color: var(--text) !important;
  padding: 8px 14px !important;
  font-size: 12px;
  cursor: pointer;
  display: inline-block;
  margin: 2px;
  transition: all 0.2s;
  box-shadow: var(--shadow-sm);
}

.modern-theme .pmCatLink:hover,
.modern-theme .pmCatLinkActive {
  background: linear-gradient(135deg, var(--primary), var(--secondary)) !important;
  color: #fff !important;
  border-color: transparent !important;
  box-shadow: var(--shadow-md);
}

/* --- Search box --- */
.modern-theme #search_cont {
  background: var(--card);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin: 12px 0;
  box-shadow: var(--shadow-sm);
}

.modern-theme #search_cont input[type="text"] {
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 12px;
  width: 200px;
  background: var(--bg);
  color: var(--text);
  outline: none;
}

.modern-theme #search_cont input[type="text"]:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(102,126,234,0.15);
}

.modern-theme #search_cont div {
  margin: 4px 0;
}

.modern-theme #search_cont a {
  color: var(--primary);
  text-decoration: none;
  font-size: 11px;
  padding: 3px 6px;
  border-radius: 4px;
  display: inline-block;
}

.modern-theme #search_cont a:hover {
  background: rgba(102,126,234,0.08);
}

/* --- PM Folder table --- */
.modern-theme table.pmFolder {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.modern-theme table.pmFolder th {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: left;
}

.modern-theme table.pmFolder td {
  padding: 10px 14px;
  font-size: 11px;
  color: var(--text);
  border-bottom: 1px solid #f0f0f0;
}

.modern-theme table.pmFolder tr:last-child td {
  border-bottom: none;
}

.modern-theme table.pmFolder tr:hover td {
  background: rgba(102,126,234,0.03);
}

.modern-theme table.pmFolder a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.modern-theme table.pmFolder a:hover {
  text-decoration: underline;
}

/* --- PM topic / message thread --- */
.modern-theme .pmTopic {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 12px;
  overflow: hidden;
}

.modern-theme .pmTopic .pmTopicAuthor {
  padding: 12px 16px;
  border-bottom: 1px solid #f0f0f0;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

.modern-theme .pmTopic .pmTopicAuthor a {
  color: var(--primary);
  text-decoration: none;
}

.modern-theme .pmTopic .pmTopicAuthor a:hover {
  text-decoration: underline;
}

.modern-theme .pmTopic .pmDate {
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 400;
  margin-left: 8px;
}

/* --- Individual PM message --- */
.modern-theme .pmMessage {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 12px;
  overflow: hidden;
}

.modern-theme .pmMessage .pmMsgHeader {
  padding: 12px 16px;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modern-theme .pmMessage .pmMsgAuthor {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.modern-theme .pmMessage .pmMsgAuthor a {
  color: var(--primary);
  text-decoration: none;
}

.modern-theme .pmMessage .pmMsgDate {
  color: var(--text-muted);
  font-size: 10px;
}

.modern-theme .pmMessage .pmMsgBody {
  padding: 16px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--text);
}

/* --- PM compose form --- */
.modern-theme .pmForm {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 20px;
  margin-bottom: 12px;
}

.modern-theme .pmForm table {
  width: 100%;
  border-collapse: collapse;
}

.modern-theme .pmForm td {
  padding: 6px 0;
  font-size: 12px;
  color: var(--text);
}

.modern-theme .pmForm input[type="text"],
.modern-theme .pmForm input[type="email"],
.modern-theme .pmForm input[type="password"] {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 12px;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 6px;
  font-size: 12px;
  background: var(--bg);
  color: var(--text);
  outline: none;
}

.modern-theme .pmForm input[type="text"]:focus,
.modern-theme .pmForm input[type="email"]:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(102,126,234,0.15);
}

.modern-theme .pmForm textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 6px;
  font-size: 12px;
  font-family: inherit;
  background: var(--bg);
  color: var(--text);
  resize: vertical;
  outline: none;
}

.modern-theme .pmForm textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(102,126,234,0.15);
}

.modern-theme .pmForm input[type="submit"],
.modern-theme .pmForm input[type="button"],
.modern-theme .pmForm .uf-btn {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  margin-top: 6px;
}

.modern-theme .pmForm input[type="submit"]:hover,
.modern-theme .pmForm input[type="button"]:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* --- Page name (breadcrumbs) --- */
.modern-theme .page_name2 {
  width: auto !important;
  padding: 10px 14px !important;
  font-weight: 700 !important;
  font-size: 12px;
  border-bottom: 1px solid rgba(0,0,0,0.08) !important;
  background: var(--card) !important;
  border-radius: var(--radius) var(--radius) 0 0 !important;
  color: var(--text);
}

/* --- Footer --- */
.modern-theme div.footer {
  text-align: center;
  padding: 20px;
  font-size: 10px;
  color: var(--text-muted);
}

.modern-theme div.footer a {
  color: var(--primary);
  text-decoration: none;
}

/* --- General table styles in PM page --- */
.modern-theme td.right table {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  border-collapse: collapse;
  width: 100%;
}

.modern-theme td.right table th {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 700;
  text-align: left;
}

.modern-theme td.right table td {
  padding: 8px 14px;
  font-size: 11px;
  color: var(--text);
  border-bottom: 1px solid #f0f0f0;
}

.modern-theme td.right table tr:last-child td {
  border-bottom: none;
}

.modern-theme td.right table tr:hover td {
  background: rgba(102,126,234,0.03);
}

.modern-theme td.right table a {
  color: var(--primary);
  text-decoration: none;
}

.modern-theme td.right table a:hover {
  text-decoration: underline;
}

/* --- PM Message Avatars --- */
.modern-theme .pmMsgHeader:after,
.modern-theme .pmTopicAuthor:after {
  content: '';
  display: table;
  clear: both;
}

/* --- PM Unread indicator --- */
.modern-theme .pmMsgUnread,
.modern-theme tr.pmMsgUnread {
  background: rgba(102,126,234,0.04) !important;
  border-left: 3px solid var(--primary);
}

.modern-theme .pmMsgUnread .pmMsgAuthor a {
  font-weight: 700;
}

/* --- PM Read indicator --- */
.modern-theme .pmMsgRead {
  border-left: 3px solid transparent;
}

/* --- PM Message hover animation --- */
.modern-theme .pmMessage,
.modern-theme .pmTopic {
  transition: transform 0.2s, box-shadow 0.2s;
}
.modern-theme .pmMessage:hover,
.modern-theme .pmTopic:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* --- Compose form auto-resize textarea --- */
.modern-theme .pmForm textarea {
  transition: border-color 0.2s, box-shadow 0.2s, height 0.2s;
}

/* --- Category link ripple effect --- */
.modern-theme .pmCatLink,
.modern-theme .pmCatLinkActive {
  position: relative;
  overflow: hidden;
}

/* --- Folder table row animation --- */
.modern-theme table.pmFolder tr {
  transition: background 0.2s;
}

/* --- Search filter buttons --- */
.modern-theme #search_cont a[data-filter] {
  transition: all 0.2s;
}

/* ============================================
   NEWS FEED TABS — Material Design
   ============================================ */
.modern-theme .feed-wrap {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 20px;
}

.modern-theme .feed-tabs {
  display: flex;
  border-bottom: 1px solid rgba(0,0,0,.06);
  background: #fafbfc;
}

.modern-theme .feed-tab {
  flex: 1;
  padding: 14px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  cursor: pointer;
  border: none;
  background: none;
  position: relative;
  transition: color .25s;
  font-family: inherit;
  letter-spacing: .3px;
}

.modern-theme .feed-tab::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 60%;
  height: 3px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 3px 3px 0 0;
  transition: transform .25s;
}

.modern-theme .feed-tab:hover {
  color: var(--text);
  background: rgba(102,126,234,.04);
}

.modern-theme .feed-tab.active {
  color: var(--primary);
}

.modern-theme .feed-tab.active::after {
  transform: translateX(-50%) scaleX(1);
}

.modern-theme .feed-panel {
  display: none;
  padding: 16px;
}

.modern-theme .feed-panel.active {
  display: block;
}

/* --- Feed items inside panels --- */
.modern-theme .feed-panel {
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--text);
}

.modern-theme .feed-panel a {
  color: var(--primary);
  text-decoration: none;
}

.modern-theme .feed-panel a:hover {
  text-decoration: underline;
}

.modern-theme .feed-panel hr {
  border: none;
  height: 1px;
  background: rgba(0,0,0,.06);
  margin: 10px 0;
}

/* ============================================
   COMMENT FEED (информер комментариев)
   ============================================ */
.modern-theme .cComment {
  margin-bottom: 0;
}

.modern-theme .cCommentCard {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(0,0,0,.06);
  transition: background .15s;
}

.modern-theme .cCommentCard:last-child {
  border-bottom: none;
}

.modern-theme .cCommentCard:hover {
  background: rgba(102,126,234,.02);
  margin: 0 -8px;
  padding: 12px 8px;
  border-radius: 8px;
}

.modern-theme .cCommentAv {
  flex-shrink: 0;
}

.modern-theme .cCommentAv img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.modern-theme .cCommentBody {
  flex: 1;
  min-width: 0;
}

.modern-theme .cCommentHead {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.modern-theme .cCommentName {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none !important;
}

.modern-theme .cCommentName:hover {
  color: var(--primary) !important;
}

.modern-theme .cCommentDate {
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
}

.modern-theme .cCommentText {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text);
  word-break: break-word;
  margin-bottom: 6px;
}

.modern-theme .cCommentFoot {
  display: flex;
  align-items: center;
  gap: 8px;
}

.modern-theme .cLikeBtn {
  font-size: 11px;
  color: var(--text-muted);
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: 6px;
  transition: all .2s;
}

.modern-theme .cLikeBtn:hover {
  background: rgba(102,126,234,.08);
  color: var(--primary);
}

.modern-theme .cLikeBtn.liked {
  color: #e74c3c;
}

.modern-theme .cLikeBtn.isOwn {
  opacity: .5;
  cursor: default;
}

.modern-theme .cLikeIcon {
  font-size: 12px;
}

.modern-theme .cCommentReply {
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: none !important;
  padding: 2px 6px;
  border-radius: 6px;
  transition: all .2s;
}

.modern-theme .cCommentReply:hover {
  background: rgba(102,126,234,.08);
  color: var(--primary);
}

.modern-theme .cCommentMod {
  margin-left: auto;
  display: flex;
  gap: 4px;
  opacity: .4;
  transition: opacity .2s;
}

.modern-theme .cCommentCard:hover .cCommentMod {
  opacity: .8;
}

/* --- Blog feed (информер блогов) --- */
.modern-theme .cBlogCard {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(0,0,0,.06);
  transition: background .15s;
}

.modern-theme .cBlogCard:last-child {
  border-bottom: none;
}

.modern-theme .cBlogCard:hover {
  background: rgba(102,126,234,.02);
  margin: 0 -8px;
  padding: 12px 8px;
  border-radius: 8px;
}

.modern-theme .cBlogAv {
  flex-shrink: 0;
}

.modern-theme .cBlogAv img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.modern-theme .cBlogBody {
  flex: 1;
  min-width: 0;
}

.modern-theme .cBlogHead {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.modern-theme .cBlogName {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none !important;
}

.modern-theme .cBlogName:hover {
  color: var(--primary) !important;
}

.modern-theme .cBlogLabel {
  font-size: 11px;
  color: var(--text-muted);
}

.modern-theme .cBlogTitle {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none !important;
  margin-bottom: 3px;
  transition: color .2s;
}

.modern-theme .cBlogTitle:hover {
  color: var(--secondary) !important;
}

.modern-theme .cBlogDate {
  font-size: 10px;
  color: var(--text-muted);
}

/* --- Friends feed (информер друзей) --- */
.modern-theme .cFriendCard {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(0,0,0,.06);
  align-items: center;
  transition: background .15s;
}

.modern-theme .cFriendCard:last-child {
  border-bottom: none;
}

.modern-theme .cFriendCard:hover {
  background: rgba(102,126,234,.02);
  margin: 0 -8px;
  padding: 12px 8px;
  border-radius: 8px;
}

.modern-theme .cFriendAv {
  flex-shrink: 0;
  position: relative;
}

.modern-theme .cFriendAv img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.modern-theme .cFriendAvLetter {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
}

.modern-theme .cFriendPlus {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 18px;
  height: 18px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: #fff;
  font-weight: 700;
  border: 2px solid var(--card);
  line-height: 1;
}

.modern-theme .cFriendBody {
  flex: 1;
  min-width: 0;
}

.modern-theme .cFriendAction {
  font-size: 12px;
  color: var(--text);
  line-height: 1.4;
}

.modern-theme .cFriendName {
  font-weight: 700;
  color: var(--text);
  text-decoration: none !important;
}

.modern-theme .cFriendName:hover {
  color: var(--primary) !important;
}

.modern-theme .cFriendTarget {
  font-weight: 600;
  color: var(--primary);
  text-decoration: none !important;
}

.modern-theme .cFriendTarget:hover {
  color: var(--secondary) !important;
}

.modern-theme .cFriendDate {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* --- New users feed (информер пользователей) --- */
.modern-theme .cUserCard {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(0,0,0,.06);
  align-items: center;
  transition: background .15s;
}

.modern-theme .cUserCard:last-child {
  border-bottom: none;
}

.modern-theme .cUserCard:hover {
  background: rgba(102,126,234,.02);
  margin: 0 -8px;
  padding: 12px 8px;
  border-radius: 8px;
}

.modern-theme .cUserAv {
  flex-shrink: 0;
  position: relative;
}

.modern-theme .cUserAv img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.modern-theme .cUserAvFallback {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
}

.modern-theme .cUserBody {
  flex: 1;
  min-width: 0;
}

.modern-theme .cUserName {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none !important;
  display: block;
  margin-bottom: 2px;
}

.modern-theme .cUserName:hover {
  color: var(--primary) !important;
}

.modern-theme .cUserMeta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 2px;
}

.modern-theme .cUserDate,
.modern-theme .cUserLast {
  font-size: 10px;
  color: var(--text-muted);
}

.modern-theme .cUserInfo {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.modern-theme .cUserSex,
.modern-theme .cUserAge,
.modern-theme .cUserCountry {
  font-size: 10px;
  color: var(--text-muted);
  background: rgba(0,0,0,.04);
  padding: 1px 6px;
  border-radius: 4px;
}

.modern-theme .cUserMsg {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none !important;
  padding: 4px 10px;
  border-radius: 6px;
  transition: all .2s;
}

.modern-theme .cUserMsg:hover {
  background: rgba(102,126,234,.1);
  color: var(--primary-dark);
}

/* ============================================
   MINI-CHAT (Мини-чат)
   ============================================ */
/* --- Mini-chat messages (standalone — works in iframe too) --- */
.chat_header {
  padding: 10px 0 !important;
  border-bottom: 1px solid rgba(0,0,0,.06) !important;
  transition: background .15s;
}

.chat_header:last-child {
  border-bottom: none !important;
}

.chat_header:hover {
  background: rgba(102,126,234,.03);
  border-radius: 10px;
  margin: 0 -10px;
  padding: 10px 10px !important;
}

.chat_header table {
  width: 100% !important;
}

.chat_header table td:first-child {
  width: 50px !important;
  vertical-align: top !important;
}

.chat_header_image img,
.chat_header_image a img,
.chat_header td img,
.chat_header img {
  width: 40px !important;
  height: 40px !important;
  max-width: 40px !important;
  max-height: 40px !important;
  object-fit: cover;
  display: block;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}

.chat_a_name {
  padding: 0 0 2px 0 !important;
}

.chat_a_name a {
  font-weight: 700 !important;
  font-size: 12.5px !important;
  color: #333 !important;
  text-decoration: none !important;
}

.chat_a_name a:hover {
  color: #667eea !important;
}

.chat_a_name font[color="#ff0000"] {
  color: #e74c3c !important;
  font-weight: 700;
}

.chat_header div[style*="padding-bottom: 4px"] {
  font-size: 12.5px !important;
  line-height: 1.5 !important;
  color: #333 !important;
  word-break: break-word;
  padding-bottom: 4px !important;
}

.chat_header div[style*="color: gray"] {
  font-size: 10px !important;
  color: #999 !important;
  padding-bottom: 2px !important;
}

/* --- Mini-chat form --- */
.mChatForm {
  padding: 8px 12px 12px;
  background: #f9fafb;
  border-top: 1px solid rgba(0,0,0,.06);
}

.mChatForm textarea,
.mChatForm #mchatMsgF {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(0,0,0,.1);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12px;
  font-family: inherit;
  background: var(--card);
  color: var(--text);
  outline: none;
  resize: vertical;
  min-height: 60px;
  transition: border-color .3s, box-shadow .3s;
  margin-bottom: 8px;
}

.mChatForm textarea:focus,
.mChatForm #mchatMsgF:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102,126,234,.15);
}

.mChatFormRow {
  display: flex;
  align-items: center;
  gap: 8px;
}

.modern-theme .mChatBtn {
  background: linear-gradient(135deg, #667eea, #764ba2) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 8px !important;
  padding: 8px 20px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  font-family: inherit !important;
  transition: transform .2s, box-shadow .2s !important;
  line-height: 1 !important;
}

.mChatBtn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(102,126,234,.3);
}

.mChatSmiles,
.mChatCtrl {
  font-size: 16px;
  text-decoration: none !important;
  line-height: 1;
  padding: 4px 6px;
  border-radius: 6px;
  transition: background .2s;
  display: inline-flex;
  align-items: center;
}

.mChatSmiles:hover,
.mChatCtrl:hover {
  background: rgba(0,0,0,.05);
}

/* =========================================
   BLOG / NEWS ITEMS
   ========================================= */
.modern-theme .yavdruzyah_blog_item {
  border-bottom: none !important;
  padding: 16px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 12px;
  transition: box-shadow .2s, transform .2s;
}

.modern-theme .yavdruzyah_blog_item:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.modern-theme .yavdruzyah_blog_item table {
  width: 100% !important;
}

.modern-theme .yavdruzyah_blog_item table td {
  border: none !important;
}

.modern-theme td.blog_avatar {
  width: 70px !important;
  text-align: center !important;
  padding: 0 12px 0 0 !important;
}

.modern-theme td.blog_avatar img {
  width: 56px !important;
  height: 56px !important;
  max-width: 56px !important;
  border-radius: 50% !important;
  object-fit: cover;
  display: block;
  margin: 0 auto;
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
}

.modern-theme .blog_a_name {
  padding: 0 0 6px 0 !important;
  font-size: 12.5px !important;
  line-height: 1.5 !important;
}

.modern-theme .blog_a_name span[style*="color: gray"],
.modern-theme .blog_a_name span[style*="color:gray"] {
  color: var(--text-muted) !important;
  font-weight: 400 !important;
}

.modern-theme .a_this_name a {
  font-weight: 700 !important;
  font-size: 15px !important;
  color: var(--text) !important;
  text-decoration: none !important;
  transition: color .2s;
}

.modern-theme .a_this_name a:hover {
  color: var(--primary) !important;
  border-bottom: none !important;
}

.modern-theme .a_this_name {
  font-weight: 700 !important;
}

.modern-theme .blog_a_name a[href*="/index/8-"] {
  color: var(--primary) !important;
  font-weight: 600 !important;
  text-decoration: none !important;
}

.modern-theme .blog_a_name a[href*="/index/8-"]:hover {
  text-decoration: underline !important;
}

.modern-theme .blog_a_text {
  padding: 8px 0 0 0 !important;
  font-size: 13px !important;
  line-height: 1.6 !important;
  color: var(--text) !important;
  word-break: break-word;
}

.modern-theme .blog_a_text img {
  max-width: 100% !important;
  border-radius: var(--radius-sm);
}

/* --- User catalog (modern) --- */
.modern-theme .mUsersPage {
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
}

.modern-theme .mUsersHeader {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--primary);
}

.modern-theme .mUsersTitle {
  font-size: 22px;
  font-weight: 700;
  margin: 0;
  color: var(--text);
}

.modern-theme .mUsersStats {
  font-size: 13px;
  color: var(--text-muted);
}

.modern-theme .mUsersLayout {
  display: flex;
  gap: 24px;
}

.modern-theme .mUsersMain {
  flex: 1;
  min-width: 0;
}

.modern-theme .mUsersSidebar {
  width: 260px;
  flex-shrink: 0;
}

.modern-theme .mUsersSideSection {
  margin-bottom: 20px;
  background: var(--card);
  border-radius: 12px;
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.modern-theme .mUsersSideTitle {
  font-weight: 700;
  font-size: 13px;
  padding-bottom: 8px;
  margin-bottom: 8px;
  border-bottom: 2px solid var(--primary);
  color: var(--text);
}

.modern-theme .mUsersLogin {
  padding: 16px;
  background: var(--card);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.modern-theme .mUsersSearch {
  margin-bottom: 20px;
  padding: 16px;
  background: var(--card);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.modern-theme .mUsersSearchInput {
  flex: 1;
  min-width: 180px;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,.1);
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  font-family: inherit;
}

.modern-theme .mUsersSearchInput:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(102,126,234,.15);
}

.modern-theme .mUsersSearchLabel {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  margin-right: -4px;
}

.modern-theme .mUsersSearchSelect {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,.1);
  background: var(--bg);
  color: var(--text);
  font-size: 12px;
  font-family: inherit;
  outline: none;
  cursor: pointer;
}

.modern-theme .mUsersSearch input[type="submit"],
.modern-theme .mUsersSearch button[type="submit"],
.modern-theme .mUsersSearchBtn {
  padding: 10px 24px;
  border: none;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: transform .2s, box-shadow .2s;
}

.modern-theme .mUsersSearch input[type="submit"]:hover,
.modern-theme .mUsersSearch button[type="submit"]:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(102,126,234,.3);
}

.modern-theme .mUsersGrid {
  display: grid;
  gap: 12px;
}

.modern-theme .mUserCard {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--card);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  transition: transform .2s, box-shadow .2s;
}

.modern-theme .mUserCard:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.modern-theme .mUserCardAvatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.modern-theme .mUserCardAvatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}

.modern-theme .mUserCardInitial {
  display: none;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
}

.modern-theme .mUserCardBody {
  flex: 1;
  min-width: 0;
}

.modern-theme .mUserCardName {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  display: block;
  margin-bottom: 2px;
}

.modern-theme .mUserCardName:hover {
  text-decoration: underline;
  color: var(--secondary);
}

.modern-theme .mUserCardMeta {
  display: flex;
  gap: 8px;
  font-size: 11px;
  margin-bottom: 2px;
  color: var(--text-muted);
}

.modern-theme .mUserCardGender {
}

.modern-theme .mUserCardGroup {
}

.modern-theme .mUserCardFullname {
  font-size: 12px;
  color: var(--text-muted);
  opacity: .7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.modern-theme .mUserCardActions {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
}

.modern-theme .mUserCardAction {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  transition: background .2s;
  white-space: nowrap;
  background: rgba(102,126,234,.08);
  color: var(--primary);
}

.modern-theme .mUserCardAction:hover {
  background: rgba(102,126,234,.15);
}

.modern-theme .mUserCardActionPm {
  background: rgba(0,0,0,.04);
  color: var(--text-muted);
}

.modern-theme .mUserCardActionPm:hover {
  background: rgba(0,0,0,.08);
}

.modern-theme .mUsersPagination {
  margin-top: 24px;
  padding-top: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.modern-theme .mUsersPagination a {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  text-decoration: none;
  color: var(--primary);
  background: var(--card);
  transition: background .2s;
  box-shadow: var(--shadow-sm);
}

.modern-theme .mUsersPagination a:hover {
  background: rgba(102,126,234,.1);
}

.modern-theme .mUsersPagination span {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.modern-theme .mUsersEmpty {
  text-align: center;
  padding: 60px 20px;
  font-size: 14px;
  color: var(--text-muted);
  opacity: .5;
}

/* --- Feed empty state --- */
.modern-theme .feedEmpty {
  text-align: center;
  padding: 40px 20px;
  font-size: 40px;
  color: #ddd;
  animation: feedPulse 3s ease-in-out infinite;
}

.modern-theme .feedEmptyMsg {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 10px;
  line-height: 1.5;
}

@keyframes feedPulse {
  0%, 100% { opacity: .6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

/* --- User catalog --- */
.modern-theme td.right > div[style*="background:#f6f6f6"],
.modern-theme td.right > div[style*="background: #f6f6f6"] {
  background: var(--card) !important;
  border: none !important;
  border-radius: var(--radius) !important;
  box-shadow: var(--shadow-sm) !important;
  padding: 10px 14px !important;
  margin-bottom: 14px;
}

.modern-theme td.right > div[style*="background:#f6f6f6"] b,
.modern-theme td.right > div[style*="background: #f6f6f6"] b {
  color: var(--text);
}

.modern-theme td.right > div[style*="background:#f6f6f6"] #nument,
.modern-theme td.right > div[style*="background: #f6f6f6"] #nument {
  font-size: 13px;
  color: var(--text-muted);
}

.modern-theme #uCodes {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modern-theme .classU {
  background: var(--card) !important;
  border: none !important;
  border-radius: var(--radius) !important;
  box-shadow: var(--shadow-sm) !important;
  margin-bottom: 0 !important;
  padding: 0 !important;
  transition: box-shadow .25s, transform .25s;
  overflow: hidden;
  position: relative;
}

.modern-theme .classU::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--primary), var(--secondary));
  border-radius: 3px 0 0 3px;
}

.modern-theme .classU:hover {
  box-shadow: var(--shadow-md) !important;
  transform: translateY(-2px);
}

.modern-theme .classU > tbody > tr > td,
.modern-theme .classU > tr > td {
  padding: 14px 16px !important;
  vertical-align: middle !important;
}

.modern-theme .classU > tbody > tr > td:first-child,
.modern-theme .classU > tr > td:first-child {
  width: 68px !important;
  padding-right: 0 !important;
}

.modern-theme .classU .avaID {
  padding: 0 !important;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modern-theme .classU .uImg {
  width: 48px !important;
  height: 48px !important;
  object-fit: cover;
  border: 2px solid rgba(102,126,234,.2);
  box-shadow: 0 2px 8px rgba(102,126,234,.15);
  transition: transform .25s;
}

.modern-theme .classU:hover .uImg {
  transform: scale(1.08);
}

.modern-theme .avaLetter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(102,126,234,.2);
}

.modern-theme .classU > tbody > tr > td:nth-child(2),
.modern-theme .classU > tr > td:nth-child(2) {
  width: auto !important;
  padding-left: 16px !important;
}

.modern-theme .classU a[style*="color:#333"] {
  color: var(--text) !important;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  display: inline-block;
}

.modern-theme .classU a[style*="color:#333"]:hover {
  color: var(--primary) !important;
}

.modern-theme .classU td {
  font-size: 12px !important;
  line-height: 1.7;
  color: var(--text);
}

.modern-theme .classU td div {
  font-size: 12px !important;
  color: var(--text-muted);
  line-height: 1.7;
}

.modern-theme .classU td div[style*="padding-top"] {
  display: block !important;
  height: 4px;
  padding: 0 !important;
}

.modern-theme .classU b {
  color: var(--primary);
  font-weight: 600;
}



.modern-theme .classU .upD {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.modern-theme .classU > tbody > tr > td:last-child,
.modern-theme .classU > tr > td:last-child {
  width: 160px !important;
  padding-left: 8px !important;
}

.modern-theme #navigate_ucodes {
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  display: flex !important;
  flex-direction: column;
  gap: 4px;
}

.modern-theme #navigate_ucodes a {
  margin: 0 !important;
  padding: 6px 12px !important;
  display: block !important;
  background: rgba(102,126,234,.06) !important;
  color: var(--primary) !important;
  text-decoration: none !important;
  border: none !important;
  font-size: 11px !important;
  font-weight: 600;
  border-radius: 6px !important;
  transition: all .2s;
  text-align: center;
}

.modern-theme #navigate_ucodes a:hover {
  background: linear-gradient(135deg, var(--primary), var(--secondary)) !important;
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(102,126,234,.25);
}

.modern-theme #navigate_ucodes .test {
  margin-top: 0;
}

.modern-theme #navigate_ucodes .test a {
  background: transparent !important;
  padding: 4px 8px !important;
  font-size: 11px !important;
  color: var(--secondary) !important;
  border: 1px solid rgba(118,75,162,.2) !important;
}

.modern-theme #navigate_ucodes .test a:hover {
  background: linear-gradient(135deg, var(--secondary), var(--primary)) !important;
  color: #fff !important;
  border-color: transparent !important;
}

.modern-theme #nameS {
  color: var(--text) !important;
  font-weight: 600 !important;
  font-size: 12px !important;
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 10px 0 6px !important;
  border-bottom: 2px solid var(--primary) !important;
  text-shadow: none !important;
  margin-bottom: 8px;
}

.modern-theme input[name="user"],
.modern-theme input[name="subm"] {
  font-family: inherit !important;
  font-size: 12px !important;
}

.modern-theme input[name="user"] {
  width: calc(100% - 14px) !important;
  box-sizing: border-box;
  margin: 0 0 8px 0 !important;
  border: 1px solid var(--border) !important;
  border-radius: 8px !important;
  padding: 9px 12px !important;
  background: var(--card) !important;
  color: var(--text) !important;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}

.modern-theme input[name="user"]:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(102,126,234,.15);
}

.modern-theme input[name="subm"] {
  background: linear-gradient(135deg, var(--primary), var(--secondary)) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 8px !important;
  padding: 8px 20px !important;
  cursor: pointer !important;
  font-weight: 600 !important;
  transition: transform .2s, box-shadow .2s !important;
  width: 100%;
}

.modern-theme input[name="subm"]:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(102,126,234,.3);
}

.modern-theme select {
  border: 1px solid var(--border) !important;
  border-radius: 6px !important;
  padding: 7px 10px !important;
  font-size: 12px !important;
  font-family: inherit !important;
  background: var(--card) !important;
  color: var(--text) !important;
  outline: none;
  cursor: pointer;
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 6px;
  transition: border-color .2s;
}

.modern-theme select:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(102,126,234,.15);
}

.modern-theme .typeV,
.modern-theme .typeV2 {
  background: transparent !important;
  padding: 10px 14px !important;
  border: none !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  color: var(--text);
  margin: 0 0 8px 0 !important;
  position: relative;
}

.modern-theme .typeV::after,
.modern-theme .typeV2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 14px;
  right: 14px;
  height: 1px;
  background: linear-gradient(90deg, var(--primary), transparent);
}

.modern-theme .swchItem,
.modern-theme .swchItemDots {
  background: var(--card) !important;
  padding: 7px 14px !important;
  border: 1px solid var(--border) !important;
  border-radius: 8px !important;
  text-decoration: none !important;
  color: var(--text-muted) !important;
  font-size: 12px !important;
  font-weight: 500;
  transition: all .2s;
  display: inline-block;
}

.modern-theme .swchItem:hover {
  border-color: var(--primary) !important;
  color: var(--primary) !important;
  background: rgba(102,126,234,.04) !important;
}

.modern-theme .swchItemA {
  background: linear-gradient(135deg, var(--primary), var(--secondary)) !important;
  padding: 7px 14px !important;
  border: none !important;
  border-radius: 8px !important;
  text-decoration: none !important;
  color: #fff !important;
  font-size: 12px !important;
  font-weight: 600 !important;
}

.modern-theme #0ent {
  text-align: center;
  padding: 60px 20px;
  font-size: 14px;
  color: var(--text-muted);
  opacity: .5;
}

.modern-theme .getid {
  display: none;
}

/* Search form container */
.modern-theme td[right] > div[style*="margin-left:7px"],
.modern-theme td[align="right"] > div[style*="margin-left"],
.modern-theme td[right] > div,
.modern-theme td[align="right"] > div {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 14px;
  margin-left: 0 !important;
}

/* Page selector wrapper */
.modern-theme .pageSelector,
.modern-theme #pageSelector {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* Fix nested table in search area */
.modern-theme td[right] form table,
.modern-theme td[align="right"] form table {
  width: 100%;
}

.modern-theme td[right] form table td,
.modern-theme td[align="right"] form table td {
  display: block;
  padding: 0;
}

.modern-theme td[right] form table td[align],
.modern-theme td[align="right"] form table td[align] {
  text-align: left !important;
}

.modern-theme td[right] form table td[align] b,
.modern-theme td[align="right"] form table td[align] b {
  display: none;
}

/* --- Profile edit form --- */
.modern-theme .manTable {
  background: transparent;
  border-collapse: separate;
  border-spacing: 0 10px;
  width: 100%;
}

.modern-theme .manTable .manTd1 {
  width: 30%;
  padding: 14px 18px !important;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  background: transparent;
  border: none;
  vertical-align: middle;
  white-space: nowrap;
  position: relative;
}

.modern-theme .manTable .manTd2 {
  padding: 10px 16px !important;
  font-size: 12px;
  color: var(--text);
  background: var(--card);
  border: none;
  vertical-align: middle;
  border-radius: 0 10px 10px 0;
}

.modern-theme .manTable tr:not(.manTdSep):not(:has(.manTdSep)) .manTd1:first-child {
  background: var(--card);
  border-radius: 10px 0 0 10px;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.modern-theme .manTable tr:not(.manTdSep):not(:has(.manTdSep)) .manTd1:first-child::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 3px;
  background: linear-gradient(180deg, var(--primary), var(--secondary));
  border-radius: 3px;
}

.modern-theme .manTable tr:not(.manTdSep):not(:has(.manTdSep)) .manTd2 {
  box-shadow: var(--shadow-sm);
}

.modern-theme .manTable .manTd2 {
  box-shadow: var(--shadow-sm);
}

.modern-theme .manTable .manTd2 input[type="text"],
.modern-theme .manTable .manTd2 input[type="password"],
.modern-theme .manTable .manTd2 input[type="email"],
.modern-theme .manTable .manTd2 input[type="url"] {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 12px;
  font-family: inherit;
  background: #f8f9fc;
  color: var(--text);
  outline: none;
  transition: all .25s;
}

.modern-theme .manTable .manTd2 input:focus {
  border-color: var(--primary) !important;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(102,126,234,.15);
}

.modern-theme .manTable .manTd2 input:not(:placeholder-shown) {
  background: #fff;
  border-color: rgba(102,126,234,.4);
}

.modern-theme .manTable .manTd2 textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 12px;
  font-family: inherit;
  background: #f8f9fc;
  color: var(--text);
  outline: none;
  resize: vertical;
  min-height: 70px;
  transition: all .25s;
}

.modern-theme .manTable .manTd2 textarea:focus {
  border-color: var(--primary) !important;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(102,126,234,.15);
}

.modern-theme .manTable .manTd2 select {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 12px;
  font-family: inherit;
  background: #f8f9fc url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23999'/%3E%3C/svg%3E") no-repeat right 12px center;
  color: var(--text);
  outline: none;
  cursor: pointer;
  min-width: 200px;
  -webkit-appearance: none;
  appearance: none;
  padding-right: 32px;
  transition: border-color .25s, box-shadow .25s;
}

.modern-theme .manTable .manTd2 select:focus {
  border-color: var(--primary) !important;
  background-color: #fff;
  box-shadow: 0 0 0 3px rgba(102,126,234,.15);
}

.modern-theme .manTable .manTd2 input[type="checkbox"],
.modern-theme .manTable .manTd2 input[type="radio"] {
  margin: 0 6px 0 0;
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.modern-theme .manTable .manTd2 label {
  font-size: 12px;
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  margin-right: 12px;
}

.modern-theme .manTable .manTdError {
  padding: 14px 20px !important;
  font-size: 12px;
  color: #e74c3c;
  background: linear-gradient(135deg, #fdf0ef, #fef5f4);
  font-weight: 700;
  border: none;
  border-left: 3px solid #e74c3c;
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
}

.modern-theme .manTable .manTdSep {
  padding: 0 !important;
  height: 0;
}

.modern-theme .manTable .manTdSep .manHr {
  display: none;
}

.modern-theme .manTable .manTdBut {
  padding: 20px 16px !important;
  text-align: center;
  background: transparent;
  border: none;
}

.modern-theme .manFlSbm {
  background: linear-gradient(135deg, var(--primary), var(--secondary)) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 10px !important;
  padding: 12px 48px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  font-family: inherit !important;
  cursor: pointer !important;
  transition: all .25s !important;
  letter-spacing: .5px;
  box-shadow: 0 4px 16px rgba(102,126,234,.25) !important;
}

.modern-theme .manFlSbm:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(102,126,234,.35) !important;
}

.modern-theme .manFlSbm:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(102,126,234,.2) !important;
}

/* --- Profile edit tabs --- */
.modern-theme .sel_tab {
  display: inline-block;
  padding: 9px 22px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 8px;
  transition: all .25s;
  margin-right: 8px;
  margin-bottom: 6px;
}

.modern-theme .sel_tab.deactive {
  background: var(--card);
  color: var(--text-muted);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.modern-theme .sel_tab.deactive:hover {
  border-color: rgba(102,126,234,.3);
  color: var(--primary);
  transform: translateY(-1px);
}

.modern-theme .sel_tab.active {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  border: none;
  box-shadow: 0 3px 10px rgba(102,126,234,.25);
  transform: translateY(-1px);
}

/* =========================================
   BLOG ENTRY PAGE
   ========================================= */

/* Blog content area */
.modern-theme #_this_this_blog {
  background: var(--card) !important;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 12px;
  overflow: hidden;
}

.modern-theme #_this_this_blog > div {
  padding: 16px !important;
  font-size: 13px !important;
  line-height: 1.7 !important;
  color: var(--text) !important;
  word-break: break-word;
}

.modern-theme #_this_this_blog img {
  max-width: 100% !important;
  border-radius: var(--radius-sm);
}

/* Comments area */
.modern-theme #_this_this_comments {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 12px;
  padding: 12px;
}

.modern-theme #_this_this_comments > div {
  padding: 2px !important;
}

/* Info selector table */
.modern-theme .info_selector table {
  width: auto !important;
  border: none !important;
}

.modern-theme .info_selector table td {
  border: none !important;
  padding: 0 !important;
}

.modern-theme .info_selector table tr {
  background: none !important;
}

/* ThankPost buttons */
.modern-theme .page_header img[onclick*="thankPost"] {
  opacity: 0.7;
  transition: opacity .2s, transform .2s;
}

.modern-theme .page_header img[onclick*="thankPost"]:hover {
  opacity: 1;
  transform: scale(1.2);
}

/* Avatar sidebar on blog page */
.modern-theme .avatar_my {
  text-align: center;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 16px;
  margin-bottom: 12px;
}

.modern-theme .avatar_my img {
  border: 3px solid var(--primary);
  box-shadow: var(--shadow-sm);
  max-width: 120px !important;
  width: auto !important;
  height: auto !important;
  transition: transform .3s;
}

.modern-theme .avatar_my img:hover {
  transform: scale(1.05);
}

/* Hidden blog title div */
.modern-theme #blogs {
  display: none !important;
}

/* --- Avatar preview on edit page --- */
.modern-theme #avaget {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  display: inline-block;
  margin-bottom: 12px;
}

.modern-theme #avaget img {
  border-radius: 12px;
  max-width: 100px;
}

/* =========================================
   FORUM MODULE — Modern Theme
   ========================================= */

.modern-theme .page_header {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  padding: 16px 20px;
  border-radius: var(--radius);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
}

.modern-theme .catPages4 {
  background: var(--card) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-sm) !important;
  padding: 8px 14px !important;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted) !important;
  text-decoration: none !important;
  transition: all .2s;
}

.modern-theme .catPages4:hover {
  background: var(--bg) !important;
  color: var(--primary) !important;
  border-color: var(--primary) !important;
}

.modern-theme .forumContent {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 16px;
  overflow: hidden;
}

.modern-theme .fNavLink {
  color: var(--text-muted) !important;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none !important;
  transition: color .2s;
}

.modern-theme .fNavLink:hover {
  color: var(--primary) !important;
}

/* Forum Navigation Bar */
.modern-theme td[align="right"] {
  padding: 8px 0 12px;
}

/* Forum Tables */
.modern-theme .gTable {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 6px;
}

.modern-theme .gTableTop {
  background: linear-gradient(135deg, var(--primary), var(--secondary)) !important;
  color: #fff !important;
  padding: 10px 14px !important;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .3px;
}

.modern-theme .gTableSubTop {
  background: var(--bg) !important;
  color: var(--text-muted) !important;
  padding: 6px 14px !important;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
}

.modern-theme .gTableBody,
.modern-theme .gTableBody1,
.modern-theme .gTableBottom {
  background: var(--card) !important;
  padding: 8px 14px !important;
  border: none;
  transition: background .15s;
}

.modern-theme .gTable tr:hover .gTableBody,
.modern-theme .gTable tr:hover .gTableBody1,
.modern-theme .gTable tr:hover .gTableBottom,
.modern-theme .gTable tr:hover td {
  background: var(--bg) !important;
}

.modern-theme .gTableLeft {
  background: var(--card) !important;
  font-weight: 700;
  color: var(--text) !important;
}

.modern-theme .gTableRight {
  background: var(--card) !important;
  color: var(--text-muted) !important;
  font-size: 12px;
}

/* Forum & Thread Names */
.modern-theme .forumNameTd,
.modern-theme .threadNametd {
  background: var(--card) !important;
}

.modern-theme a.forumBarA:link,
.modern-theme a.forumBarA:visited,
.modern-theme a.forumBarA:hover {
  color: var(--primary) !important;
  text-decoration: none;
  font-weight: 600;
}

.modern-theme a.threadLink:link,
.modern-theme a.threadLink:visited {
  color: var(--text) !important;
  text-decoration: none;
  font-weight: 600;
}

.modern-theme a.threadLink:hover {
  color: var(--primary) !important;
  text-decoration: underline;
}

.modern-theme a.threadPinnedLink:link,
.modern-theme a.threadPinnedLink:visited {
  color: var(--secondary) !important;
}

.modern-theme .threadDescr,
.modern-theme .thDescr {
  color: var(--text-muted) !important;
  font-size: 11px;
}

/* Forum Last Post */
.modern-theme .forumLastPostTd,
.modern-theme .threadLastPostTd {
  background: var(--card) !important;
  color: var(--text-muted) !important;
  font-size: 11px;
}

/* Thread Type */
.modern-theme .threadsType {
  background: var(--primary) !important;
  color: #fff !important;
  padding: 6px 14px !important;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

/* Forum Icons */
.modern-theme .forumIcoTd,
.modern-theme .threadIcoTd {
  background: var(--card) !important;
  width: 32px;
  text-align: center;
}

/* Thread Stats */
.modern-theme .threadPostTd,
.modern-theme .threadViewTd,
.modern-theme .forumPostTd,
.modern-theme .forumThreadTd {
  background: var(--card) !important;
  font-size: 12px;
  color: var(--text-muted) !important;
  text-align: center;
}

/* Thread Author */
.modern-theme .threadAuthor,
.modern-theme .lastPostUser,
.modern-theme .threadAuthTd {
  background: var(--card) !important;
  font-size: 11px;
}

/* Forum Moder */
.modern-theme .forumModer {
  color: var(--primary) !important;
  font-size: 11px;
}

/* Hover rows */
.modern-theme .gTable tr:hover td {
  background: var(--bg) !important;
}

/* =========================================
   FORUM POSTS VIEW
   ========================================= */

.modern-theme .postFirst {
  background: var(--card) !important;
  border-bottom: 2px solid var(--border) !important;
  border-radius: var(--radius) var(--radius) 0 0;
}

.modern-theme .postRest1,
.modern-theme .postRest2 {
  background: var(--card) !important;
}

.modern-theme .postSeparator {
  height: 3px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 2px;
}

.modern-theme .postTdTop {
  background: linear-gradient(135deg, var(--primary), var(--secondary)) !important;
  color: #fff;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 600;
}

.modern-theme .postBottom {
  background: var(--bg) !important;
  padding: 6px 12px;
  font-size: 11px;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

.modern-theme .postUser {
  color: var(--text);
  font-weight: 700;
  font-size: 13px;
}

.modern-theme .postTdInfo {
  text-align: center;
  padding: 12px 8px;
  background: var(--bg) !important;
  border-right: 1px solid var(--border);
  min-width: 140px;
}

.modern-theme .postRankName {
  font-size: 11px;
  color: var(--primary);
  font-weight: 600;
  margin-top: 6px;
}

.modern-theme .postRankIco img {
  border-radius: 50%;
}

.modern-theme .reputation {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
}

.modern-theme .posttdMessage {
  padding: 14px !important;
  background: var(--card) !important;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text);
}

.modern-theme .signatureView {
  font-size: 11px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  margin-top: 14px;
  padding-top: 10px;
}

.modern-theme .signatureHr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 14px 0 8px;
}

.modern-theme .edited {
  font-size: 11px;
  color: var(--text-muted);
  text-align: right;
}

/* Status */
.modern-theme .is_stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 20px;
  background: var(--bg);
  color: var(--text-muted);
}

.modern-theme .statusOnline,
.modern-theme .statusOffline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.modern-theme .statusOnline::before,
.modern-theme .statusOffline::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.modern-theme .statusOnline {
  color: #27ae60 !important;
}

.modern-theme .statusOnline::before {
  background: #27ae60;
  box-shadow: 0 0 6px rgba(39,174,96,.4);
}

.modern-theme .statusOffline {
  color: var(--text-muted) !important;
}

.modern-theme .statusOffline::before {
  background: #bdc3c7;
}

/* =========================================
   FORUM POLL
   ========================================= */

.modern-theme .postPoll {
  background: var(--bg) !important;
  border-radius: var(--radius);
  padding: 14px;
  text-align: center;
}

.modern-theme .pollQuestion {
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}

.modern-theme .pollSubmitBut,
.modern-theme .pollreSultsBut {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  border: none;
  padding: 8px 20px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
}

.modern-theme .pollSubmitBut:hover,
.modern-theme .pollreSultsBut:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102,126,234,.3);
}

/* =========================================
   FORUM FAST ADD
   ========================================= */

.modern-theme .newThreadBlock,
.modern-theme .newPollBlock {
  background: var(--card) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius);
}

/* =========================================
   FORUM PAGE SWITCHES
   ========================================= */

.modern-theme .switches {
  background: transparent !important;
  padding: 8px 0;
}

.modern-theme .switchActive {
  background: linear-gradient(135deg, var(--primary), var(--secondary)) !important;
  color: #fff !important;
  border-radius: 6px;
  font-weight: 700;
}

.modern-theme a.switchDigit:link,
.modern-theme a.switchBack:link,
.modern-theme a.switchNext:link {
  color: var(--text-muted) !important;
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all .2s;
}

.modern-theme a.switchDigit:hover,
.modern-theme a.switchBack:hover,
.modern-theme a.switchNext:hover {
  color: var(--primary) !important;
  background: var(--bg);
}

/* =========================================
   FORUM ONLINE BAR
   ========================================= */

.modern-theme .forumOnlineBar {
  background: var(--bg) !important;
  color: var(--text-muted) !important;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
}

/* =========================================
   FORUM CODE & QUOTE
   ========================================= */

.modern-theme .codeMessage {
  background: var(--bg) !important;
  border: 1px solid var(--border) !important;
  border-left: 4px solid var(--primary) !important;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 12px;
  padding: 10px;
  color: var(--text);
}

.modern-theme .quoteMessage {
  background: var(--bg) !important;
  border: 1px solid var(--border) !important;
  border-left: 4px solid var(--secondary) !important;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 12px;
  padding: 10px;
  color: var(--text);
}

.modern-theme .bbQuoteName,
.modern-theme .bbCodeName {
  background: var(--card) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  color: var(--text-muted) !important;
  font-size: 11px;
  padding: 4px 8px;
}

/* =========================================
   FORUM CATEGORY PAGES
   ========================================= */

.modern-theme a.catLink:link,
.modern-theme a.catLink:visited,
.modern-theme a.catLink:hover,
.modern-theme a.catLink:active {
  color: #fff !important;
}

/* =========================================
   FORUM ERROR & ARCHIVE
   ========================================= */

.modern-theme .gTableError {
  background: var(--card) !important;
  color: #e74c3c !important;
}

.modern-theme .archivedForum {
  color: #e74c3c !important;
  font-size: 11px;
}

/* =========================================
   FORUM INPUTS
   ========================================= */

.modern-theme INPUT[type="text"],
.modern-theme INPUT[type="password"],
.modern-theme TEXTAREA,
.modern-theme SELECT {
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}

.modern-theme INPUT[type="text"]:focus,
.modern-theme INPUT[type="password"]:focus,
.modern-theme TEXTAREA:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(102,126,234,.15);
}

.modern-theme FORM {
  font-family: inherit;
  font-size: 13px;
}

/* =========================================
   FORUM THREAD BLOCK
   ========================================= */

.modern-theme .threadFrmBlock {
  font-size: 11px;
}

.modern-theme .postpSwithces {
  font-size: 11px;
}

.modern-theme .postpSwithces a {
  color: var(--primary);
  text-decoration: none;
}

.modern-theme .postpSwithces a:hover {
  text-decoration: underline;
}

/* =========================================
   FORUM MEMBERS LIST
   ========================================= */

.modern-theme .forumNamesBar {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}

.modern-theme .forumBarKw {
  font-size: 11px;
  color: var(--text-muted);
}

/* =========================================
   FORUM SIDEBAR
   ========================================= */

.modern-theme #sideBar {
  width: 258px;
}

.modern-theme .infPage {
  background: linear-gradient(135deg, var(--primary), var(--secondary)) !important;
  color: #fff !important;
  border: none !important;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  padding: 10px 14px !important;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .3px;
}

.modern-theme .infPage b {
  color: #fff;
}

.modern-theme .infTable {
  background: var(--card);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  box-shadow: var(--shadow-sm);
  margin-bottom: 12px;
  overflow: hidden;
  padding: 8px;
  width: 100% !important;
}

.modern-theme .infTable td {
  padding: 6px 4px;
  font-size: 11px;
  border-bottom: 1px solid var(--border);
  text-align: center;
  vertical-align: top;
}

.modern-theme .infTable tr:last-child td {
  border-bottom: none;
}

/* Avatars in infomers */
.modern-theme .infTable img {
  border-radius: 50%;
  max-width: 50px;
  max-height: 50px;
  box-shadow: 0 2px 6px rgba(0,0,0,.1);
  transition: transform .2s;
}

.modern-theme .infTable img:hover {
  transform: scale(1.08);
}

/* Letter avatar fallback in infomers */
.modern-theme .infTable .avaLetter,
.modern-theme .infTable .infLetter,
.modern-theme .infTable span[style*="background"] {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 2px 6px rgba(0,0,0,.1);
}

/* Usernames under avatars */
.modern-theme .infTable a {
  color: var(--primary) !important;
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
  display: block;
  padding: 4px 2px 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.modern-theme .infTable a:hover {
  text-decoration: underline;
}

/* Rating text */
.modern-theme .infTable .infoPageValue,
.modern-theme .infTable td div {
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 2px;
}

/* Ensure rating numbers don't get cut off */
.modern-theme .infTable td[align="center"],
.modern-theme .infTable td[align="right"] {
  overflow: visible;
  white-space: normal;
  word-break: break-word;
}

/* Info page value (rating numbers) */
.modern-theme .infoPageValue {
  color: var(--text-muted);
  font-size: 10px;
  float: none;
}

/* Online users infomer specific */
.modern-theme .infTable td a[href*="/index/8-0-"] {
  max-width: 60px;
  display: inline-block;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

/* Forum link bar between header and content */
.modern-theme .forumContent > span {
  background: var(--card);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  display: inline-block;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}

.modern-theme .forumContent > span > a {
  color: var(--primary) !important;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background .2s;
}

.modern-theme .forumContent > span > a:hover {
  background: var(--bg);
}

.modern-theme .forumContent > span > b {
  color: var(--text);
}

/* =========================================
   FORUM POST VIEW (вид материалов)
   ========================================= */

.modern-theme .postTable {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 12px;
}

.modern-theme .postTable td {
  border: none;
}

/* Top bar — username + date */
.modern-theme .postTdTop {
  background: linear-gradient(135deg, var(--primary), var(--secondary)) !important;
  color: #fff !important;
  padding: 10px 14px !important;
  font-size: 12px;
}

.modern-theme .postTdTop a.postUser {
  color: #fff !important;
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
}

.modern-theme .postTdTop a.postUser:hover {
  text-decoration: underline;
}

.modern-theme .postTdTop b {
  color: #fff;
}

/* Left info panel — avatar, rating, awards */
.modern-theme .postTdInfo {
  background: var(--bg) !important;
  text-align: center;
  padding: 14px 10px !important;
  border-right: 1px solid var(--border) !important;
  width: 140px;
  min-width: 120px;
  vertical-align: top;
}

.modern-theme .postTdInfo img {
  border-radius: 50%;
  max-width: 90px;
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
  margin-bottom: 8px;
}

.modern-theme .reputation {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
  line-height: 1.4;
}

.modern-theme .reputation a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.modern-theme .reputation a:hover {
  text-decoration: underline;
}

.modern-theme .repNums b {
  color: var(--text);
  font-size: 13px;
}

.modern-theme .repHistory {
  color: var(--primary);
}

/* Message content */
.modern-theme .posttdMessage {
  background: var(--card) !important;
  padding: 14px !important;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text);
  vertical-align: top;
}

.modern-theme .posttdMessage .eAttach {
  margin-top: 12px;
  padding: 10px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
}

.modern-theme .posttdMessage .eAttach a {
  color: var(--primary);
  text-decoration: none;
}

.modern-theme .posttdMessage .eAttach a:hover {
  text-decoration: underline;
}

/* Bottom bar — gender, icons */
.modern-theme .postBottom {
  background: var(--bg) !important;
  padding: 8px 14px !important;
  font-size: 11px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

.modern-theme .postBottom b {
  color: var(--text);
}

.modern-theme .postBottom img {
  opacity: .6;
  transition: opacity .2s;
}

.modern-theme .postBottom img:hover {
  opacity: 1;
}

/* Edited notice */
.modern-theme .edited {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 10px;
}

/* Thank post button */
.modern-theme img[onclick*="thankPost"] {
  border-radius: 4px;
  transition: transform .2s;
}

.modern-theme img[onclick*="thankPost"]:hover {
  transform: scale(1.2);
}

/* Post IP / user info line */
.modern-theme .postip {
  font-size: 11px;
}

/* =========================================
   FORUM COMMENTS IMAGES
   ========================================= */

.modern-theme .imagecom img {
  overflow: hidden;
  padding: 3px;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-sm);
  transition: transform .2s, box-shadow .2s;
  max-width: 100%;
}

.modern-theme .imagecom img:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
}

/* =========================================
   FORUM POST FORM (Форма добавления сообщений)
   ========================================= */

/* Container divs */
.modern-theme .gDivLeft,
.modern-theme .gDivRight {
  background: transparent;
}

.modern-theme .gDivBottomLeft,
.modern-theme .gDivBottomCenter,
.modern-theme .gDivBottomRight {
  display: none;
}

/* Form table */
.modern-theme #frM53,
.modern-theme .gDivLeft .gTable {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
}

/* Form header */
.modern-theme .gTableTop {
  background: linear-gradient(135deg, var(--primary), var(--secondary)) !important;
  padding: 12px 16px !important;
  font-size: 14px;
  font-weight: 700;
}

.modern-theme .gTableTop a[name="post"] {
  color: #fff;
  text-decoration: none;
}

.modern-theme .gTableTop font {
  color: #fff !important;
}

/* Error message */
.modern-theme .gTableError {
  background: #fdf0ef !important;
  color: #e74c3c !important;
  text-align: center;
  padding: 10px 16px !important;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid #f5c6cb;
  border-radius: var(--radius-sm);
  margin: 12px;
}

/* Labels (left column) */
.modern-theme .gTableLeft {
  background: var(--bg) !important;
  padding: 10px 14px !important;
  font-size: 12px;
  font-weight: 600;
  color: var(--text) !important;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  width: 160px;
}

/* Input cells (right column) */
.modern-theme .gTableRight {
  background: var(--card) !important;
  padding: 10px 14px !important;
  font-size: 13px;
  color: var(--text) !important;
  border-bottom: 1px solid var(--border);
}

/* All form inputs */
.modern-theme .gTableRight input[type="text"],
.modern-theme .gTableRight input[type="password"],
.modern-theme .gTableRight textarea,
.modern-theme .gTableRight select {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 13px;
  font-family: inherit;
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: border-color .25s, box-shadow .25s;
}

.modern-theme .gTableRight input[type="text"]:not(#filter_word),
.modern-theme .gTableRight input[type="password"],
.modern-theme .gTableRight textarea {
  width: 100%;
  box-sizing: border-box;
}

.modern-theme .gTableRight input[type="text"]:focus,
.modern-theme .gTableRight input[type="password"]:focus,
.modern-theme .gTableRight textarea:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(102,126,234,.15);
}

/* Textarea for message */
.modern-theme .gTableRight textarea {
  min-height: 180px;
  resize: vertical;
  line-height: 1.6;
}

/* Labels for checkboxes */
.modern-theme .gTableRight label {
  font-size: 12px;
  color: var(--text-muted);
  margin-left: 4px;
  cursor: pointer;
}

.modern-theme .gTableRight label:hover {
  color: var(--text);
}

/* Poll help text */
.modern-theme .pollHelp {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.4;
}

.modern-theme .pollHelp b {
  color: var(--primary);
}

/* BBCode toolbar */
.modern-theme .codeButtons {
  background: var(--bg) !important;
  border: 1px solid var(--border) !important;
  border-radius: 6px !important;
  padding: 5px 10px !important;
  font-size: 11px !important;
  font-weight: 600;
  color: var(--text-muted) !important;
  cursor: pointer;
  transition: all .2s;
  width: auto !important;
  height: auto !important;
}

.modern-theme .codeButtons:hover {
  background: var(--primary) !important;
  color: #fff !important;
  border-color: var(--primary) !important;
}

/* Smiles section */
.modern-theme .smilesPart {
  margin-top: 6px;
  padding: 8px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.modern-theme .smilesPart img {
  cursor: pointer;
  padding: 3px;
  border-radius: 4px;
  transition: background .15s, transform .15s;
}

.modern-theme .smilesPart img:hover {
  background: var(--primary);
  transform: scale(1.15);
}

/* BBCode panel wrapper */
.modern-theme .my_bb {
  margin-bottom: 8px;
  padding: 6px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

/* Message options row */
.modern-theme #frM14 .gTableRight {
  line-height: 2;
}

/* Moderator options row */
.modern-theme #frM6 .gTableRight {
  line-height: 2;
}

/* File upload */
.modern-theme .gTableRight input[type="file"] {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  background: var(--bg);
  color: var(--text);
  width: 100%;
  box-sizing: border-box;
  cursor: pointer;
}

.modern-theme .gTableRight input[type="file"]:hover {
  border-color: var(--primary);
}

/* Captcha */
.modern-theme .gTableRight img[src*="captcha"],
.modern-theme .gTableRight img[src*="ncode"] {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

/* Submit buttons row */
.modern-theme #frM59 .gTableRight {
  background: var(--bg) !important;
  padding: 14px !important;
  text-align: center;
  border-bottom: none;
}

/* Preview button */
.modern-theme .postPreview,
.modern-theme #frF15 {
  background: var(--card) !important;
  border: 1px solid var(--border) !important;
  border-radius: 8px !important;
  padding: 8px 20px !important;
  font-size: 12px !important;
  font-weight: 600;
  color: var(--text) !important;
  cursor: pointer;
  transition: all .2s;
  width: auto !important;
  height: auto !important;
}

.modern-theme .postPreview:hover,
.modern-theme #frF15:hover {
  border-color: var(--primary) !important;
  color: var(--primary) !important;
}

/* Submit button */
.modern-theme .postSubmit,
.modern-theme #frF16 {
  background: linear-gradient(135deg, var(--primary), var(--secondary)) !important;
  border: none !important;
  border-radius: 8px !important;
  padding: 10px 28px !important;
  font-size: 13px !important;
  font-weight: 700;
  color: #fff !important;
  cursor: pointer;
  transition: all .2s;
  box-shadow: 0 2px 8px rgba(102,126,234,.25);
  width: auto !important;
  height: auto !important;
}

.modern-theme .postSubmit:hover,
.modern-theme #frF16:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(102,126,234,.35);
}

/* User name row */
.modern-theme #frM3 .gTableRight {
  font-weight: 600;
  color: var(--primary) !important;
}

/* Thread name / description rows */
.modern-theme #frM25 .gTableRight,
.modern-theme #frM28 .gTableRight {
  font-size: 13px;
}

/* Result div */
.modern-theme #result {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Last row no border */
.modern-theme #frM59 {
  border-bottom: none;
}

/* =========================================
   FORUM NAVIGATION BAR + FILTER
   ========================================= */

/* Page info + buttons row */
.modern-theme .switches {
  background: transparent !important;
  padding: 10px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

/* "Страница 1 из 1" */
.modern-theme .pagesInfo {
  background: transparent !important;
  font-size: 12px;
  color: var(--text-muted);
  padding: 0;
}

/* Page number links */
.modern-theme .switchActive {
  background: var(--primary) !important;
  color: #fff !important;
  border-radius: 6px;
  font-weight: 700;
  padding: 4px 10px;
}

.modern-theme a.switchDigit,
.modern-theme a.switchBack,
.modern-theme a.switchNext {
  color: var(--text-muted) !important;
  text-decoration: none;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  transition: all .2s;
}

.modern-theme a.switchDigit:hover,
.modern-theme a.switchBack:hover,
.modern-theme a.switchNext:hover {
  color: var(--primary) !important;
  background: var(--bg);
}

/* "Н. ТЕМА" / "ОПРОС" buttons */
.modern-theme .switch a:link,
.modern-theme .switch a:visited {
  background: var(--card) !important;
  color: var(--text) !important;
  border: 1px solid var(--border) !important;
  padding: 6px 14px !important;
  font-size: 11px !important;
  font-weight: 700;
  border-radius: 8px;
  text-decoration: none !important;
  transition: all .2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.modern-theme .switch a:hover {
  background: var(--primary) !important;
  color: #fff !important;
  border-color: var(--primary) !important;
}

.modern-theme .switch b {
  background: var(--primary) !important;
  color: #fff !important;
  border: none !important;
  padding: 6px 14px !important;
  font-size: 11px !important;
  border-radius: 8px;
}

/* Forum category navigation */
.modern-theme .catPages4 {
  background: var(--card) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-sm) !important;
  padding: 6px 12px !important;
  font-size: 12px;
  text-decoration: none !important;
  transition: all .2s;
}

.modern-theme .catPages4:hover {
  background: var(--bg) !important;
  color: var(--primary) !important;
  border-color: var(--primary) !important;
}

/* =========================================
   FORUM FILTER
   ========================================= */

.modern-theme #forum_filter {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin: 8px 0;
  flex-wrap: wrap;
}

.modern-theme #filter_by {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.modern-theme #forum_filter form {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  font-size: inherit;
  width: auto;
  white-space: nowrap;
}

.modern-theme #forum_filter select,
.modern-theme #forum_filter_select {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  font-family: inherit;
  background: var(--bg);
  color: var(--text);
  outline: none;
  cursor: pointer;
  width: auto !important;
  min-width: 130px;
  max-width: 180px;
  flex-shrink: 0;
}

.modern-theme #forum_filter select:focus,
.modern-theme #forum_filter_select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(102,126,234,.15);
}

.modern-theme #forum_filter input[type="text"],
.modern-theme #filter_word {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  font-family: inherit;
  background: var(--bg);
  color: var(--text);
  outline: none;
  width: 160px !important;
  max-width: 160px;
  flex-shrink: 0;
  transition: border-color .25s, box-shadow .25s;
}

.modern-theme #forum_filter input[type="text"]:focus,
.modern-theme #filter_word:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(102,126,234,.15);
}

.modern-theme #forum_filter input[type="submit"],
.modern-theme #forum_filter input[value="Ok"] {
  background: var(--primary) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 8px !important;
  padding: 6px 14px !important;
  font-size: 12px !important;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  width: auto !important;
  flex-shrink: 0;
}

.modern-theme #forum_filter input[type="submit"]:hover,
.modern-theme #forum_filter input[value="Ok"]:hover {
  background: var(--secondary) !important;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(102,126,234,.25);
}

/* Breadcrumb */
.modern-theme .forumContent > a,
.modern-theme .forumContent > b > a {
  color: var(--primary);
  text-decoration: none;
  font-size: 12px;
}

.modern-theme .forumContent > a:hover,
.modern-theme .forumContent > b > a:hover {
  text-decoration: underline;
}

/* =========================================
   PHOTO MODULE — Modern Theme
   ========================================= */

/* Page name sidebar */
.modern-theme .page_name2 {
  background: linear-gradient(135deg, var(--primary), var(--secondary)) !important;
  border: none !important;
  border-radius: var(--radius) !important;
  padding: 14px !important;
  font-weight: 700;
  font-size: 14px;
  color: #fff !important;
  width: auto !important;
  margin-bottom: 8px;
}

/* Add photo button */
.modern-theme .button_blue.button_wide {
  background: none !important;
  border: none !important;
  padding: 0 !important;
  margin-bottom: 8px;
}

.modern-theme .button_blue.button_wide button,
.modern-theme .button_blue.button_wide input,
.modern-theme .button_blue.button_wide a {
  width: 100%;
  display: block;
  padding: 9px 14px;
  background: var(--card) !important;
  color: var(--primary) !important;
  border: 2px dashed var(--border) !important;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: all .2s;
}

.modern-theme .button_blue.button_wide button:hover,
.modern-theme .button_blue.button_wide input:hover,
.modern-theme .button_blue.button_wide a:hover {
  border-color: var(--primary) !important;
  background: var(--bg) !important;
  color: var(--primary) !important;
}

/* Categories table */
.modern-theme .catsTable_yavdruzyah {
  background: var(--card);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-top: 8px;
}

.modern-theme .catsTable_yavdruzyah a {
  display: block;
  padding: 8px 14px;
  font-size: 12px;
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: all .2s;
}

.modern-theme .catsTable_yavdruzyah a:last-child {
  border-bottom: none;
}

/* Active category */
.modern-theme .catsTable_yavdruzyah a.catNameActive,
.modern-theme .catsTable_yavdruzyah a.catNameActive:hover {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff !important;
  font-weight: 700;
}

/* Inactive category */
.modern-theme .catsTable_yavdruzyah a.catName,
.modern-theme .catsTable_yavdruzyah a:not(.catNameActive) {
  color: var(--text) !important;
}

.modern-theme .catsTable_yavdruzyah a:not(.catNameActive):hover {
  background: var(--bg);
  color: var(--primary) !important;
}

/* Photo header — force override */
.modern-theme div.page_header,
.modern-theme td.right div.page_header,
.modern-theme .right div.page_header {
  background: linear-gradient(135deg, var(--primary), var(--secondary)) !important;
  color: #fff !important;
  padding: 16px 20px !important;
  border-radius: var(--radius) !important;
  font-size: 20px !important;
  font-weight: 700 !important;
  margin-bottom: 12px !important;
  display: block !important;
  box-shadow: var(--shadow-sm) !important;
  background-color: transparent !important;
  border: none !important;
}

/* Stats line "Фотографий: X | Альбомов: Y" */
.modern-theme .right table,
.modern-theme .right > table {
  background: var(--card);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  box-shadow: var(--shadow-sm);
}

.modern-theme .right table td {
  font-size: 12px;
  color: var(--text-muted);
  padding: 4px 0;
}

.modern-theme .right table td b {
  color: var(--text);
}

/* Photo gallery items (if grid) */
.modern-theme .photoItem,
.modern-theme .ePhotoItem {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .2s, box-shadow .2s;
}

.modern-theme .photoItem:hover,
.modern-theme .ePhotoItem:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
}

.modern-theme .photoItem img,
.modern-theme .ePhotoItem img {
  border-radius: var(--radius);
  transition: transform .3s;
}

.modern-theme .photoItem:hover img,
.modern-theme .ePhotoItem:hover img {
  transform: scale(1.03);
}

/* Photo description / title */
.modern-theme .photoName,
.modern-theme .ePhotoName {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  padding: 8px;
  text-align: center;
}

/* Photo meta (author, date, views) */
.modern-theme .photoMeta,
.modern-theme .ePhotoMeta {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  padding: 0 8px 8px;
}

/* Slideshow button */
.modern-theme #slideshow_button,
.modern-theme a[href*="slideshow"] {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 18px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  transition: all .2s;
}

.modern-theme #slideshow_button:hover,
.modern-theme a[href*="slideshow"]:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--bg);
}

/* HR separator */
.modern-theme .right > hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 16px 0;
}

/* =========================================
   PHOTO VIEW (вид фотографий)
   ========================================= */

/* Photo card container */
.modern-theme #photo {
  display: block !important;
}

.modern-theme #photo > a > div,
.modern-theme #photo > a {
  display: inline-block;
  margin: 4px;
  text-decoration: none;
}

/* Photo table */
.modern-theme #photo table {
  border-collapse: separate;
  border-spacing: 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .2s, box-shadow .2s;
  background: var(--card);
}

.modern-theme #photo table:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
}

/* Photo cell */
.modern-theme #photo td[style*="text-align: center"] {
  padding: 6px !important;
  background: var(--card);
  border-radius: var(--radius);
}

/* Photo image — override inline styles */
.modern-theme #photo img {
  border: 2px solid var(--border) !important;
  border-radius: var(--radius-sm) !important;
  padding: 4px !important;
  max-width: 130px !important;
  background: var(--bg) !important;
  transition: border-color .2s, transform .2s !important;
}

.modern-theme #photo a:hover img,
.modern-theme #photo td:hover img {
  border-color: var(--primary) !important;
  transform: scale(1.05);
}

/* Colorbox popup content (#inline_example1) */
.modern-theme #inline_example1 {
  background: var(--card) !important;
  border-radius: var(--radius);
  padding: 16px !important;
  font-size: 13px;
  color: var(--text);
  line-height: 1.7;
}

/* Photo in popup */
.modern-theme #inline_example1 center img {
  border: 2px solid var(--border) !important;
  border-radius: var(--radius) !important;
  padding: 6px !important;
  max-width: 100% !important;
  background: var(--bg) !important;
  box-shadow: var(--shadow-sm);
}

/* Photo details in popup */
.modern-theme #inline_example1 b {
  color: var(--text);
}

.modern-theme #inline_example1 font[color="blue"] {
  color: var(--primary) !important;
}

/* "Перейти к странице" link in popup */
.modern-theme #inline_example1 u a,
.modern-theme #inline_example1 div[align="right"] a {
  color: var(--primary) !important;
  text-decoration: none !important;
  font-size: 12px;
  font-weight: 600;
}

.modern-theme #inline_example1 u a:hover,
.modern-theme #inline_example1 div[align="right"] a:hover {
  text-decoration: underline;
}

/* Share image button (groupa) */
.modern-theme #groupa img {
  border: 2px solid var(--border) !important;
  border-radius: var(--radius-sm) !important;
  padding: 4px !important;
  max-width: 50px !important;
  background: var(--bg) !important;
  cursor: pointer;
  transition: border-color .2s;
}

.modern-theme #groupa img:hover {
  border-color: var(--primary) !important;
}

/* Colorbox overlay fix */
.modern-theme #colorbox,
.modern-theme #cboxOverlay {
  border-radius: var(--radius);
}

/* Photo grid layout */
.modern-theme #photo > a {
  vertical-align: top;
}

/* Hide colorbox duplicate — keep only direct link */
.modern-theme #photo > a.example8 {
  display: none !important;
}

/* =========================================
   SHOP
   ========================================= */
.modern-theme .shop-wrap {
  font-family: inherit;
}

.modern-theme .shop-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  border-radius: var(--radius) var(--radius) 0 0;
}

.modern-theme .shop-title {
  font-size: 16px;
  font-weight: 700;
}

.modern-theme .shop-balance {
  background: rgba(255,255,255,.2);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}

.modern-theme .shop-top-tabs {
  display: flex;
  background: var(--card);
  border-bottom: 2px solid var(--border);
}

.modern-theme .shop-top-tab {
  flex: 1;
  text-align: center;
  padding: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all .2s;
}

.modern-theme .shop-top-tab.active {
  color: var(--primary);
  border-bottom: 2px solid var(--primary);
  margin-bottom: -2px;
}

.modern-theme .shop-top-tab:hover {
  color: var(--primary);
  background: var(--bg);
}

.modern-theme .shop-tabs {
  display: flex;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.modern-theme .shop-tab {
  flex: 1;
  text-align: center;
  padding: 8px 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all .2s;
  border-bottom: 2px solid transparent;
}

.modern-theme .shop-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: var(--card);
}

.modern-theme .shop-tab:hover {
  color: var(--primary);
}

.modern-theme .shop-panel {
  display: none;
  padding: 8px;
  max-height: 400px;
  overflow-y: auto;
}

.modern-theme .shop-panel.active {
  display: block;
}

.modern-theme .shop-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--card);
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
  transition: all .2s;
  border: 1px solid var(--border);
}

.modern-theme .shop-item:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(102,126,234,.1);
}

.modern-theme .shop-item.owned {
  opacity: .6;
  border-color: transparent;
}

.modern-theme .shop-item-icon {
  font-size: 28px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.modern-theme .shop-item-info {
  flex: 1;
  min-width: 0;
}

.modern-theme .shop-item-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.modern-theme .shop-item-desc {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.modern-theme .shop-item-right {
  text-align: right;
  flex-shrink: 0;
}

.modern-theme .shop-item-price {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
}

.modern-theme .shop-item-owned {
  font-size: 12px;
  color: #27ae60;
  font-weight: 600;
}

.modern-theme .shop-item.expired .shop-item-owned {
  color: #e74c3c;
}

.modern-theme .shop-item-btn {
  margin-top: 4px;
  padding: 4px 14px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  border: none;
  border-radius: 16px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  font-family: inherit;
}

.modern-theme .shop-item-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(102,126,234,.3);
}

.modern-theme .shop-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 13px;
}

/* Shop confirm / alert / gift form */
.modern-theme .shop-confirm,
.modern-theme .shop-alert,
.modern-theme .shop-gift-form {
  padding: 16px;
}

.modern-theme .shop-confirm-text,
.modern-theme .shop-alert-text {
  font-size: 13px;
  color: var(--text);
  text-align: center;
  margin-bottom: 16px;
  line-height: 1.5;
}

.modern-theme .shop-confirm-actions,
.modern-theme .shop-alert-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.modern-theme .shop-gift-icon {
  font-size: 40px;
  text-align: center;
  margin-bottom: 8px;
}

.modern-theme .shop-gift-name {
  text-align: center;
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 16px;
}

.modern-theme .shop-gift-field {
  margin-bottom: 12px;
}

.modern-theme .shop-gift-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.modern-theme .shop-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color .2s;
  background: var(--bg);
  color: var(--text);
  box-sizing: border-box;
}

.modern-theme .shop-input:focus {
  border-color: var(--primary);
}

.modern-theme .shop-gift-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 16px;
}

.modern-theme .shop-btn {
  padding: 8px 20px;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all .2s;
}

.modern-theme .shop-btn-cancel {
  background: var(--bg);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.modern-theme .shop-btn-cancel:hover {
  background: var(--border);
}

.modern-theme .shop-btn-buy {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
}

.modern-theme .shop-btn-buy:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(102,126,234,.3);
}
