/* =====================================================
   GAMELANDMC — Shared Stylesheet
   Base: shared chrome (navbar, side dock, dropdown, modal,
   toast, panels, buttons, forms) — one definition, reused
   by every page, so sizing/spacing is identical site-wide.
   Each page below only adds what is unique to it.
   ===================================================== */


/* ---------- Shared chrome + Home page (index.html) ---------- */

:root {
  --bg: #0a0b0e;
  --panel: rgba(255, 255, 255, 0.035);
  --panel-hover: rgba(255, 255, 255, 0.055);
  --glass: var(--panel);
  --glass-hover: var(--panel-hover);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.2);
  --text-main: #f1f0ec;
  --text: var(--text-main);
  --text-muted: #8b8e98;
  --muted: var(--text-muted);
  --accent: #d6a756;
  --accent-dim: #a8813e;
  --accent-soft: rgba(214, 167, 86, 0.14);
  --accent-cyan: var(--accent);
  --accent-purple: var(--accent);
  --accent-pink: var(--accent);
  --accent-gold: var(--accent);
  --success: #4e9f6e;
  --error: #c24b43;
  --danger: var(--error);
  --warn: var(--accent);
  --iti-hover-color: rgba(214, 167, 86, 0.18);
  --iti-border-color: rgba(255, 255, 255, 0.15);
  --iti-country-selector-bg: rgba(14, 14, 22, 0.98);
  --iti-icon-color: #8b8e98;
  --iti-spacer-horizontal: 12px;
  --iti-flag-width: 22px;
}

    html {
      scroll-behavior: smooth;
      direction: ltr;
    }

    ::-webkit-scrollbar {
      width: 9px;
    }

    ::-webkit-scrollbar-track {
      background: transparent;
    }

    ::-webkit-scrollbar-thumb {
      background: rgba(255, 255, 255, 0.16);
      border-radius: 100px;
      border: 2px solid var(--bg);
      background-clip: padding-box;
      transition: background 0.3s ease;
    }

    ::-webkit-scrollbar-thumb:hover {
      background: rgba(214, 167, 86, 0.45);
      background-clip: padding-box;
    }

    * {
      scrollbar-width: thin;
      scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
    }

    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
      font-family: 'Vazirmatn', sans-serif;
      -webkit-tap-highlight-color: transparent;
    }

    h1, h2, h3, h4, h5, h6 {
      font-family: 'Vazirmatn', sans-serif;
    }

    body {
      direction: rtl;
      background-color: var(--bg);
      background-image:
        radial-gradient(ellipse 900px 600px at 15% -10%, rgba(214, 167, 86, 0.06), transparent 60%),
        radial-gradient(ellipse 900px 700px at 85% 15%, rgba(255, 255, 255, 0.03), transparent 55%);
      background-attachment: fixed;
      color: var(--text-main);
      min-height: 100vh;
      display: flex;
      flex-direction: column;
      align-items: center;
      overflow-x: hidden;
      width: 100%;
    }

    img { max-width: 100%; }

    .navbar {
      width: 100%;
      position: fixed;
      top: 0;
      left: 0;
      z-index: 100;
      background: rgba(9, 10, 13, 0.9);
      backdrop-filter: blur(20px);
      -webkit-backdrop-filter: blur(20px);
      border-bottom: 1px solid var(--border);
      padding: 20px 48px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      transition: all 0.3s ease;
      direction: ltr;
      gap: 12px;
    }

    .navbar > * {
      direction: rtl;
    }

    .nav-logo {
      font-size: 22px;
      font-weight: 800;
      letter-spacing: 2.5px;
      color: var(--text-main);
      flex-shrink: 0;
      white-space: nowrap;
    }

    .nav-right {
      display: flex;
      align-items: center;
      gap: 14px;
      min-width: 0;
    }

    .nav-auth {
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .nav-btn {
      font-size: 14px;
      font-weight: 700;
      padding: 10px 22px;
      border-radius: 10px;
      text-decoration: none;
      cursor: pointer;
      transition: all 0.25s ease;
      font-family: 'Vazirmatn', sans-serif;
      border: 1px solid transparent;
      white-space: nowrap;
    }

    .nav-btn-outline {
      color: var(--text-main);
      background: rgba(255, 255, 255, 0.04);
      border-color: var(--border);
    }

    .nav-btn-outline:hover {
      background: rgba(255, 255, 255, 0.09);
      border-color: var(--border-strong);
    }

    .nav-btn-solid {
      color: #14100a;
      background: var(--accent);
      border: none;
    }

    .nav-btn-solid:hover {
      background: #e2b568;
    }

    .nav-user {
      display: none;
      align-items: center;
      gap: 16px;
      position: relative;
      min-width: 0;
    }

    .user-trigger {
      display: flex;
      align-items: center;
      gap: 10px;
      background: rgba(255, 255, 255, 0.04);
      border: 1px solid var(--border);
      padding: 6px 16px 6px 10px;
      border-radius: 100px;
      cursor: pointer;
      transition: all 0.25s ease;
      font-family: 'Vazirmatn', sans-serif;
      color: #fff;
      max-width: 100%;
      min-width: 0;
    }

    .user-trigger:hover {
      background: rgba(255, 255, 255, 0.08);
      border-color: var(--border-strong);
    }

    .user-avatar {
      width: 32px;
      height: 32px;
      border-radius: 50%;
      background: var(--accent);
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 800;
      font-size: 14px;
      color: #14100a;
      flex-shrink: 0;
      overflow: hidden;
    }

    .user-avatar img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      border-radius: 50%;
    }

    .chevron-icon {
      transition: transform 0.3s ease;
      opacity: 0.7;
      flex-shrink: 0;
    }

    .user-trigger.open .chevron-icon {
      transform: rotate(180deg);
    }

    .side-dock {
      position: fixed;
      top: 112px;
      right: 26px;
      z-index: 90;
      display: flex;
      flex-direction: column;
      gap: 10px;
      background: var(--panel);
      border: 1px solid var(--border);
      backdrop-filter: blur(18px);
      -webkit-backdrop-filter: blur(18px);
      padding: 12px 9px;
      border-radius: 18px;
      box-shadow: 0 16px 34px rgba(0, 0, 0, 0.45);
    }

    .side-dock-secondary {
      position: fixed;
      top: 470px;
      right: 26px;
      z-index: 90;
      display: flex;
      flex-direction: column;
      gap: 10px;
      background: var(--panel);
      border: 1px solid var(--border);
      backdrop-filter: blur(18px);
      -webkit-backdrop-filter: blur(18px);
      padding: 12px 9px;
      border-radius: 18px;
      box-shadow: 0 16px 34px rgba(0, 0, 0, 0.45);
    }

    .dock-item-btn {
      appearance: none;
      -webkit-appearance: none;
      padding: 0;
      font-family: inherit;
      outline: none;
    }

    .dock-item {
      width: 44px;
      height: 44px;
      border-radius: 12px;
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--text-muted);
      background: transparent;
      border: 1px solid transparent;
      text-decoration: none;
      transition: all 0.25s ease;
      position: relative;
    }

    .dock-badge {
      position: absolute;
      top: -4px;
      left: -4px;
      min-width: 18px;
      height: 18px;
      padding: 0 5px;
      border-radius: 100px;
      background: var(--error);
      color: #fff;
      font-size: 10px;
      font-weight: 800;
      display: none;
      align-items: center;
      justify-content: center;
      box-shadow: 0 0 0 2px var(--bg);
      z-index: 2;
      line-height: 1;
    }

    @keyframes bellPulse {
      0%, 100% { transform: scale(1) rotate(0); }
      20% { transform: scale(1.22) rotate(-14deg); }
      40% { transform: scale(1.1) rotate(10deg); }
      60% { transform: scale(1.18) rotate(-7deg); }
      80% { transform: scale(1.05) rotate(4deg); }
    }

    .dock-item.bell-pulse { color: var(--accent); }
    .dock-item.bell-pulse svg { animation: bellPulse 0.7s ease; }

    .dock-item:hover {
      color: #fff;
      background: rgba(255, 255, 255, 0.06);
      border-color: var(--border);
    }

    .dock-item.active {
      color: #14100a;
      background: var(--accent);
      border-color: var(--accent);
    }

    .dock-item::after {
      content: attr(data-tip);
      position: absolute;
      right: calc(100% + 12px);
      top: 50%;
      transform: translateY(-50%) translateX(8px);
      background: rgba(12, 13, 17, 0.97);
      border: 1px solid var(--border);
      color: #fff;
      font-size: 12px;
      font-weight: 700;
      padding: 7px 14px;
      border-radius: 8px;
      white-space: nowrap;
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
      transition: all 0.2s ease;
      box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    }

    .dock-item:hover::after {
      opacity: 1;
      visibility: visible;
      transform: translateY(-50%) translateX(0);
    }

    .user-dropdown {
      position: absolute;
      top: calc(100% + 14px);
      right: 0;
      min-width: 230px;
      max-width: calc(100vw - 32px);
      background: rgba(14, 15, 19, 0.99);
      backdrop-filter: blur(22px);
      -webkit-backdrop-filter: blur(22px);
      border: 1px solid var(--border);
      border-radius: 16px;
      box-shadow: 0 25px 55px rgba(0, 0, 0, 0.55);
      padding: 8px;
      display: flex;
      flex-direction: column;
      gap: 2px;
      opacity: 0;
      visibility: hidden;
      transform: translateY(-8px);
      transition: all 0.2s ease;
      z-index: 200;
    }

    .user-dropdown.open {
      opacity: 1;
      visibility: visible;
      transform: translateY(0);
    }

    .dropdown-item {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 12px 14px;
      border-radius: 10px;
      color: #e2e2df;
      text-decoration: none;
      font-size: 14px;
      font-weight: 600;
      background: none;
      border: none;
      width: 100%;
      text-align: right;
      cursor: pointer;
      font-family: 'Vazirmatn', sans-serif;
      transition: all 0.18s ease;
    }

    .dropdown-item svg {
      flex-shrink: 0;
      opacity: 0.7;
    }

    .dropdown-item:hover {
      background: rgba(255, 255, 255, 0.07);
      color: #fff;
    }

    .dropdown-item-danger {
      color: #e5a19c;
    }

    .dropdown-item-danger:hover {
      background: rgba(194, 75, 67, 0.15);
      color: #f0bcb7;
    }

    .dropdown-divider {
      height: 1px;
      background: var(--border);
      margin: 6px 4px;
    }

    .nav-username {
      font-size: 15px;
      font-weight: 700;
      color: #fff;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      max-width: 140px;
    }

    .container {
      width: 100%;
      max-width: 1100px;
      display: flex;
      flex-direction: column;
      gap: 28px;
      padding: 150px clamp(20px, 8vw, 120px) 80px 20px;
      animation: fadeIn 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
      position: relative;
      z-index: 10;
    }

    @keyframes fadeIn {
      from { opacity: 0; transform: translateY(16px); }
      to { opacity: 1; transform: translateY(0); }
    }

    .panel {
      background: var(--panel);
      border: 1px solid var(--border);
      backdrop-filter: blur(18px);
      -webkit-backdrop-filter: blur(18px);
      border-radius: 20px;
      box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
      position: relative;
      overflow: hidden;
    }

    .header-panel {
      padding: 52px 40px;
      display: flex;
      flex-direction: column;
      align-items: center;
      text-align: center;
      gap: 22px;
    }

    .hero-title {
      font-size: 44px;
      font-weight: 800;
      letter-spacing: 3px;
      color: #fff;
      margin-bottom: 2px;
      word-break: break-word;
    }

    .about-text {
      color: #c3c4c9;
      font-size: 16px;
      line-height: 1.9;
      max-width: 650px;
      font-weight: 400;
    }

    .ip-box {
      display: inline-flex;
      align-items: center;
      gap: 20px;
      background: rgba(0, 0, 0, 0.35);
      border: 1px solid var(--border);
      padding: 13px 26px;
      border-radius: 12px;
      margin-top: 12px;
      cursor: pointer;
      transition: all 0.25s ease;
      max-width: 100%;
      flex-wrap: wrap;
      justify-content: center;
    }
    .ip-box:hover {
      background: rgba(0, 0, 0, 0.5);
      border-color: var(--accent-dim);
    }
    .ip-text { font-weight: 700; font-size: 18px; letter-spacing: 0.5px; color: #fff; direction: ltr; }
    .ip-icon {
      color: var(--accent);
      font-size: 13px;
      font-weight: 700;
      background: var(--accent-soft);
      padding: 7px 15px;
      border-radius: 8px;
      transition: all 0.2s ease;
      white-space: nowrap;
    }

    .proxy-panel {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 32px 44px;
      flex-wrap: wrap;
      gap: 24px;
    }
    .proxy-info {
      display: flex;
      align-items: center;
      gap: 22px;
      min-width: 0;
    }

    .pulse-container {
      position: relative;
      width: 16px;
      height: 16px;
      flex-shrink: 0;
    }
    .status-dot {
      width: 100%;
      height: 100%;
      border-radius: 50%;
      background: var(--text-muted);
      position: relative;
      z-index: 2;
    }
    .status-ping {
      position: absolute;
      top: 0; left: 0;
      width: 100%; height: 100%;
      border-radius: 50%;
      background: var(--text-muted);
      opacity: 0.8;
      z-index: 1;
    }

    .status-dot.online { background: var(--success); }
    .status-dot.online + .status-ping { background: var(--success); animation: ping 2s cubic-bezier(0, 0, 0.2, 1) infinite; }
    .status-dot.offline { background: var(--error); }

    @keyframes ping {
      75%, 100% { transform: scale(2.6); opacity: 0; }
    }

    .proxy-title { font-size: 20px; font-weight: 700; color: #fff; }
    .proxy-subtitle { font-size: 13px; color: var(--text-muted); margin-top: 5px; }

    .total-players {
      text-align: left;
      background: rgba(0,0,0,0.3);
      padding: 15px 30px;
      border-radius: 14px;
      border: 1px solid var(--border);
      flex-shrink: 0;
    }
    .total-num {
      font-size: 36px;
      font-weight: 800;
      color: var(--accent);
      line-height: 1;
    }
    .total-label {
      font-size: 13px;
      color: var(--text-muted);
      margin-top: 8px;
      font-weight: 500;
    }

    .gamemodes-section {
      margin-top: 20px;
      display: flex;
      flex-direction: column;
      gap: 22px;
    }

    .section-title {
      font-size: 21px;
      font-weight: 800;
      color: #fff;
      display: flex;
      align-items: center;
      gap: 16px;
      padding: 0 16px;
    }
    .section-title::after {
      content: '';
      flex: 1;
      height: 1px;
      background: var(--border);
    }

.gamemodes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  align-items: stretch;
}

    @keyframes cardFadeInUp {
      from { opacity: 0; transform: translateY(14px); }
      to { opacity: 1; transform: translateY(0); }
    }

    .gm-card {
      background: var(--panel);
      border: 1px solid var(--border);
      border-radius: 18px;
      display: flex;
      flex-direction: column;
      transition: border-color 0.25s ease, transform 0.25s ease, background 0.25s ease;
      position: relative;
      overflow: hidden;
      box-shadow: 0 12px 28px rgba(0,0,0,0.35);
      animation: cardFadeInUp 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
      min-width: 0;
    }

    .gm-card:nth-child(1) { animation-delay: 0.02s; }
    .gm-card:nth-child(2) { animation-delay: 0.06s; }
    .gm-card:nth-child(3) { animation-delay: 0.10s; }
    .gm-card:nth-child(4) { animation-delay: 0.14s; }
    .gm-card:nth-child(5) { animation-delay: 0.18s; }
    .gm-card:nth-child(6) { animation-delay: 0.22s; }
    .gm-card:nth-child(7) { animation-delay: 0.26s; }
    .gm-card:nth-child(8) { animation-delay: 0.30s; }

    .gm-card:hover {
      background: var(--panel-hover);
      border-color: var(--border-strong);
      transform: translateY(-4px);
    }

    .gm-banner {
      width: 100%;
      height: 136px;
      background: rgba(0, 0, 0, 0.4);
      border-bottom: 1px solid var(--border);
      position: relative;
      overflow: hidden;
    }

    .gm-banner img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      transition: transform 0.4s ease;
    }

    .gm-card:hover .gm-banner img {
      transform: scale(1.03);
    }

    .gm-content {
      padding: 22px;
      display: flex;
      flex-direction: column;
      gap: 15px;
      flex: 1;
      position: relative;
      z-index: 2;
      min-width: 0;
    }

    .gm-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 10px;
      flex-wrap: wrap;
    }

    .gm-name {
      font-size: 20px;
      font-weight: 800;
      color: #fff;
      letter-spacing: 0.5px;
    }

    .gm-state {
      font-size: 12px;
      font-weight: 700;
      padding: 6px 13px;
      border-radius: 8px;
      background: rgba(255, 255, 255, 0.08);
      color: var(--text-muted);
      border: 1px solid transparent;
      transition: all 0.25s ease;
      white-space: nowrap;
    }

    .gm-state.online {
      background: rgba(78, 159, 110, 0.16);
      color: var(--success);
      border-color: rgba(78, 159, 110, 0.35);
    }

    .gm-state.offline {
      background: rgba(194, 75, 67, 0.16);
      color: var(--error);
      border-color: rgba(194, 75, 67, 0.35);
    }

    .gm-info-grid {
      display: grid;
      grid-template-columns: 1fr;
      gap: 12px;
      background: rgba(0, 0, 0, 0.2);
      padding: 12px 16px;
      border-radius: 12px;
      border: 1px solid var(--border);
      text-align: center;
    }

    .gm-info-item {
      display: flex;
      flex-direction: column;
      gap: 4px;
    }

    .info-label {
      font-size: 11px;
      color: var(--text-muted);
      font-weight: 500;
    }

    .info-val {
      font-size: 13px;
      color: #fff;
      font-weight: 700;
    }

    .gm-players-detailed {
      display: flex;
      align-items: baseline;
      gap: 8px;
      flex-wrap: wrap;
    }

    .gm-p-num { font-size: 26px; font-weight: 800; color: #fff; }
    .gm-p-sep { font-size: 18px; color: rgba(255,255,255,0.25); font-weight: 300; }
    .gm-p-max { font-size: 17px; color: var(--text-muted); font-weight: 700; }
    .gm-p-label { font-size: 13px; color: var(--text-muted); font-weight: 500; margin-right: 4px; }

    .gm-desc {
      font-size: 13px;
      color: #c3c4c9;
      line-height: 1.7;
      margin-top: auto;
      padding-top: 15px;
      border-top: 1px solid var(--border);
    }

    .about-section { margin-top: 40px; }

    .about-panel {
      padding: 44px 40px;
      text-align: center;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 18px;
    }

    .about-title {
      font-size: 32px;
      font-weight: 800;
      color: #fff;
      margin-bottom: 14px;
    }

    .toast-container {
      position: fixed;
      bottom: 40px;
      right: 30px;
      z-index: 9999;
      display: flex;
      flex-direction: column;
      gap: 12px;
      max-width: calc(100vw - 40px);
    }

    .toast {
      background: rgba(78, 159, 110, 0.14);
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
      border: 1px solid rgba(78, 159, 110, 0.4);
      color: #fff;
      padding: 15px 22px;
      border-radius: 12px;
      font-weight: 600;
      font-size: 14px;
      box-shadow: 0 10px 26px rgba(0, 0, 0, 0.4);
      display: flex;
      align-items: center;
      gap: 12px;
      transform: translateX(150%);
      animation: slideInRight 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.1) forwards;
    }

    .toast.hide {
      animation: slideOutRight 0.35s ease forwards;
    }

    @keyframes slideInRight {
      0% { transform: translateX(150%); opacity: 0; }
      100% { transform: translateX(0); opacity: 1; }
    }

    @keyframes slideOutRight {
      0% { transform: translateX(0); opacity: 1; }
      100% { transform: translateX(150%); opacity: 0; }
    }

    /* ============ RESPONSIVE BREAKPOINTS ============ */
    /* Two separate docks (main nav + quick actions) stay stacked vertically
       on the right at every breakpoint. The container always reserves a
       right-hand gutter at least as wide as the dock so cards never slide
       underneath it. */

    @media (max-width: 1300px) {
      .container { padding-right: 100px; }
    }

    @media (max-width: 1100px) {
      .container { padding-right: 88px; }
      .side-dock { top: 104px; right: 18px; padding: 10px 7px; gap: 9px; }
      .side-dock-secondary { top: 428px; right: 18px; padding: 10px 7px; gap: 9px; }
      .dock-item { width: 40px; height: 40px; }
      .announce-panel { top: 428px; right: 98px; }
    }

    @media (max-width: 900px) {
      .navbar { padding: 15px 18px; }
      .nav-logo { font-size: 19px; }
      .nav-right { gap: 8px; }
      .nav-btn { padding: 8px 15px; font-size: 13px; }
      .nav-username { display: none; }

      .side-dock { top: 88px; right: 12px; padding: 9px 6px; gap: 8px; }
      .side-dock-secondary { top: 384px; right: 12px; padding: 9px 6px; gap: 8px; }
      .dock-item { width: 37px; height: 37px; }
      .dock-item::after { display: none; }
      .announce-panel { top: 384px; right: 84px; }

      .container { padding: 122px 76px 100px 16px; }

      .proxy-panel { flex-direction: column; align-items: flex-start; gap: 22px; padding: 26px; }
      .total-players { align-self: stretch; text-align: center; }
      .hero-title { font-size: 32px; letter-spacing: 1.5px; }
      .header-panel { padding: 38px 24px; }
      .toast-container { bottom: 20px; right: 20px; left: 20px; align-items: stretch; }
      .toast { justify-content: center; transform: translateY(150%); }

      @keyframes slideInRight {
        0% { transform: translateY(150%); opacity: 0; }
        100% { transform: translateY(0); opacity: 1; }
      }
      @keyframes slideOutRight {
        0% { transform: translateY(0); opacity: 1; }
        100% { transform: translateY(150%); opacity: 0; }
      }
    }

    @media (max-width: 560px) {
      .hero-title { font-size: 25px; }
      .about-text { font-size: 14px; line-height: 1.8; }
      .ip-box { padding: 11px 17px; gap: 12px; }
      .ip-text { font-size: 15px; }
      .ip-icon { font-size: 11px; padding: 6px 11px; }
      .about-title { font-size: 25px; }
      .about-panel { padding: 30px 20px; }
      .section-title { font-size: 17px; padding: 0 6px; }
      .gamemodes-grid { grid-template-columns: 1fr; gap: 16px; }
      .gm-content { padding: 17px; }
      .gm-name { font-size: 18px; }
      .proxy-title { font-size: 16px; }
      .total-num { font-size: 29px; }
      .nav-btn { padding: 7px 12px; font-size: 12px; }
      .nav-logo { font-size: 16px; }
      .container { padding: 112px 66px 100px 12px; gap: 20px; }
    }

    @media (max-width: 420px) {
      .nav-btn-outline { display: none; }
      .side-dock { right: 8px; padding: 7px 5px; gap: 6px; }
      .side-dock-secondary { right: 8px; top: 344px; padding: 7px 5px; gap: 6px; }
      .dock-item { width: 33px; height: 33px; }
      .container { padding-right: 54px; }
    }
    /* ---------- Friends system v2 ---------- */

    .modal-overlay {
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.65);
      backdrop-filter: blur(6px);
      -webkit-backdrop-filter: blur(6px);
      z-index: 500;
      display: none;
      align-items: center;
      justify-content: center;
      padding: 20px;
      animation: overlayFadeIn 0.2s ease;
    }

    .modal-overlay.open {
      display: flex;
    }

    @keyframes overlayFadeIn {
      from { opacity: 0; }
      to { opacity: 1; }
    }

    .modal-box {
      background: rgba(15, 16, 21, 0.99);
      border: 1px solid var(--border);
      border-radius: 18px;
      padding: 32px;
      width: 100%;
      max-width: 420px;
      display: flex;
      flex-direction: column;
      gap: 18px;
      box-shadow: 0 30px 65px rgba(0, 0, 0, 0.6);
      animation: modalPopIn 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
      position: relative;
    }

    @keyframes modalPopIn {
      from { opacity: 0; transform: translateY(14px) scale(0.98); }
      to { opacity: 1; transform: translateY(0) scale(1); }
    }


    .friends-modal-box {
      max-width: 560px;
      width: 100%;
      height: 700px;
      max-height: 88vh;
      padding: 0;
      display: flex;
      flex-direction: column;
      overflow: hidden;
      position: relative;
      border: 1px solid var(--border);
    }

    .friends-modal-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 20px 22px;
      background: rgba(255, 255, 255, 0.02);
      border-bottom: 1px solid var(--border);
      flex-shrink: 0;
      gap: 10px;
    }

    .friends-modal-title-group {
      display: flex;
      align-items: center;
      gap: 10px;
      min-width: 0;
    }

    .friends-modal-title-icon {
      width: 32px;
      height: 32px;
      border-radius: 10px;
      background: var(--accent);
      display: flex;
      align-items: center;
      justify-content: center;
      color: #14100a;
      flex-shrink: 0;
    }

    .friends-modal-header-text span {
      display: block;
      font-size: 16px;
      font-weight: 800;
      color: #fff;
    }

    .friends-modal-header-sub {
      font-size: 11px;
      color: var(--text-muted);
      font-weight: 600;
      margin-top: 1px;
    }

    .friends-close-btn {
      width: 34px;
      height: 34px;
      border-radius: 50%;
      border: none;
      background: rgba(255, 255, 255, 0.06);
      color: var(--text-muted);
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      transition: all 0.2s ease;
      flex-shrink: 0;
    }

    .friends-close-btn:hover {
      background: rgba(194, 75, 67, 0.16);
      color: #f0bcb7;
    }

    .friends-tabs {
      display: flex;
      gap: 6px;
      padding: 12px 16px 0 16px;
      flex-shrink: 0;
    }

    .friends-tab {
      flex: 1;
      padding: 11px 8px;
      border-radius: 10px 10px 0 0;
      background: none;
      border: none;
      color: var(--text-muted);
      font-size: 13px;
      font-weight: 700;
      cursor: pointer;
      font-family: 'Vazirmatn', sans-serif;
      transition: all 0.2s ease;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      min-width: 0;
      white-space: nowrap;
    }

    .friends-tab svg {
      opacity: 0.7;
      flex-shrink: 0;
    }

    .friends-tab:hover {
      color: #fff;
      background: rgba(255, 255, 255, 0.03);
    }

    .friends-tab.active {
      color: #fff;
      background: rgba(255, 255, 255, 0.05);
      box-shadow: inset 0 -2px 0 var(--accent);
    }

    .friends-tab.active svg {
      opacity: 1;
    }

    .friends-badge {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 17px;
      height: 17px;
      padding: 0 5px;
      border-radius: 9px;
      background: var(--error);
      color: #fff;
      font-size: 10px;
      font-weight: 800;
    }

    .friends-body {
      flex: 1;
      overflow: hidden;
      position: relative;
    }

    .friends-panel {
      display: none;
      flex-direction: column;
      padding: 16px 18px;
      height: 100%;
      overflow-y: auto;
    }

    .friends-panel.active {
      display: flex;
      animation: friendsPanelFadeIn 0.25s ease;
    }

    @keyframes friendsPanelFadeIn {
      from { opacity: 0; transform: translateY(4px); }
      to { opacity: 1; transform: translateY(0); }
    }

    .friends-online-summary {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 12px;
      font-weight: 700;
      color: var(--text-muted);
      padding: 4px 4px 14px 4px;
      flex-shrink: 0;
    }

    .friends-online-summary .dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: var(--success);
    }

    .friends-subsection-title {
      font-size: 12px;
      font-weight: 800;
      color: var(--text-muted);
      margin-bottom: 10px;
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .friends-empty {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 12px;
      text-align: center;
      color: var(--text-muted);
      font-size: 13px;
      padding: 50px 20px;
      flex: 1;
    }

    .friends-empty svg {
      opacity: 0.3;
    }

    .friends-list {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    .friend-card {
      display: flex;
      align-items: center;
      gap: 13px;
      padding: 11px 13px;
      border-radius: 14px;
      background: rgba(255, 255, 255, 0.02);
      border: 1px solid transparent;
      cursor: pointer;
      transition: all 0.2s ease;
      animation: friendsPanelFadeIn 0.25s ease backwards;
      min-width: 0;
      flex-wrap: wrap;
    }

    .friend-card:hover {
      background: rgba(255, 255, 255, 0.05);
      border-color: var(--border);
    }

    .friend-avatar-wrap {
      position: relative;
      flex-shrink: 0;
    }

    .friend-avatar {
      width: 44px;
      height: 44px;
      border-radius: 50%;
      background: var(--accent);
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 800;
      color: #14100a;
      overflow: hidden;
      font-size: 15px;
    }

    .friend-avatar img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    .friend-online-dot {
      position: absolute;
      bottom: -1px;
      left: -1px;
      width: 12px;
      height: 12px;
      border-radius: 50%;
      background: #5c5f68;
      border: 2px solid #101116;
    }

    .friend-online-dot.online {
      background: var(--success);
    }

    .friend-info {
      flex: 1;
      min-width: 0;
    }

    .friend-name {
      font-size: 14px;
      font-weight: 800;
      color: var(--text-main);
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .friend-sub {
      font-size: 12px;
      color: var(--text-muted);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      margin-top: 1px;
    }

    .friend-unread-badge {
      min-width: 20px;
      height: 20px;
      border-radius: 10px;
      background: var(--accent);
      color: #14100a;
      font-size: 11px;
      font-weight: 900;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 0 6px;
      flex-shrink: 0;
    }

    .friend-actions {
      display: flex;
      gap: 6px;
      flex-shrink: 0;
      flex-wrap: wrap;
      justify-content: flex-end;
    }

    .friend-action-btn {
      padding: 8px 14px;
      border-radius: 9px;
      font-size: 12px;
      font-weight: 700;
      border: 1px solid var(--border);
      background: rgba(255, 255, 255, 0.03);
      color: var(--text-main);
      cursor: pointer;
      font-family: 'Vazirmatn', sans-serif;
      transition: all 0.2s ease;
      white-space: nowrap;
    }

    .friend-action-btn:hover {
      background: rgba(255, 255, 255, 0.1);
    }

    .friend-action-btn.primary {
      background: var(--accent);
      color: #14100a;
      border: none;
    }

    .friend-action-btn.danger {
      background: rgba(194, 75, 67, 0.1);
      border-color: rgba(194, 75, 67, 0.3);
      color: #f0bcb7;
    }

    .friends-search-row {
      margin-bottom: 16px;
      flex-shrink: 0;
      position: relative;
    }

    .friends-search-row svg {
      position: absolute;
      top: 50%;
      right: 16px;
      transform: translateY(-50%);
      color: var(--text-muted);
      pointer-events: none;
    }

    .friends-input {
      width: 100%;
      background: rgba(0, 0, 0, 0.25);
      border: 1px solid var(--border);
      border-radius: 100px;
      padding: 13px 44px 13px 16px;
      color: var(--text-main);
      font-size: 14px;
      font-family: 'Vazirmatn', sans-serif;
      outline: none;
      transition: all 0.25s ease;
    }

    .friends-input:focus {
      border-color: var(--accent-dim);
    }

    .friends-chat-view {
      position: absolute;
      inset: 0;
      background: var(--bg);
      display: none;
      flex-direction: column;
      z-index: 10;
    }

    .friends-chat-view.active {
      display: flex;
      animation: friendsPanelFadeIn 0.22s ease;
    }

    .friends-chat-header {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 15px 18px;
      background: rgba(255, 255, 255, 0.02);
      border-bottom: 1px solid var(--border);
      flex-shrink: 0;
    }

    .friends-chat-back {
      width: 34px;
      height: 34px;
      border-radius: 50%;
      border: none;
      background: rgba(255, 255, 255, 0.06);
      color: var(--text-main);
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      flex-shrink: 0;
      transition: all 0.2s ease;
    }

    .friends-chat-back:hover {
      background: rgba(255, 255, 255, 0.12);
    }

    .friends-chat-avatar {
      width: 40px;
      height: 40px;
      border-radius: 50%;
      background: var(--accent);
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 800;
      color: #14100a;
      overflow: hidden;
      flex-shrink: 0;
    }

    .friends-chat-avatar img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    .friends-chat-info {
      flex: 1;
      min-width: 0;
    }

    .friends-chat-name {
      font-size: 15px;
      font-weight: 800;
      color: #fff;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .friends-chat-status {
      font-size: 11px;
      color: var(--text-muted);
      display: flex;
      align-items: center;
      gap: 5px;
    }

    .friends-chat-status::before {
      content: '';
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background: #5c5f68;
    }

    .friends-chat-status.online {
      color: var(--success);
    }

    .friends-chat-status.online::before {
      background: var(--success);
    }

    .friends-chat-remove {
      width: 34px;
      height: 34px;
      border-radius: 50%;
      border: none;
      background: rgba(194, 75, 67, 0.1);
      color: #f0bcb7;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      transition: all 0.2s ease;
    }

    .friends-chat-remove:hover {
      background: rgba(194, 75, 67, 0.2);
    }

    .friends-chat-messages {
      flex: 1;
      overflow-y: auto;
      padding: 18px;
      display: flex;
      flex-direction: column;
      gap: 4px;
    }

    .chat-bubble-row {
      display: flex;
      margin-top: 8px;
    }

    .chat-bubble-row.mine {
      justify-content: flex-end;
    }

    .chat-bubble-col {
      display: flex;
      flex-direction: column;
      max-width: 75%;
      min-width: 0;
      animation: chatBubbleIn 0.22s ease backwards;
    }

    @keyframes chatBubbleIn {
      from { opacity: 0; transform: translateY(6px); }
      to { opacity: 1; transform: translateY(0); }
    }

    .chat-bubble-row.mine .chat-bubble-col {
      align-items: flex-end;
    }

    .chat-bubble-row:not(.mine) .chat-bubble-col {
      align-items: flex-start;
    }

    .chat-bubble {
      width: fit-content;
      max-width: 100%;
      padding: 10px 15px;
      border-radius: 16px;
      font-size: 13.5px;
      line-height: 1.65;
      word-break: break-word;
    }

    .chat-bubble-row:not(.mine) .chat-bubble {
      background: rgba(255, 255, 255, 0.07);
      color: var(--text-main);
      border-bottom-left-radius: 5px;
    }

    .chat-bubble-row.mine .chat-bubble {
      background: var(--accent);
      color: #14100a;
      border-bottom-right-radius: 5px;
    }

    .chat-meta {
      display: flex;
      align-items: center;
      gap: 4px;
      font-size: 10px;
      color: var(--text-muted);
      margin-top: 4px;
      padding: 0 4px;
    }

    .chat-meta .chat-seen-icon {
      display: inline-flex;
      color: var(--text-muted);
    }

    .chat-meta .chat-seen-icon.seen {
      color: var(--accent);
    }

    .friends-chat-input-row {
      display: flex;
      gap: 10px;
      padding: 14px 16px;
      border-top: 1px solid var(--border);
      flex-shrink: 0;
    }

    .friends-chat-input-row input {
      flex: 1;
      min-width: 0;
      background: rgba(0, 0, 0, 0.25);
      border: 1px solid var(--border);
      border-radius: 100px;
      padding: 12px 18px;
      color: var(--text-main);
      font-size: 13.5px;
      font-family: 'Vazirmatn', sans-serif;
      outline: none;
      transition: all 0.2s ease;
    }

    .friends-chat-input-row input:focus {
      border-color: var(--accent-dim);
    }

    .friends-chat-send {
      width: 40px;
      height: 40px;
      border-radius: 50%;
      border: none;
      background: var(--accent);
      color: #14100a;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      transition: all 0.2s ease;
    }

    .friends-chat-send:hover {
      background: #e2b568;
    }

    .friends-chat-send:disabled {
      opacity: 0.5;
      cursor: not-allowed;
    }


    .friends-status-picker {
      position: relative;
      flex-shrink: 0;
    }
    .friends-status-btn {
      width: 34px;
      height: 34px;
      border-radius: 50%;
      border: none;
      background: rgba(255,255,255,0.06);
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      position: relative;
    }
    .friends-status-btn .status-swatch {
      width: 13px;
      height: 13px;
      border-radius: 50%;
      background: var(--success);
      border: 2px solid rgba(15,16,21,0.99);
    }
    .friends-status-dropdown {
      position: absolute;
      top: calc(100% + 8px);
      left: 0;
      min-width: 170px;
      max-width: calc(100vw - 32px);
      background: rgba(14,15,19,0.99);
      border: 1px solid var(--border);
      border-radius: 12px;
      box-shadow: 0 20px 40px rgba(0,0,0,0.55);
      padding: 6px;
      display: none;
      flex-direction: column;
      gap: 2px;
      z-index: 50;
    }
    .friends-status-dropdown.open { display: flex; }
    .friends-status-option {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 9px 10px;
      border-radius: 8px;
      background: none;
      border: none;
      color: #e2e2df;
      font-size: 13px;
      font-weight: 600;
      cursor: pointer;
      font-family: 'Vazirmatn', sans-serif;
      width: 100%;
      text-align: right;
    }
    .friends-status-option:hover { background: rgba(255,255,255,0.06); }
    .friends-status-option .dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
    .dot-online { background: #4e9f6e; }
    .dot-idle { background: #c8963f; }
    .dot-dnd { background: #c24b43; }
    .dot-invisible { background: #5c5f68; }

    .friend-online-dot.idle, .friends-chat-status.idle::before, .friend-avatar-wrap.idle .friend-avatar { background: #c8963f !important; }
    .friend-online-dot.dnd, .friends-chat-status.dnd::before, .friend-avatar-wrap.dnd .friend-avatar { background: #c24b43 !important; }
    .friend-avatar-wrap.idle .friend-avatar { background: var(--accent); }
    .friend-avatar-wrap.dnd .friend-avatar { background: var(--accent); }
    .friends-chat-status.idle { color: #c8963f; }
    .friends-chat-status.dnd { color: #c24b43; }

    .typing-indicator-row { display: flex; padding: 0 4px; }
    .typing-indicator-bubble {
      background: rgba(255,255,255,0.07);
      border-radius: 16px;
      border-bottom-left-radius: 5px;
      padding: 10px 16px;
      display: flex;
      align-items: center;
      gap: 4px;
    }
    .typing-indicator-bubble span {
      width: 6px; height: 6px; border-radius: 50%;
      background: var(--text-muted);
      animation: typingBounce 1.2s infinite;
    }
    .typing-indicator-bubble span:nth-child(2) { animation-delay: 0.2s; }
    .typing-indicator-bubble span:nth-child(3) { animation-delay: 0.4s; }
    @keyframes typingBounce {
      0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
      30% { transform: translateY(-4px); opacity: 1; }
    }

    @media (max-width: 700px) {
      .modal-overlay { padding: 10px; }
      .modal-box { padding: 22px; border-radius: 16px; }
      .friends-modal-box {
        height: 92vh;
        max-height: 92vh;
        border-radius: 16px;
      }
      .friends-modal-header { padding: 15px 16px; }
      .friends-modal-header-text span { font-size: 15px; }
      .friends-modal-header-sub { font-size: 10px; }
      .friends-tabs { padding: 10px 10px 0 10px; }
      .friends-tab { font-size: 12px; padding: 10px 4px; }
      .friend-card { padding: 10px; gap: 10px; }
      .friend-actions { width: 100%; }
    }

    @media (max-width: 420px) {
      .friends-modal-header-sub { display: none; }
      .friends-tab span, .friends-tab { font-size: 11px; }
    }

    .enamad-box {
      display: flex;
      justify-content: center;
      margin-top: 6px;
    }
    .enamad-box img {
      border-radius: 8px;
    }


/* ==========================================================
   Admin dashboard (admin.html) — page-specific styles
   ========================================================== */

body.page-admin {
  display: block;
  padding: 36px 20px 80px;
}

body.page-admin h1 {
    font-size: 24px;
    font-weight: 900;
    color: var(--text);
    margin-bottom: 24px;
    letter-spacing: -0.5px;
  }

#keyGate {
    max-width: 420px;
    margin: 100px auto 0;
    background: var(--panel);
    border: 1px solid var(--border);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: 24px;
    padding: 38px 28px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    animation: fadeIn 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
  }

#keyGate h1 { margin-bottom: 8px; }

#keyGate input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.35);
    border: 1.5px solid var(--border);
    color: var(--text);
    margin: 20px 0 16px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: all 0.25s ease;
    text-align: center;
    direction: ltr;
  }

#keyGate input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-soft);
    background: rgba(0, 0, 0, 0.55);
  }

#keyGate button {
    width: 100%;
    background: var(--accent);
    color: #0a0b0e;
    font-size: 15px;
    font-weight: 800;
    border: none;
    padding: 13px 20px;
    border-radius: 14px;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(214, 167, 86, 0.25);
    transition: all 0.25s ease;
  }

#keyGate button:hover {
    background: #e2b362;
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(214, 167, 86, 0.35);
  }

#dashboard {
    display: none;
    max-width: 1100px;
    margin: 0 auto;
    animation: fadeIn 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
  }

.toolbar {
    display: flex;
    gap: 10px;
    margin-bottom: 22px;
    flex-wrap: wrap;
    align-items: center;
  }

.filter-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    color: var(--muted);
    padding: 8px 18px;
    border-radius: 12px;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    transition: all 0.2s ease;
  }

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    border-color: var(--border-strong);
  }

.filter-btn.active {
    background: var(--accent-soft);
    color: var(--accent);
    border-color: rgba(214, 167, 86, 0.4);
  }

.spacer { flex: 1; }

.btn {
    border: none;
    color: #fff;
    padding: 8px 16px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    font-family: inherit;
    font-size: 12px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

#refreshBtn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 9px 18px;
    border-radius: 12px;
    font-size: 13px;
  }

#refreshBtn:hover {
    background: var(--accent);
    color: #0a0b0e;
    border-color: var(--accent);
  }

.order-card {
    background: var(--panel);
    border: 1px solid var(--border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 22px;
    margin-bottom: 16px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
    flex-wrap: wrap;
    transition: all 0.25s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  }

.order-card:hover {
    border-color: rgba(214, 167, 86, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5);
  }

.receipt-thumb {
    width: 120px;
    height: 120px;
    border-radius: 14px;
    object-fit: cover;
    cursor: pointer;
    border: 1px solid var(--border);
    flex-shrink: 0;
    background: #000;
    transition: transform 0.2s ease, border-color 0.2s ease;
  }

.receipt-thumb:hover {
    transform: scale(1.03);
    border-color: var(--accent);
  }

.order-info {
    flex: 1;
    min-width: 240px;
  }

.order-top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 12px;
  }

.order-item {
    font-size: 17px;
    font-weight: 800;
    color: #fff;
  }

.order-status {
    font-size: 12px;
    font-weight: 800;
    padding: 5px 14px;
    border-radius: 8px;
    white-space: nowrap;
  }

.st-pending {
    background: rgba(214, 167, 86, 0.12);
    color: var(--accent);
    border: 1px solid rgba(214, 167, 86, 0.3);
  }

.st-approved {
    background: rgba(78, 159, 110, 0.12);
    color: var(--success);
    border: 1px solid rgba(78, 159, 110, 0.3);
  }

.st-rejected {
    background: rgba(194, 75, 67, 0.12);
    color: var(--danger);
    border: 1px solid rgba(194, 75, 67, 0.3);
  }

.st-delivered {
    background: rgba(78, 159, 110, 0.2);
    color: var(--success);
    border: 1px solid rgba(78, 159, 110, 0.4);
  }

.order-meta {
    font-size: 13.5px;
    color: var(--muted);
    line-height: 2.1;
  }

.order-meta b {
    color: var(--text);
    font-weight: 600;
  }

.order-meta code {
    font-family: monospace;
    direction: ltr;
    display: inline-block;
    background: rgba(0, 0, 0, 0.3);
    padding: 1px 6px;
    border-radius: 6px;
    border: 1px solid var(--border);
    font-size: 12px;
    color: var(--accent);
  }

.order-actions {
    display: flex;
    gap: 8px;
    margin-top: 14px;
    flex-wrap: wrap;
  }

.act-approve { solid rgba(194, 75, 67, 0.4) !important;
    color: #fb7185 !important;
  }

.act-delete:hover {
    background: rgba(194, 75, 67, 0.15);
  }

#emptyState {
    text-align: center;
    color: var(--muted);
    padding: 80px 20px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 14px;
  }

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
    padding: 24px;
    cursor: zoom-out;
  }

