:root{
  /* Light theme (default) */
  --bg: #f6f7fb;
  --card: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --border: #e5e7eb;

  --shadow: 0 10px 26px rgba(17,24,39,.08);
  --radius: 16px;
  --tap: 48px;
  --nav-h: 64px;
  --accent: #f97316; /* Takberi orange */

  --input-bg: #ffffff;
  --input-text: var(--text);
  --chip-bg: rgba(17,24,39,.04);
  --chip-border: rgba(17,24,39,.18);

  --appbar-bg: rgba(246,247,251,.82);
  --appbar-border: rgba(229,231,235,.75);
  --nav-bg: rgba(255,255,255,.86);
  --nav-border: rgba(229,231,235,.85);

  --modal-overlay: rgba(17,24,39,.60);
  --zoom-overlay: rgba(17,24,39,.75);

  --btn-secondary-bg: #ffffff;
  --btn-secondary-text: #111827;

  --pill-bg: #eef2ff;
  --pill-text: #3730a3;

  --sheet-bg: var(--card);
  --sheet-shadow: 0 -10px 30px rgba(0,0,0,.18);

  --fab-bg: #111827;
  --fab-border: rgba(0,0,0,.10);
}

/* Dark theme */
html[data-theme="dark"]{
  --bg: #0b1220;
  --card: #0f172a;
  --text: #e5e7eb;
  --muted: rgba(229,231,235,.70);
  --border: rgba(255,255,255,.12);

  --shadow: 0 14px 34px rgba(0,0,0,.45);

  --input-bg: rgba(255,255,255,.06);
  --input-text: var(--text);
  --chip-bg: rgba(255,255,255,.08);
  --chip-border: rgba(255,255,255,.18);

  --appbar-bg: rgba(11,18,32,.72);
  --appbar-border: rgba(255,255,255,.10);
  --nav-bg: rgba(11,18,32,.80);
  --nav-border: rgba(255,255,255,.10);

  --modal-overlay: rgba(0,0,0,.72);
  --zoom-overlay: rgba(0,0,0,.78);

  --btn-secondary-bg: rgba(255,255,255,.06);
  --btn-secondary-text: var(--text);

  --pill-bg: rgba(99,102,241,.18);
  --pill-text: #c7d2fe;

  --sheet-bg: #0b1220;
  --sheet-shadow: 0 -12px 36px rgba(0,0,0,.55);

  --fab-bg: #0b1220;
  --fab-border: rgba(255,255,255,.14);
}

*{ box-sizing: border-box; }

html, body{ height: 100%; }

