/* =========================================================
   Pasteit UI – Modern Minimal by Shayan Mousaee [mousaee.ir]

   ========================================================= */
@font-face{
  font-family: "Vazirmatn";
  src: url("/assets/fonts/Vazirmatn-FD-NL-Thin.woff2") format("woff2");
  font-weight: 100;
  font-style: normal;
  font-display: swap;
}
@font-face{
  font-family: "Vazirmatn";
  src: url("/assets/fonts/Vazirmatn-FD-NL-ExtraLight.woff2") format("woff2");
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}
@font-face{
  font-family: "Vazirmatn";
  src: url("/assets/fonts/Vazirmatn-FD-NL-Light.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face{
  font-family: "Vazirmatn";
  src: url("/assets/fonts/Vazirmatn-FD-NL-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face{
  font-family: "Vazirmatn";
  src: url("/assets/fonts/Vazirmatn-FD-NL-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face{
  font-family: "Vazirmatn";
  src: url("/assets/fonts/Vazirmatn-FD-NL-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face{
  font-family: "Vazirmatn";
  src: url("/assets/fonts/Vazirmatn-FD-NL-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face{
  font-family: "Vazirmatn";
  src: url("/assets/fonts/Vazirmatn-FD-NL-ExtraBold.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face{
  font-family: "Vazirmatn";
  src: url("/assets/fonts/Vazirmatn-FD-NL-Black.woff2") format("woff2");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

/* ===============================
   Design tokens
   =============================== */

:root{
  color-scheme: light;

  --radius: 16px;

  --shadow: 0 18px 45px rgba(0,0,0,.08);
  --shadow-sm: 0 8px 24px rgba(0,0,0,.08);

  --border: rgba(17, 24, 39, .10);

  --primary: #6D5DFC;
  --primary-2: #8B7BFF;

  --success: #16a34a;
  --danger: #ef4444;
  --warn: #f59e0b;

  /* Fonts */
  --sans: "Vazirmatn", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  /* Light theme */
  --bg: #f7f7fb;
  --bg2: #ffffff;
  --text: #111827;
  --muted: #6b7280;

  --card: rgba(255,255,255,.86);
  --card-solid: #ffffff;

  --input: #ffffff;
  --input-border: rgba(17,24,39,.14);

  --ring: rgba(109,93,252,.25);
  --chip: rgba(109,93,252,.10);

  --glow: rgba(109,93,252,.28);
  --soft: rgba(109,93,252,.12);
}

/* Dark theme override */
html[data-theme="dark"]{
  color-scheme: dark;

  --bg: #0b1020;
  --bg2: #0f1630;
  --text: #e8eaf6;
  --muted: #9aa3c7;

  --card: rgba(255,255,255,.04);
  --card-solid: #101833;

  --border: rgba(255,255,255,.10);

  --input: #0c1228;
  --input-border: rgba(255,255,255,.12);

  --shadow: 0 22px 55px rgba(0,0,0,.35);
  --shadow-sm: 0 10px 30px rgba(0,0,0,.25);

  --chip: rgba(139,123,255,.12);
}

/* ===============================
   Base reset (lightweight)
   =============================== */

*,
*::before,
*::after{ box-sizing:border-box; }

html, body{ height:100%; }

html { scrollbar-gutter: stable; scroll-behavior: smooth; }
body { overflow-y: scroll; }


body{
  margin:0;
  direction: rtl;
  font-family: var(--sans);
  line-height: 1.8;
  color: var(--text);

  background:
    radial-gradient(
      1200px 600px at 15% -20%,
      rgba(109,93,252,.18),
      rgba(109,93,252,.08) 35%,
      transparent 70%
    ),
    radial-gradient(
      1000px 500px at 110% 0%,
      rgba(139,123,255,.15),
      rgba(139,123,255,.06) 40%,
      transparent 75%
    ),
    linear-gradient(
      180deg,
      var(--bg),
      var(--bg2)
    );

  background-attachment: fixed;
}

img{ max-width:100%; height:auto; display:block; }
a{ color: inherit; }

.menu-link {
  padding: 5px 12px;
  text-decoration: none;
  font-weight: 500;
  color: #424242;
  transition: transform .15s ease-in;
}

.menu-link:hover {
  color: var(--primary-2);
  transition: transform .15s ease-out;
}

html[data-theme="dark"] .menu-link{ color: var(--text); } 
html[data-theme="dark"] .menu-link:hover {
  color: var(--primary-2);
  transition: transform .15s ease-out;
}

/* Focus */
:where(a, button, input, textarea, select, [tabindex]):focus-visible{
  outline: none;
  box-shadow: 0 0 0 4px var(--ring);
  border-radius: 12px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  *{ transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ===============================
   Layout helpers
   =============================== */

.container{
  max-width: 1040px;
  margin: 0 auto;
  padding: 22px 16px 60px;
}

.grid{ display:grid; gap:16px; }
@media (min-width: 980px){
  .grid-2{ grid-template-columns: 1.2fr .8fr; }
  .grid-3{ grid-template-columns: repeat(3, 1fr); }
}

.row{ display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.stack{ display:flex; flex-direction:column; gap:10px; overflow-x: auto; }
.spacer{ height: 20px; }

.blog {line-height: 2;
  text-align: justify;
  padding: 8px 25px !important;}
.blog p {margin:0;}

.row-2col{ width:100%; flex-wrap:nowrap; align-items:stretch; }
.row-2col > .col{ flex:1 1 0; min-width:0; }

.mt-12 {
    margin-top: 12px;
}
.pd-5 {padding:5px;}
.pdlr-5 {padding:0 5px;}
.mdlr-10 {margin: 0 10px;}

.ws-nowrap {
    white-space:nowrap;
}
@media (max-width: 640px){
  .row-2col{ flex-wrap:wrap; }
  .row-2col > .col{ flex:0 0 100%; max-width:100%; }
}

/* ===============================
   Typography
   =============================== */

.h1{ font-size: 1.55rem; font-weight: 900; letter-spacing: -.2px; }
.h2{ font-size: .98rem; color: var(--muted); margin-top: 6px; }
.small{ font-size: .88rem; color: var(--muted); }
.xsmall{ font-size: .78rem !important; color: var(--muted); }
.sm { font-size: .88rem;}
.msm { font-size: .80rem;}
.xsm { font-size: .78rem;}

.full-width {width: 100%;}

.mono{
  font-family: var(--mono);
  /* direction:ltr; */
  unicode-bidi: plaintext; /* helps mixed RTL/LTR content */
}

/* ===============================
   Navbar
   =============================== */

.navbar{
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.65);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
}
html[data-theme="dark"] .navbar{ background: rgba(10, 14, 30, .55); }

.navbar-inner{
  max-width: 1040px;
  margin: 0 auto;
  padding: 12px 16px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap: 12px;
}

.brand{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight: 950;
  text-decoration:none;
  color: var(--text);
}

.brand-badge{
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 10px 30px var(--glow);
}

.nav-links{ display:flex; gap:8px; align-items:center; flex-wrap:wrap; }

/* Badge (single definition only) */
.btn-with-badge{ position: relative; }

.nav-badge{
  position:absolute;
  top:-6px;
  right:-6px;

  min-width: 20px;
  height: 20px;
  padding: 0 6px;

  border-radius: 999px;
  background: var(--danger);
  color: #fff;

  font-size: 12px;
  line-height: 20px;
  text-align:center;

  border: 2px solid var(--bg2);
  box-shadow: 0 10px 22px rgba(239,68,68,.25);
  pointer-events:none;
}

/* ===============================
   Cards
   =============================== */

.card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  transition: box-shadow .2s ease, transform .2s ease;
}
.card.tight{ padding: 14px; }

.card-title{ font-weight: 900; font-size: 1.05rem; }
.card-desc{ color: var(--muted); font-size: .92rem; margin-top: 6px; }

.card:hover{
  box-shadow: 0 20px 50px var(--glow);
  transform: translateY(-1px);
}

/* ===============================
   Hero / Chips
   =============================== */

.hero{
  padding: 22px;
  border-radius: calc(var(--radius) + 6px);
  background:
    radial-gradient(600px 260px at 20% 0%, var(--soft), transparent 60%),
    linear-gradient(135deg, rgba(109,93,252,.18), rgba(139,123,255,.10));
  border: 1px solid rgba(109,93,252,.35);
  box-shadow: var(--shadow);
}
.hero .h1{ font-size: 1.75rem; }

.hero .chips{
  margin-top: 12px;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.chip{
  background: var(--soft);
  border: 1px solid rgba(109,93,252,.35);
  color: var(--text);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: .86rem;
}

/* ===============================
   QR
   =============================== */

.qr-box canvas{
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--card-solid);
  padding: 10px;
  box-shadow: var(--shadow-sm);
}

/* ===============================
   Forms
   =============================== */

label{ display:block; font-size:.88rem; color: var(--muted); padding: 0 6px; font-weight: 700;}

input, textarea, select{
  font-family: "Vazirmatn";
  width:100%;
  background: var(--input);
  border: 1px solid var(--input-border);
  border-radius: 14px;
  padding: 12px 13px;
  color: var(--text);
  outline:none;
  transition: box-shadow .15s ease, border-color .15s ease, transform .06s ease;
}

textarea{ min-height: 170px; resize: vertical; }

input:focus, textarea:focus, select:focus{
  border-color: rgba(109,93,252,.55);
  box-shadow: 0 0 0 4px var(--glow);
}

input:active, textarea:active{ transform: translateY(1px); }

/* ===============================
   Buttons
   =============================== */

.btn{
  font-family: "Vazirmatn" !important;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 8px;

  border-radius: 14px;
  padding: 10px 14px;

  border: 1px solid var(--border);
  background: rgba(255,255,255,.65);
  color: var(--text);
  text-decoration:none;
  cursor:pointer;

  transition: transform .08s ease, box-shadow .15s ease, background .15s ease;
  user-select:none;
}
html[data-theme="dark"] .btn{ background: rgba(255,255,255,.04); }

.btn:hover{ transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn:active{ transform: translateY(1px); box-shadow:none; }

.btn-primary{
  border: none;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  box-shadow: 0 10px 26px var(--glow);
}

html[data-theme="dark"] .btn-primary{   border: none;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  box-shadow: none; }

html[data-theme="dark"] .btn-icon{ color: #ffcb00; }

.btn-primary:hover{ box-shadow: 0 14px 34px var(--glow); }

.btn-ghost{ background: transparent; }

.btn-warn{
  background: rgba(245,158,11,.14);
  border: 1px solid rgba(245,158,11,.30);
  color: #9a5b00;
}
html[data-theme="dark"] .btn-warn{ color: #ffd48a; }

.link-warn{
  color: #9a5b00;
}
html[data-theme="dark"] .link-warn{ color: #ffd48a; }

.btn-danger{
  background: rgba(239,68,68,.14);
  border: 1px solid rgba(239,68,68,.30);
  color: #a51414;
}
html[data-theme="dark"] .btn-danger{ color: #ffb0b0; }

.btn-success, .badge-success{
  background: rgba(22,163,74,.14);
  border: 1px solid rgba(22,163,74,.30);
  color: #0b5f2a;
}
html[data-theme="dark"] .btn-success{ color: #b9f6d0; }

.btn-icon{
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 14px;
}

/* ===============================
   Progress
   =============================== */

.progress{
  width:100%;
  height: 12px;
  border-radius: 999px;
  background: rgba(0,0,0,.06);
  border: 1px solid var(--border);
  overflow:hidden;
}
html[data-theme="dark"] .progress{ background: rgba(255,255,255,.06); }

.progress-bar{
  height:100%;
  width:0%;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  transition: width .12s ease;
}

/* ===============================
   Alerts
   =============================== */

.alert{
  padding: 12px 14px;
  border-radius: 14px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
}
.alert-danger{ background: rgba(239,68,68,.10); border-color: rgba(239,68,68,.25); }
.alert-warn{ background: rgba(245,158,11,.10); border-color: rgba(245,158,11,.22); }
.alert-success{ background: rgba(22,163,74,.10); border-color: rgba(22,163,74,.22); }

/* ===============================
   Paste box (code-like)
   =============================== */

.paste-box{
  background: var(--input);
  border: 1px solid var(--input-border);
  border-radius: 16px;
  padding: 14px;
  overflow:auto;
}

.paste-box pre{
  margin:0;
  font-family: var(--mono) !important;
  font-size: .95rem;
  white-space: pre-wrap;
  word-break: break-word;
  direction:ltr;
  unicode-bidi: plaintext;
}

/* If you also show inline code anywhere: */
code, pre, kbd, samp{ font-family: var(--mono); }

/* ===============================
   Badges
   =============================== */

.badge{
  display:inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,.03);
  color: var(--muted);
}
html[data-theme="dark"] .badge{ background: rgba(255,255,255,.04); }

.badge-warn{ border-color: rgba(245,158,11,.30); background: rgba(245,158,11,.12); }
.badge-danger{ border-color: rgba(239,68,68,.30); background: rgba(239,68,68,.12); }

/* ===============================
   Feature / Icon
   =============================== */

.feature{
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow-sm);
}
.feature h3{ font-size: 1.02rem; font-weight: 900; margin-bottom: 6px; }
.feature p{ color: var(--muted); font-size: .92rem; margin-bottom: 12px; text-align: justify; }

.icon{
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(109,93,252,.35), rgba(139,123,255,.18));
  border: 1px solid rgba(109,93,252,.30);
  display:flex;
  align-items:center;
  justify-content:center;
}

.svg-ic{
  width: 20px;
  height: 20px;
  display: inline-block;
  color: var(--text);
  opacity: .92;
}

/* Editor focus */
#htmlEditor:focus{
  outline: none;
  border-color: rgba(109,93,252,.55);
  box-shadow: 0 0 0 4px var(--ring);
}

.ann-body img{
  max-width:100%;
  height:auto;
  border-radius: 14px;
  display:block;
  margin: 10px 0;
}

/* ===============================
   Footer (Redesign – modern, glassy, readable)
   =============================== */

.site-footer{
  --footer-pad: 34px;

 /* margin-top: 70px; */
  padding: var(--footer-pad) 16px 28px;
  border-top: 1px solid var(--border);

  /* Smooth backdrop that matches page background */
  background:
    radial-gradient(900px 320px at 20% 0%, rgba(109,93,252,.10), transparent 60%),
    radial-gradient(800px 300px at 95% 10%, rgba(139,123,255,.08), transparent 58%),
    linear-gradient(180deg, rgba(0,0,0,.00), rgba(0,0,0,.025));
}

html[data-theme="dark"] .site-footer{
  background:
    radial-gradient(900px 320px at 20% 0%, rgba(109,93,252,.14), transparent 60%),
    radial-gradient(800px 300px at 95% 10%, rgba(139,123,255,.10), transparent 58%),
    linear-gradient(180deg, rgba(0,0,0,.00), rgba(0,0,0,.25));
}

/* top grid */
.footer-inner{
  max-width: 1040px;
  margin: 0 auto;
  display: grid;
  gap: 16px;
}

/* make the top area look like a clean panel */
.footer-inner:not(.footer-bottom){
  padding: 18px;
  border-radius: calc(var(--radius) + 6px);
  border: 1px solid var(--border);
  background: rgba(255,255,255,.60);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
}

html[data-theme="dark"] .footer-inner:not(.footer-bottom){
  background: rgba(255,255,255,.04);
}

/* 3 columns on desktop */
@media (min-width: 920px){
  .footer-inner{
    grid-template-columns: 1.6fr 1fr 1fr;
    align-items: start;
  }
}

/* Brand */
.footer-brand{
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-left: 6px;
}

.footer-brand .name{
  font-weight: 950;
  font-size: 1.15rem;
  letter-spacing: -.2px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

/* tiny brand badge */
.footer-links h4::before{
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 10px 26px var(--glow);
  display: inline-block;
  margin-left: 7px;
}

.footer-brand .desc{
  font-size: .92rem;
  color: var(--muted);
  max-width: 520px;
  text-align: justify;
  line-height: 2;
}

.footer-brand .desc a{text-decoration: none; }

/* Link columns */
.footer-links{
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 16px;
}

@media (min-width: 920px){
  .footer-links{
    border-right: 1px dashed var(--border);
  }
  /* RTL: last column no border */
  .footer-links:last-child{ border-right: none; }
}

.footer-links h4{
  font-size: .92rem;
  font-weight: 900;
  margin: 2px 0 4px;
}

.footer-links a{
  font-size: .90rem;
  color: var(--muted);
  text-decoration: none;

  display: inline-flex;
  align-items: center;
  gap: 8px;

  padding: 8px 10px;
  border-radius: 12px;

  transition: transform .08s ease, background .15s ease, color .15s ease, box-shadow .15s ease;
}

.footer-links a::before{
  content: "↗";
  font-size: 12px;
  opacity: .55;
  transform: translateY(-1px);
}

.footer-links a:hover{
  color: var(--text);
  background: rgba(109,93,252,.08);
  box-shadow: 0 10px 24px rgba(0,0,0,.06);
  transform: translateY(-1px);
}

html[data-theme="dark"] .footer-links a:hover{
  background: rgba(139,123,255,.10);
  box-shadow: 0 14px 30px rgba(0,0,0,.35);
}

/* bottom row */
.footer-bottom{
  margin-top: 14px;
  padding: 14px 6px 0;
  border-top: 1px dashed var(--border);

  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;

  font-size: .86rem;
  color: var(--muted);
}

/* bottom links as pills */
.footer-inline-links{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.footer-inline-links a{
  color: var(--muted);
  text-decoration: none;

  padding: 7px 10px;
}

html[data-theme="dark"] .footer-inline-links a{
  background: rgba(255,255,255,.03);
}

.footer-inline-links a:hover{
  color: var(--text);
  transform: translateY(-1px);
}

/* mobile polish */
@media (max-width: 520px){
  .footer-inner:not(.footer-bottom){
    padding: 14px;
  }
  .footer-links a{
    padding: 10px 10px;
  }
}

.table-wrap{
  width: 100%;
  overflow: auto;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow-sm);
}

.table{
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 760px;
}

.table thead th{
  position: sticky;
  top: 0;
  z-index: 2;
  text-align: right;
  padding: 12px 12px;
  font-size: .88rem;
  color: var(--muted);
  background: rgba(255,255,255,.75);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
html[data-theme="dark"] .table thead th{ background: rgba(16, 24, 51, .75); }

.table tbody td{
  padding: 12px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  white-space: nowrap;
}

.table tbody tr:nth-child(odd){ background: rgba(0,0,0,.02); }
html[data-theme="dark"] .table tbody tr:nth-child(odd){ background: rgba(255,255,255,.03); }

.table tbody tr:hover{ background: rgba(109,93,252,.06); }
html[data-theme="dark"] .table tbody tr:hover{ background: rgba(109,93,252,.12); }

.table .mono{ font-family: var(--mono); direction: ltr; }

.table .actions{
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
}

.table .btn{ padding: 8px 10px; border-radius: 12px; font-size: 12px; }

/* unread / read rows */
.table tr.is-unread td{ background: rgba(245, 158, 11, .10); }
html[data-theme="dark"] .table tr.is-unread td{ background: rgba(245, 158, 11, .12); }
.table tr.is-read td{ opacity: .92; }

/* status dots */
.status-dot{
  display:inline-block;
  width:10px;
  height:10px;
  border-radius:999px;
  margin-left:6px;
  vertical-align:middle;
}
.status-dot.unread{ background: var(--danger); }
.status-dot.read{ background: var(--success); }

/* ===============================
   Status / Error Pages
   =============================== */
.status-page{
  max-width: 1040px;
  margin: 0 auto;
  padding: 18px 16px 60px;
}
.status-card{
  padding: 20px;
}
.status-head{
  display: grid;
  gap: 16px;
}
@media (min-width: 860px){
  .status-head{
    grid-template-columns: 220px 1fr;
    align-items: start;
  }
}
.status-meta{
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.status-code{
  font-size: 6rem;
    font-weight: bold;
    text-align: end;
}
.status-icon{
    font-size: 44px;
    line-height: 1;
    user-select: none;
    display: inline-block;
    padding: 10px;
}
.status-body{
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: center;
}
.status-breadcrumb{
  font-size: .88rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.status-breadcrumb a{
  color: var(--muted);
  text-decoration: none;
}
.status-breadcrumb a:hover{
  color: var(--text);
}
.status-breadcrumb .sep{
  opacity: .6;
}
.status-title{
  margin-top: 2px;
  font-size: 2rem;
  margin-bottom: 2px;
}
.status-message{
  margin-top: 2px;
  font-size: 1.1rem;
  margin-bottom: 5px;
  
}
.status-hint{
  margin-top: 6px;
}
.status-actions{
  margin-top: 6px;
  display: block;
}

@media (max-width: 640px){
  .status-code{
    text-align: center;
}
}

/* ===============================
   Dropzone
   =============================== */

.dropzone{
  position: relative;
  border: 1px dashed rgba(109,93,252,.35);
  background: linear-gradient(135deg, rgba(109,93,252,.08), rgba(139,123,255,.04));
  border-radius: 18px;
  padding: 14px;
  transition: box-shadow .15s ease, border-color .15s ease, transform .06s ease;
}
.dropzone:hover{ box-shadow: var(--shadow-sm); }

.dropzone.dragover{
  border-color: rgba(109,93,252,.70);
  box-shadow: 0 0 0 4px rgba(109,93,252,.20);
}

.dropzone input[type="file"]{
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.file-meta{
  margin-top: 10px;
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap: wrap;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.55);
}
html[data-theme="dark"] .file-meta{ background: rgba(255,255,255,.04); }

.is-hidden{ display:none !important; }

/* ===============================
   Announcements
   =============================== */

.home-ann{ --ann-gap: 12px; }

.ann-list{ display: grid; gap: var(--ann-gap); }

@media (min-width: 900px){
  .ann-list{ grid-template-columns: 1fr 1fr; }
}

.ann-item{
  display: block;
  text-decoration: none;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow-sm);
  transition: transform .08s ease, box-shadow .15s ease, border-color .15s ease;
  min-height: 118px;
}

.ann-item:hover{
  transform: translateY(-1px);
  box-shadow: 0 18px 40px rgba(0,0,0,.10);
  border-color: rgba(109,93,252,.25);
}
html[data-theme="dark"] .ann-item:hover{
  box-shadow: 0 18px 40px rgba(0,0,0,.35);
}

.ann-title{
  font-weight: 900;
  font-size: 1.02rem;
  color: var(--text);
  line-height: 1.55;
}

.ann-excerpt{
  margin-top: 6px;
  color: var(--muted);
  font-size: .90rem;
  line-height: 1.75;

  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ann-meta{
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
  min-width: 140px;
}
@media (max-width: 520px){
  .ann-meta{ min-width: 0; }
}

.ann-date{
  color: var(--muted);
  font-size: .84rem;
  white-space: nowrap;
}

.ann-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap: 10px;
  flex-wrap: wrap;
}

@media (max-width: 520px){
  .ann-head .btn{
    width: 100%;
    justify-content: center;
  }
}

.paste-actions{ justify-content:flex-start; gap:8px; }
@media (max-width: 640px){
  .paste-actions{ width:100%; }
}

/* ===============================
   Modal
   =============================== */

.modal{ position:fixed; inset:0; z-index:9999; }
.modal-backdrop{ position:absolute; inset:0; background: rgba(0,0,0,.35); }
html[data-theme="dark"] .modal-backdrop{ background: rgba(0,0,0,.55); }

.modal-card{
  position: relative;
  max-width: 920px;
  width: calc(100% - 24px);
  margin: 18px auto;
  background: var(--card-solid);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 16px;
}

/* ===============================
   Scrollbar (optional, webkit)
   =============================== */

.table-wrap::-webkit-scrollbar{ height: 10px; }
.table-wrap::-webkit-scrollbar-track{ background: transparent; }
.table-wrap::-webkit-scrollbar-thumb{
  background: rgba(0,0,0,.12);
  border-radius: 999px;
}
html[data-theme="dark"] .table-wrap::-webkit-scrollbar-thumb{
  background: rgba(255,255,255,.14);
}

/* Home redesign helpers */

.home-hero{ margin-top: 6px; }
.home-hero-grid{ align-items: stretch; }

.home-brand-row{
  display:flex;
  align-items:center;
  gap: 12px;
  flex-wrap: wrap;
}

.home-logo{
  width: 150px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--card-solid);
  box-shadow: var(--shadow-sm);
}

.footer-logo-wrap {
  width: 240px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

/* your original image */
.footer-logo {
  width: 100%;
  display: block;
}

/* glow sweep layer */
.footer-logo-wrap::after {
  content: "";
  position: absolute;
  inset: -30%;
  pointer-events: none;

  background: linear-gradient(
    120deg,
    transparent 30%,
    rgba(180, 140, 255, 0.35) 48%,
    rgba(255, 255, 255, 0.6) 50%,
    rgba(180, 140, 255, 0.35) 52%,
    transparent 70%
  );

  transform: translateX(120%) skewX(-20deg);
  animation: footerGlowSweep 6s ease-in-out infinite;
opacity: 0.6;
  mix-blend-mode: screen;
}

/* animation */
@keyframes footerGlowSweep {
  0% {
    transform: translateX(120%) skewX(-20deg);
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  55% {
    transform: translateX(-120%) skewX(-20deg);
    opacity: 1;
  }
  70% {
    opacity: 0;
  }
  100% {
    transform: translateX(-120%) skewX(-20deg);
    opacity: 0;
  }
}

/* accessibility */
@media (prefers-reduced-motion: reduce) {
  .footer-logo-wrap::after {
    animation: none;
    opacity: 0;
  }
}


.home-brand-text{ display:flex; flex-direction:column; gap: 2px; }
.home-title{ font-weight: 950; font-size: 1.65rem; line-height: 1.15; }
.home-subtitle{ color: var(--muted); font-size: .95rem; }

.home-lead{
  margin: 0;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.9;
  text-align: justify;
}

.home-cta{ margin-top: 8px; }

.hero--clean{ padding: 22px; }

.home-how-card{ height: 100%; }

.home-steps{
  display:flex;
  flex-direction:column;
  gap: 12px;
}

.home-step{
  display:flex;
  align-items:flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255,255,255,.55);
}

html[data-theme="dark"] .home-step{ background: rgba(255,255,255,.04); }

.home-step-ic{
  width: 42px;
  height: 42px;
  border-radius: 14px;
  flex: 0 0 42px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: linear-gradient(135deg, rgba(109,93,252,.20), rgba(139,123,255,.10));
  border: 1px solid rgba(109,93,252,.22);
}

.home-step-title{ font-weight: 900; font-size: .98rem; }
.home-step-txt{ display:flex; flex-direction:column; gap: 2px; text-align: justify; }

.home-kpis{
  display:grid;
  gap: 10px;
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 520px){
  .home-kpis{ grid-template-columns: 1fr; }
}

.home-kpi{
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255,255,255,.55);
  text-align: right;
}

html[data-theme="dark"] .home-kpi{ background: rgba(255,255,255,.04); }

.home-kpi-num{ font-weight: 900; }

.home-feature-head{ justify-content: space-between; }

.home-faq{ }
.home-faq-grid{
  display:grid;
  gap: 12px;
  grid-template-columns: 1fr 1fr;
}

@media (max-width: 820px){
  .home-faq-grid{ grid-template-columns: 1fr; }
}

.home-faq-item{
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.55);
}

html[data-theme="dark"] .home-faq-item{ background: rgba(255,255,255,.04); }

.home-faq-q{ font-weight: 900; margin-bottom: 6px; }
.home-faq-a{ margin: 0; text-align: justify; }


/* Announcements archive */
.ann-archive{ }
.ann-archive-head{ display:flex; justify-content:space-between; align-items:center; gap:14px; flex-wrap:wrap; }

.ann-grid{
  display:grid;
  gap: 14px;
  grid-template-columns: repeat(3, 1fr);
}

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

.ann-card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow-sm);
  padding: 16px;
  display:flex;
  flex-direction:column;
  gap: 10px;
}

.ann-card-meta{ display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.ann-card-title{ margin: 0; font-size: 1.05rem; font-weight: 950; }
.ann-card-link{ color: var(--text); text-decoration:none; }
.ann-card-link:hover{ text-decoration: underline; }

.ann-card-excerpt{
  margin: 0;
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.9;
}

.ann-card-actions{ margin-top: 2px; }

/* Breadcrumb */
.bc{
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap:wrap;
  margin: 10px 0 14px;
  color: var(--muted);
  font-size: .88rem;
  padding: 8px;
}
.bc-link{ color: var(--muted); text-decoration:none; }
.bc-link:hover{ color: var(--text); text-decoration: underline; }
.bc-sep{ opacity:.6; }
.bc-current{ color: var(--text); font-weight: 700; }

/* Announcement show */
.ann-show{ max-width: 980px; margin: 0 auto; }
.ann-show-head{ display:flex; flex-direction:column; gap:10px; }
.ann-show-meta{ display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.ann-show-title{ margin: 0; }
.ann-show-actions{ justify-content:flex-start; gap:10px; flex-wrap:wrap; }
.ann-body{ line-height: 2; text-align: justify; padding: 0 10px;}

/* اگر body شامل h2,h3 بود خواناتر شود */
.ann-body h2{ margin: 14px 0 8px; font-size: 1.1rem; font-weight: 900; }
.ann-body h3{ margin: 12px 0 6px; font-size: 1.0rem; font-weight: 900; }
.ann-body a{ color: var(--primary); text-decoration: underline; }
.ann-body img{ max-width: 100%; height: auto; border-radius: 12px; }

/* Title top, solo */
.solo-title{
  margin: 0 0 14px;
}

/* =========================================================
   Paste view – unified textarea-like panel
   Toolbar + content feel like one component
   ========================================================= */

.paste-panel{
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 2px);
  background: var(--card-solid);
  box-shadow: var(--shadow-sm);
}

/* Keep rounded corners without clipping inner scrollbars */
.paste-panel__toolbar{
  padding: 10px 12px;
  background: linear-gradient(180deg, rgba(0,0,0,.015), transparent);
  border-bottom: 1px solid var(--border);
  border-top-left-radius: calc(var(--radius) - 2px);
  border-top-right-radius: calc(var(--radius) - 2px);
}

html[data-theme="dark"] .paste-panel__toolbar{
  background: linear-gradient(180deg, rgba(255,255,255,.03), transparent);
}

.paste-panel__actions{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-start; /* buttons sit near content, like a toolbar */
}

/* Content area behaves like a big textarea */
.paste-panel__box{
  padding: 14px;
  overflow: hidden;
  background: var(--input);
  border-bottom-left-radius: calc(var(--radius) - 2px);
  border-bottom-right-radius: calc(var(--radius) - 2px);
}

/* Make <pre> wrap and never look "cut" */
.paste-panel__box pre{
  margin: 0;
  font-family: var(--mono) !important;
  font-size: .95rem;
  line-height: 1.9;

  /* textarea-like wrapping */
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;

  /* preserve mixed RTL/LTR nicely */
  direction: inherit;
  unicode-bidi: plaintext;
}

/* Nice scrolling for long pastes */
.paste-panel__box::-webkit-scrollbar{ width: 10px; height: 10px; }
.paste-panel__box::-webkit-scrollbar-track{ background: transparent; }
.paste-panel__box::-webkit-scrollbar-thumb{
  background: rgba(0,0,0,.12);
  border-radius: 999px;
}
html[data-theme="dark"] .paste-panel__box::-webkit-scrollbar-thumb{
  background: rgba(255,255,255,.14);
}

/* Mobile: center actions */
@media (max-width: 900px){
  .paste-panel__actions{
    justify-content: center;
  }
}

/* =========================================================
   Share row: QR on the left + meta on the right
   (dir=ltr on container for positioning, meta stays rtl)
   ========================================================= */

.share-row{
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 14px;
  align-items: center;
  margin-top: 14px;

  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
}

.share-qr{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.share-qr__img{
  width: 124px;
  height: 124px;
  display: block;
  background: var(--card-solid);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px;
  box-shadow: var(--shadow-sm);
}

.share-qr__cap{
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  text-align: center;
}

.share-meta{
  min-width: 0;
}

.share-meta__item{
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 13px;
  line-height: 1.9;
  margin-top: 6px;
  word-break: break-all;
}

.share-meta__label{
  color: var(--muted);
  white-space: nowrap;
}

.share-meta__value{
  color: var(--text);
  background: rgba(0,0,0,.02);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 4px 8px;
}

html[data-theme="dark"] .share-meta__value{
  background: rgba(255,255,255,.04);
}

/* ===============================
   File show – redesign (matches paste_show panel)
   =============================== */

.file-show{
  max-width: 980px;
  margin: 0 auto;
}

.file-box{
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.file-box__head{
  display: flex;
  gap: 12px;
  align-items: center;
}

.file-ic{
  width: 46px;
  height: 46px;
  border-radius: 16px;
  border: 1px solid rgba(109,93,252,.30);
  background: linear-gradient(135deg, rgba(109,93,252,.18), rgba(139,123,255,.10));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.file-box__title{
  font-weight: 950;
  font-size: 1.05rem;
  line-height: 1.6;
}

.file-box__sub{
  margin-top: 2px;
}

.file-meta-grid{
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
}

.file-meta-item{
  border: 1px solid var(--border);
  background: rgba(0,0,0,.02);
  border-radius: 14px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
html[data-theme="dark"] .file-meta-item{
  background: rgba(255,255,255,.04);
}

.file-meta-label{
  font-size: .80rem;
  color: var(--muted);
}

.file-meta-value{
  font-size: .92rem;
  color: var(--text);
  word-break: break-word;
}

.file-note{
  margin-top: 4px;
}

.file-cta{
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

.tooltip {
  position: relative;
  cursor: help;
}

.tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  background: #111;
  color: #fff;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s ease, transform .15s ease;
  z-index: 999;
}

.tooltip::before {
  content: "";
  position: absolute;
  bottom: 115%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #111;
  opacity: 0;
  transition: opacity .15s ease;
}

.tooltip:hover::after,
.tooltip:hover::before {
  opacity: 1;
}


/* ===============================
   Paste create page redesign
   =============================== */

.paste-create{
  align-items: start;
}

.paste-create__main{
  min-width: 0;
}

.paste-create__side{
  min-width: 0;
  position: sticky;
  top: 16px;
}

.paste-create__head{
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.form-grid{
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr 1fr;
}

.field{
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.field__label-row{
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.field__hint-row{
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.paste-textarea{
  min-height: 220px;
  resize: vertical;
}

.paste-create__actions{
  gap: 10px;
  flex-wrap: wrap;
}

.callout{
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  background: rgba(0,0,0,.02);
}
html[data-theme="dark"] .callout{
  background: rgba(255,255,255,.04);
}

.list{
  margin: 8px 0 0;
  padding: 0 18px 0 0;
}
.list li{
  margin: 6px 0;
}

/* Checkbox (TOS) */
.check{
  display: flex;
  gap: 10px;
  align-items: flex-start;
  cursor: pointer;
  user-select: none;
}
.check input{
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.check__box{
  width: 18px;
  height: 18px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,.02);
  margin-top: 2px;
  flex: 0 0 auto;
}
html[data-theme="dark"] .check__box{
  background: rgba(255,255,255,.04);
}
.check input:checked + .check__box{
  border-color: rgba(109,93,252,.55);
  background: linear-gradient(135deg, rgba(109,93,252,.55), rgba(139,123,255,.40));
}
.check input:checked + .check__box::after{
  content: "✓";
  display: block;
  text-align: center;
  line-height: 18px;
  font-weight: 900;
}

.check__text{
  line-height: 1.8;
}

.btn-sm{
  padding: 8px 10px;
  border-radius: 12px;
}

/* Responsive */
@media (max-width: 980px){
  .paste-create__side{
    position: static;
    top: auto;
  }
}

@media (max-width: 720px){
  .form-grid{
    grid-template-columns: 1fr;
  }
  .paste-create__actions .btn{
    width: 100%;
  }
}


@media (max-width: 720px){
  .file-meta-grid{
    grid-template-columns: 1fr;
  }
}
@media (max-width: 520px){
  .file-cta .btn{
    width: 100%;
  }
}


@media (max-width: 900px){
  .share-row{
    grid-template-columns: 1fr;
    text-align: center;
  }
  .share-meta{
    text-align: center;
  }
  .share-meta__item{
    justify-content: center;
    flex-wrap: wrap;
  }
}

/* ===============================
   Mobile Nav (Hamburger)
   =============================== */

.nav-toggle{ display: none; }

.nav-overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.35);
  z-index: 80;
    opacity: 0;
  pointer-events: none;
  backdrop-filter: blur(0);
  transition:
    opacity .25s ease,
    backdrop-filter .25s ease;
}

.nav-mobile{
  position: fixed;
  top: 0;       
  left: 0;
  /*width: min(86vw, 360px);
  height: calc(100vh - 64px);*/
  width:100vw;
  height:100vh;
  z-index: 200;

  background: var(--card-solid);
  border-right: 1px solid var(--border);
  box-shadow: var(--shadow);

 /* transform: translateX(-110%);
  transition: transform .18s ease; */
  padding: 14px;

  overflow-y: auto;
  transform: translateX(100%);
  opacity: 0;
  transition:
    transform .35s cubic-bezier(.22,.61,.36,1),
    opacity .25s ease;
  will-change: transform;
}
.nav-mobile.is-open{
  transform: translateX(0);
  opacity: 1;
}
.nav-overlay.is-open{
  opacity: 1;
  pointer-events: auto;
  backdrop-filter: blur(3px);
}
html.nav-open .nav-mobile{
  transform: translateX(0);
}

.nav-mobile-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--border);
  margin-bottom: 12px;
}

.nav-mobile-title{ font-weight: 900; }

.nav-mobile-body{
  display:flex;
  flex-direction:column;
  gap: 8px;
}

.nav-mobile a{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;

  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,.02);
  text-decoration:none;
}
html[data-theme="dark"] .nav-mobile a{ background: rgba(255,255,255,.04); }

.nav-mobile a:hover{
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.nav-mobile-sep{
  height: 1px;
  background: var(--border);
  margin: 8px 0;
}

.nav-mobile-cta{
  border: none !important;
  background: linear-gradient(135deg, var(--primary), var(--primary-2)) !important;
  color: #fff !important;
  box-shadow: 0 10px 26px var(--glow);
}

.nav-mobile-form{ margin: 0; }
.nav-mobile-logout{
  width: 100%;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(239,68,68,.30);
  background: rgba(239,68,68,.14);
  color: #a51414;
  cursor: pointer;
  font-family: var(--sans);
}
html[data-theme="dark"] .nav-mobile-logout{ color: #ffb0b0; }

/* Responsive: switch desktop to hamburger */
@media (max-width: 920px){
  .nav-desktop{ display: none !important; }
  .nav-toggle{ display: inline-flex; }
}

/* ===============================
   User dropdown (desktop)
   =============================== */

.nav-user{ position: relative; }

.nav-user-btn{ position: relative; padding:14px; }

.nav-caret{
  width: 0; height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid currentColor;
  opacity: .65;
  transform: translateY(1px);
}

.nav-user-menu{
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 210px;
  z-index: 100;

  background: var(--card-solid);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  padding: 8px;

  display: none;           /* default hidden */
}

.nav-user-menu.is-open{ display: block; }

.nav-user-menu a{
  display: flex;
  align-items: center;
  gap: 10px;

  padding: 10px 10px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--text);
}

.nav-user-menu a:hover{
  background: rgba(0,0,0,.03);
}
html[data-theme="dark"] .nav-user-menu a:hover{
  background: rgba(255,255,255,.05);
}

.nav-user-menu form{
  margin: 6px 0 0;
  padding-top: 6px;
  border-top: 1px dashed var(--border);
}

.nav-user-menu button{
  width: 100%;
  text-align: right;
  border: 1px solid rgba(239,68,68,.30);
  background: rgba(239,68,68,.14);
  color: #a51414;

  padding: 10px 10px;
  border-radius: 12px;
  cursor: pointer;
  font-family: var(--sans);
}
html[data-theme="dark"] .nav-user-menu button{ color: #ffb0b0; }

@media (max-width: 768px){
  input,
  textarea,
  select{
    font-size: 16px;
  }
}

/* ===== Modal (Created) - Enhanced UX ===== */
.is-hidden{ display:none !important; }

.modal[hidden]{ display:none !important; }

.modal{
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 18px;
  /* پیش‌فرض بسته: اگر JS فقط aria-hidden را عوض می‌کند */
}

.modal[aria-hidden="true"]{
  pointer-events: none;
  opacity: 0;
}

.modal[aria-hidden="false"]{
  pointer-events: auto;
  opacity: 1;
}

.modal__backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.60);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  opacity: 0;
  transition: opacity .20s ease;
}

.modal[aria-hidden="false"] .modal__backdrop{
  opacity: 1;
}

.modal__dialog{
  position: relative;
  width: min(760px, 100%);
  max-height: min(86vh, 760px);
  overflow: auto;

  background: var(--card, #0f172a);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 18px;
  box-shadow: 0 24px 80px rgba(0,0,0,.50);

  transform: translateY(14px) scale(.98);
  opacity: 0;
  transition: transform .22s ease, opacity .22s ease;
}

.modal[aria-hidden="false"] .modal__dialog{
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* Header */
.modal__head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;

  padding: 14px 14px 12px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

html[data-theme="dark"] .modal__head {
  border-bottom: none;
}

.modal__title{
  align-items: center;
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 10px;
}

/* Body */
.modal__body{
  padding: 14px;
}

.modal__desc{
  margin: 0 0 12px 0;
  line-height: 1.9;
  opacity: .92;
}

/* Sharebox (more distinct) */
.sharebox{
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  padding: 12px;
}

html[data-theme="dark"] .sharebox {
  padding: 10px;
  margin-bottom:10px;
}

.sharebox__label{
  font-size: 12px;
  opacity: .78;
  margin-bottom: 8px;
}

.sharebox__row{
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.sharebox__input{
  width: 100%;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.18);
  padding: 0 12px;
  outline: none;
}

.sharebox__actions{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
  align-items: center;
}

.share-ic{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.06);
  text-decoration: none;
  color: inherit;
  font-size: 13px;
}

html[data-theme="dark"] .share-ic {
  background: #171d34;
}

.share-ic:hover{
  background: rgba(255,255,255,.10);
}

html[data-theme="dark"] .share-ic:hover {
  background: #161b2f;
}

#copyStatus{
  margin-top: 10px;
}

/* Footer */
.modal__foot{
  padding: 12px 14px 14px;
  border-top: 1px solid rgba(255,255,255,.08);
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

html[data-theme="dark"] .modal__foot {
  border-top: none;
}

/* Mobile improvements */
@media (max-width: 520px){
  .modal{ padding: 12px; }
  .modal__dialog{ border-radius: 16px; }
  .sharebox__row{ grid-template-columns: 1fr; }
  #copyCreatedBtn{ width: 100%; }
  .modal__foot{ justify-content: stretch; }
  .modal__foot .btn{ flex: 1; }
}

html.modal-open, body.modal-open{
  overflow: hidden;
}



/* ===== Modal animation + centered large ===== */
.modal{
  position: fixed;
  inset: 0;
  z-index: 999;
  display: block;
}

.modal[hidden]{
  display: none !important;
}

.modal__backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.55);
  opacity: 0;
  transition: opacity .22s ease;
}

.modal__dialog{
  position: relative;
  width: min(720px, calc(100% - 28px));
  margin: 0 auto;
  top: 50%;
  transform: translateY(calc(-50% + 10px)) scale(.98);
  opacity: 0;
  transition: transform .22s ease, opacity .22s ease;
  border-radius: 18px;
  box-shadow: 0 20px 70px rgba(0,0,0,.35);
  background: #fff;
}

html[data-theme="dark"] .modal__dialog {
  background: #171d34;
}

/* when open */
.modal.is-open .modal__backdrop{
  opacity: 1;
}

.modal.is-open .modal__dialog{
  opacity: 1;
  transform: translateY(-50%) scale(1);
}

/* when closing (for smooth exit) */
.modal.is-closing .modal__backdrop{
  opacity: 0;
}

.modal.is-closing .modal__dialog{
  opacity: 0;
  transform: translateY(calc(-50% + 10px)) scale(.98);
}

/* optional: better spacing for body */
.modal__body{
  padding: 16px 18px;
}

.modal__head, .modal__foot{
  padding: 6px 16px;
}

/* prevent scroll behind modal */
html.modal-open, body.modal-open{
  overflow: hidden;
}

/* ===== Share icon buttons ===== */
.share-ic{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.08);
  background: rgba(255,255,255,.7);
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
  text-decoration: none;
}

.share-ic svg{
  width: 20px;
  height: 20px;
  fill: currentColor;
  opacity: .9;
}

.share-ic:hover{
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(0,0,0,.12);
  background: rgba(255,255,255,.95);
}

.sharebox__actions{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

/* make native share button align nicely */
#nativeShareBtn{
  margin-inline-end: 6px;
}

.btn.is-copied{
  background-color: #16a34a; /* سبز */
  border-color: #16a34a;
}

.btn.is-error{
  background-color: #dc2626; /* قرمز */
  border-color: #dc2626;
}

/* ===============================
   Created Modal – QR layout (responsive)
   بدون تغییر نام کلاس‌های قبلی
   =============================== */

/* چیدمان: دسکتاپ = QR کنار لینک / موبایل = QR بالا */
.created-share-layout{
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 12px;
  align-items: start;
  direction: ltr;
}

/* جلوگیری از ترکیدن layout با لینک‌های طولانی */
.created-share-main{ min-width: 0; }

/* بهبود ردیف لینک + دکمه کپی (بدون دست‌کاری کلاس‌ها) */
.created-share-main .sharebox__row{
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

/* لینک طولانی: ellipsis */
.created-share-main #createdUrl{
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* کارت QR (از همان کلاس qrbox استفاده می‌کنیم) */
.created-share-layout .qrbox{
  border-radius: 16px;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/*
html[data-theme="dark"] .created-share-layout .qrbox{
  background: rgba(255,255,255,.04);
} */

/* تصویر QR: شارپ و خوانا */
.created-share-layout .qrbox__img{
  width: 132px;
  height: 132px;
  object-fit: contain;
  background: var(--card-solid);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px;
  box-shadow: var(--shadow-sm);
  image-rendering: pixelated; /* QR شفاف‌تر در بعضی مرورگرها */
}

/* وقتی QR مخفی است، فضا نگیره */
.created-share-layout #createdQrBox[hidden]{
  display: none !important;
}

/* موبایل: QR میاد بالا و وسط */
@media (max-width: 720px){
  .created-share-layout{
    grid-template-columns: 1fr;
    gap: 10px;
  }

  /* QR قبل از لینک */
  .created-share-layout #createdQrBox{
    order: 1;
  }

  .created-share-layout .qrbox{
    padding: 12px;
  }

  .created-share-layout .qrbox__img{
    width: 150px;
    height: 150px;
  }
}

/* موبایل کوچیک: دکمه کپی تمام‌عرض */
@media (max-width: 520px){
  .created-share-main .sharebox__row{
    grid-template-columns: 1fr;
  }

  .created-share-main #copyCreatedBtn{
    width: 100%;
  }
}

.created-share-main{
  direction: rtl;
}

.check{ position: relative; }
.check input{
  top: 0;
  right: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  transform: none;
}

/* ===== Mobile Safari modal safe-area fix ===== */

.modal{
  position: fixed;
  inset: 0;
  z-index: 9999;
  /* مهم: در iOS 100vh مشکل دارد */
  height: 100dvh;
}

@supports not (height: 100dvh){
  .modal{ height: 100vh; }
}

/* بک‌دراپ کل صفحه را بپوشاند */
.modal__backdrop{
  position: absolute;
  inset: 0;
}

/* دیالوگ: وسط، با فاصله از safe-area بالا/پایین */
.modal__dialog{
  position: relative;
  margin: 0 auto;

  /* فاصله امن از نوار بالا/پایین مرورگر + ناچ */
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);

  /* خود کارت/محتوا داخلش اسکرول بخورد */
  max-height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 24px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;

  /* برای اینکه عرض در موبایل درست باشد */
  width: min(560px, calc(100% - 24px));
}

/* اگر داخل dialog شما head/body/foot دارید، بهتر است فقط body اسکرول بخورد */
.modal__dialog{
  display: flex;
  flex-direction: column;
}

.modal__head,
.modal__foot{
  flex: 0 0 auto;
}

.modal__body{
  flex: 1 1 auto;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  max-height: none;
}

/* آیفون‌ها گاهی کلیک/اسکرول “بپر” می‌شود؛ overscroll را کنترل کن */
.modal__body{
  overscroll-behavior: contain;
}

/* Auth success redirect progress */
.auth-redirect{
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.auth-redirect__bar{
  height: 10px;
  border-radius: 999px;
  background: rgba(0,0,0,.08);
  overflow: hidden;
}

.auth-redirect__fill{
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: rgba(0,0,0,.35);
  transform: translateZ(0);
  transition: width 120ms linear;
}

.auth-redirect__hint{
  line-height: 1.6;
}

html.nav-open,
body.nav-open{
  overflow: hidden !important;
  height: 100%;
  overscroll-behavior: none;
}

.nav-mobile{
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  height: 100dvh;
}

@supports not (height: 100dvh){
  .nav-mobile{ height: 100vh; }
}

/* ===============================
   Top Support Banner (Highlight)
   =============================== */

:root{
  --top-banner-height: 0px;
}

.top-support-banner{
  position: sticky;
  top: 0;
  z-index: 120;

  border-bottom: 1px solid rgba(255,255,255,.15);
  background: var(--primary);

  color: #fff;

  box-shadow: 0 14px 40px rgba(109,93,252,.35);
}

.top-support-banner[hidden]{
  display: none !important;
}

.top-support-banner__inner{
  max-width: 1040px;
  margin: 0 auto;
  padding: 10px 16px;
}

.top-support-banner__content{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.top-support-banner__text{
  flex: 1 1 auto;
  min-width: 0;
  font-size: .92rem;
  line-height: 1.9;
  font-weight: 500;
  color: rgba(255,255,255,.95);
}

.top-support-banner__actions{
  display: flex;
  align-items: center;
  gap: 10px;
}

.top-support-banner__cta{
  background: #fff;
  color: var(--primary);
  border: none;
  font-weight: 700;
  box-shadow: 0 10px 26px rgba(0,0,0,.15);
}

html[data-theme="dark"] .top-support-banner__cta{   background: #fff;
  color: var(--primary);
  border: none;
  font-weight: 700;
  box-shadow: 0 10px 26px rgba(0,0,0,.15); } 

.top-support-banner__cta:hover{
  background: #f3f4f6;
  transform: translateY(-1px);
}

/* دکمه بستن */
.top-support-banner__close{
  color: rgba(255,255,255,.9);
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.20);
}

.top-support-banner__close:hover{
  background: rgba(255,255,255,.22);
}

/* آیکون */
.top-support-banner__close .svg-ic{
  width: 18px;
  height: 18px;
  color: #FFF;
}

/* offset برای navbar */
body.has-top-banner .navbar{
  top: var(--top-banner-height);
}

/* ===============================
   Mobile
   =============================== */

@media (max-width: 720px){
  .top-support-banner__content{
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .top-support-banner__text{
    font-size: .88rem;
    text-align: justify;
  }

  .top-support-banner__actions{
    width: 100%;
    justify-content: space-between;
  }

  .top-support-banner__cta{
    flex: 1;
  }
}

/* خیلی کوچیک */
@media (max-width: 420px){
  .top-support-banner__text{
    font-size: .84rem;
  }
}
/* Action loading state */
.btn.is-loading,
button.is-loading,
a.is-loading {
  pointer-events: none;
  opacity: .82;
  cursor: wait;
  gap: .45rem;
}

.btn-spinner {
  width: 1em;
  height: 1em;
  border: 2px solid currentColor;
  border-inline-start-color: transparent;
  border-radius: 999px;
  display: inline-block;
  animation: pasteitSpin .75s linear infinite;
  vertical-align: -0.15em;
}

@keyframes pasteitSpin {
  to { transform: rotate(360deg); }
}