.lightbox.open { display: flex; }

.lightbox img {
    max-width: 90%;
    max-height: 88vh;
    border-radius: 18px;
    border: 1px solid var(--border);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
    cursor: default;
  }

@media (max-width: 600px) {
.order-card { padding: 16px; }

.receipt-thumb { width: 100%; height: 180px; }

.order-actions { width: 100%; }

.order-actions .btn { flex: 1; text-align: center; }
}


/* ==========================================================
   Orders page (orders.html) — page-specific styles
   ========================================================== */

.nav-btn:hover { background: rgba(255,255,255,0.06); border-color: rgba(214, 167, 86, 0.5); color: var(--accent); }

.page-title { font-size: 28px; font-weight: 900; color: #fff; }

.page-sub { color: var(--text-muted); font-size: 14px; margin-top: 4px; }

.refresh-btn {
      background: rgba(255,255,255,0.05); border: 1px solid var(--border); color: var(--text-main);
      padding: 10px 22px; border-radius: 14px; font-size: 14px; font-weight: 700; cursor: pointer;
      transition: all 0.25s; display: flex; align-items: center; gap: 8px;
    }

.refresh-btn:hover { background: var(--accent); color: #0a0b0e; border-color: var(--accent); }

.state-box { padding: 60px 30px; text-align: center; color: var(--text-muted); display: flex; flex-direction: column; align-items: center; gap: 14px; }

.spinner { width: 30px; height: 30px; border-radius: 50%; border: 3px solid rgba(255,255,255,0.1); border-top-color: var(--accent); animation: spin 0.8s linear infinite; }

@keyframes spin { to { transform: rotate(360deg); } }

.orders-list { display: flex; flex-direction: column; gap: 10px; }

.orders-list .order-card { padding: 14px 18px; display: flex; flex-direction: column; gap: 8px; transition: all 0.3s; background: var(--panel); border: 1px solid var(--border); border-radius: 16px; }
.orders-list .order-card:hover { border-color: rgba(214, 167, 86, 0.4); }
.orders-list .order-top { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.orders-list .order-status { font-size: 11.5px; font-weight: 700; padding: 5px 12px; border-radius: 8px; white-space: nowrap; }
.order-heading { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.order-type-badge { font-size: 11px; font-weight: 800; padding: 3px 10px; border-radius: 7px; background: rgba(214, 167, 86, 0.1); color: var(--accent); border: 1px solid rgba(214, 167, 86, 0.2); }

.order-item-name { font-size: 15px; font-weight: 800; color: #fff; }

.status-pending { background: rgba(214, 167, 86, 0.1); color: var(--accent); }

.status-approved { background: rgba(78, 159, 110, 0.1); color: var(--success); }

.status-rejected { background: rgba(194, 75, 67, 0.1); color: var(--error); }

.status-delivered { background: rgba(78, 159, 110, 0.15); color: var(--success); }

/* Compact single-line meta row (replaces the old boxed grid layout) */
.order-meta-grid { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; }

.meta-item { display: flex; align-items: baseline; gap: 5px; }

.meta-label { font-size: 11.5px; color: var(--text-muted); }

.meta-label::after { content: ':'; }

.meta-val { font-size: 12.5px; color: #fff; font-weight: 700; }

.meta-val.price { color: var(--accent); }

.order-extra { display: flex; gap: 10px; font-size: 12.5px; color: var(--text-muted); }

.extra-swatch { width: 13px; height: 13px; border-radius: 4px; border: 1px solid rgba(255,255,255,0.2); display: inline-block; vertical-align: middle; margin-left: 4px; }

/* Resume-payment row (pending_payment orders only) */
.order-resume-row {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    margin-top: 2px; padding-top: 10px; border-top: 1px dashed var(--border);
  }

.order-expiry { font-size: 12px; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }

.order-expiry .expiry-time { direction: ltr; font-weight: 700; color: var(--text-main); font-variant-numeric: tabular-nums; }

.order-expiry.is-expired .expiry-time { color: var(--danger, #f43f5e); }

.resume-pay-btn {
    background: var(--accent); color: #0a0b0e; border: none; border-radius: 10px;
    padding: 8px 18px; font-size: 13px; font-weight: 800; cursor: pointer;
    transition: filter 0.2s ease, opacity 0.2s ease; white-space: nowrap;
  }

.resume-pay-btn:hover { filter: brightness(1.08); }

.resume-pay-btn:disabled { opacity: 0.6; cursor: default; }

.resume-pay-btn.is-expired { background: rgba(214, 167, 86, 0.15); color: var(--accent); border: 1px solid rgba(214, 167, 86, 0.4); }

.order-resume-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.cancel-order-btn {
    background: transparent; color: var(--text-muted); border: 1px solid var(--border); border-radius: 10px;
    padding: 8px 16px; font-size: 13px; font-weight: 700; cursor: pointer;
    transition: all 0.2s ease; white-space: nowrap;
  }

.cancel-order-btn:hover { background: rgba(194, 75, 67, 0.12); border-color: rgba(194, 75, 67, 0.4); color: var(--error, #f43f5e); }

.cancel-order-btn:disabled { opacity: 0.6; cursor: default; }

@media (max-width: 700px) {
.container { padding: 110px 20px 80px 20px; }

.side-dock { bottom: 0; top: auto; right: 0; left: 0; width: 100%; flex-direction: row; border-radius: 0; border-top: 1px solid var(--border); padding: 10px; justify-content: center; }
}


/* ==========================================================
   Profile page (profile.html) — page-specific styles
   ========================================================== */

.iti {
      width: 100%;
    }

.iti__tel-input {
      direction: ltr;
      text-align: left;
    }

.iti__country-container {
      padding: 4px !important;
    }

.iti__selected-country-primary {
      height: 100%;
      border-radius: 10px;
      padding: 0 10px;
      transition: background-color 0.2s ease;
    }

.iti__selected-dial-code {
      color: var(--text-main);
      font-weight: 700;
      font-size: 14px;
      margin-inline-start: 6px;
    }

.iti__flag {
      border-radius: 3px;
      box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2);
    }

.iti__country-selector {
      border: 1px solid var(--iti-border-color);
      border-radius: 16px;
      backdrop-filter: blur(24px);
      -webkit-backdrop-filter: blur(24px);
      box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.06);
      overflow: hidden;
      margin-top: 8px;
    }

.iti__search-input-wrapper {
      background: rgba(0, 0, 0, 0.25);
      border-bottom: 1px solid var(--iti-border-color);
    }

.iti__search-input {
      background: transparent;
      color: var(--text-main);
      font-family: "Vazirmatn", sans-serif;
      font-size: 14px;
      padding-top: 12px;
      padding-bottom: 12px;
    }

.iti__search-input::placeholder {
      color: var(--text-muted);
    }

.iti__no-results {
      color: var(--text-muted);
      font-size: 13px;
    }

.iti__country {
      color: #e2e8f0;
      font-size: 14px;
      padding-top: 11px;
      padding-bottom: 11px;
    }

.iti__country-name {
      color: #e2e8f0;
    }

.bg-gradient {
      position: fixed;
      inset: 0;
      z-index: -2;
      background: radial-gradient(ellipse at 30% 20%, rgba(214, 167, 86, 0.10) 0%, transparent 55%),
                  radial-gradient(ellipse at 70% 80%, rgba(198, 75, 67, 0.08) 0%, transparent 55%),
                  radial-gradient(ellipse at 50% 50%, #14100a 0%, #0a0b0e 80%);
      pointer-events: none;
    }

.bg-orbs {
      position: fixed;
      inset: 0;
      z-index: -1;
      pointer-events: none;
    }

.bg-orb {
      position: absolute;
      border-radius: 50%;
      filter: blur(90px);
      opacity: 0.5;
      animation: floatOrb 20s ease-in-out infinite;
    }

.bg-orb:nth-child(1) {
      width: 45vmax;
      height: 45vmax;
      background: var(--accent);
      top: -20%;
      left: -15%;
      animation-delay: 0s;
      animation-duration: 18s;
    }

.bg-orb:nth-child(2) {
      width: 38vmax;
      height: 38vmax;
      background: var(--error);
      bottom: -22%;
      right: -12%;
      animation-delay: -6s;
      animation-duration: 22s;
    }

.bg-orb:nth-child(3) {
      width: 30vmax;
      height: 30vmax;
      background: var(--accent-dim);
      top: 40%;
      left: 30%;
      animation-delay: -12s;
      animation-duration: 24s;
    }

@keyframes floatOrb {
      0%, 100% { transform: translate(0, 0) scale(1); }
      33% { transform: translate(4vw, -3vh) scale(1.05); }
      66% { transform: translate(-3vw, 5vh) scale(0.95); }
    }

.glass-particles {
      position: fixed;
      inset: 0;
      pointer-events: none;
      z-index: 0;
    }

.particle {
      position: absolute;
      border-radius: 50%;
      background: rgba(255, 255, 255, 0.35);
      backdrop-filter: blur(4px);
      -webkit-backdrop-filter: blur(4px);
      animation: particleFloat 12s ease-in-out infinite;
      box-shadow: 0 0 12px rgba(255, 255, 255, 0.4);
    }

.particle:nth-child(1) { width: 6px; height: 6px; top: 15%; left: 10%; animation-delay: 0s; }

.particle:nth-child(2) { width: 4px; height: 4px; top: 25%; right: 20%; animation-delay: -3s; }

.particle:nth-child(3) { width: 8px; height: 8px; top: 65%; left: 25%; animation-delay: -6s; }

.particle:nth-child(4) { width: 3px; height: 3px; top: 70%; right: 15%; animation-delay: -2s; }

.particle:nth-child(5) { width: 5px; height: 5px; top: 40%; left: 60%; animation-delay: -7s; }

.particle:nth-child(6) { width: 7px; height: 7px; top: 80%; right: 35%; animation-delay: -4s; }

@keyframes particleFloat {
      0%, 100% { transform: translateY(0) scale(1); opacity: 0.5; }
      50% { transform: translateY(-40px) scale(1.5); opacity: 0.9; }
    }

.profile-header {
      padding: 44px 40px;
      display: flex;
      align-items: center;
      gap: 24px;
    }

.profile-avatar-large {
      width: 84px;
      height: 84px;
      border-radius: 50%;
      background: linear-gradient(135deg, var(--accent), var(--accent-dim));
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 900;
      font-size: 34px;
      color: #050508;
      flex-shrink: 0;
      overflow: hidden;
      box-shadow: 0 12px 30px rgba(214, 167, 86, 0.4);
    }

.profile-avatar-large img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      border-radius: 50%;
    }

.profile-header-info {
      display: flex;
      flex-direction: column;
      gap: 6px;
      min-width: 0;
    }

.profile-header-username {
      font-size: 26px;
      font-weight: 900;
      color: var(--text-main);
      overflow-wrap: anywhere;
    }

.profile-header-email {
      font-size: 14px;
      color: var(--text-muted);
      direction: ltr;
      text-align: right;
      overflow-wrap: anywhere;
    }

.profile-header-since {
      font-size: 12px;
      color: var(--text-muted);
    }

.tabs-panel {
      padding: 12px;
      display: flex;
      gap: 8px;
    }

.tab-btn {
      flex: 1;
      padding: 13px 16px;
      border-radius: 16px;
      background: none;
      border: none;
      color: var(--text-muted);
      font-size: 14px;
      font-weight: 700;
      cursor: pointer;
      font-family: "Vazirmatn", sans-serif;
      transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      min-width: 0;
    }

.tab-btn span {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

.tab-btn:hover {
      color: var(--text-main);
      background: rgba(255, 255, 255, 0.06);
    }

.tab-btn.active {
      color: var(--text-main);
      background: linear-gradient(90deg, rgba(214, 167, 86, 0.18), rgba(214, 167, 86, 0.18));
      box-shadow: inset 0 0 0 1px rgba(214, 167, 86, 0.4);
    }

.tab-btn.danger.active {
      background: rgba(244, 63, 94, 0.15);
      box-shadow: inset 0 0 0 1px rgba(244, 63, 94, 0.4);
      color: #fecdd3;
    }

.tab-panel {
      display: none;
      padding: 40px;
      flex-direction: column;
      gap: 22px;
      animation: fieldFadeInUp 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    }

.tab-panel.active {
      display: flex;
    }

@keyframes fieldFadeInUp {
      from { opacity: 0; transform: translateY(14px); }
      to { opacity: 1; transform: translateY(0); }
    }

.panel-title {
      font-size: 20px;
      font-weight: 800;
      color: var(--text-main);
    }

.panel-subtitle {
      font-size: 13px;
      color: var(--text-muted);
      margin-top: -14px;
    }

.avatar-upload-row {
      display: flex;
      align-items: center;
      gap: 20px;
      flex-wrap: wrap;
    }

.avatar-upload-preview {
      width: 76px;
      height: 76px;
      border-radius: 50%;
      background: linear-gradient(135deg, var(--accent), var(--accent-dim));
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 900;
      font-size: 28px;
      color: #050508;
      overflow: hidden;
      flex-shrink: 0;
      box-shadow: 0 10px 26px rgba(214, 167, 86, 0.35);
    }

.avatar-upload-preview img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

.avatar-upload-actions {
      display: flex;
      flex-direction: column;
      gap: 10px;
      min-width: 0;
    }

.avatar-upload-btn-row {
      display: flex;
      gap: 10px;
      flex-wrap: wrap;
    }

.avatar-btn {
      padding: 9px 18px;
      border-radius: 12px;
      font-size: 13px;
      font-weight: 700;
      cursor: pointer;
      font-family: "Vazirmatn", sans-serif;
      border: 1px solid var(--border);
      background: rgba(255, 255, 255, 0.06);
      color: var(--text-main);
      transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
      white-space: nowrap;
    }

.avatar-btn:hover {
      background: rgba(255, 255, 255, 0.12);
      transform: translateY(-1px);
    }

.avatar-btn:disabled {
      opacity: 0.6;
      cursor: not-allowed;
      transform: none;
    }

.avatar-btn-remove {
      border-color: rgba(244, 63, 94, 0.4);
      color: #fecdd3;
      background: rgba(244, 63, 94, 0.1);
    }

.avatar-btn-remove:hover {
      background: rgba(244, 63, 94, 0.2);
    }

.avatar-hint {
      font-size: 12px;
      color: var(--text-muted);
    }

.info-strip {
      display: flex;
      flex-wrap: wrap;
      gap: 12px;
      margin-top: 4px;
    }

.info-chip {
      background: rgba(0, 0, 0, 0.3);
      border: 1px solid var(--border);
      border-radius: 14px;
      padding: 12px 16px;
      display: flex;
      flex-direction: column;
      gap: 4px;
      flex: 1;
      min-width: 150px;
    }

.info-chip-label {
      font-size: 11px;
      color: var(--text-muted);
      font-weight: 600;
    }

.info-chip-value {
      font-size: 13px;
      color: var(--text-main);
      font-weight: 700;
      direction: ltr;
      text-align: right;
      overflow-wrap: anywhere;
    }

.form-group {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

.form-label {
      font-size: 14px;
      font-weight: 600;
      color: var(--text-muted);
    }

.form-input {
      background: rgba(0, 0, 0, 0.4);
      border: 1px solid var(--border);
      border-radius: 14px;
      padding: 14px 16px;
      color: var(--text-main);
      font-size: 15px;
      font-family: "Vazirmatn", sans-serif;
      outline: none;
      transition: all 0.3s;
      direction: ltr;
      text-align: right;
      width: 100%;
    }

.form-input:focus {
      border-color: var(--accent-purple);
      box-shadow: 0 0 0 3px rgba(214, 167, 86, 0.2);
    }

.form-input.invalid {
      border-color: var(--error);
    }

.field-error {
      font-size: 12px;
      color: var(--error);
      min-height: 16px;
    }

.submit-btn {
      margin-top: 4px;
      background: linear-gradient(90deg, var(--accent), var(--accent-dim));
      border: none;
      border-radius: 14px;
      padding: 15px;
      color: #050508;
      font-size: 15px;
      font-weight: 800;
      cursor: pointer;
      transition: all 0.3s;
      font-family: "Vazirmatn", sans-serif;
      align-self: flex-start;
      padding-left: 32px;
      padding-right: 32px;
    }

.submit-btn:hover {
      transform: translateY(-2px);
      box-shadow: 0 10px 30px rgba(214, 167, 86, 0.4);
    }

.submit-btn:disabled {
      opacity: 0.6;
      cursor: not-allowed;
      transform: none;
    }

.form-alert {
      padding: 12px 16px;
      border-radius: 14px;
      font-size: 13px;
      display: none;
      text-align: center;
    }

.form-alert.error {
      background: rgba(244, 63, 94, 0.15);
      border: 1px solid rgba(244, 63, 94, 0.4);
      color: #fecdd3;
    }

.form-alert.success {
      background: rgba(16, 185, 129, 0.15);
      border: 1px solid rgba(16, 185, 129, 0.4);
      color: #bbf7d0;
    }

.danger-box {
      background: rgba(244, 63, 94, 0.08);
      border: 1px solid rgba(244, 63, 94, 0.3);
      border-radius: 18px;
      padding: 24px;
      display: flex;
      flex-direction: column;
      gap: 14px;
    }

.danger-box-title {
      font-size: 16px;
      font-weight: 800;
      color: #fecdd3;
      display: flex;
      align-items: center;
      gap: 10px;
    }

.danger-box-text {
      font-size: 13px;
      color: var(--text-muted);
      line-height: 1.8;
    }

.danger-btn {
      align-self: flex-start;
      background: rgba(244, 63, 94, 0.15);
      border: 1px solid rgba(244, 63, 94, 0.5);
      color: #fecdd3;
      padding: 13px 28px;
      border-radius: 14px;
      font-size: 14px;
      font-weight: 700;
      cursor: pointer;
      font-family: "Vazirmatn", sans-serif;
      transition: all 0.3s;
    }

.danger-btn:hover {
      background: rgba(244, 63, 94, 0.28);
      transform: translateY(-2px);
      box-shadow: 0 10px 26px rgba(244, 63, 94, 0.3);
    }

.signout-box {
      background: rgba(214, 167, 86, 0.08);
      border: 1px solid rgba(214, 167, 86, 0.3);
      border-radius: 18px;
      padding: 24px;
      display: flex;
      flex-direction: column;
      gap: 14px;
    }

.signout-box-title {
      font-size: 16px;
      font-weight: 800;
      color: var(--text-main);
      display: flex;
      align-items: center;
      gap: 10px;
    }

.signout-box-text {
      font-size: 13px;
      color: var(--text-muted);
      line-height: 1.8;
    }

.signout-btn {
      align-self: flex-start;
      background: rgba(214, 167, 86, 0.18);
      border: 1px solid rgba(214, 167, 86, 0.5);
      color: #e9d5ff;
      padding: 13px 28px;
      border-radius: 14px;
      font-size: 14px;
      font-weight: 700;
      cursor: pointer;
      font-family: "Vazirmatn", sans-serif;
      transition: all 0.3s;
    }

.signout-btn:hover {
      background: rgba(214, 167, 86, 0.3);
      transform: translateY(-2px);
      box-shadow: 0 10px 26px rgba(214, 167, 86, 0.3);
    }

.modal-title {
      font-size: 19px;
      font-weight: 800;
      color: #fecdd3;
    }

.modal-text {
      font-size: 13px;
      color: var(--text-muted);
      line-height: 1.8;
    }

.modal-actions {
      display: flex;
      gap: 10px;
      margin-top: 6px;
    }

.modal-btn {
      flex: 1;
      padding: 13px;
      border-radius: 14px;
      font-size: 14px;
      font-weight: 700;
      cursor: pointer;
      font-family: "Vazirmatn", sans-serif;
      border: 1px solid transparent;
      transition: all 0.25s;
    }

.modal-btn-cancel {
      background: rgba(255, 255, 255, 0.06);
      border-color: var(--border);
      color: var(--text-main);
    }

.modal-btn-cancel:hover {
      background: rgba(255, 255, 255, 0.12);
    }

.modal-btn-confirm {
      background: linear-gradient(90deg, #f43f5e, #e11d48);
      background-clip: padding-box;
      border: none;
      color: var(--text-main);
    }

.modal-btn-confirm:hover {
      transform: translateY(-1px);
      box-shadow: 0 10px 26px rgba(244, 63, 94, 0.4);
    }

.modal-btn-confirm:disabled {
      opacity: 0.6;
      cursor: not-allowed;
      transform: none;
    }

.crop-modal-box {
      max-width: 400px;
    }

.crop-stage {
      position: relative;
      width: 280px;
      height: 280px;
      max-width: 100%;
      margin: 4px auto 0 auto;
      border-radius: 16px;
      overflow: hidden;
      background: #000;
      touch-action: none;
      cursor: grab;
    }

.crop-stage:active {
      cursor: grabbing;
    }

#cropCanvas {
      display: block;
      width: 280px;
      height: 280px;
      max-width: 100%;
      touch-action: none;
    }

.crop-circle-guide {
      position: absolute;
      top: 10px;
      left: 10px;
      right: 10px;
      bottom: 10px;
      border-radius: 50%;
      box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.55);
      border: 2px solid rgba(255, 255, 255, 0.85);
      pointer-events: none;
    }

.crop-hint {
      font-size: 12px;
      color: var(--text-muted);
      text-align: center;
      margin-top: 10px;
    }

.crop-zoom-row {
      display: flex;
      align-items: center;
      gap: 12px;
      margin-top: 16px;
    }

.crop-zoom-row svg {
      color: var(--text-muted);
      flex-shrink: 0;
    }

.crop-zoom-slider {
      flex: 1;
      accent-color: var(--accent-purple);
      cursor: pointer;
    }

.modal-btn-confirm-crop {
      background: linear-gradient(90deg, var(--accent), var(--accent-dim));
      background-clip: padding-box;
      border: none;
      color: #050508;
    }

.modal-btn-confirm-crop:hover {
      transform: translateY(-1px);
      box-shadow: 0 10px 26px rgba(214, 167, 86, 0.4);
    }

.modal-btn-confirm-crop:disabled {
      opacity: 0.6;
      cursor: not-allowed;
      transform: none;
    }

.toast.error {
      background: rgba(244, 63, 94, 0.15);
      border: 1px solid rgba(244, 63, 94, 0.4);
    }

@media (max-width: 900px) {
.profile-header { padding: 32px 24px; flex-direction: column; text-align: center; }

.tabs-panel { flex-direction: column; }

.tab-panel { padding: 26px; }

@keyframes slideInRight {
        0% { transform: translateY(150%); opacity: 0; }
        100% { transform: translateY(0); opacity: 1; }
      }

@keyframes slideOutRight {
        0% { transform: translateY(0); opacity: 1; }
        100% { transform: translateY(150%); opacity: 0; }
      }
}

@media (max-width: 560px) {
.profile-header-username { font-size: 21px; }

.tab-btn span { font-size: 12px; }

.tab-btn { padding: 11px 8px; gap: 5px; }

.tab-panel { padding: 20px; gap: 18px; }

.avatar-upload-row { gap: 14px; }

.avatar-upload-preview { width: 64px; height: 64px; font-size: 22px; }

.modal-box { padding: 26px; }

.info-chip { min-width: 100%; }
}

@media (max-width: 420px) {
.avatar-upload-btn-row { flex-direction: column; }

.avatar-btn { width: 100%; text-align: center; }
}

.friend-avatar-wrap.online .friend-avatar {
      box-shadow: 0 0 0 2px var(--glass), 0 0 0 4px var(--success);
    }

@media (max-width: 420px) {
.friends-tab { font-size: 11px; }
}


/* ==========================================================
   Sign-in page (sign-in.html) — page-specific styles
   ========================================================== */

.form-group:nth-of-type(1) { animation-delay: 0.15s; }

.form-group:nth-of-type(2) { animation-delay: 0.22s; }

.auth-footer {
      animation: fieldFadeInUp 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
      animation-delay: 0.36s;
    }

.auth-wrapper {
      width: 100%;
      max-width: 460px;
      margin: 0 auto;
      display: flex;
      flex-direction: column;
      gap: 24px;
      padding: 150px 24px 100px;
      position: relative;
      z-index: 10;
      animation: fadeIn 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
    }

.auth-panel {
      background: var(--panel);
      border: 1px solid var(--border);
      backdrop-filter: blur(32px);
      -webkit-backdrop-filter: blur(32px);
      border-radius: 28px;
      box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.08);
      padding: 44px 36px;
      display: flex;
      flex-direction: column;
      gap: 24px;
    }

.auth-title {
      font-size: 28px;
      font-weight: 900;
      text-align: center;
      color: var(--text-main);
    }

.auth-subtitle {
      text-align: center;
      color: var(--text-muted);
      font-size: 14px;
      margin-top: -14px;
    }

form#signinForm {
      display: flex;
      flex-direction: column;
      gap: 20px;
    }

.form-input::placeholder {
      color: rgba(139, 142, 152, 0.5);
    }

.form-input:hover {
      border-color: var(--border-strong);
    }

.submit-btn:active {
      transform: translateY(0);
    }

.auth-footer a {
      color: var(--accent);
      text-decoration: none;
      font-weight: 700;
    }

.auth-footer a:hover {
      text-decoration: underline;
    }

@media (max-width: 1300px) {
.auth-wrapper { padding-right: max(24px, 96px); }
}

@media (max-width: 1100px) {
.auth-wrapper { padding-right: 88px; }
}

@media (max-width: 768px) {
.navbar { padding: 16px 20px; }

.nav-logo { font-size: 21px; }

.side-dock {
        top: auto;
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
        flex-direction: row;
        justify-content: center;
        gap: 10px;
        border-radius: 0;
        border: none;
        border-top: 1px solid var(--border);
        padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
        box-shadow: 0 -14px 30px rgba(0, 0, 0, 0.55);
      }

.dock-item { width: 42px; height: 42px; }

.dock-item::after { display: none; }

.auth-wrapper { padding: 110px 20px 96px; }

.auth-panel { padding: 36px 26px; }
}

@media (max-width: 480px) {
.navbar { padding: 14px 16px; }

.auth-title { font-size: 24px; }

.auth-panel { padding: 30px 20px; border-radius: 22px; }

.auth-wrapper { padding: 100px 16px 90px; gap: 18px; }

.form-input { padding: 14px 16px; }

.submit-btn { padding: 15px; }

.side-dock { gap: 6px; padding: 8px 6px calc(8px + env(safe-area-inset-bottom)); }

.dock-item { width: 38px; height: 38px; }
}

@media (max-width: 360px) {
.dock-item { width: 34px; height: 34px; }

.side-dock { gap: 4px; }
}


/* ==========================================================
   Sign-up page (sign-up.html) — page-specific styles
   ========================================================== */

.form-group:nth-of-type(3) { animation-delay: 0.24s; }

.form-group:nth-of-type(4) { animation-delay: 0.30s; }

.form-group:nth-of-type(5) { animation-delay: 0.36s; }

form#signupForm {
      display: flex;
      flex-direction: column;
      gap: 20px;
    }


/* ==========================================================
   SkyMine page (skymine.html) — page-specific styles
   ========================================================== */

@font-face {
            font-family: "Arad";
            src: url("fonts/Arad-Black.woff2") format("woff2");
            font-weight: normal;
            font-style: normal;
        }

html.page-skymine, body.page-skymine {
            height: 100%;
            overflow: hidden;
        }

.card {
            width: 100%;
            max-width: 920px;
            background: var(--glass);
            border: 1px solid var(--border);
            border-radius: 24px;
            padding: 24px;
            backdrop-filter: blur(16px);
            box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
            display: flex;
            flex-direction: column;
            gap: 16px;
        }

.header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
        }

.brand-title {
            font-size: 1.4rem;
            letter-spacing: 0.5px;
            background: linear-gradient(90deg, var(--accent), var(--accent));
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
        }

.tabs {
            display: flex;
            gap: 8px;
            background: rgba(255, 255, 255, 0.04);
            padding: 4px;
            border-radius: 12px;
            border: 1px solid rgba(255, 255, 255, 0.05);
        }

.video-container {
            position: relative;
            width: 100%;
            aspect-ratio: 16 / 9;
            max-height: 52vh;
            overflow: hidden;
            border: 1px solid rgba(255, 255, 255, 0.06);
            border-radius: 16px;
            background: #020617;
        }

.video-container video {
            width: 100%;
            height: 100%;
            display: block;
            object-fit: contain;
            background: #020617;
        }

.video-slot {
            display: none;
            width: 100%;
            height: 100%;
        }

.video-slot.active {
            display: block;
        }

.footer-desc {
            color: var(--text-muted);
            font-size: 0.95rem;
            line-height: 1.8;
            text-align: center;
        }

@media (max-width: 600px) {
body {
                padding: 12px;
            }

.card {
                padding: 16px;
                gap: 12px;
            }

.brand-title {
                font-size: 1.15rem;
            }

.tab-btn {
                padding: 5px 10px;
                font-size: 0.8rem;
            }

.footer-desc {
                font-size: 0.85rem;
                line-height: 1.6;
            }
}


/* ==========================================================
   Store page (store.html) — page-specific styles
   ========================================================== */

.bg-gradient,
    .bg-orbs,
    .glass-particles {
      display: none !important;
    }

.particle:nth-child(7) { width: 4px; height: 4px; top: 10%; left: 45%; animation-delay: -1s; }

.particle:nth-child(8) { width: 9px; height: 9px; top: 50%; right: 8%; animation-delay: -8s; }

.store-title { font-size: 38px; font-weight: bold; background: linear-gradient(135deg, #ffffff, var(--accent-gold)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 16px; text-shadow: 0 4px 10px rgba(0,0,0,0.5); }

.store-desc { color: var(--text-muted); font-size: 16px; line-height: 1.8; max-width: 700px; margin: 0 auto; font-weight: normal; }

.ranks-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }

@keyframes rankCardFadeInUp {
      from { opacity: 0; transform: translateY(28px); }
      to { opacity: 1; transform: translateY(0); }
    }

.rank-card { background: var(--glass); border: 1px solid var(--border); border-radius: 24px; padding: 32px 24px; display: flex; flex-direction: column; align-items: center; transition: all 0.4s ease; position: relative; box-shadow: 0 10px 30px rgba(0,0,0,0.5); text-align: center; animation: rankCardFadeInUp 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) backwards; min-width: 0; }

.rank-card:nth-child(1) { animation-delay: 0.05s; }

.rank-card:nth-child(2) { animation-delay: 0.12s; }

.rank-card:nth-child(3) { animation-delay: 0.19s; }

.rank-card:nth-child(4) { animation-delay: 0.26s; }

.rank-card:nth-child(5) { animation-delay: 0.33s; }

.rank-card:nth-child(6) { animation-delay: 0.40s; }

.rank-card:hover { transform: translateY(-10px); background: var(--glass-hover); border-color: var(--accent-purple); box-shadow: 0 20px 40px rgba(214, 167, 86, 0.2); }

.rank-name { font-size: 32px; font-weight: bold; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 8px; font-family: Impact, Tahoma, sans-serif; }

.rank-price { font-size: 28px; font-weight: bold; color: var(--text-main); margin-bottom: 24px; display: flex; align-items: baseline; gap: 8px; justify-content: center; flex-wrap: wrap; }

.price-currency { font-size: 16px; color: var(--text-muted); font-weight: normal; }

.r-vip .rank-name { color: #10b981; }

.r-vipplus .rank-name { color: #3b82f6; }

.r-mvp .rank-name { color: var(--accent); }

.r-mvpplus .rank-name { background: linear-gradient(90deg, var(--accent), var(--accent-dim)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

.r-elite .rank-name { color: #ef4444; }

.r-legend .rank-name { background: linear-gradient(90deg, #fbbf24, #f59e0b); -webkit-background-clip: text; -webkit-text-fill-color: transparent; text-shadow: 0 0 15px rgba(251, 191, 36, 0.3); }

.btn-group { display: flex; flex-direction: column; gap: 12px; width: 100%; margin-top: auto; }

.btn-buy { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.2); color: var(--text-main); padding: 10px 24px; border-radius: 100px; font-size: 15px; font-weight: bold; cursor: pointer; transition: all 0.3s; width: 100%; font-family: "Vazirmatn", sans-serif; }

.btn-buy:hover { background: var(--accent-purple); border-color: var(--accent-purple); box-shadow: 0 0 20px rgba(214, 167, 86, 0.4); transform: scale(1.05); }

.btn-buy:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.btn-info { background: transparent; border: 1px dashed rgba(255,255,255,0.3); color: var(--text-muted); padding: 8px; border-radius: 100px; font-size: 13px; cursor: pointer; transition: all 0.3s; width: 100%; font-family: "Vazirmatn", sans-serif; }

.btn-info:hover { color: var(--text-main); border-color: var(--text-main); background: rgba(255,255,255,0.05); }

.gang-panel { background: linear-gradient(145deg, rgba(30, 20, 20, 0.8), rgba(20, 10, 15, 0.9)); border: 1px solid rgba(239, 68, 68, 0.3); border-radius: 28px; padding: 48px; position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 40px; box-shadow: 0 20px 50px rgba(0,0,0,0.6), inset 0 0 40px rgba(239, 68, 68, 0.1); }

.gang-panel::before { content: ""; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%; background: radial-gradient(circle, rgba(239, 68, 68, 0.1) 0%, transparent 60%); pointer-events: none; }

.gang-content { flex: 1; z-index: 2; min-width: 0; }

.gang-title { font-size: 32px; font-weight: bold; background: linear-gradient(90deg, #ef4444, #f97316); -webkit-background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 16px; }

.gang-desc { color: var(--text-muted); font-size: 16px; line-height: 1.8; margin-bottom: 24px; }

.gang-pricing { display: flex; gap: 24px; margin-bottom: 32px; flex-wrap: wrap; }

.g-price-box { background: rgba(0,0,0,0.4); border: 1px solid rgba(255,255,255,0.1); border-radius: 16px; padding: 16px 24px; flex: 1; min-width: 200px; }

.g-label { font-size: 14px; color: var(--text-muted); margin-bottom: 8px; }

.g-val { font-size: 24px; font-weight: bold; color: var(--text-main); }

.g-val span { font-size: 14px; font-weight: normal; color: var(--text-muted); }

.btn-gang { background: linear-gradient(90deg, #ef4444, #f97316); border: none; color: var(--text-main); padding: 14px 36px; border-radius: 100px; font-size: 16px; font-weight: bold; cursor: pointer; transition: all 0.3s; box-shadow: 0 10px 25px rgba(239, 68, 68, 0.4); font-family: "Vazirmatn", sans-serif; width: 100%; max-width: 320px; }

.btn-gang:hover { transform: translateY(-3px) scale(1.05); box-shadow: 0 15px 35px rgba(239, 68, 68, 0.6); }

.modal-overlay.active { display: flex; opacity: 1; }

.modal-content { background: var(--glass); border: 1px solid var(--border); border-radius: 24px; padding: 32px; width: 100%; max-width: 500px; box-shadow: 0 20px 60px rgba(0,0,0,0.8); transform: translateY(20px); transition: transform 0.3s ease; position: relative; max-height: 85vh; overflow-y: auto; }

.modal-overlay.active .modal-content { transform: translateY(0); }

.modal-close { position: absolute; top: 20px; left: 20px; background: rgba(255,255,255,0.1); border: none; color: var(--text-main); width: 32px; height: 32px; border-radius: 50%; cursor: pointer; font-size: 16px; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }

.modal-close:hover { background: var(--error); }

.feature-list { display: flex; flex-direction: column; gap: 16px; }

.feature-item { display: flex; align-items: flex-start; gap: 12px; background: rgba(0,0,0,0.3); padding: 12px 16px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.05); }

.f-icon { color: var(--accent-gold); font-size: 18px; margin-top: 2px; }

.f-text h4 { font-size: 16px; color: var(--text-main); margin-bottom: 4px; }

.f-text p { font-size: 13px; color: var(--text-muted); line-height: 1.6; }

.input-group { margin-bottom: 18px; text-align: right; }

.user-input-box { width: 100%; padding: 14px 16px; border-radius: 12px; background: rgba(0,0,0,0.4); border: 1px solid var(--border); color: var(--text-main); font-size: 16px; outline: none; text-align: center; font-family: "Vazirmatn", sans-serif; transition: all 0.3s; }

.user-input-box:focus { border-color: var(--accent-cyan); box-shadow: 0 0 15px rgba(214, 167, 86, 0.2); }

.color-picker { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 8px; }

.color-swatch { width: 36px; height: 36px; border-radius: 50%; cursor: pointer; border: 2px solid rgba(255,255,255,0.05); transition: all 0.3s ease; }

.color-swatch:hover { transform: scale(1.1); box-shadow: 0 0 10px currentColor; }

.color-swatch.active { border-color: var(--text-main); transform: scale(1.2); box-shadow: 0 0 20px currentColor; z-index: 2; }

.slot-counter-wrap { background: rgba(0,0,0,0.3); padding: 15px; border-radius: 16px; border: 1px dashed var(--border); }

.slot-counter { display: flex; align-items: center; justify-content: center; gap: 24px; margin-top: 8px; }

.slot-btn { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.2); color: var(--text-main); font-size: 22px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s; flex-shrink: 0; }

.slot-btn:hover { background: var(--accent-cyan); border-color: var(--accent-cyan); color: #000; box-shadow: 0 0 15px var(--accent-cyan); }

.slot-display { font-size: 28px; font-weight: bold; color: var(--text-main); min-width: 60px; text-align: center; }

.slot-display small { font-size: 14px; color: var(--text-muted); font-weight: normal; }

.gang-total-price { font-size: 16px; font-weight: bold; color: var(--text-main); margin-bottom: 24px; background: rgba(16, 185, 129, 0.1); padding: 16px; border-radius: 12px; border: 1px solid rgba(16, 185, 129, 0.3); text-align: center; }

.gang-total-price span { color: var(--success); font-size: 26px; margin: 0 6px; }

@media (max-width: 900px) {
.gang-panel { flex-direction: column; text-align: center; padding: 32px 24px; }

.gang-pricing { flex-direction: column; }

.btn-gang { max-width: 100%; }

@keyframes slideInRight { 0% { transform: translateY(150%); opacity: 0; } 100% { transform: translateY(0); opacity: 1; } }

@keyframes slideOutRight { 0% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(150%); opacity: 0; } }
}

@media (max-width: 560px) {
.store-title { font-size: 26px; }

.store-desc { font-size: 14px; }

.header-panel { padding: 32px 20px; }

.ranks-grid { grid-template-columns: 1fr; gap: 16px; }

.rank-card { padding: 24px 18px; }

.rank-name { font-size: 26px; }

.rank-price { font-size: 22px; }

.gang-title { font-size: 24px; }

.gang-desc { font-size: 14px; }

.modal-content { padding: 22px; }

.color-swatch { width: 32px; height: 32px; }

.slot-counter { gap: 16px; }
}

@media (max-width: 420px) {
.nav-btn { padding: 7px 12px; font-size: 12px; }
}

/* ==========================================================
   Shared small components — reused across pages
   (FAQ accordion, "you'll lose this" list)
   ========================================================== */
.faq-list { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.faq-item { border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: rgba(255, 255, 255, 0.02); }
.faq-question { width: 100%; text-align: right; padding: 14px 18px; background: none; border: none; color: var(--text-main); font-family: 'Vazirmatn', sans-serif; font-size: 14px; font-weight: 700; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.faq-question:hover { color: var(--accent); }
.faq-question svg { transition: transform 0.25s ease; flex-shrink: 0; color: var(--text-muted); }
.faq-item.open .faq-question svg { transform: rotate(180deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.3s ease, padding 0.3s ease; padding: 0 18px; color: var(--text-muted); font-size: 13px; line-height: 1.9; }
.faq-item.open .faq-answer { max-height: 300px; padding: 0 18px 16px; }

.loss-list { display: flex; flex-direction: column; gap: 10px; margin: 20px 0; }
.loss-item { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 14px; background: rgba(198, 75, 67, 0.06); border: 1px solid rgba(198, 75, 67, 0.18); color: var(--text-main); font-size: 13px; }
.loss-item svg { flex-shrink: 0; color: var(--error); }

/* Orders page — order type guide cards */
.type-guide-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-top: 20px; }
.type-guide-card { background: rgba(0, 0, 0, 0.2); border: 1px solid var(--border); border-radius: 18px; padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.type-guide-icon { width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; }
.type-guide-name { font-size: 15px; font-weight: 800; color: var(--text-main); }
.type-guide-desc { font-size: 12.5px; color: var(--text-muted); line-height: 1.8; }

/* ==========================================================
   Support ticket system — reuses .friend-card / .chat-bubble
   styling from the friends system; these are the ticket-specific
   additions only.
   ========================================================== */
.ticket-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.22s ease;
}
.ticket-card:hover {
  background: rgba(214, 167, 86, 0.08);
  border-color: rgba(214, 167, 86, 0.3);
  transform: translateX(-2px);
}
.ticket-card-icon {
  width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
  background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.ticket-card-info { flex: 1; min-width: 0; }
.ticket-card-subject { font-size: 14px; font-weight: 800; color: var(--text-main); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ticket-card-preview { font-size: 12px; color: var(--text-muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ticket-card-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }

.ticket-status-badge { font-size: 11px; font-weight: 700; padding: 4px 12px; border-radius: 100px; white-space: nowrap; }
.ticket-status-badge.open { background: rgba(214, 167, 86, 0.14); color: var(--accent); }
.ticket-status-badge.answered { background: rgba(78, 159, 110, 0.14); color: var(--success); }
.ticket-status-badge.closed { background: rgba(255, 255, 255, 0.08); color: var(--text-muted); }

.ticket-unread-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); }

.chat-attachment { margin-top: 6px; }
.chat-attachment img {
  max-width: 220px; max-height: 220px; border-radius: 14px; display: block;
  cursor: pointer; border: 1px solid var(--border);
}

.new-ticket-form { display: flex; flex-direction: column; gap: 14px; }
.new-ticket-form label { font-size: 12.5px; color: var(--text-muted); font-weight: 700; margin-bottom: 6px; display: block; }
.new-ticket-form textarea {
  width: 100%; min-height: 120px; resize: vertical;
  background: rgba(0, 0, 0, 0.3); border: 1px solid var(--border); border-radius: 14px;
  padding: 12px 16px; color: var(--text-main); font-size: 13.5px;
  font-family: 'Vazirmatn', sans-serif; outline: none;
}
.new-ticket-form textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.attach-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px;
  border-radius: 12px; border: 1px dashed var(--border); background: rgba(255,255,255,0.03);
  color: var(--text-muted); font-size: 12.5px; font-weight: 700; cursor: pointer;
  font-family: 'Vazirmatn', sans-serif; width: fit-content;
}
.attach-btn:hover { border-color: var(--accent); color: var(--accent); }
.attach-preview { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.attach-preview img { width: 50px; height: 50px; border-radius: 10px; object-fit: cover; border: 1px solid var(--border); }
.attach-preview button { background: none; border: none; color: var(--error); font-size: 12px; cursor: pointer; font-family: 'Vazirmatn', sans-serif; }

/* ==========================================================
   Support ticket system v2 — full-page two-pane layout
   ========================================================== */
.support-layout {
  display: flex;
  gap: 20px;
  height: calc(100vh - 260px);
  min-height: 520px;
}

.support-sidebar {
  width: 340px;
  flex-shrink: 0;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 22px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  backdrop-filter: blur(20px);
}
.support-sidebar-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-shrink: 0;
}
.support-sidebar-header h3 { font-size: 15px; font-weight: 900; color: #fff; }
.support-new-btn {
  width: 34px; height: 34px; border-radius: 10px; border: none;
  background: linear-gradient(90deg, var(--accent), var(--accent-dim));
  color: #0a0b0e; font-size: 18px; font-weight: 900; cursor: pointer;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.support-filter-row { display: flex; gap: 6px; padding: 12px 14px 0; flex-shrink: 0; flex-wrap: wrap; }
.support-filter-chip {
  font-size: 11.5px; font-weight: 700; padding: 6px 12px; border-radius: 100px;
  border: 1px solid var(--border); background: rgba(255,255,255,0.03); color: var(--text-muted);
  cursor: pointer; font-family: 'Vazirmatn', sans-serif;
}
.support-filter-chip.active { background: var(--accent-soft); border-color: rgba(214,167,86,0.4); color: var(--accent); }

.support-sidebar-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.support-ticket-item {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 14px; border-radius: 16px; cursor: pointer;
  border: 1px solid transparent; transition: all 0.2s ease;
}
.support-ticket-item:hover { background: rgba(255,255,255,0.04); }
.support-ticket-item.active { background: rgba(214, 167, 86, 0.1); border-color: rgba(214, 167, 86, 0.3); }
.support-ticket-avatar {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; overflow: hidden;
  background: linear-gradient(135deg, var(--accent), var(--accent-dim));
  display: flex; align-items: center; justify-content: center; font-weight: 800; color: #0a0b0e; font-size: 15px;
}
.support-ticket-avatar img { width: 100%; height: 100%; object-fit: cover; }
.support-ticket-item-info { flex: 1; min-width: 0; }
.support-ticket-item-top { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.support-ticket-item-subject { font-size: 13.5px; font-weight: 800; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.support-ticket-item-time { font-size: 10.5px; color: var(--text-muted); flex-shrink: 0; }
.support-ticket-item-preview { font-size: 12px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.support-ticket-item-user { font-size: 11px; color: var(--accent); margin-top: 1px; }

.support-main {
  flex: 1;
  min-width: 0;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 22px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  backdrop-filter: blur(20px);
}

.support-main-header {
  padding: 16px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}
.support-back-btn { display: none; }
.support-main-header-info { flex: 1; min-width: 0; }
.support-main-header-subject { font-size: 15px; font-weight: 900; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.support-main-header-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.support-main-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.support-empty-state {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; color: var(--text-muted); text-align: center; padding: 40px;
}
.support-empty-state svg { opacity: 0.3; }

.support-msg-row { display: flex; gap: 10px; align-items: flex-end; max-width: 78%; }
.support-msg-row.mine { flex-direction: row-reverse; align-self: flex-end; }
.support-msg-row:not(.mine) { align-self: flex-start; }
.support-msg-avatar {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0; overflow: hidden;
  display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; color: #0a0b0e;
  background: linear-gradient(135deg, var(--accent), var(--accent-dim));
}
.support-msg-avatar.agent { background: linear-gradient(135deg, #4e9f6e, #2f7350); color: #fff; }
.support-msg-avatar img { width: 100%; height: 100%; object-fit: cover; }
.support-msg-col { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.support-msg-row.mine .support-msg-col { align-items: flex-end; }
.support-msg-time { font-size: 10px; color: var(--text-muted); padding: 0 4px; }

.support-new-ticket-panel { padding: 32px; max-width: 520px; margin: 0 auto; width: 100%; }

.support-attach-thumb { position: relative; display: inline-block; }
.support-attach-thumb img { max-width: 240px; max-height: 240px; border-radius: 16px; cursor: zoom-in; border: 1px solid var(--border); display: block; }

@media (max-width: 900px) {
  .support-layout { height: calc(100vh - 200px); gap: 0; position: relative; overflow: hidden; border-radius: 22px; }
  .support-sidebar { width: 100%; border-radius: 22px; position: absolute; inset: 0; z-index: 2; transition: transform 0.25s ease; }
  .support-main { border-radius: 22px; position: absolute; inset: 0; z-index: 1; transform: translateX(105%); transition: transform 0.25s ease; }
  .support-layout.chat-open .support-sidebar { transform: translateX(105%); }
  .support-layout.chat-open .support-main { transform: translateX(0); }
  .support-back-btn { display: flex; }
}

/* ==========================================================
   Announcements system (index.html) — corner dock menu,
   homepage teaser banner, and reactions
   ========================================================== */

.announce-panel {
  position: fixed;
  top: 470px;
  right: 114px;
  width: 380px;
  max-width: calc(100vw - 32px);
  max-height: 65vh;
  background: rgba(14, 15, 19, 0.99);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(214, 167, 86, 0.06) inset;
  z-index: 205;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: translateX(12px) scale(0.97);
  transform-origin: top right;
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.announce-panel::before {
  content: '';
  position: absolute;
  top: 27px;
  right: -7px;
  width: 14px;
  height: 14px;
  background: rgba(14, 15, 19, 0.99);
  border-top: 1px solid var(--border);
  border-right: 1px solid var(--border);
  border-radius: 3px;
  transform: rotate(45deg);
}

.announce-panel.open {
  opacity: 1;
  visibility: visible;
  transform: translateX(0) scale(1);
}

.announce-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  border-radius: 20px 20px 0 0;
  background: linear-gradient(135deg, rgba(214, 167, 86, 0.09), transparent 70%);
  flex-shrink: 0;
}

.announce-panel-title {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.announce-panel-close {
  background: rgba(255, 255, 255, 0.06);
  border: none;
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.announce-panel-close:hover { background: rgba(194, 75, 67, 0.18); color: #f0bcb7; }

.announce-list {
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.announce-empty {
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  padding: 40px 16px;
}

.announce-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  animation: cardFadeInUp 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
}

.announce-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  gap: 8px;
}

.announce-type-badge {
  font-size: 10.5px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 100px;
  white-space: nowrap;
  flex-shrink: 0;
}
.announce-type-badge.type-info { background: var(--accent-soft); color: var(--accent); }
.announce-type-badge.type-update { background: rgba(78, 159, 110, 0.14); color: var(--success); }
.announce-type-badge.type-event { background: rgba(122, 141, 214, 0.16); color: #9db2ec; }
.announce-type-badge.type-warning { background: rgba(194, 75, 67, 0.14); color: var(--error); }

.announce-item-time { font-size: 11px; color: var(--text-muted); white-space: nowrap; }

.announce-item-title { font-size: 14px; font-weight: 800; color: #fff; margin-bottom: 4px; word-break: break-word; }
.announce-item-content {
  font-size: 12.5px;
  color: #c3c4c9;
  line-height: 1.8;
  white-space: pre-line;
  word-break: break-word;
}

.announce-item-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  gap: 8px;
  flex-wrap: wrap;
}

.announce-item-author { font-size: 11px; color: var(--text-muted); }

.announce-reactions { display: flex; gap: 6px; flex-wrap: wrap; }

.reaction-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
  color: var(--text-muted);
  font-family: 'Vazirmatn', sans-serif;
  transition: all 0.2s ease;
}
.reaction-btn:hover { border-color: var(--border-strong); background: rgba(255, 255, 255, 0.09); transform: translateY(-1px); }
.reaction-btn.active {
  background: var(--accent-soft);
  border-color: rgba(214, 167, 86, 0.4);
  color: var(--accent);
}
.reaction-btn.reacting { opacity: 0.55; pointer-events: none; }
.reaction-count { font-size: 11px; font-weight: 700; transition: color 0.2s ease; }

@keyframes reactionPop {
  0% { transform: scale(1); }
  35% { transform: scale(1.3); }
  60% { transform: scale(0.94); }
  100% { transform: scale(1); }
}
.reaction-btn.pop { animation: reactionPop 0.35s cubic-bezier(0.3, 1.4, 0.5, 1); }

.announce-banner {
  display: none;
  align-items: center;
  gap: 18px;
  padding: 18px 26px;
  animation: fadeIn 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.announce-banner-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  flex-shrink: 0;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 21px;
  animation: bannerIconFloat 3s ease-in-out infinite;
}

@keyframes bannerIconFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.announce-banner-body { flex: 1; min-width: 0; }
.announce-banner-label {
  font-size: 11.5px;
  font-weight: 800;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.announce-banner-label::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: bannerDotPing 1.8s infinite;
  flex-shrink: 0;
}
@keyframes bannerDotPing {
  0% { box-shadow: 0 0 0 0 rgba(214, 167, 86, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(214, 167, 86, 0); }
  100% { box-shadow: 0 0 0 0 rgba(214, 167, 86, 0); }
}
.announce-banner-title {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.announce-banner-btn {
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid rgba(214, 167, 86, 0.35);
  padding: 9px 18px;
  border-radius: 12px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  font-family: 'Vazirmatn', sans-serif;
  white-space: nowrap;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.announce-banner-btn:hover { background: var(--accent); color: #14100a; }

@media (max-width: 640px) {
  .announce-panel {
    top: auto;
    bottom: 16px;
    left: 12px;
    right: 12px;
    width: auto;
    max-width: none;
    max-height: 72vh;
    transform: translateY(16px) scale(0.98);
    transform-origin: bottom center;
  }
  .announce-panel.open { transform: translateY(0) scale(1); }
  .announce-panel::before { display: none; }
  .announce-banner { padding: 16px; gap: 12px; flex-wrap: wrap; }
  .announce-banner-title { white-space: normal; }
  .announce-banner-btn { width: 100%; }
}

/* ---------- Announcements — admin panel (admin.html) ---------- */

.announce-form {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 22px;
  margin-bottom: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.announce-form-row { display: flex; gap: 12px; flex-wrap: wrap; }
.announce-form-row > * { flex: 1; min-width: 160px; }

.gl-label { font-size: 12.5px; color: var(--text-muted); font-weight: 700; margin-bottom: 6px; display: block; }

.gl-input, .gl-textarea, .gl-select {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 11px 14px;
  color: var(--text-main);
  font-size: 13.5px;
  font-family: 'Vazirmatn', sans-serif;
  outline: none;
  transition: all 0.2s ease;
}
.gl-textarea { min-height: 100px; resize: vertical; }
.gl-input:focus, .gl-textarea:focus, .gl-select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.gl-select { cursor: pointer; }

.gl-checkbox-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-muted); cursor: pointer; user-select: none; }
.gl-checkbox-row input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }

.announce-form-actions { display: flex; gap: 10px; align-items: center; }

.announce-admin-reactions { display: flex; gap: 10px; font-size: 12px; color: var(--text-muted); margin-top: 10px; }
.announce-admin-badges { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.pin-badge {
  font-size: 10.5px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 100px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid rgba(214, 167, 86, 0.35);
  white-space: nowrap;
}