body{
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

/* =========================
   SHELL / LAYOUT
========================= */

.app-shell{
  min-height: 100dvh;
  display: flex;
  justify-content: center;
}

/* Desktop: nice centered column; Mobile: full width */
.app{
  width: 100%;
  max-width: 720px;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.content{
  width: 100%;
  padding: 14px 14px calc(var(--nav-h) + env(safe-area-inset-bottom) + 14px);
}

.panel{ width: 100%; }

/* =========================
   AUTH
========================= */

.auth{
  width: 100%;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.auth__card{
  width: 100%;
  max-width: 520px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}

.auth__brand{
  font-weight: 900;
  letter-spacing: .2px;
  font-size: 22px;
}

.field{ display:block; }
.field__label{ display:block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }

/* =========================
   APP BAR
========================= */

.appbar{
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: var(--appbar-bg);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--appbar-border);
}

.appbar__title{ font-weight: 900; font-size: 18px; line-height: 1.1; }
.appbar__subtitle{ font-size: 12px; margin-top: 2px; }

.icon-btn{
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: none;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size: 18px;
}

.btn{
  height: 44px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  letter-spacing: .2px;
}

.btn--sm{
  height: 36px;
  padding: 0 12px;
  border-radius: 12px;
  font-size: 13px;
}

/* =========================
   UPDATE BANNER
========================= */

.update-banner{
  position: sticky;
  top: 60px;
  z-index: 49;
  margin: 10px 14px 0;
  padding: 10px 12px;
  border: 1px solid rgba(229,231,235,.85);
  border-radius: 16px;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(160%) blur(10px);
  box-shadow: 0 10px 22px rgba(17,24,39,.08);
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
}

.update-banner__text{
  font-size: 13px;
  color: var(--text);
  font-weight: 700;
}

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

/* =========================
   CARDS / TYPOGRAPHY
========================= */

.card{
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px;
  margin: 12px 0;
}

.h{ font-weight: 800; font-size: 18px; }
.muted{ color: var(--muted); font-size: 13px; }

/* inputs/buttons */
input, button, textarea, select{
  width: 100%;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  font-size: 16px;
  background: var(--input-bg);
  color: var(--input-text);
}

select{
  appearance: none;
  -webkit-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(1em + 2px),
    calc(100% - 13px) calc(1em + 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 34px;
}

textarea{ resize: vertical; }

button{
  min-height: var(--tap);
  background: var(--accent);
  color: #fff;
  border: none;
  cursor: pointer;
  font-weight: 800;
}

button.secondary{
  background: var(--btn-secondary-bg);
  color: var(--btn-secondary-text);
  border: 1px solid var(--border);
  font-weight: 800;
}

button:disabled{ opacity: .55; cursor: not-allowed; }

.row{ display:flex; gap:10px; }
.row > *{ flex: 1; }

.list-item{ display:flex; justify-content: space-between; gap: 10px; align-items: center; }
.pill{ font-size: 12px; padding: 4px 10px; border-radius: 999px; background: var(--pill-bg); color: var(--pill-text); }

/* Section head */
.section-head{
  display:flex;
  align-items:center;
  gap: 10px;
  margin-bottom: 10px;
}
.section-head__text{ flex: 1; min-width: 0; }

.section-title.is-hidden{ display:none; }

.profile-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--appbar-border);
}
.profile-row:first-of-type{ border-top: 0; padding-top: 0; }
.profile-row__k{ font-weight: 800; }

.profile-row__v{ flex:1; text-align:right; }
.profile-row .mini{ width:auto; padding:8px 10px; font-size:13px; border-radius:10px; background:#fff; color:#111827; border:1px solid #e5e7eb; }
.profile-row .mini{ background: var(--accent); color:#fff; border:none; }
.profile-row .mini:active{ transform: scale(0.98); }

.chip{
  width: auto;
  padding: 10px 12px;
  border-radius: 999px;
  border: none;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}


/* =========================
   BADGES (statuses)
========================= */

.badge{
  display:inline-flex;
  align-items:center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  border: 1px solid var(--border);
  background: var(--chip-bg);
  line-height: 1.1;
  white-space: nowrap;
}

.badge--green{ background: rgba(16,185,129,.10); border-color: rgba(16,185,129,.25); color: #065f46; }
.badge--amber{ background: rgba(245,158,11,.12); border-color: rgba(245,158,11,.28); color: #92400e; }
.badge--red{ background: rgba(239,68,68,.10); border-color: rgba(239,68,68,.25); color: #991b1b; }
.badge--blue{ background: rgba(59,130,246,.10); border-color: rgba(59,130,246,.25); color: #1e40af; }
.badge--gray{ background: rgba(156,163,175,.12); border-color: rgba(156,163,175,.28); color: #374151; }

html[data-theme="dark"] .badge--green{ color: #bbf7d0; }
html[data-theme="dark"] .badge--amber{ color: #fde68a; }
html[data-theme="dark"] .badge--red{ color: #fecaca; }
html[data-theme="dark"] .badge--blue{ color: #bfdbfe; }
html[data-theme="dark"] .badge--gray{ color: rgba(229,231,235,.85); }

.meta-dot{
  opacity: .6;
  font-weight: 900;
}

.badge--warn{
  background:#ff8a00;
  color:#fff;
}

/* =========================
   BOTTOM NAV
========================= */

.bottom-nav{
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;

  height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);

  display: flex;
  justify-content: center;

  background: var(--nav-bg);
  backdrop-filter: saturate(160%) blur(12px);
  border-top: 1px solid var(--nav-border);
}

.bottom-nav .tab{
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;

  width: 100%;
  max-width: 240px;

  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;

  padding: 8px 6px;
  min-height: var(--nav-h);
}

.bottom-nav .tab__icon{ font-size: 18px; line-height: 1; }
.bottom-nav .tab__label{ font-size: 11px; font-weight: 800; }

.bottom-nav .tab.active{ color: var(--text); }

/* =========================
   TELEGRAM-LIKE CARD TEXT
========================= */

.tg-caption{
  white-space: pre-wrap;
  font-size: 14px;
  line-height: 1.42;
  color: var(--text);
}

.tg-caption b{ font-weight: 900; }

.thumb{
  width: 92px;
  height: auto;
  aspect-ratio: 3 / 4; /* WB photos are typically 900x1200 */
  border-radius: 14px;
  object-fit: cover;
  border: 1px solid var(--border);
  cursor: zoom-in;
  flex: 0 0 auto;
  display: block;
}

.thumb.thumb--placeholder{
  background: var(--chip-bg);
}

/* pager */
.pager{ display:flex; gap:10px; align-items:center; justify-content:space-between; }
.pager button{ width:auto; max-width: 160px; }

/* =========================
   IMAGE ZOOM MODAL
========================= */

.no-scroll{ overflow: hidden; }

.img-zoom.hidden{ display:none; }
.img-zoom{ position: fixed; inset: 0; z-index: 9999; display:block; }
.img-zoom__backdrop{ position:absolute; inset:0; background: var(--zoom-overlay); }
.img-zoom__content{ position:absolute; inset: 24px; display:flex; align-items:center; justify-content:center; }
.img-zoom__content img{ max-width: 100%; max-height: 100%; border-radius: 18px; box-shadow: 0 18px 60px rgba(0,0,0,.35); background: var(--card); }
.img-zoom__close{ position:absolute; top: 14px; right: 14px; width:auto; padding: 10px 12px; border-radius: 14px; background: var(--btn-secondary-bg); color: var(--btn-secondary-text); border:1px solid var(--border); }

/* slightly tighter on very small devices */
@media (max-width: 360px){
  .content{ padding-left: 12px; padding-right: 12px; }
  .thumb{ width: 84px; }
}


/* --- Edit modal (reuse backdrop) --- */
.edit-modal__content{ position:absolute; inset:24px; display:flex; align-items:center; justify-content:center; }



/* =========================
   COMPACT OFFER CARD (modern)
========================= */

.offer-card{ padding: 14px; }

.offer-row{
  display:flex;
  gap:12px;
  align-items:flex-start;
}

.offer-col{
  flex:1;
  min-width:0;
}

.offer__title{
  font-weight: 900;
  font-size: 15px;
  line-height: 1.25;
}

.offer__meta{
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  display:flex;
  flex-wrap: nowrap;
  gap: 6px;
  align-items:center;
}

.offer__dot{ opacity: .5; }

.offer-body{
  margin-top:14px;
}

.offer-actions{
  margin-top:16px;
}

.offer-row{
  display:flex;
  gap:12px;
}


.facts{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap:10px;
  margin: 10px 0 8px;
}

.fact{
  border:1px solid var(--border);
  border-radius:14px;
  padding:10px 12px;
  background: var(--card);
  line-height:1.15;
}

.fact__label{
  font-size:12px;
  color: var(--muted);
  margin-bottom: 6px;
}

.fact__value{
  font-size:16px;
  font-weight: 900;
}

.fact--accent{
  background:#16a34a;
  border-color: rgba(0,0,0,.20);
  box-shadow: 0 2px 6px rgba(21,128,61,.25);
}
html[data-theme="dark"] .fact--accent{ border-color: rgba(255,255,255,.14); }

.fact--accent .fact__label{ color: rgba(255,255,255,.75); }
.fact--accent .fact__value{ color:#fff; }

.offer__media{
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.35;
}

.offer__notes{
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.35;
  color: var(--text);
}

.offer__note + .offer__note{ margin-top: 6px; }

.offer__note--special{
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--chip-bg);
  border: 1px dashed var(--chip-border);
}

.offer-actions{
  margin-top: 12px;
}

.offer-actions--wrap{
  display:flex;
  gap:10px;
  flex-wrap: wrap;
}

.offer-actions--wrap button{ flex: 1; min-width: 160px; }

@media (max-width: 520px){
  .facts{ gap:8px; }
  .fact{ padding: 9px 10px; }
  .fact__value{ font-size: 15px; }
}

@media (max-width: 380px){
  /* Keep 3 blocks in one line on Android too (match iOS). */
  .facts{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fact{ padding: 8px 10px; }
  .fact__label{ font-size: 11px; }
  .fact__value{ font-size: 14px; }
}

@media (max-width: 320px){
  /* On ultra-small screens allow wrap */
  .facts{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}


/* ===== Modal (write review) ===== */
body.modal-open{ overflow:hidden; }

/* FAQ */
.faq{ padding: 14px; }
.faq__item{ border: 1px solid var(--border); border-radius: 14px; padding: 10px 12px; margin: 10px 0; background: var(--card); }
.faq__q{ cursor:pointer; font-weight:700; list-style:none; }
.faq__q::-webkit-details-marker{ display:none; }
.faq__a{ margin-top:10px; color: var(--muted); line-height:1.55; }
.faq code{ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-size: 12px; padding: 2px 6px; border-radius: 8px; background: var(--chip-bg); }

.modal{
  position:fixed;
  inset:0;
  display:flex;
  align-items:flex-end;
  justify-content:center;
  z-index:9999;
}

.modal__overlay{
  position:absolute;
  inset:0;
  background: var(--modal-overlay);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}


.modal__sheet{
  position:relative;
  width:min(680px, 100%);
  max-height:85vh;
  background: var(--sheet-bg);
  border-radius:18px 18px 0 0;
  box-shadow: var(--sheet-shadow);
  padding:14px 14px 16px;
  overflow:auto;
}

/* Floating support chat button */
.support-fab{
  position: fixed;
  right: 16px;
  bottom: 92px; /* above bottom nav */
  width: 54px;
  height: 54px;
  border-radius: 999px;
  border: 1px solid var(--fab-border);
  background: var(--fab-bg);
  color: #fff;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 22px rgba(0,0,0,.20);
  z-index: 60;
}
.support-fab__icon{
  width: 26px;
  height: 26px;
  display:block;
  fill: currentColor;
}
.support-fab:active{ transform: scale(.98); }
.support-fab__badge{
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 12px;
  line-height: 20px;
  font-weight: 700;
  border: 2px solid #fff;
}

/* Support archive list */
.ticket-item{
  border:1px solid var(--border);
  border-radius:16px;
  padding:10px;
  background: var(--card);
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  cursor:pointer;
}
.ticket-item:active{ transform: scale(.99); }
.ticket-item + .ticket-item{ margin-top:10px; }
.ticket-item__title{ font-weight:900; line-height:1.25; }
.ticket-item__meta{ margin-top:6px; color:#5a6575; font-size:13px; line-height:1.35; }
.ticket-item__right{ display:flex; flex-direction:column; align-items:flex-end; gap:8px; min-width:86px; }
.ticket-status{
  font-size:12px;
  font-weight:800;
  padding:4px 8px;
  border-radius:999px;
  border:1px solid var(--border);
  background: var(--chip-bg);
  color: var(--text);
}
.ticket-status.open{ background:rgba(34,197,94,.12); border-color:rgba(34,197,94,.25); }
.ticket-status.closed{ background:rgba(107,114,128,.12); border-color:rgba(107,114,128,.25); }
.ticket-new{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:20px;
  height:20px;
  padding:0 7px;
  border-radius:999px;
  background:#ef4444;
  color:#fff;
  font-size:12px;
  font-weight:800;
}

.modal__head{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:10px;
  padding:4px 2px 10px;
  position: relative;
  padding-right: 52px; /* reserve space for close */
  flex-wrap: nowrap;
}

.modal__title{ font-weight:900; font-size:18px; flex: 1; min-width: 0; }

/* Single close button class for ALL modals + update banner.
   Fully defined to avoid inheriting global button styles. */
.modal_close{
  width: 40px;
  height: 40px;
  min-height: 0;
  padding: 0;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--btn-secondary-bg);
  color: var(--btn-secondary-text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  line-height: 1;
  font-weight: 800;
  box-sizing: border-box;
  flex: 0 0 auto;
}

.modal_close:hover{ background: rgba(229,231,235,.92); }
html[data-theme="dark"] .modal_close:hover{ background: rgba(255,255,255,.10); }

/* Pin close in top-right of modal headers */
.modal__header{ position: relative; padding-right: 52px; }
.modal__header .modal_close{
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
}

.modal__head .modal_close{
  position: absolute;
  top: 4px;
  right: 10px;
  z-index: 2;
}

/* Update banner close stays inline */
.update-banner .modal_close{
  position: static;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  font-size: 18px;
}

.textarea{
  width:100%;
  box-sizing:border-box;
  border:1px solid var(--border);
  border-radius:14px;
  padding:12px;
  font-size:16px;
  outline:none;
  resize:vertical;
}

.textarea:focus{
  border-color: rgba(249,115,22,.55);
  box-shadow:0 0 0 4px rgba(249,115,22,.18);
}

.modal__foot{
  margin-top:12px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
}

button.primary, button.secondary{
  border-radius:12px;
  padding:8px 12px;
  font-weight:800;
  cursor:pointer;
}

button.primary{
  border:1px solid rgba(0,0,0,.20);
  background:#111827;
  color:#fff;
}
html[data-theme="dark"] button.primary{ border-color: rgba(255,255,255,.14); background: #111827; }

button.primary:disabled{ opacity:.55; cursor:not-allowed; }

button.secondary{
  border:1px solid var(--border);
  background: var(--btn-secondary-bg);
  color: var(--btn-secondary-text);
}

@media (min-width: 640px){
  .modal{ align-items:center; }
  .modal__sheet{ border-radius:18px; }
}


/* Appbar actions */
.appbar__actions{ display:flex; align-items:center; gap:10px; }
.icon-btn{
  width: 42px;
  height: 42px;
  display:flex;
  align-items:center;
  justify-content:center;
  border: 1px solid var(--border);
  background: var(--btn-secondary-bg);
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(17,24,39,.08);
  cursor:pointer;
  user-select:none;
}
.icon-btn:active{ transform: translateY(1px); }
.icon-btn.is-on{ border-color: rgba(16,185,129,.45); }
.icon-btn.is-on #pushToggleIcon{ filter: saturate(1.4); }
.icon-btn.is-off{ opacity: .72; }

/* Modal positioning: centered on desktop, bottom-sheet on mobile */
.modal{
  align-items: center;
  padding: 18px;
}
.modal__sheet{
  width: min(720px, 100%);
  border-radius: 18px;
  max-height: min(86vh, 840px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  margin: 0 auto;
}
.modal__content{
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

/* bottom-sheet on small screens */
@media (max-width: 720px){
  .modal{ align-items: flex-end; padding: 0; }
  .modal__sheet{
    border-radius: 18px 18px 0 0;
    width: 100%;
    max-height: 88vh;
  }
}

/* Support chat modal polish */
#ticketChatModal .modal__sheet{ padding: 0; }

/* Keep header visible; body scrolls (important for iOS) */
#ticketChatModal .modal__sheet{
  display: flex;
  flex-direction: column;
  max-height: min(92dvh, 860px);
}

#ticketChatModal .modal__header{
  padding: 14px 14px 10px;
  border-bottom: 1px solid var(--appbar-border);
  background: var(--appbar-bg);
  backdrop-filter: saturate(160%) blur(10px);
}
#ticketChatModal .modal__title{ font-weight: 900; }

#ticketChatModal .modal__body{
  flex: 1;
  min-height: 0; /* critical for nested scrolling in flex */
  padding: 12px 14px 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

#ticketChatModal .messages{
  flex: 1;
  min-height: 140px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  display:flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 10px;
  overscroll-behavior: contain;
}

#ticketChatModal .msg{
  max-width: 92%;
  border-radius: 16px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: 0 6px 18px rgba(0,0,0,.10);
}
#ticketChatModal .msg.me{
  align-self: flex-end;
  background: rgba(16,185,129,.10);
  border-color: rgba(16,185,129,.18);
}

/* Smooth theme switch */
html{
  color-scheme: light;
  transition: background-color .18s ease, color .18s ease;
}
html[data-theme="dark"]{ color-scheme: dark; }
#ticketChatModal .msg.support{ align-self: flex-start; }

#ticketChatModal .msg__meta{
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

/* input area */
#ticketChatModal textarea{ min-height: 84px; }

@media (max-width: 720px){
  #ticketChatModal .modal__sheet{
    max-height: 92dvh;
    padding-bottom: env(safe-area-inset-bottom);
  }
}



/* =========================
   SUPPORT ARCHIVE (polish)
========================= */

.support-archive-modal.modal{
  z-index: 9999;
}

/* On mobile keep margins; do NOT glue to edges */
.support-archive__sheet{
  width: min(720px, 100%);
  max-height: min(90dvh, 860px);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 0;
  margin: 0;
}

/* Always have a bit of breathing room */
.support-archive-modal{
  padding: 14px;
  align-items: center;
}

@media (max-width: 720px){
  .support-archive-modal{
    align-items: flex-end;
    padding: 12px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
  }
  .support-archive__sheet{
    border-radius: 18px;
    max-height: 92dvh;
  }
}

/* Header */
.support-archive__head{
  padding: 14px 14px 10px;
  border-bottom: 1px solid var(--appbar-border);
  background: var(--appbar-bg);
  backdrop-filter: saturate(160%) blur(10px);
}

/* Scrollable content area */
.support-archive__content{
  flex: 1;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px 14px 14px;
}

/* Filters: responsive, always fits */
.support-filters{
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.support-filter{
  width: auto !important;
  flex: 1 1 0;
  min-width: 0;
  height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--btn-secondary-bg);
  color: var(--btn-secondary-text);
  font-weight: 900;
  cursor: pointer;
}

.support-filter.is-active{
  background: #111827;
  color: #fff;
  border-color: rgba(0,0,0,.20);
}
html[data-theme="dark"] .support-filter.is-active{ border-color: rgba(255,255,255,.14); }

/* List */
.support-archive__list{
  margin-top: 12px;
}

/* Pager pinned to bottom, compact */
.support-archive__pager{
  border-top: 1px solid var(--appbar-border);
  background: var(--appbar-bg);
  backdrop-filter: saturate(160%) blur(10px);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
}

.support-archive__btn{
  width: auto !important;
  flex: 0 0 auto;
  max-width: 160px;
  white-space: nowrap;
}

@media (max-width: 420px){
  .support-archive__pager{
    flex-wrap: wrap;
    justify-content: center;
  }
  .support-archive__btn{
    flex: 1 1 140px;
    max-width: none;
  }
}


/* =========================
   Support: top tabs + system badge
========================= */
.support-top-tabs{
  display:flex;
  gap:10px;
  margin-top:12px;
  margin-bottom:12px;
}
.support-top-tab{
  flex:1;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:12px 14px;
  border-radius:999px;
  border:1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-weight:700;
}
.support-top-tab.is-active{
  border-color: rgba(71, 141, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(71, 141, 255, 0.15);
}
.support-top-tab__badge{
  min-width:22px;
  height:22px;
  padding:0 7px;
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:12px;
  font-weight:800;
  background: rgba(35, 201, 122, 0.18);
  border: 1px solid rgba(35, 201, 122, 0.45);
  color: var(--text);
}
.support-filter--green.is-active{
  border-color: rgba(35, 201, 122, 0.55);
  box-shadow: 0 0 0 3px rgba(35, 201, 122, 0.14);
}

/* =========================
   DESKTOP LAYOUT (20/80)
========================= */

.desktop-layout{ display: flex; width: 100%; }
.desktop-sidebar{ display:none; }
.desktop-main{ width:100%; min-width:0; display:flex; flex-direction:column; }

.ds-brand{ display:flex; align-items:center; gap:10px; font-weight:900; font-size:18px; letter-spacing:.2px; margin-bottom:14px; }
.ds-logo{ width:22px; height:22px; border-radius:6px; flex:0 0 22px; }
.ds-nav{ display:flex; flex-direction:column; gap:6px; }
.ds-item{
  height: 44px;
  width: 100%;
  border-radius: 14px;
  border: 1px solid transparent;
  background: transparent;
  text-align: left;
  padding: 0 12px;
  font-weight: 500;
  color: var(--text);
}
.ds-item:hover{ background: rgba(17,24,39,.04); }
html[data-theme="dark"] .ds-item:hover{ background: rgba(255,255,255,.06); }
.ds-item.is-active{ background: rgb(158 158 158 / 12%); border-color: rgb(127 127 127 / 25%); }

.ds-spacer{ flex:1; }

.ds-qr{ margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.ds-qr__title{ font-weight: 900; margin-bottom: 8px; }
.ds-qr__box{ display:flex; justify-content:center; }
.ds-qr__note{ font-size: 12px; color: var(--muted); margin-top: 8px; line-height:1.35; }

@media (min-width: 980px){
  html, body{ height:100%; }
  html, body{ overflow:hidden; }
  body.is-desktop{ overflow:hidden; }

  body.is-desktop .app-shell{ justify-content: stretch; }
  body.is-desktop .app{ max-width: none; }

  body.is-desktop .desktop-layout{
    max-width: none;
    width: 100vw;
    margin: 0;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
    display: flex;
  }

  body.is-desktop .desktop-sidebar{
    display:flex;
    flex-direction:column;
    width: 280px;
    flex: 0 0 280px;
    background: var(--card);
    border-right: 1px solid var(--border);
    padding: 16px 14px;
    position: sticky;
    top: 0;
    height: 100dvh;
    overflow: auto;
  }

  body.is-desktop .desktop-main{
    padding-left: 0;
    flex: 1 1 auto;
    min-width: 0;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  body.is-desktop .content{
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    padding: 18px 22px 22px;
  }
  body.is-desktop .bottom-nav{ display:none; }
  body.is-desktop .support-fab{ display:none !important; }

  /* don't show theme toggle on desktop (requested) */
  body.is-desktop #btnToggleTheme{ display:none !important; }
}

/* =========================
   DESKTOP SUPPORT (INLINE)
========================= */

.support-desk{
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 16px;
}

@media (max-width: 980px){
  .support-desk{ grid-template-columns: 1fr; }
}

body.is-desktop #supportArchiveModal,
body.is-desktop #ticketChatModal{
  position: static !important;
  inset: auto !important;
  background: transparent !important;
}

body.is-desktop #supportArchiveModal .modal__overlay,
body.is-desktop #ticketChatModal .modal__overlay{
  display:none !important;
}

body.is-desktop #supportArchiveModal .modal__sheet,
body.is-desktop #ticketChatModal .modal__sheet{
  position: static !important;
  transform: none !important;
  max-width: none !important;
  width: 100% !important;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

body.is-desktop #supportArchiveModal .modal_close{
  display:none !important;
}

body.is-desktop #ticketChatModal{
  display:none; /* hidden until ticket is opened */
}


/* --- Desktop sidebar footer: compact QR + resources (very minimal) --- */
@media (min-width: 980px){
  body.is-desktop .ds-footer{ padding: 14px 0 10px; border-top: 1px solid var(--border); }
  body.is-desktop .ds-qr{ margin-top: 0; padding-top: 0; border-top: 0; }
  body.is-desktop .ds-qr__head{ display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom: 10px; }
  body.is-desktop .ds-qr__title{ font-weight: 800; font-size: 13px; margin:0; letter-spacing: .2px; }
  body.is-desktop .ds-qr__action{
    display:inline-flex; align-items:center; justify-content:center;
    width: 34px; height: 34px; border-radius: 10px;
    border: 1px solid var(--border); background: var(--card);
    color: var(--muted); cursor:pointer;
  }
  body.is-desktop .ds-qr__action:hover{ color: var(--text); }
  body.is-desktop .ds-qr__img{
    width: 118px; height: 118px; object-fit: contain;
    border-radius: 12px; border: 1px solid var(--border);
    background: #fff;
  }
  body.is-desktop .ds-qr__hint{ margin-top: 8px; font-size: 12px; color: var(--muted); }

  body.is-desktop .ds-ico{ width: 18px; height: 18px; flex: 0 0 18px; opacity: .88; }
  body.is-desktop .ds-item{ display:flex; align-items:center; gap:10px; }
  body.is-desktop .ds-item span{ font-weight: 500; }
  
  
  body.is-desktop .ds-acc{ margin-top: 12px; }
  body.is-desktop .ds-acc__sum{
    list-style: none;
    display:flex; align-items:center; gap:10px;
    padding: 10px 10px;
    border-radius: 12px;
    cursor:pointer;
    color: var(--muted);
    user-select:none;
  }
  body.is-desktop .ds-acc__sum::-webkit-details-marker{ display:none; }
  body.is-desktop .ds-acc[open] .ds-acc__sum,
  body.is-desktop .ds-acc__sum:hover{ background: rgba(2,6,23,.04); color: var(--text); }
  body.is-desktop .ds-acc__sum span{ font-weight: 650; }
  body.is-desktop .ds-acc__body{ padding: 8px 4px 2px 6px; display:flex; flex-direction:column; gap: 6px; }

  body.is-desktop .ds-link{
    display:flex; align-items:center; gap:10px;
    padding: 9px 10px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text);
    border: 1px solid transparent;
    background: transparent;
  }
  body.is-desktop .ds-link:hover{ background: rgba(2,6,23,.04); border-color: rgba(2,6,23,.06); }
  body.is-desktop .ds-link--btn{ width:100%; text-align:left; cursor:pointer; font: inherit; }

  body.is-desktop .ds-subacc{ padding-left: 0; }
  body.is-desktop .ds-subacc__sum{
    list-style:none;
    display:flex; align-items:center; gap:10px;
    padding: 9px 10px;
    border-radius: 12px;
    cursor:pointer;
    color: var(--text);
  }
  body.is-desktop .ds-subacc__sum::-webkit-details-marker{ display:none; }
  body.is-desktop .ds-subacc__sum:hover{ background: rgba(2,6,23,.04); }
  body.is-desktop .ds-subacc__body{ padding: 6px 0 4px 32px; display:flex; flex-direction:column; gap: 6px; }
  body.is-desktop .ds-sublink{
    display:flex;
    align-items:center;
    gap: 8px;
    color: var(--muted);
    text-decoration: none;
    padding: 6px 0;
  }
  body.is-desktop .ds-sublink:hover{ color: var(--text); }

  body.is-desktop .ds-sub-ico{
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    border-radius: 4px;
    object-fit: contain;
  }
}


  body.is-desktop .ds-footer{
    padding: 14px 14px 16px;
    border-top: 1px solid rgba(0,0,0,.06);
  }
  body.is-desktop .ds-section__title{
    font-weight: 600;
    font-size: 14px;
    color: var(--text);
    margin: 0 0 8px;
  }
  body.is-desktop .ds-section__body{
    display:flex;
    flex-direction:column;
    gap: 2px;
  }
  body.is-desktop .ds-link--btn{
    appearance:none;
    border:0;
    background:transparent;
    text-align:left;
    cursor:pointer;
    padding: 8px 10px;
    border-radius: 10px;
  }
  body.is-desktop .ds-link--btn:hover{
    background: rgba(0,0,0,.04);
  }
  
  

/* --- My Styles --- */
#entryInstall {
  background: #f97316;
  border-color: #f97316;
}

#entryInstall:hover {
  background: #ea580c;
  border-color: #ea580c;
}

/* ===== Seller WEB additions ===== */
.card{padding:14px;margin:12px 0;background:var(--card-bg, #fff);box-shadow:0 8px 22px rgba(0,0,0,.04)}
[data-theme="dark"] .card{border-color:rgba(255,255,255,.10);box-shadow:0 10px 26px rgba(0,0,0,.35)}
.card__title{font-weight:700;margin-bottom:10px}
.card__row{display:flex;justify-content:space-between;gap:12px;padding:6px 0;border-bottom:1px dashed rgba(0,0,0,.08)}
.card__row:last-child{border-bottom:none}
.muted{opacity:.7}
.navbar{display:flex;gap:8px;flex-wrap:wrap;margin:10px 0}
.navbtn{padding:10px 12px;border-radius:12px;border:1px solid rgba(0,0,0,.1);background:transparent;cursor:pointer}
.navbtn.active{font-weight:700}
[data-theme="dark"] .navbtn{border-color:rgba(255,255,255,.12)}
.toast{position:fixed;left:50%;bottom:18px;transform:translateX(-50%);background:rgba(0,0,0,.85);color:#fff;padding:10px 14px;border-radius:14px;opacity:0;pointer-events:none;transition:opacity .2s;z-index:9999}
.toast.show{opacity:1}

/* ===== Header (seller) ===== */
.balance-pill{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  height: 40px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--chip-bg);
  border: 1px solid var(--chip-border);
  color: var(--text);
  font-weight: 800;
  letter-spacing: .2px;
  user-select: none;
}

/* ===== Home: Create Giveaway (single screen) ===== */
.gw-grid{display:grid;gap:12px}
.gw-row{display:flex;gap:10px;flex-wrap:wrap;align-items:flex-end}
.gw-row .field{flex:1;min-width:220px}
.gw-mini{font-size:12px;opacity:.7}

.gw-product{display:flex;gap:12px;align-items:flex-start; background: #f0f8ff; border-radius: 12px; padding: 5px;}
.gw-product__imgWrap{width:72px;aspect-ratio:3/4;border-radius:14px;border:1px solid rgba(0,0,0,.10);background:#fff;overflow:hidden;flex:0 0 auto}
.gw-product__img{width:100%;height:100%;object-fit:cover;display:block}
[data-theme="dark"] .gw-product__imgWrap{border-color:rgba(255,255,255,.14)}
.gw-product__title{font-weight:900;line-height:1.2}
.gw-product__meta{margin-top:6px;display:flex;gap:10px;flex-wrap:wrap;font-size:13px;opacity:.75}
.gw-product__badge{display:inline-flex;align-items:center;gap:6px;padding:4px 10px;border-radius:999px;border:1px solid rgba(0,0,0,.10);background:rgba(255,255,255,.7)}
[data-theme="dark"] .gw-product__badge{border-color:rgba(255,255,255,.14);background:rgba(255,255,255,.06)}

.pct{display:flex;flex-wrap:nowrap;gap:8px}
.pct button{border-radius:12px; border:1px solid rgba(0,0,0,.12);background:rgba(255,255,255,.85);font-weight:900;cursor:pointer; padding: 10px; color: #777; width: 67px; min-width: 55px; min-height: 0;}
.pct button{flex:0 0 auto}
@media (max-width:520px){
  .pct{flex-wrap:wrap}
  .pct button{min-width:72px}
}
[data-theme="dark"] .pct button{border-color:rgba(255,255,255,.14);background:rgba(255,255,255,.06);color:var(--text)}
.pct button[aria-pressed="true"]{border-color:rgba(0,0,0,.25);background:rgba(0,0,0,.06)}
[data-theme="dark"] .pct button[aria-pressed="true"]{border-color:rgba(255,255,255,.25);background:rgba(255,255,255,.10)}

.gw-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:10px}
.gw-actions .btn{flex:1;min-width:220px}

.gw-more{margin-top:14px;border-top:1px dashed rgba(0,0,0,.12);padding-top:14px}
[data-theme="dark"] .gw-more{border-top-color:rgba(255,255,255,.18)}

.dist-head{display:flex;gap:10px;flex-wrap:wrap;align-items:flex-end}
.dist-head .field{flex:1;min-width:220px}

.dist-meta{margin-top:8px;display:flex;gap:10px;flex-wrap:wrap;font-size:13px;opacity:.85}

.dist-grid{margin-top:10px;display:grid;gap:8px;grid-template-columns:repeat(5, minmax(0,1fr))}
.daycell{display:flex;flex-direction:column;gap:4px}
.daylabel{font-size:11px;opacity:.7;line-height:1;text-align:center;white-space:nowrap}
.dist-grid input{width:100%;text-align:center}

@media (min-width: 980px){
  /* как просили: максимум 30 -> удобно 10 в ряд */
  .dist-grid{grid-template-columns:repeat(10, minmax(0,1fr))}
}

.checkbox{display:flex;gap:10px;align-items:center;user-select:none;cursor:pointer}
.checkbox input{width:auto}

/* ===== Giveaways list (tabs) ===== */
.seg{display:flex;gap:8px;flex-wrap:nowrap;overflow-x:auto;margin-bottom:12px;-webkit-overflow-scrolling:touch}
.seg::-webkit-scrollbar{height:0}
.seg__btn{flex:1 0 0;white-space:nowrap}
.seg__btn{height:38px;padding:0 12px;border-radius:12px;border:1px solid rgba(0,0,0,.12);background:#fff;color:var(--text);cursor:pointer;font-weight:800}
.seg__btn.is-active{background:rgba(0,0,0,.06);border-color:rgba(0,0,0,.22);color:var(--text)}

/* tabsbar for giveaways: sticky right under the appbar (баланс), without covering list items */
.gw-tabsbar{
  position: sticky;
  top: -20px;
  z-index: 49;
  padding: 10px 14px;
  background: var(--bg);
  border-bottom: 1px solid rgba(0,0,0,.08);
  box-shadow: 0 6px 16px rgba(0,0,0,.06);
  margin: 0 0 12px 0;
}
.gw-tabsbar .seg{margin-bottom:0}
[data-theme="dark"] .gw-tabsbar{background: var(--bg); border-bottom-color: rgba(255,255,255,.12)}
[data-theme="dark"] .seg__btn{border-color:rgba(255,255,255,.14);background:rgba(255,255,255,.06);color:var(--text)}
[data-theme="dark"] .seg__btn.is-active{background:rgba(0,0,0,.06);border-color:rgba(0,0,0,.22);color:var(--text)}

.gw-list{display:grid;gap:10px}
.gw-card{display:flex;gap:12px;border:1px solid rgba(0,0,0,.08);border-radius:16px;padding:12px;background:rgba(255,255,255,.92)}
[data-theme="dark"] .gw-card{border-color:rgba(255,255,255,.12);background:rgba(255,255,255,.04)}

.gw-img{width:72px;height:96px;object-fit:cover;border-radius:14px;border:1px solid rgba(0,0,0,.10);background:#fff;flex:0 0 auto}
[data-theme="dark"] .gw-img{border-color:rgba(255,255,255,.14);background:rgba(255,255,255,.06)}
.gw-img--ph{display:block}
.gw-img{cursor:zoom-in}

/* Finished giveaways: year/month folders */
.gw-folders{display:flex;flex-direction:column;gap:10px}
.gw-folder{border:1px solid rgba(0,0,0,.10);border-radius:14px;background:rgba(255,255,255,.70);padding:2px 10px}
[data-theme="dark"] .gw-folder{border-color:rgba(255,255,255,.14);background:rgba(255,255,255,.06)}
.gw-folder__summary{cursor:pointer;list-style:none;padding:10px 6px;font-weight:700;display:flex;align-items:center;gap:8px}
.gw-folder__summary::-webkit-details-marker{display:none}
.gw-folder__body{padding:6px 0 10px 0}
.gw-folder--month{margin:8px 0 0 0}
.gw-folder--month .gw-folder__summary{font-weight:600}

/* Image lightbox */
.img-lightbox{position:fixed;inset:0;z-index:9999;display:none}
.img-lightbox.is-open{display:block}
.img-lightbox__backdrop{position:absolute;inset:0;background:rgba(0,0,0,.60)}
.img-lightbox__panel{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;padding:18px}
.img-lightbox__img{max-width:min(980px, 96vw);max-height:88vh;border-radius:18px;border:1px solid rgba(255,255,255,.18);background:rgba(255,255,255,.06);object-fit:contain}
.img-lightbox__close{position:absolute;top:18px;right:18px;width:42px;height:42px;border-radius:999px;border:1px solid rgba(255,255,255,.20);background:rgba(0,0,0,.35);color:#fff;font-size:26px;line-height:1;cursor:pointer}

.gw-body{flex:1;min-width:0}
.gw-top{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.gw-title{font-weight:400;line-height:1.15; font-size: 14px}
.gw-badges{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}
.gw-meta{margin:6px 0px 6px;display:flex;gap:8px;flex-wrap:wrap;font-size:13px}
.gw-actions{margin-top:10px;display:flex;gap:8px;flex-wrap:wrap}

.pill{display:inline-flex;align-items:center;gap:6px;height:26px;padding:0 10px;border-radius:999px;border:1px solid rgba(0,0,0,.12);background:rgba(0,0,0,.04);font-size:12px;font-weight:900}
[data-theme="dark"] .pill{border-color:rgba(255,255,255,.14);background:rgba(255,255,255,.08)}
.pill--green{background:rgba(16,185,129,.12);border-color:rgba(16,185,129,.30)}
.pill--orange{background:rgba(249,115,22,.14);border-color:rgba(249,115,22,.34)}
.pill--grey{background:rgba(148,163,184,.18);border-color:rgba(148,163,184,.35)}

/* Balance pill as a top-up entry point */
#balancePill.is-clickable{
  cursor:pointer;
  user-select:none;
}
#balancePill.is-clickable:hover{
  filter:brightness(0.98);
}

/* Buttons variants (used on list) */
.btn--primary{background:var(--accent);color:#fff}
.btn--danger{background:rgba(239,68,68,.92);border-color:rgba(239,68,68,.92);color:#fff}
.btn--secondary{background:rgba(148,163,184,.18);border-color:rgba(148,163,184,.45);color:var(--text)}
.btn--secondary:hover{background:rgba(148,163,184,.28)}



/* ===== Reports: month picker field (Act) ===== */
.monthpick{
  position: relative;
  width: 100%;
}
.monthpick > input[type="text"]{
  width: 100%;
  padding-right: 52px; /* space for calendar button */
}
.monthpick .iconbtn{
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.monthpick .iconbtn:active{
  transform: translateY(-50%) scale(0.98);
}
.monthpick__native{
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  opacity: 0;
  pointer-events: none; /* открываем через JS */
}

/* Month picker (acts) */
.monthpick{
  display:flex;
  gap:10px;
  align-items:center;
}
.monthpick input[type="text"]{
  flex:1;
}
/* keep native month input off-screen so it doesn't break layout */
#actPeriodNative{
  position:absolute;
  left:-9999px;
  width:1px;
  height:1px;
  opacity:0;
  pointer-events:none;
}
.icon-mini{
  width:44px;
  height:44px;
  border-radius:14px;
  display:flex;
  align-items:center;
  justify-content:center;
  border:1px solid #e6e8ef;
  background:#fff;
}
.icon-mini:hover{ filter:brightness(0.98); }

/* Override old monthpick styles */
.monthpick{ position: relative; display:flex; width:100%; gap:10px; align-items:center; }
.monthpick > input[type="text"]{ width:100%; padding-right:16px; }


/* =========================
   DASHBOARD V2
========================= */
:root{
  --dash-gap:12px;
  --dash-widget-bg:rgba(255,255,255,.94);
  --dash-widget-border:rgba(15,23,42,.07);
  --dash-widget-shadow:0 10px 24px rgba(15,23,42,.06);
  --dash-head-h:40px;
}
html,body{height:100%;}
body{overflow:hidden; background:linear-gradient(180deg,#f5f7fb 0%,#eef3fb 100%);} 
#appRoot,.app-shell,.app,.desktop-layout,.desktop-main{height:100%;}
.desktop-main{min-width:0;}
.content{height:calc(100vh - var(--appbar-h,72px)); overflow:hidden; padding:12px;}
[data-app-view="home"], .dashboard-view{height:100%;}

.appbar__brandline{display:flex; align-items:center; gap:10px;}
.appbar__logo{width:28px; height:28px; object-fit:contain; display:block;}
.appbar__title{font-size:16px; font-weight:800;}
.balance-pill{font-size:12px; padding:10px 16px; border-radius:999px;}

.dashboard-grid{
  height:100%;
  min-height:0;
  display:grid;
  grid-template-columns:minmax(0,1fr);
  grid-template-rows:minmax(0,7fr) minmax(280px,3fr);
  gap:var(--dash-gap);
}
.dashboard-zone{
  min-width:0;
  min-height:0;
  display:grid;
  gap:var(--dash-gap);
}
.dashboard-zone--top{
  grid-template-columns:repeat(2,minmax(0,1fr));
}
.dashboard-zone--bottom{
  grid-template-columns:repeat(4,minmax(0,1fr));
}
.dash-widget{
  min-width:0;
  min-height:0;
  display:flex;
  flex-direction:column;
  background:var(--dash-widget-bg);
  border:1px solid var(--dash-widget-border);
  border-radius:18px;
  box-shadow:var(--dash-widget-shadow);
  overflow:hidden;
}
.dash-widget__head{
  height:var(--dash-head-h);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  padding:6px 10px;
  border-bottom:1px solid rgba(15,23,42,.06);
  background:#fff;
  flex:0 0 auto;
}
.dash-widget__title{font-size:13px; font-weight:800; color:#0f172a; line-height:1.1;}
.dash-widget__hint{display:none !important;}
.dash-widget__drag{
  width:28px; height:28px; border-radius:10px; border:1px solid rgba(15,23,42,.08);
  background:#fff; color:#64748b; font-size:13px; line-height:1; cursor:grab; flex:0 0 auto;
}
.dash-widget__drag:active{cursor:grabbing;}
.dash-widget__body{flex:1 1 auto; min-height:0; overflow:auto; padding:10px;}
.dash-widget.dragging{opacity:.45; box-shadow:0 10px 24px rgba(15,23,42,.12);}
.dash-widget.drop-target,.dashboard-zone.drop-target{outline:2px dashed rgba(59,130,246,.35); outline-offset:-6px;}
#homeBox > .card:first-child,
#dashReportsBox > .card,
#dashProfileBox > .card,
#dashGiveawaysBox > .card,
#dashResourcesBox > .card{background:transparent;box-shadow:none;border-radius:0;padding:0;margin:0;}
#homeBox > .card + .card,
#dashReportsBox > .card + .card,
#dashProfileBox > .card + .card,
#dashGiveawaysBox > .card + .card,
#dashResourcesBox > .card + .card{margin-top:10px;}
#homeBox .card__title,
#dashReportsBox .card__title,
#dashProfileBox .card__title,
#dashGiveawaysBox .card__title,
#dashResourcesBox .card__title{display:none;}
.dashboard-tabs{display:flex; gap:6px; flex-wrap:wrap; margin-bottom:10px;}
.dashboard-tab{appearance:none; border:1px solid rgba(15,23,42,.08); background:#fff; color:#0f172a; border-radius:10px; padding:6px 12px; min-height:34px; font-weight:700; font-size:11px; width:auto; cursor:pointer;}
.dashboard-tab.is-active{background:#111827; color:#fff; border-color:#111827;}
.dashboard-pane{display:none;}
.dashboard-pane.is-active{display:block;}
.widget-form-grid{display:grid; gap:10px;}
.widget-form-grid--2{grid-template-columns:1fr 1fr;}
.widget-actions{display:flex; gap:8px; flex-wrap:wrap;}
.widget-actions .btn,.widget-actions button{width:auto; min-width:0; padding:0 12px; height:34px; font-size:11px; border-radius:10px;}
.widget-mini-note{font-size:11px; color:#64748b; margin-top:8px;}
.profile-summary{display:grid; gap:8px;}
.profile-summary__row{display:flex; justify-content:space-between; gap:10px; padding:8px 10px; border-radius:12px; background:rgba(248,250,252,.95); border:1px solid rgba(15,23,42,.06); font-size:11px;}
.profile-links{display:grid; gap:8px; margin-top:8px;}
.profile-link{display:flex; align-items:center; justify-content:space-between; gap:10px; padding:8px 10px; border-radius:12px; background:#fff; border:1px solid rgba(15,23,42,.08); color:#0f172a; text-decoration:none; font-size:11px;}
.profile-link:hover{transform:translateY(-1px); box-shadow:0 6px 14px rgba(15,23,42,.05);}
.support-stack{display:grid; gap:8px;}
.support-card{padding:10px; border-radius:12px; background:#fff; border:1px solid rgba(15,23,42,.08);}
.support-card__title{font-weight:800; margin-bottom:4px; color:#111827; font-size:11px;}
.support-card__text{font-size:11px; color:#64748b; line-height:1.35;}
.support-card__actions{display:flex; gap:8px; flex-wrap:wrap; margin-top:10px;}
.support-card__actions .btn,.support-card__actions button,.support-card__actions a{width:auto; min-width:0; height:34px; padding:0 12px; border-radius:10px; text-decoration:none; font-size:11px;}
.gw-widget-list{display:flex; flex-direction:column; gap:10px;}
#homeBox .gw-grid{gap:10px;}
#homeBox .gw-more{margin-top:10px; padding-top:10px; border-top:1px solid rgba(15,23,42,.06);}
#homeBox .dist-grid{grid-template-columns:repeat(5,minmax(0,1fr)); gap:8px;}
#homeBox .field__label{font-size:11px;}
#homeBox .gw-product{align-items:flex-start;}
#homeBox .gw-product__imgWrap{width:72px; height:72px; border-radius:14px; overflow:hidden;}
#homeBox .gw-product__img{width:100%; height:100%; object-fit:cover;}
#dashReportsBox .field input,#dashReportsBox .field select{background:#fff;}
#homeBox .field input,
#homeBox .field select,
#dashReportsBox .field input,
#dashReportsBox .field select,
#dashProfileBox .field input,
#dashProfileBox .field select{height:34px; padding:0 10px; font-size:11px; border-radius:10px;}
#homeBox .pct{gap:6px;}
#homeBox .pct-btn{height:30px; border-radius:10px; font-size:11px; padding:0 8px; min-width:46px;}
#homeBox .pill,
#dashGiveawaysBox .pill{font-size:11px; padding:5px 10px; border-radius:999px;}
#homeBox .btn,
#dashReportsBox .btn,
#dashSupportBox .btn,
#dashResourcesBox .btn,
#dashProfileBox .btn,
#dashGiveawaysBox .btn{height:34px; font-size:11px; border-radius:10px; padding:0 12px;}
#homeBox .gw-actions{display:flex; gap:8px; flex-wrap:wrap;}
#homeBox .daylabel{font-size:10px; margin-bottom:3px;}
#homeBox .daycell .inp{height:32px; font-size:11px;}
@media (min-width: 980px){
  body.is-desktop .desktop-sidebar{display:none;}
  body.is-desktop .bottom-nav{display:none !important;}
  body.is-desktop .desktop-layout{grid-template-columns:minmax(0,1fr);}
  body.is-desktop .appbar{position:sticky; top:0; z-index:20; margin:0; border-radius:0; border:none; border-bottom:1px solid rgba(15,23,42,.08); box-shadow:none; background:rgba(245,247,251,.92); backdrop-filter:saturate(150%) blur(16px); padding:12px 18px;}
}
@media (max-width: 1279px){
  .dashboard-zone--bottom{grid-template-columns:repeat(2,minmax(0,1fr));}
  #homeBox .dist-grid{grid-template-columns:repeat(4,minmax(0,1fr));}
}
@media (max-width: 979px){
  body{overflow:auto;}
  .content{height:auto; overflow:visible; padding:12px 12px 90px;}
  .dashboard-grid{display:flex; flex-direction:column; height:auto; gap:12px;}
  .dashboard-zone{display:flex; flex-direction:column;}
  .dash-widget__body{overflow:visible;}
  .dash-widget__drag{display:none;}
  .appbar__logo{width:24px;height:24px;}
  #homeBox .dist-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
}


#homeBox .gw-row--compact{gap:8px;}
#homeBox .gw-row--compact .field{min-width:0;}
#homeBox .gw-builder{display:grid; grid-template-columns:minmax(0,1.7fr) minmax(250px,1fr); gap:10px; align-items:start;}
#homeBox .gw-builder__left,#homeBox .gw-builder__right{display:grid; gap:8px; min-width:0;}
#homeBox .dist-head--compact{gap:8px;}
#homeBox .dist-head--compact .field{min-width:0;}
#homeBox .dist-meta--compact{display:flex; gap:6px; flex-wrap:wrap; margin-top:0;}
#homeBox .checkbox--compact{margin:0; font-size:11px; min-height:auto;}
#homeBox .dist-grid--compact{margin-top:0; grid-template-columns:repeat(4,minmax(0,1fr)); gap:6px;}
#homeBox .gw-summary{display:flex; gap:6px; flex-wrap:wrap; margin-top:6px;}
#homeBox .gw-product{padding:6px 8px; border-radius:10px;}
#homeBox .gw-product__title{font-size:13px;}
#homeBox .gw-product__meta{font-size:11px; gap:6px; margin-top:4px;}
#homeBox .gw-product__badge{padding:3px 8px;}
#homeBox .gw-more{margin-top:8px; padding-top:8px;}
#homeBox .gw-actions .btn{min-width:180px;}
.profile-summary__row{padding:8px 10px; border-radius:12px; font-size:11px;}
.profile-link{padding:8px 10px; border-radius:12px; font-size:11px;}
.support-card{padding:10px; border-radius:12px;}
.support-card__title{font-size:11px; margin-bottom:4px;}
.support-card__text{font-size:11px;}
#dashReportsBox .dashboard-tabs, #dashSupportBox .dashboard-tabs, #dashGiveawaysBox .dashboard-tabs{margin-bottom:8px;}
@media (max-width: 1279px){
  #homeBox .gw-builder{grid-template-columns:minmax(0,1fr);}
  #homeBox .dist-grid--compact{grid-template-columns:repeat(3,minmax(0,1fr));}
}
@media (max-width: 979px){
  #homeBox .gw-builder{grid-template-columns:minmax(0,1fr);}
  #homeBox .dist-grid--compact{grid-template-columns:repeat(2,minmax(0,1fr));}
}


/* ===== Dashboard polish v4 ===== */
@media (min-width: 980px){
  .content{padding:12px;}
  .dashboard-grid{gap:12px;}
  .dashboard-column{gap:12px;}
  .dash-widget{border-radius:16px;}
  .dash-widget__head{
    height:42px;
    padding:8px 12px;
    background:linear-gradient(180deg,#ffffff 0%,#fbfcfe 100%);
  }
  .dash-widget__title{font-size:14px; font-weight:800; letter-spacing:-.01em;}
  .dash-widget__body{padding:12px;}

  .dash-widget__drag{
    position:relative;
    width:24px;
    height:24px;
    min-width:24px;
    min-height:24px;
    padding:0;
    border:1px solid transparent;
    border-radius:8px;
    background:transparent;
    color:transparent;
    box-shadow:none;
    outline:none;
    overflow:hidden;
  }
  .dash-widget__drag::before{
    content:"";
    display:block;
    width:10px;
    height:14px;
    margin:auto;
    background:
      radial-gradient(circle, #94a3b8 1.15px, transparent 1.35px) 0 0 / 5px 5px;
    opacity:.95;
  }
  .dash-widget__drag:hover{background:#f8fafc; border-color:#e2e8f0;}
  .dash-widget__drag:focus-visible{background:#f8fafc; border-color:#cbd5e1;}
  .dash-widget__drag:active{transform:scale(.98); background:#f1f5f9;}

  .dashboard-tabs,
  #dashReportsBox .dashboard-tabs,
  #dashSupportBox .dashboard-tabs,
  #dashGiveawaysBox .dashboard-tabs{
    display:flex;
    align-items:center;
    gap:8px;
    flex-wrap:wrap;
    margin:0 0 10px;
  }

  .dashboard-tab,
  #dashReportsBox .dashboard-tab,
  #dashGiveawaysBox .dashboard-tab{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    flex:0 0 auto;
    width:auto !important;
    min-width:0;
    height:32px;
    min-height:32px;
    padding:0 14px;
    border-radius:10px;
    border:1px solid #dbe3ee;
    background:#f8fafc;
    color:#0f172a;
    font-size:12px;
    font-weight:700;
    line-height:1;
    box-shadow:none;
  }
  .dashboard-tab:hover{background:#f1f5f9; border-color:#cbd5e1;}
  .dashboard-tab.is-active{background:#0f172a; color:#fff; border-color:#0f172a;}

  #homeBox .btn,
  #dashReportsBox .btn,
  #dashSupportBox .btn,
  #dashResourcesBox .btn,
  #dashProfileBox .btn,
  #dashGiveawaysBox .btn,
  .widget-actions .btn,
  .widget-actions button,
  .support-card__actions .btn,
  .support-card__actions button,
  .support-card__actions a{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    flex:0 0 auto;
    width:auto !important;
    min-width:0;
    max-width:none;
    height:32px;
    min-height:32px;
    padding:0 14px;
    border-radius:10px;
    font-size:12px;
    font-weight:700;
    line-height:1;
    white-space:nowrap;
    box-shadow:none;
  }
  .widget-actions,.support-card__actions{gap:8px; align-items:center;}
  #dashReportsBox .widget-actions{margin-top:10px;}
  #dashReportsBox .widget-actions .btn{min-width:132px;}

  #homeBox .field input,
  #homeBox .field select,
  #dashReportsBox .field input,
  #dashReportsBox .field select,
  #dashProfileBox .field input,
  #dashProfileBox .field select{
    width:100%;
    height:34px;
    min-height:34px;
    padding:0 12px;
    border-radius:10px;
    border:1px solid #dbe3ee;
    background:#fff;
    font-size:12px;
    line-height:1.2;
    box-shadow:none;
  }
  #homeBox .field input:focus,
  #homeBox .field select:focus,
  #dashReportsBox .field input:focus,
  #dashReportsBox .field select:focus{
    border-color:#c6d3e1;
    outline:none;
  }
  #homeBox .field__label,
  #dashReportsBox .field__label{font-size:11px; font-weight:600; color:#64748b; margin-bottom:5px;}

  #homeBox .pct{display:flex; align-items:center; gap:6px; flex-wrap:wrap;}
  #homeBox .pct button,
  #homeBox .pct-btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:auto !important;
    min-width:54px;
    height:30px;
    min-height:30px;
    padding:0 10px;
    border-radius:10px;
    border:1px solid #dbe3ee;
    background:#fff;
    color:#475569;
    font-size:12px;
    font-weight:700;
    line-height:1;
    box-shadow:none;
  }
  #homeBox .pct button[aria-pressed="true"],
  #homeBox .pct-btn[aria-pressed="true"]{
    background:#fff7ed;
    border-color:#fdba74;
    color:#c2410c;
  }

  #homeBox .pill,
  #dashGiveawaysBox .pill{
    display:inline-flex;
    align-items:center;
    gap:6px;
    padding:5px 10px;
    border-radius:999px;
    border:1px solid #dbe3ee;
    background:#f8fafc;
    font-size:11px;
    line-height:1.2;
  }

  #homeBox .gw-row{
    display:grid;
    grid-template-columns:minmax(0,1.2fr) minmax(300px,.9fr);
    gap:12px;
    align-items:end;
  }
  #homeBox .gw-row .field{min-width:0;}
  #homeBox .gw-builder{
    display:grid;
    grid-template-columns:minmax(0,1.55fr) minmax(300px,1fr);
    gap:12px;
    align-items:start;
  }
  #homeBox .gw-builder__left,
  #homeBox .gw-builder__right{display:grid; gap:10px; min-width:0;}
  #homeBox .gw-builder__left .gw-row,
  #homeBox .dist-head--compact{
    display:grid;
    grid-template-columns:repeat(2, minmax(0,1fr));
    gap:10px;
  }
  #homeBox .dist-meta--compact{display:flex; flex-wrap:wrap; gap:8px; align-items:center;}
  #homeBox .checkbox--compact{display:flex; align-items:center; gap:8px; font-size:12px; color:#334155;}
  #homeBox .checkbox--compact input{width:14px; height:14px; min-height:14px; padding:0; border-radius:4px;}
  #homeBox .dist-grid--compact{
    display:grid;
    grid-template-columns:repeat(4, minmax(0,1fr));
    gap:8px;
  }
  #homeBox .daycell{
    padding:8px;
    border:1px solid #e2e8f0;
    border-radius:12px;
    background:#fbfdff;
  }
  #homeBox .daylabel{font-size:10px; font-weight:700; color:#64748b; margin-bottom:4px;}
  #homeBox .daycell .inp{
    height:30px;
    min-height:30px;
    padding:0 8px;
    border-radius:8px;
    text-align:center;
    font-size:12px;
  }

  #homeBox .gw-product{
    gap:10px;
    padding:8px 10px;
    border-radius:12px;
    background:#f1f6fd;
    border:1px solid #deebf7;
  }
  #homeBox .gw-product__imgWrap{width:60px; height:60px; border-radius:12px;}
  #homeBox .gw-product__title{font-size:13px; line-height:1.25;}
  #homeBox .gw-product__meta{gap:6px; margin-top:4px; font-size:11px;}
  #homeBox .gw-product__badge{padding:4px 8px; font-size:11px;}

  .support-card,
  .profile-link,
  .profile-summary__row{
    border-radius:12px;
    border-color:#e2e8f0;
    box-shadow:none;
  }
  .support-card{padding:10px; background:#fbfdff;}
  .support-card__title{font-size:12px; margin-bottom:4px;}
  .support-card__text{font-size:11px; line-height:1.45;}

  .dash-widget--create{flex:0 0 58%;}
  .dash-widget--giveaways{flex:1 1 42%;}
}

@media (max-width: 1279px) and (min-width: 980px){
  #homeBox .gw-row{grid-template-columns:minmax(0,1fr);}
  #homeBox .gw-builder{grid-template-columns:minmax(0,1fr);}
  #homeBox .dist-grid--compact{grid-template-columns:repeat(3,minmax(0,1fr));}
}

/* ===== Dashboard final layout polish v6 ===== */
@media (min-width: 980px){
  .content{padding:14px;}
  .dashboard-grid{
    display:grid;
    grid-template-rows:minmax(0, 7fr) minmax(240px, 3fr);
    gap:14px;
    height:100%;
  }
  .dashboard-zone{min-width:0; min-height:0; display:grid; gap:14px;}
  .dashboard-zone--top{grid-template-columns:repeat(2, minmax(0,1fr)); align-items:stretch;}
  .dashboard-zone--bottom{grid-template-columns:repeat(4, minmax(0,1fr)); align-items:stretch;}
  .dashboard-zone.drop-target{outline:2px dashed rgba(59,130,246,.20); outline-offset:4px; border-radius:18px;}

  .dash-widget{
    height:100%;
    border-radius:20px;
    border:1px solid rgba(148,163,184,.18);
    background:rgba(255,255,255,.94);
    box-shadow:0 8px 22px rgba(15,23,42,.05);
  }
  .dash-widget--create,.dash-widget--giveaways,.dash-widget--reports,.dash-widget--support,.dash-widget--resources,.dash-widget--profile{flex:unset;}
  .dash-widget__head{
    height:44px;
    padding:8px 12px 8px 14px;
    border-bottom:1px solid rgba(226,232,240,.9);
    background:linear-gradient(180deg,#fff 0%,#fcfdff 100%);
  }
  .dash-widget__title{font-size:14px; font-weight:800; letter-spacing:-.01em;}
  .dash-widget__body{padding:12px 14px 14px;}
  .dash-widget__drag{
    width:22px; height:22px; min-width:22px; min-height:22px; border-radius:8px;
    border:1px solid transparent; background:transparent; position:relative;
  }
  .dash-widget__drag::before{
    content:""; position:absolute; inset:4px 6px;
    background:radial-gradient(circle, #94a3b8 1.1px, transparent 1.25px) 0 0/5px 5px;
    opacity:.85;
  }
  .dash-widget__drag:hover{background:#f8fafc; border-color:#e2e8f0;}
  .dash-widget__drag:active{background:#eef2f7;}

  .dashboard-tabs{gap:8px; margin:0 0 12px;}
  .dashboard-tab,
  #dashReportsBox .dashboard-tab,
  #dashGiveawaysBox .dashboard-tab{
    height:34px; min-height:34px; padding:0 16px; border-radius:11px;
    border:1px solid #d9e2ec; background:#f8fafc; color:#0f172a; font-size:12px; font-weight:700;
  }

  #homeBox > .card:first-child,
  #dashReportsBox > .card,
  #dashProfileBox > .card,
  #dashGiveawaysBox > .card,
  #dashResourcesBox > .card{padding:0;}

  #homeBox .gw-grid{gap:12px;}
  #homeBox .field__label,
  #dashReportsBox .field__label{font-size:11px; font-weight:700; color:#64748b; margin-bottom:6px;}
  #homeBox .field input,
  #homeBox .field select,
  #dashReportsBox .field input,
  #dashReportsBox .field select{
    height:36px; min-height:36px; padding:0 12px; border-radius:12px; font-size:12px;
    border:1px solid #dbe3ee; background:#fff;
  }
  #homeBox .gw-row,
  #homeBox .gw-builder,
  #homeBox .gw-builder__left .gw-row,
  #homeBox .dist-head--compact{display:grid; grid-template-columns:minmax(0,1fr); gap:10px;}
  #homeBox .gw-builder__left,
  #homeBox .gw-builder__right{display:grid; gap:10px;}
  #homeBox .gw-summary{gap:8px; margin-top:8px;}
  #homeBox .pill,
  #dashGiveawaysBox .pill{padding:6px 10px; border-radius:999px; font-size:11px; border:1px solid #dbe3ee; background:#f8fafc;}
  #homeBox .pct{gap:8px;}
  #homeBox .pct button,
  #homeBox .pct-btn{height:32px; min-width:52px; padding:0 10px; border-radius:10px; font-size:12px;}
  #homeBox .gw-product{padding:10px; border-radius:14px; background:#f3f7fd; border:1px solid #e1ebf6;}
  #homeBox .gw-product__imgWrap{width:64px; height:64px; border-radius:12px;}
  #homeBox .gw-product__title{font-size:14px; font-weight:800;}
  #homeBox .gw-product__badge{padding:4px 8px; border-radius:999px; font-size:11px;}
  #homeBox .gw-more{margin-top:12px; padding-top:12px;}
  #homeBox .dist-meta--compact{gap:8px;}
  #homeBox .checkbox--compact{font-size:12px;}
  #homeBox .dist-grid--compact{grid-template-columns:repeat(10, minmax(0,1fr)); gap:8px;}
  #homeBox .daycell{padding:8px; border-radius:12px; border:1px solid #e2e8f0; background:#fbfdff;}
  #homeBox .daycell .inp{height:32px; min-height:32px; border-radius:9px;}
  #homeBox .gw-actions{margin-top:12px;}
  #homeBox .gw-actions .btn{width:100% !important; justify-content:center; height:38px; border-radius:12px; font-size:12px;}

  #dashReportsBox .widget-actions,
  .support-card__actions,
  .widget-actions{display:flex; gap:8px; flex-wrap:wrap;}
  #dashReportsBox .btn,
  #dashSupportBox .btn,
  #dashResourcesBox .btn,
  #dashProfileBox .btn,
  #dashGiveawaysBox .btn,
  .support-card__actions .btn,
  .support-card__actions a,
  .widget-actions .btn,
  .widget-actions button{
    width:auto !important; min-width:94px; height:34px; min-height:34px; padding:0 14px;
    border-radius:11px; font-size:12px; font-weight:700; line-height:1;
  }
  .support-card,
  .profile-summary__row,
  .profile-link{border-radius:14px; border:1px solid #e2e8f0; background:#fbfdff; box-shadow:none;}
  .support-card{padding:12px;}
  .support-card__title{font-size:12px;}
  .support-card__text{font-size:11px; line-height:1.45;}
  .profile-summary{gap:10px;}
  .profile-summary__row{padding:10px 12px; font-size:12px;}
  .profile-link{padding:10px 12px; font-size:12px;}

  #dashGiveawaysBox .gw-widget-list{height:100%; overflow:auto; padding-right:2px;}
}

@media (max-width: 1399px) and (min-width: 980px){
  .dashboard-zone--bottom{grid-template-columns:repeat(2, minmax(0,1fr));}
  .dashboard-grid{grid-template-rows:minmax(0,6.5fr) minmax(300px,3.5fr);}
  #homeBox .dist-grid--compact{grid-template-columns:repeat(4, minmax(0,1fr));}
}

@media (max-width: 979px){
  .dashboard-grid{display:flex; flex-direction:column; height:auto;}
  .dashboard-zone{display:flex; flex-direction:column;}
  .dash-widget__drag{display:none;}
}


/* ===== Final dashboard polish v7 ===== */
@media (min-width: 980px){
  .dashboard-grid{gap:16px; grid-template-rows:minmax(0,6.8fr) minmax(250px,3.2fr);}
  .dashboard-zone{gap:16px;}
  .dash-widget{border-radius:18px; background:rgba(255,255,255,.96); box-shadow:0 6px 18px rgba(15,23,42,.045);}
  .dash-widget__head{height:40px; padding:8px 12px;}
  .dash-widget__title{font-size:13px;}
  .dash-widget__body{padding:10px 12px 12px;}

  .dashboard-tab,
  #dashReportsBox .dashboard-tab,
  #dashGiveawaysBox .dashboard-tab{
    height:32px; min-height:32px; padding:0 14px; border-radius:10px; font-size:12px;
    background:#f8fafc; border-color:#d9e2ec;
  }
  .dashboard-tab.is-active,
  #dashReportsBox .dashboard-tab.is-active,
  #dashGiveawaysBox .dashboard-tab.is-active{background:#0f172a; color:#fff; border-color:#0f172a;}

  #homeBox .field input,
  #homeBox .field select,
  #dashReportsBox .field input,
  #dashReportsBox .field select{
    height:34px; min-height:34px; border-radius:11px; font-size:12px;
  }
  #homeBox .field__label,
  #dashReportsBox .field__label{font-size:11px; margin-bottom:5px;}

  #homeBox .gw-grid{gap:10px;}
  #homeBox .gw-product{padding:10px 12px;}
  #homeBox .gw-product__imgWrap{width:60px; height:60px;}
  #homeBox .gw-product__title{font-size:13px;}
  #homeBox .gw-product__meta{font-size:11px;}
  #homeBox .gw-more{margin-top:10px; padding-top:10px;}
  #homeBox .gw-summary{margin-top:6px;}
  #homeBox .gw-actions{display:flex; gap:8px; flex-wrap:wrap; align-items:center;}
  #homeBox .gw-actions--form .btn{
    width:auto !important; min-width:168px; flex:0 0 auto;
    height:36px; min-height:36px; padding:0 16px; border-radius:11px; font-size:12px;
  }
  #homeBox .gw-actions--form .btn:first-child{min-width:200px;}

  .modal-inline-actions{display:flex; gap:10px; flex-wrap:nowrap !important; align-items:center;}
  .modal-inline-actions > .btn,
  .modal-inline-actions > button{
    width:auto !important; flex:1 1 0; min-width:0; height:40px; min-height:40px; border-radius:12px;
  }
  .modal-inline-actions > .btn--secondary,
  .modal-inline-actions > button.btn--secondary{flex:0 0 160px;}

  .modal__sheet{width:min(560px, calc(100vw - 48px)); border-radius:18px; padding:14px 16px 16px;}
  .modal__head{padding:0 0 10px;}
  .modal__title{font-size:16px; line-height:1.2;}
  .modal_close{width:36px; height:36px; border-radius:10px;}

  .support-card,
  .profile-summary__row,
  .profile-link{background:#fbfcfe;}
}

/* ===== Dashboard readable scroll layout v8 ===== */
@media (min-width: 980px){
  html, body{overflow:auto !important;}
  body.is-desktop{overflow:auto !important;}
  body{background:linear-gradient(180deg,#f5f7fb 0%,#eef3fb 100%);}
  .content{
    height:auto !important;
    min-height:calc(100dvh - var(--appbar-h,72px));
    overflow:visible !important;
    padding:14px 14px 88px;
  }
  [data-app-view="home"], .dashboard-view{
    height:auto !important;
    min-height:auto !important;
  }

  .dashboard-grid{
    display:flex !important;
    flex-direction:column;
    gap:16px;
    height:auto !important;
    grid-template-rows:none !important;
  }
  .dashboard-zone{
    display:grid;
    gap:16px;
    min-width:0;
    min-height:0;
    height:auto !important;
  }
  .dashboard-zone--top{grid-template-columns:repeat(2,minmax(0,1fr));}
  .dashboard-zone--bottom{grid-template-columns:repeat(2,minmax(0,1fr));}

  .dash-widget{
    height:auto !important;
    min-height:0;
  }
  .dash-widget--create,
  .dash-widget--giveaways{min-height:560px;}
  .dash-widget--reports,
  .dash-widget--support,
  .dash-widget--resources,
  .dash-widget--profile{min-height:280px;}

  .dash-widget__body{
    overflow:visible !important;
  }

  #homeBox .card:first-child,
  #dashReportsBox > .card,
  #dashSupportBox > .card,
  #dashResourcesBox > .card,
  #dashProfileBox > .card{
    height:auto;
  }

  #dashGiveawaysBox .gw-widget-list{
    height:auto !important;
    max-height:640px;
    overflow:auto;
    padding-right:4px;
  }
}

@media (max-width: 1279px) and (min-width: 980px){
  .dashboard-zone--top,
  .dashboard-zone--bottom{grid-template-columns:minmax(0,1fr);}

  .dash-widget--create,
  .dash-widget--giveaways{min-height:480px;}
  .dash-widget--reports,
  .dash-widget--support,
  .dash-widget--resources,
  .dash-widget--profile{min-height:240px;}
}


/* ===== Final cleanup v9 ===== */
.bottom-nav{display:none !important;}
.content{padding:14px 14px 18px;}
.app-shell{min-height:100%; display:block;}
.app{min-height:auto;}
[data-app-view="home"], .dashboard-view{height:auto !important; min-height:auto !important;}

@media (max-width: 979px){
  html, body{height:auto; min-height:100%; overflow:auto;}
  body{overflow:auto;}
  .app-shell{display:block; min-height:100%;}
  .app{max-width:none; min-height:auto;}
  .desktop-layout{display:block; min-height:auto;}
  .desktop-sidebar{display:none !important;}
  .desktop-main{display:block; min-height:auto;}
  .appbar{
    position:sticky;
    top:0;
    padding:12px 14px;
    border-bottom:1px solid rgba(15,23,42,.08);
    background:rgba(245,247,251,.94);
    backdrop-filter:saturate(150%) blur(14px);
  }
  .content{
    padding:12px 12px 18px;
    overflow:visible !important;
  }
  .dashboard-grid{display:flex !important; flex-direction:column; gap:12px; height:auto !important;}
  .dashboard-zone{display:flex !important; flex-direction:column; gap:12px; height:auto !important;}
  .dash-widget{
    min-height:0 !important;
    height:auto !important;
    border-radius:18px;
  }
  .dash-widget__head{padding:14px 16px 12px;}
  .dash-widget__title{font-size:15px; line-height:1.2;}
  .dash-widget__drag{display:none !important;}
  .dash-widget__body{padding:12px 12px 14px; overflow:visible !important;}
  .dash-widget--create,
  .dash-widget--giveaways,
  .dash-widget--reports,
  .dash-widget--support,
  .dash-widget--resources,
  .dash-widget--profile{min-height:0 !important;}
  #dashGiveawaysBox .gw-widget-list{max-height:none !important; overflow:visible !important;}
  .dashboard-tabs,
  #dashReportsBox .dashboard-tabs,
  #dashGiveawaysBox .dashboard-tabs{gap:8px; margin:0 0 12px;}
  .dashboard-tab,
  #dashReportsBox .dashboard-tab,
  #dashGiveawaysBox .dashboard-tab{
    width:auto;
    min-width:0;
    flex:0 0 auto;
    height:32px;
    padding:0 14px;
    font-size:13px;
    border-radius:11px;
    white-space:nowrap;
  }
  .support-card__actions,
  .widget-actions,
  .modal-inline-actions{flex-wrap:wrap;}
  .support-card__actions > .btn,
  .widget-actions > .btn,
  .modal-inline-actions > .btn{width:auto; min-width:120px;}
  .profile-links{gap:10px;}
  .profile-link{padding:12px 14px; min-height:48px;}
}

/* ===== Final stable dashboard flow v10 ===== */
html, body {
  height: auto !important;
  min-height: 100% !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}
body,
body.is-desktop {
  overflow-y: auto !important;
  overflow-x: hidden !important;
}
#appRoot,
.app-shell,
.app,
.desktop-layout,
.desktop-main,
[data-app-view="home"],
.dashboard-view {
  height: auto !important;
  min-height: 0 !important;
}
.content {
  height: auto !important;
  min-height: 0 !important;
  overflow: visible !important;
  padding: 16px 20px 24px !important;
}
.bottom-nav { display: none !important; }

.dashboard-grid {
  display: flex !important;
  flex-direction: column !important;
  gap: 16px !important;
  height: auto !important;
  min-height: 0 !important;
}
.dashboard-zone {
  display: grid !important;
  gap: 16px !important;
  height: auto !important;
  min-height: 0 !important;
}
.dashboard-zone--top {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}
.dashboard-zone--bottom {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}
.dash-widget {
  height: auto !important;
  min-height: 0 !important;
  align-self: start !important;
}
.dash-widget__body {
  overflow: visible !important;
}
.dash-widget--create,
.dash-widget--giveaways {
  min-height: 520px !important;
}
.dash-widget--reports,
.dash-widget--support,
.dash-widget--resources,
.dash-widget--profile {
  min-height: 250px !important;
}
#dashGiveawaysBox .gw-widget-list {
  max-height: 620px !important;
  overflow: auto !important;
}

@media (max-width: 1439px) {
  .dashboard-zone--bottom {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 979px) {
  .appbar {
    position: sticky !important;
    top: 0 !important;
  }
  .content {
    padding: 12px 12px 18px !important;
  }
  .dashboard-zone--top,
  .dashboard-zone--bottom {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  .dash-widget--create,
  .dash-widget--giveaways,
  .dash-widget--reports,
  .dash-widget--support,
  .dash-widget--resources,
  .dash-widget--profile {
    min-height: 0 !important;
  }
  #dashGiveawaysBox .gw-widget-list {
    max-height: none !important;
    overflow: visible !important;
  }
  .dash-widget__drag,
  .desktop-sidebar,
  .bottom-nav {
    display: none !important;
  }
}

/* =========================
   DASHBOARD V11 FINAL SIZE + INNER SCROLL
========================= */
@media (min-width: 980px){
  html, body{
    height:auto !important;
    min-height:100%;
    overflow:auto !important;
  }
  body,
  body.is-desktop,
  body.is-desktop .app-shell,
  body.is-desktop .desktop-layout,
  body.is-desktop .desktop-main,
  body.is-desktop #appRoot,
  body.is-desktop .app{
    height:auto !important;
    min-height:0 !important;
    overflow:visible !important;
  }

  body.is-desktop .content{
    height:auto !important;
    min-height:0 !important;
    overflow:visible !important;
    padding:18px 18px 24px !important;
  }

  body.is-desktop [data-app-view="home"],
  body.is-desktop .dashboard-view{
    height:auto !important;
    min-height:0 !important;
  }

  body.is-desktop .dashboard-grid{
    display:grid !important;
    grid-template-columns:minmax(0,1fr) !important;
    grid-template-rows:auto auto !important;
    gap:18px !important;
    height:auto !important;
    min-height:0 !important;
    align-items:start;
  }

  body.is-desktop .dashboard-zone{
    display:grid !important;
    min-width:0;
    min-height:0;
    gap:18px !important;
    align-items:stretch;
  }

  body.is-desktop .dashboard-zone--top{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }

  body.is-desktop .dashboard-zone--bottom{
    grid-template-columns:repeat(4,minmax(0,1fr)) !important;
  }

  body.is-desktop .dashboard-zone--top > .dash-widget{
    height:560px !important;
    max-height:560px !important;
  }

  body.is-desktop .dashboard-zone--bottom > .dash-widget{
    height:320px !important;
    max-height:320px !important;
  }

  body.is-desktop .dash-widget{
    display:flex !important;
    flex-direction:column !important;
    min-width:0;
    min-height:0 !important;
    overflow:hidden !important;
    align-self:stretch;
  }

  body.is-desktop .dash-widget__head{
    flex:0 0 42px;
  }

  body.is-desktop .dash-widget__body{
    flex:1 1 auto !important;
    min-height:0 !important;
    height:auto !important;
    overflow:auto !important;
    -webkit-overflow-scrolling:touch;
    overscroll-behavior:contain;
  }

  body.is-desktop #homeBox,
  body.is-desktop #dashGiveawaysBox,
  body.is-desktop #dashReportsBox,
  body.is-desktop #dashSupportBox,
  body.is-desktop #dashResourcesBox,
  body.is-desktop #dashProfileBox{
    min-height:0 !important;
  }

  body.is-desktop #homeBox > .card,
  body.is-desktop #dashGiveawaysBox > .card,
  body.is-desktop #dashReportsBox > .card,
  body.is-desktop #dashSupportBox > .card,
  body.is-desktop #dashResourcesBox > .card,
  body.is-desktop #dashProfileBox > .card{
    min-height:0 !important;
  }
}

@media (min-width: 980px) and (max-width: 1399px){
  body.is-desktop .dashboard-zone--bottom{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }
  body.is-desktop .dashboard-zone--bottom > .dash-widget{
    height:300px !important;
    max-height:300px !important;
  }
}

@media (max-width: 979px){
  .dashboard-grid,
  .dashboard-zone{
    gap:14px !important;
  }
  .dash-widget__body{
    overflow:visible !important;
  }
}

/* ===== v12 hard fix: no horizontal scroll, stable widget heights, mobile wraps ===== */
html, body {
  max-width: 100%;
  overflow-x: clip !important;
}
body.is-desktop .desktop-layout,
body.is-desktop .app-shell,
body.is-desktop .app,
body.is-desktop .desktop-main,
body.is-desktop #appRoot,
body.is-desktop .content,
body.is-desktop .dashboard-grid,
body.is-desktop .dashboard-zone,
body.is-desktop .dash-widget,
body.is-desktop .dash-widget__body {
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box;
}
body.is-desktop .desktop-layout{ width:100% !important; }

@media (min-width:980px){
  body.is-desktop .dashboard-zone--top > .dash-widget{
    height: min(560px, calc(100vh - 170px)) !important;
    max-height: min(560px, calc(100vh - 170px)) !important;
  }
  body.is-desktop .dashboard-zone--bottom > .dash-widget{
    height: 320px !important;
    max-height: 320px !important;
  }
  body.is-desktop .dash-widget__body{
    overflow: auto !important;
    overflow-x: hidden !important;
    scrollbar-gutter: stable;
  }
  body.is-desktop #homeBox,
  body.is-desktop #dashGiveawaysBox,
  body.is-desktop #dashReportsBox,
  body.is-desktop #dashSupportBox,
  body.is-desktop #dashResourcesBox,
  body.is-desktop #dashProfileBox{
    min-width:0 !important;
    max-width:100% !important;
  }
}

@media (max-width:979px){
  html, body, #appRoot, .app-shell, .app, .content, [data-app-view="home"], .dashboard-view {
    width:100% !important;
    max-width:100% !important;
    overflow-x:hidden !important;
    box-sizing:border-box;
  }
  .dashboard-grid, .dashboard-zone, .dash-widget, .dash-widget__body {
    min-width:0 !important;
    max-width:100% !important;
    overflow-x:hidden !important;
    box-sizing:border-box;
  }
  .dash-widget{
    border-radius:18px !important;
  }
  .dash-widget__head{
    padding:12px 14px 10px !important;
  }
  .dash-widget__title{
    font-size:14px !important;
    line-height:1.2 !important;
  }
  .dash-widget__body{
    padding:10px 10px 12px !important;
    overflow:visible !important;
  }
  .dashboard-tabs,
  #dashReportsBox .dashboard-tabs,
  #dashGiveawaysBox .dashboard-tabs{
    display:flex !important;
    flex-wrap:wrap !important;
    gap:8px !important;
    margin:0 0 12px !important;
  }
  .dashboard-tab,
  #dashReportsBox .dashboard-tab,
  #dashGiveawaysBox .dashboard-tab{
    flex:0 0 auto !important;
    min-width:0 !important;
    width:auto !important;
    max-width:100% !important;
    padding:0 14px !important;
    height:34px !important;
    border-radius:10px !important;
    font-size:12px !important;
    line-height:34px !important;
    white-space:nowrap !important;
  }
  .support-card{
    overflow:hidden !important;
  }
  .support-card__title,
  .support-card__text,
  .widget-mini-note,
  .dash-widget label,
  .dash-widget .label,
  .dash-widget .muted,
  .dash-widget .hint{
    white-space:normal !important;
    word-break:break-word !important;
    overflow-wrap:anywhere !important;
  }
  .support-card__actions,
  .widget-actions{
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:8px !important;
    width:100% !important;
  }
  .support-card__actions .btn,
  .support-card__actions a,
  .support-card__actions button,
  .widget-actions .btn,
  .widget-actions button{
    width:100% !important;
    min-width:0 !important;
    max-width:100% !important;
    padding:0 10px !important;
    font-size:12px !important;
  }
  .support-card__text{font-size:12px !important; line-height:1.4 !important;}
}

/* === FINAL DASHBOARD FIXES v13 === */
html, body {
  overflow-x: hidden !important;
}
.dashboard-view,
.dashboard-grid,
.dashboard-zone,
.dash-widget,
.dash-widget__body,
.support-stack,
.support-card,
.support-card__actions,
.dashboard-tabs,
.widget-actions,
.profile-links,
.profile-link,
.gw-widget-list,
.gw-builder,
.gw-builder__left,
.gw-builder__right,
.gw-row,
.field,
.field > span,
.field > label {
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box;
}

body.is-desktop .dashboard-view{
  height: auto !important;
  min-height: auto !important;
}
body.is-desktop .dashboard-zone--top > .dash-widget{
  height: 520px !important;
  min-height: 520px !important;
  max-height: 520px !important;
}
body.is-desktop .dashboard-zone--bottom > .dash-widget{
  height: 300px !important;
  min-height: 300px !important;
  max-height: 300px !important;
}
body.is-desktop .dash-widget{
  align-self: stretch;
}
body.is-desktop .dash-widget__body{
  min-height: 0 !important;
  overflow: auto !important;
  overflow-x: hidden !important;
}
body.is-desktop #dashGiveawaysBox,
body.is-desktop #dashReportsBox,
body.is-desktop #dashSupportBox,
body.is-desktop #dashResourcesBox,
body.is-desktop #dashProfileBox,
body.is-desktop #homeBox{
  height: 100%;
  min-height: 0;
}
body.is-desktop #dashGiveawaysBox .gw-widget-list{
  height: auto !important;
  max-height: none !important;
  min-height: 0 !important;
  overflow: visible !important;
}

.support-card__title,
.support-card__text,
.profile-link span,
.dashboard-tab,
.widget-mini-note,
.field__label,
.muted,
.pill,
.gw-card__title,
.gw-card__meta,
.gw-card__line {
  overflow-wrap: anywhere;
  word-break: break-word;
}

@media (max-width: 767px){
  html, body, #appRoot, .app-shell, .app, .content, [data-app-view="home"], .dashboard-view {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }
  .dashboard-zone--top,
  .dashboard-zone--bottom{
    grid-template-columns: minmax(0,1fr) !important;
  }
  .dash-widget,
  .dash-widget__body,
  .support-card,
  .profile-link,
  .gw-card,
  .field,
  input,
  select,
  textarea,
  button{
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }
  .dashboard-tabs{
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  .dashboard-tab,
  .seg__btn{
    flex: 0 1 auto !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    white-space: normal !important;
    line-height: 1.2 !important;
    text-align: center;
  }
  .support-card__actions,
  .widget-actions{
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 8px;
    align-items: stretch;
  }
  .support-card__actions .btn,
  .support-card__actions a,
  .support-card__actions button,
  .widget-actions .btn,
  .widget-actions button{
    width: 100% !important;
    min-width: 0 !important;
    justify-content: center;
    text-align: center;
    white-space: normal !important;
  }
  #homeBox .gw-actions--form{
    display:grid !important;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 8px;
  }
}

/* ===== Support widget (web) ===== */
.support-widget{display:flex;flex-direction:column;gap:10px;min-height:100%;}
.support-toolbar{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;}
.support-list{display:flex;flex-direction:column;gap:8px;}
.support-ticket{width:100%;border:1px solid rgba(15,23,42,.08);background:#fff;border-radius:14px;padding:12px;text-align:left;cursor:pointer;transition:transform .12s ease, box-shadow .12s ease,border-color .12s ease;}
.support-ticket:hover{transform:translateY(-1px);box-shadow:0 8px 20px rgba(15,23,42,.06);border-color:rgba(71,141,255,.35);}
.support-ticket__head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:6px;}
.support-ticket__title{font-size:13px;font-weight:800;color:#0f172a;}
.support-ticket__badge{display:inline-flex;align-items:center;justify-content:center;padding:0 8px;height:22px;border-radius:999px;background:rgba(35,201,122,.14);border:1px solid rgba(35,201,122,.35);font-size:11px;font-weight:800;color:#166534;white-space:nowrap;}
.support-ticket__text{font-size:12px;line-height:1.45;color:#475569;}
.support-ticket__foot{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;margin-top:8px;}
.support-ticket__meta{font-size:11px;color:#64748b;}
.support-empty{padding:18px 14px;border:1px dashed rgba(148,163,184,.45);border-radius:14px;color:#64748b;background:#fbfdff;font-size:12px;}
.support-count-badge{display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 6px;border-radius:999px;background:rgba(71,141,255,.14);border:1px solid rgba(71,141,255,.32);font-size:10px;font-weight:800;color:#1d4ed8;vertical-align:middle;}
.support-count-badge--green{background:rgba(35,201,122,.14);border-color:rgba(35,201,122,.35);color:#166534;}
.support-system-item{padding:12px;border-radius:14px;border:1px solid rgba(15,23,42,.08);background:#fff;}
.support-system-item__text{font-size:12px;line-height:1.5;color:#334155;white-space:pre-wrap;}
.support-modal{display:flex;flex-direction:column;gap:12px;}
.support-modal__meta{font-size:12px;color:#64748b;}
.support-chat{display:flex;flex-direction:column;gap:10px;max-height:52vh;overflow:auto;padding:4px 2px;}
.support-chat__msg{display:flex;flex-direction:column;gap:4px;max-width:86%;}
.support-chat__msg.mine{align-self:flex-end;}
.support-chat__msg.support{align-self:flex-start;}
.support-chat__sender{font-size:11px;font-weight:700;color:#64748b;}
.support-chat__bubble{padding:10px 12px;border-radius:14px;background:#f8fafc;border:1px solid rgba(148,163,184,.22);font-size:12px;line-height:1.45;color:#0f172a;white-space:pre-wrap;}
.support-chat__msg.mine .support-chat__bubble{background:#eef4ff;border-color:rgba(71,141,255,.24);}
.support-chat__time{font-size:10px;color:#94a3b8;}
.support-chat__attachments{display:flex;gap:6px;flex-wrap:wrap;}
.support-chat__attachment{display:inline-flex;align-items:center;height:22px;padding:0 8px;border-radius:999px;background:#f1f5f9;border:1px solid rgba(148,163,184,.28);font-size:10px;color:#475569;}
.support-reply{display:flex;flex-direction:column;gap:10px;}
.support-reply__textarea{min-height:110px;resize:vertical;}
.support-reply__actions{display:flex;gap:8px;flex-wrap:wrap;}
@media (max-width: 767px){
  .support-top-tabs{gap:8px;}
  .support-top-tab{padding:10px 12px;font-size:12px;}
  .support-ticket{padding:10px;}
  .support-reply__actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));}
  .support-chat__msg{max-width:100%;}
}


/* ===== SELLER DASHBOARD 2026 REWORK ===== */

body.is-desktop .content{
  max-width: 100%;
  padding: 18px 18px 28px;
}

.dashboard-view--split,
.dashboard-view--split *{
  box-sizing: border-box;
}

.dashboard-view--split .dashboard-grid{
  display: grid !important;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, .95fr);
  gap: 18px !important;
  align-items: start;
  height: auto !important;
}

.dashboard-view--split .dashboard-main-column,
.dashboard-view--split .dashboard-side-column{
  min-width: 0;
}

.dashboard-view--split .dashboard-side-column{
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 82px;
}

.dashboard-view--split .dash-widget,
.dashboard-view--split .side-panel{
  background: #fff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 24px !important;
  box-shadow: 0 8px 26px rgba(15, 23, 42, .05) !important;
  overflow: hidden;
}

.dashboard-view--split .dash-widget{
  min-height: 520px;
}

.dashboard-view--split .dash-widget__head,
.dashboard-view--split .side-panel__toggle{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.dashboard-view--split .dash-widget__head{
  padding: 18px 20px;
  border-bottom: 1px solid #e8edf4;
  background: linear-gradient(180deg, #ffffff 0%, #fafbfd 100%);
}

.dashboard-view--split .dash-widget__title,
.dashboard-view--split .side-panel__toggle span:first-child{
  font-size: 16px;
  font-weight: 500;
  color: #0f172a;
}

.dashboard-view--split .dash-widget__subtitle{
  margin-top: 4px;
  color: #64748b;
  font-size: 13px;
}

.dashboard-view--split .dash-widget__body--workspace{
  padding: 16px 18px 18px;
}

.workspace-tabs{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.workspace-tab{
  width: auto !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 14px !important;
  border: 1px solid #d6deeb !important;
  background: #f8fafc !important;
  color: #334155 !important;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.workspace-tab.is-active{
  background: #0f172a !important;
  border-color: #0f172a !important;
  color: #fff !important;
}

.tab-badge{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
}

.tab-badge--danger{ background: #ef4444; color: #fff; }
.tab-badge--success{ background: #16a34a; color: #fff; }
.tab-badge--muted{ background: #94a3b8; color: #fff; }

.workspace-tab.is-active .tab-badge{ box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); }

.workspace-pane{ display: none; }
.workspace-pane.is-active{ display: block; }

#homeBox,
#dashGiveawaysBox{
  min-height: 420px;
}

#dashGiveawaysBox{
  padding-top: 2px;
}

#dashGiveawaysBox > .dashboard-tabs{
  display: none !important;
}

.gw-widget-list{
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.dashboard-view--split .side-panel__toggle{
  width: 100% !important;
 /* min-height: 72px; */
  border: 0 !important;
  border-radius: 0 !important;
  padding: 18px 20px;
  background: linear-gradient(180deg, #ffffff 0%, #fafbfd 100%) !important;
  color: #0f172a !important;
  text-align: left;
  cursor: pointer;
  position: relative;
}

.dashboard-view--split .side-panel__toggle::after{
  content: '+';
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #eff4fb;
  color: #0f172a;
  font-size: 18px;
  font-weight: 700;
}

.dashboard-view--split .side-panel.is-open .side-panel__toggle::after{
  content: '–';
}

.side-panel__meta{
  margin-left: auto;
  margin-right: 34px;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.side-panel__body{
  display: none;
  padding: 0 18px 18px;
  border-top: 1px solid #e8edf4;
}

.side-panel.is-open .side-panel__body{
  display: block;
}

.dashboard-tabs--inner{
  margin: 16px 0 12px;
}

.dashboard-pane{ display: none; }
.dashboard-pane.is-active{ display: block; }

#dashReportsBox,
#dashSupportBox,
#dashProfileBox,
#dashResourcesBox{
  min-height: 40px;
  padding-top: 14px;
}

#dashProfileBox .profile-summary,
#meBox .profile-summary{
  border: 1px solid #e6ebf2;
  border-radius: 18px;
  overflow: hidden;
}

#dashProfileBox .profile-summary__row,
#meBox .profile-summary__row{
  padding: 14px 16px;
  background: #fff;
}

#dashProfileBox .profile-summary__row + .profile-summary__row,
#meBox .profile-summary__row + .profile-summary__row{
  border-top: 1px solid #eef2f7;
}

#dashResourcesBox .profile-links{
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#dashResourcesBox .profile-link{
  min-height: 46px;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: #fff;
}

.dashboard-view--split .dash-widget__drag,
.dashboard-view--split [data-dash-zone]{
  display: none !important;
}


@media (max-width: 1099px){
  .dashboard-view--split .dashboard-grid{
    grid-template-columns: 1fr !important;
  }
  .dashboard-view--split .dashboard-side-column{
    position: static;
  }
  .dashboard-view--split .dash-widget{
    min-height: auto;
  }
  #homeBox,
  #dashGiveawaysBox{
    min-height: 0;
  }
}


/* ===== 2026 desktop one-screen hard override ===== */
@media (min-width: 1100px){
  html, body{
    height:100dvh !important;
    min-height:100dvh !important;
    overflow:hidden !important;
  }

  body.is-desktop,
  body.is-desktop #appRoot,
  body.is-desktop .app-shell,
  body.is-desktop .app,
  body.is-desktop .desktop-layout,
  body.is-desktop .desktop-main{
    height:100dvh !important;
    min-height:100dvh !important;
    overflow:hidden !important;
  }

  body.is-desktop .desktop-sidebar{display:none !important;}
  body.is-desktop .desktop-layout{display:block !important; width:100% !important;}
  body.is-desktop .desktop-main{display:flex !important; flex-direction:column !important;}

  body.is-desktop .appbar{
    position:relative !important;
    top:auto !important;
    flex:0 0 auto !important;
    min-height:64px;
    padding:14px 18px !important;
  }

  body.is-desktop .content{
    flex:1 1 auto !important;
    min-height:0 !important;
    height:auto !important;
    padding:16px !important;
    overflow:hidden !important;
  }

  body.is-desktop [data-app-view="home"],
  body.is-desktop .dashboard-view,
  body.is-desktop #dashboardGrid,
  body.is-desktop .dashboard-main-column,
  body.is-desktop .dashboard-side-column{
    min-height:0 !important;
  }

  body.is-desktop .dashboard-view--split .dashboard-grid,
  body.is-desktop .dashboard-grid--split{
    display:grid !important;
    grid-template-columns:minmax(0, 1fr) minmax(320px, 360px) !important;
    gap:16px !important;
    align-items:stretch !important;
    height:100% !important;
    min-height:0 !important;
  }

  body.is-desktop .dashboard-view--split .dashboard-main-column,
  body.is-desktop .dashboard-view--split .dashboard-side-column{
    height:100% !important;
    min-height:0 !important;
  }

  body.is-desktop .dashboard-view--split .dashboard-main-column{
    display:flex !important;
    flex-direction:column !important;
  }

  body.is-desktop .dashboard-view--split .dash-widget--workspace{
    flex:1 1 auto !important;
    min-height:0 !important;
    height:100% !important;
    display:flex !important;
    flex-direction:column !important;
    border-radius:22px !important;
    overflow:hidden !important;
  }

  body.is-desktop .dashboard-view--split .dash-widget__head--workspace{
    flex:0 0 auto !important;
    padding:10px;
  }

  body.is-desktop .dashboard-view--split .dash-widget__body--workspace{
    flex:1 1 auto !important;
    min-height:0 !important;
    display:flex !important;
    flex-direction:column !important;
    gap:12px !important;
    padding:0 18px 18px !important;
    overflow:hidden !important;
  }

  body.is-desktop .workspace-tabs{
    flex:0 0 auto !important;
    margin:0 !important;
    padding:10px;
    border-bottom:1px solid #e8edf4;
  }

  body.is-desktop .workspace-panes{
    flex:1 1 auto !important;
    min-height:0 !important;
    overflow:hidden !important;
  }

  body.is-desktop .workspace-pane,
  body.is-desktop .workspace-pane.is-active{
    height:100% !important;
    min-height:0 !important;
  }

  body.is-desktop #homeBox,
  body.is-desktop #dashGiveawaysBox{
    height:100% !important;
    min-height:0 !important;
    overflow:auto !important;
    padding-right:4px;
  }

  body.is-desktop .dashboard-view--split .dashboard-side-column{
    display:flex !important;
    flex-direction:column !important;
    gap:12px !important;
    position:static !important;
    top:auto !important;
  }

  body.is-desktop .dashboard-view--split .side-panel{
    flex:0 0 auto !important;
    display:flex !important;
    flex-direction:column !important;
    min-height:64px !important;
    border-radius:20px !important;
    overflow:hidden !important;
  }

  body.is-desktop .dashboard-view--split .side-panel__toggle{
    min-height:64px !important;
    padding:16px 18px !important;
  }

  body.is-desktop .dashboard-view--split .side-panel.is-open{
    flex:1 1 auto !important;
    min-height:0 !important;
  }

  body.is-desktop .dashboard-view--split .side-panel__body{
    display:none;
    min-height:0 !important;
    padding:0 16px 16px !important;
    overflow:hidden !important;
  }

  body.is-desktop .dashboard-view--split .side-panel.is-open .side-panel__body{
    display:flex !important;
    flex-direction:column !important;
    flex:1 1 auto !important;
    min-height:0 !important;
  }

  body.is-desktop #dashSupportBox,
  body.is-desktop #dashReportsBox,
  body.is-desktop #dashProfileBox,
  body.is-desktop #dashResourcesBox{
    flex:1 1 auto !important;
    min-height:0 !important;
    overflow:auto !important;
    padding-top:14px !important;
    padding-right:4px;
  }

  body.is-desktop .dashboard-tabs--inner{
    margin:14px 0 10px !important;
    flex:0 0 auto !important;
  }

  body.is-desktop [data-account-pane].is-active{
    display:flex !important;
    flex-direction:column !important;
    flex:1 1 auto !important;
    min-height:0 !important;
  }

  body.is-desktop .profile-summary__row{padding:12px 14px !important;}
  body.is-desktop .profile-link{min-height:42px !important;}
  body.is-desktop .support-widget{gap:12px !important;}
  body.is-desktop .support-widget__toolbar{gap:10px !important;}
  body.is-desktop .support-ticket-list{gap:10px !important;}
  body.is-desktop .support-ticket{padding:10px !important;}

  body.is-desktop ::-webkit-scrollbar{width:10px;height:10px;}
  body.is-desktop ::-webkit-scrollbar-thumb{background:#d8e0eb;border-radius:999px;border:2px solid transparent;background-clip:padding-box;}
  body.is-desktop ::-webkit-scrollbar-track{background:transparent;}
}

@media (min-width: 1100px) and (max-width: 1340px){
  body.is-desktop .dashboard-view--split .dashboard-grid,
  body.is-desktop .dashboard-grid--split{
    grid-template-columns:minmax(0,1fr) 330px !important;
  }
  body.is-desktop .workspace-tab{padding:0 12px !important; font-size:13px !important;}
}

@media (min-width: 300px) and (max-width: 1099px){
  html, body { overflow: auto !important; }

  body.is-desktop .content { overflow: visible !important; }

  body.is-desktop .dashboard-view--split .dashboard-grid,
  body.is-desktop .dashboard-grid--split{
    grid-template-columns: 1fr !important;
    height: auto !important;
  }

  body.is-desktop .dashboard-view--split .dashboard-side-column{
    position: static !important;
  }
}

/* ===== 2026-03 fixed 60/40 independent columns ===== */
@media (min-width: 1100px){
  :root{
    --desktop-appbar-h: 76px;
    --desktop-page-pad: 32px;
    --desktop-grid-gap: 18px;
    --desktop-available-h: calc(100dvh - var(--desktop-appbar-h) - var(--desktop-page-pad));
    --desktop-left-h: calc(var(--desktop-available-h) * 0.92);
  }

  body.is-desktop .content{
    padding:16px !important;
    overflow:hidden !important;
  }

  body.is-desktop .dashboard-view--split,
  body.is-desktop .dashboard-view--split #dashboardGrid,
  body.is-desktop .dashboard-view--split .dashboard-grid,
  body.is-desktop .dashboard-grid--split{
    height:100% !important;
    min-height:0 !important;
  }

  body.is-desktop .dashboard-view--split .dashboard-grid,
  body.is-desktop .dashboard-grid--split{
    grid-template-columns: minmax(0, 60%) minmax(320px, 40%) !important;
    align-items:start !important;
    align-content:start !important;
    gap:18px !important;
  }

  body.is-desktop .dashboard-view--split .dashboard-main-column{
    display:block !important;
    height:auto !important;
    min-height:0 !important;
    align-self:start !important;
  }

   body.is-desktop .dashboard-view--split .dash-widget--workspace{
    display:flex !important;
    flex-direction:column !important;
    flex:0 0 auto !important;
    width:100% !important;
    height:var(--desktop-left-h) !important;
    min-height:var(--desktop-left-h) !important;
    max-height:var(--desktop-left-h) !important;
    overflow:hidden !important;
  }

  body.is-desktop .dashboard-view--split .dash-widget__head--workspace{
    flex:0 0 auto !important;
	height: 60px;
  }

  body.is-desktop .dashboard-view--split .dash-widget__body--workspace{
    flex:1 1 auto !important;
    min-height:0 !important;
    overflow:hidden !important;
  }

  body.is-desktop .workspace-panes,
  body.is-desktop .workspace-pane,
  body.is-desktop .workspace-pane.is-active,
  body.is-desktop #homeBox,
  body.is-desktop #dashGiveawaysBox{
    min-height:0 !important;
  }

  body.is-desktop #homeBox,
  body.is-desktop #dashGiveawaysBox{
    height:100% !important;
    overflow:auto !important;
  }

  body.is-desktop .dashboard-view--split .dashboard-side-column{
    display:flex !important;
    flex-direction:column !important;
    gap:12px !important;
    height:100% !important;
    min-height:0 !important;
    align-self:start !important;
    overflow:hidden !important;
  }

  body.is-desktop .dashboard-view--split .side-panel{
    flex:0 0 auto !important;
   /* min-height:72px !important; */
    max-height:none !important;
  }

  body.is-desktop .dashboard-view--split .side-panel.is-open{
    flex:1 1 auto !important;
    min-height:160px !important;
  }

  body.is-desktop .dashboard-view--split .side-panel__body{
    min-height:0 !important;
    overflow:hidden !important;
  }

  body.is-desktop .dashboard-view--split .side-panel.is-open .side-panel__body{
    display:flex !important;
    flex-direction:column !important;
    flex:1 1 auto !important;
    min-height:0 !important;
  }

  body.is-desktop #dashSupportBox,
  body.is-desktop #dashReportsBox,
  body.is-desktop #dashProfileBox,
  body.is-desktop #dashResourcesBox{
    min-height:0 !important;
    overflow:auto !important;
  }
}

@media (min-width: 1100px) and (max-width: 1399px){
  :root{
    --desktop-appbar-h: 76px;
    --desktop-page-pad: 32px;
    --desktop-available-h: calc(100dvh - var(--desktop-appbar-h) - var(--desktop-page-pad));
    --desktop-left-h: calc(var(--desktop-available-h) * 0.88);
  }
}

/* ===== Giveaway top summary row: qty + percent + calculations ===== */
@media (min-width: 980px){
  #homeBox .gw-top-row{
    display:grid;
    grid-template-columns: 180px minmax(300px, 1fr) auto auto;
    gap:12px;
    align-items:end;
  }
  #homeBox .gw-top-row .field{
    min-width:0;
  }
  #homeBox .gw-top-row__qty input{
    max-width:140px;
  }
  #homeBox .gw-top-row__pct .pct{
    flex-wrap:nowrap;
  }
  #homeBox .gw-top-row__meta{
    display:flex;
    flex-direction:column;
    justify-content:flex-end;
  }
  #homeBox .gw-top-row__pill{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:34px;
    padding:0 12px;
    white-space:nowrap;
    font-weight:800;
  }
}

@media (max-width: 979px){
  #homeBox .gw-top-row{
    display:grid;
    grid-template-columns:minmax(0,1fr);
    gap:10px;
    align-items:end;
  }
  #homeBox .gw-top-row__pct .pct{
    flex-wrap:wrap;
  }
  #homeBox .gw-top-row__meta .pill{
    width:max-content;
    max-width:100%;
  }
}

/* ===== giveaway form rows restored: 4+3+3 layout ===== */
@media (min-width: 980px){
  #homeBox .gw-builder.gw-builder--flat{
    display:grid !important;
    grid-template-columns:minmax(0,1fr) !important;
    gap:10px !important;
    align-items:start !important;
  }
  #homeBox .gw-builder.gw-builder--flat .gw-row--triple{
    display:grid !important;
    grid-template-columns:repeat(3, minmax(0,1fr)) !important;
    gap:10px !important;
    align-items:end !important;
  }
  #homeBox .gw-builder.gw-builder--flat .field{
    min-width:0 !important;
  }
}

@media (max-width: 979px){
  #homeBox .gw-builder.gw-builder--flat .gw-row--triple{
    display:grid !important;
    grid-template-columns:minmax(0,1fr) !important;
    gap:10px !important;
  }
}

.gw-searchbar{
  margin: 0 0 12px;
}
.gw-searchbar__modes{
  display:flex;
  align-items:center;
  gap:8px;
  margin:0 0 8px;
  flex-wrap:nowrap;
  overflow-x:auto;
  scrollbar-width:none;
}
.gw-searchbar__modes::-webkit-scrollbar{ display:none; }

.gw-searchbar__label{
  font-size:13px;
  color:#6b7280;
  white-space:nowrap;
  flex:0 0 auto;
}

.gw-searchbar__mode{
  appearance: none;
  border: 1px solid #d6deeb;
  background: #fff;
  color: #334155;
  border-radius: 9999px;
  padding: 0 10px;
  height: 30px;
  min-height: 30px;
  line-height: 28px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex: 0 0 auto;
  width: auto;
}

.gw-searchbar__mode:hover{
  border-color:#bfcddd;
  background:#f8fafc;
}

.gw-searchbar__mode.is-active{
  background:#0f172a;
  color:#fff;
  border-color:#0f172a;
}

.gw-searchbar__input{
  width: 100%;
  height: 40px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid #d6deeb;
  background: #fff;
  font-size: 14px;
  margin-bottom: 15px;
}

.gw-searchbar__input:focus{
  outline: none;
  border-color: #c2d0e0;
}

@media (max-width: 640px){
  .gw-searchbar__modes{
    gap:6px;
  }
  .gw-searchbar__mode{
    padding:5px 9px;
    font-size:12px;
  }
}

.gw-search-empty{
  padding: 6px 2px 2px;
}

/* ===== Finished giveaways summary / tooltips ===== */
.gw-summary{
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(15,23,42,.08);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  font-size: 13px;
  line-height: 1.35;
  color: #6b7280;
}

.gw-summary .pill{
  display: contents;
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 0;
  min-height: 0;
  box-shadow: none;
}

.gw-sum__row{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  width: 100%;
}

.gw-summary--active{
  margin-top: 8px;
  padding-top: 8px;
}

.gw-sum__item{
  display: inline-flex;
  align-items: center;
  gap: 0;
  white-space: nowrap;
  min-width: 0;
  font-size: 12px;
}

.gw-sum__k{
  color: #7a8594;
  margin-right: 4px;
  font-weight: 400;
}

.gw-sum__v{
  color: #1f2937;
  font-weight: 600;
}

.gw-sum__item--total .gw-sum__v{
  font-weight: 800;
}

.gw-sum__dot{
  color: #b6c0cc;
  line-height: 1;
  flex: 0 0 auto;
}

.gw-sum__break{
  flex-basis: 100%;
  height: 0;
}

button.gw-tip{
  all: unset;
  box-sizing: border-box;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  min-width: 14px;
  margin-left: 4px;
  border-radius: 50%;
  background: #e5e7eb;
  color: #2563eb;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  vertical-align: middle;
  flex: 0 0 auto;
  transform: translateY(-1px);
}

button.gw-tip:hover,
button.gw-tip:focus-visible,
button.gw-tip.is-open{
  background: #dbeafe;
  color: #1d4ed8;
}

button.gw-tip::after{
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  min-width: 220px;
  max-width: 280px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #4b5563;
  color: #fff;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.35;
  text-align: left;
  white-space: normal;
  box-shadow: 0 10px 24px rgba(0,0,0,.18);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 50;
}

button.gw-tip::before{
  content: "";
  position: absolute;
  left: 50%;
  bottom: calc(100% + 3px);
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #4b5563;
  opacity: 0;
  visibility: hidden;
  z-index: 51;
}

button.gw-tip:hover::after,
button.gw-tip:hover::before,
button.gw-tip:focus-visible::after,
button.gw-tip:focus-visible::before,
button.gw-tip.is-open::after,
button.gw-tip.is-open::before{
  opacity: 1;
  visibility: visible;
}

html[data-theme="dark"] .gw-summary{
  border-top-color: rgba(255,255,255,.10);
  color: #9ca3af;
}

html[data-theme="dark"] .gw-sum__k{ color: #9ca3af; }
html[data-theme="dark"] .gw-sum__v{ color: #f3f4f6; }
html[data-theme="dark"] .gw-sum__dot{ color: #6b7280; }

html[data-theme="dark"] button.gw-tip{
  background: rgba(255,255,255,.12);
  color: #60a5fa;
}

html[data-theme="dark"] button.gw-tip:hover,
html[data-theme="dark"] button.gw-tip:focus-visible,
html[data-theme="dark"] button.gw-tip.is-open{
  background: rgba(96,165,250,.18);
  color: #93c5fd;
}

@media (max-width: 768px){
  .gw-summary{
    gap: 6px 8px;
    font-size: 12px;
  }

  button.gw-tip::after{
    left: 0;
    transform: none;
    min-width: 200px;
    max-width: min(250px, 78vw);
  }

  button.gw-tip::before{
    left: 10px;
    transform: none;
  }
}


/* ===== Searchable category picker ===== */
.searchpick{
  position: relative;
}
.searchpick > input[type="text"]{
  width: 100%;
}
.searchpick__menu{
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 30;
  display: none;
  max-height: 220px;
  overflow: auto;
  background: #fff;
  border: 1px solid #d8deea;
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(15,23,42,.10);
  padding: 6px;
}
.searchpick__menu.is-open{
  display: block;
}
.searchpick__item{
  width: 100%;
  min-height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #0f172a;
  text-align: left;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.searchpick__item:hover,
.searchpick__item.is-active{
  background: #f3f7fd;
}
.searchpick__empty{
  padding: 10px 12px;
  color: #64748b;
  font-size: 12px;
}
html[data-theme="dark"] .searchpick__menu{
  background: #0f172a;
  border-color: rgba(255,255,255,.12);
}
html[data-theme="dark"] .searchpick__item{
  color: #e5e7eb;
}
html[data-theme="dark"] .searchpick__item:hover,
html[data-theme="dark"] .searchpick__item.is-active{
  background: rgba(255,255,255,.08);
}
html[data-theme="dark"] .searchpick__empty{
  color: rgba(229,231,235,.70);
}

/* ===== Giveaway tasks modal ===== */
#gwTasksModal > div{
  max-width: 1080px !important;
  width: min(1080px, calc(100vw - 24px)) !important;
}
.gw-tasks-modal{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.gw-tasks-modal__meta{
  color:#64748b;
  font-size:13px;
}
.gw-tasks-table-wrap{
  width:100%;
  overflow:auto;
  border:1px solid var(--border);
  border-radius:14px;
  background:var(--card);
}
.gw-tasks-table{
  width:100%;
  min-width:980px;
  border-collapse:separate;
  border-spacing:0;
  font-size:13px;
  line-height:1.35;
}
.gw-tasks-table th,
.gw-tasks-table td{
  padding:10px 12px;
  border-bottom:1px solid rgba(15,23,42,.08);
  text-align:left;
  vertical-align:top;
  white-space:nowrap;
}
.gw-tasks-table th{
  position:sticky;
  top:0;
  z-index:1;
  background:#f8fafc;
  color:#475569;
  font-weight:800;
}
.gw-tasks-table tr:last-child td{border-bottom:0;}

.gw-tasks__review{
  min-width:260px;
  max-width:420px;
  white-space:normal !important;
}
.gw-review{
  white-space:normal;
  max-width:420px;
}
.gw-review summary{
  cursor:pointer;
  color:#334155;
  line-height:1.35;
  outline:none;
}
.gw-review summary:hover{
  color:#111827;
}
.gw-review div{
  margin-top:8px;
  padding:10px 12px;
  border-radius:12px;
  background:#f8fafc;
  color:#111827;
  line-height:1.45;
  white-space:pre-wrap;
}
html[data-theme="dark"] .gw-review summary{color:#cbd5e1;}
html[data-theme="dark"] .gw-review summary:hover{color:#f8fafc;}
html[data-theme="dark"] .gw-review div{background:#111827;color:#f8fafc;}

.gw-tasks__id,
.gw-tasks__money{
  font-weight:800;
  color:#111827;
}
html[data-theme="dark"] .gw-tasks-table th{background:#111827;color:#cbd5e1;}
html[data-theme="dark"] .gw-tasks-table th,
html[data-theme="dark"] .gw-tasks-table td{border-bottom-color:rgba(255,255,255,.08);}
html[data-theme="dark"] .gw-tasks__id,
html[data-theme="dark"] .gw-tasks__money{color:#f8fafc;}
@media (max-width: 640px){
  #gwTasksModal > div{
    width: min(100vw - 12px, 100%) !important;
    margin:6px auto !important;
  }
  .gw-tasks-table{font-size:12px;min-width:920px;}
  .gw-tasks-table th,
  .gw-tasks-table td{padding:8px 10px;}
}

#gwTasksModalClose {width: 5%;}
#payClose, #supportNewTicketModalClose {width: 10%;}
/* ===== Marketplace + variations markers on giveaway cards ===== */
.marketplace-badge{
  display:inline-flex;
  align-items:center;
  gap:4px;
  vertical-align:baseline;
  font-weight:500;
  color:#334155;
}
.marketplace-badge__label{
  color:#7a8594;
  font-weight:400;
}
.marketplace-badge__dot{
  line-height:1;
}
.marketplace-badge b{
  font-weight:800;
}
.marketplace-badge--wb b{ color:#7c3aed; }
.marketplace-badge--ozon b{ color:#005bff; }
.marketplace-badge--ym b{ color:#d99a00; }
.marketplace-badge--mega b{ color:#16a34a; }
.marketplace-badge--other b{ color:#334155; }

.gw-variations{
  margin-top:6px;
  display:inline-flex;
  align-items:center;
  max-width:100%;
  padding:5px 10px;
  border-radius:999px;
  border:1px solid rgba(22,163,74,.22);
  background:rgba(22,163,74,.08);
  color:#166534;
  font-size:12px;
  font-weight:700;
  line-height:1.25;
}

html[data-theme="dark"] .marketplace-badge{ color:#cbd5e1; }
html[data-theme="dark"] .marketplace-badge__label{ color:#9ca3af; }
html[data-theme="dark"] .marketplace-badge--wb b{ color:#c4b5fd; }
html[data-theme="dark"] .marketplace-badge--ozon b{ color:#93c5fd; }
html[data-theme="dark"] .marketplace-badge--ym b{ color:#fde68a; }
html[data-theme="dark"] .marketplace-badge--mega b{ color:#86efac; }
html[data-theme="dark"] .marketplace-badge--other b{ color:#e5e7eb; }
html[data-theme="dark"] .gw-variations{
  border-color:rgba(134,239,172,.22);
  background:rgba(34,197,94,.12);
  color:#bbf7d0;
}
