:root {
  --violet: #8d3bf7;
  --violet-2: #b47aff;
  --violet-dim: #6b2cc4;
  --green: #6ab608;
  --green-2: #9be63c;
  --green-dim: #4f8806;
  --bg0: #08070d;
  --bg1: #100e17;
  --bg2: #191522;
  --surface: rgba(25, 21, 34, 0.78);
  --surface-strong: rgba(31, 26, 42, 0.94);
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f7f3ff;
  --muted: #b8afd0;
  --muted-2: #867b9f;
  --danger: #ff5c7a;
  --warning: #ffd166;
  --radius: 22px;
  --radius-sm: 16px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.48);
  --shadow-soft: 0 16px 42px rgba(0, 0, 0, 0.28);
  --font: "IRANSans", "Segoe UI", Tahoma, system-ui, sans-serif;
}

@font-face {
  font-family: "IRANSans";
  src: url("../fonts/IRANSans.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

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

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  background:
    radial-gradient(820px 520px at 88% -8%, rgba(141, 59, 247, 0.32), transparent 64%),
    radial-gradient(720px 460px at 8% 0%, rgba(106, 182, 8, 0.16), transparent 62%),
    linear-gradient(145deg, #08070d 0%, #100e17 48%, #0c1010 100%);
  color: var(--text);
  line-height: 1.7;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.95), transparent 85%);
}

body::after {
  content: "";
  position: fixed;
  inset: auto -20% -32% -20%;
  z-index: -1;
  height: 360px;
  pointer-events: none;
  background: radial-gradient(closest-side, rgba(141, 59, 247, 0.22), transparent);
  filter: blur(10px);
}

a {
  color: var(--green);
  text-decoration: none;
}

a:hover {
  color: var(--green-2);
}

.shell {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: clamp(16px, 4vw, 30px) clamp(14px, 4vw, 24px) 72px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  background: linear-gradient(135deg, rgba(31, 26, 42, 0.88), rgba(13, 11, 18, 0.78));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 12px;
  z-index: 20;
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  font-weight: 700;
  min-width: 0;
  letter-spacing: -0.2px;
}

.brand-text {
  min-width: 0;
}

.brand-title {
  display: block;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-mark {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.96) url("../img/icon.png") center / 86% auto no-repeat;
  box-shadow: 0 18px 36px rgba(141, 59, 247, 0.38), inset 0 0 0 1px rgba(255, 255, 255, 0.72);
}

.brand-logo {
  display: block;
  width: min(230px, 56vw);
  height: 72px;
  margin: 60px auto 18px;
  background: url("../img/logo-full.png") center / contain no-repeat;
  filter: drop-shadow(0 18px 28px rgba(141, 59, 247, 0.22));

}

.brand small {
  display: block;
  color: var(--muted);
  font-weight: 500;
  font-size: 12px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  border: 1px solid transparent;
  cursor: pointer;
  padding: 11px 17px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  font-family: var(--font);
  text-align: center;
  transition: transform 0.14s ease, box-shadow 0.14s ease, filter 0.14s ease, border-color 0.14s ease;
  user-select: none;
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  cursor: wait;
  filter: grayscale(0.25);
  opacity: 0.68;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--violet), var(--violet-2));
  box-shadow: 0 14px 34px rgba(141, 59, 247, 0.38);
}

.btn-primary:hover,
.btn-accent:hover {
  filter: brightness(1.05);
}

.btn-accent {
  color: #081006;
  background: linear-gradient(135deg, var(--green), var(--green-2));
  box-shadow: 0 14px 34px rgba(106, 182, 8, 0.3);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
  border-color: var(--line);
}

.btn-ghost:hover {
  border-color: rgba(141, 59, 247, 0.42);
  background: rgba(141, 59, 247, 0.12);
}

.btn-danger {
  color: #ffdce4;
  background: rgba(255, 92, 122, 0.1);
  border-color: rgba(255, 92, 122, 0.24);
}

.card {
  margin-top: 22px;
  padding: clamp(18px, 4vw, 28px);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    var(--surface);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.card-hero {
  position: relative;
  overflow: hidden;
}

.card-hero::before {
  content: "";
  position: absolute;
  inset: -90px auto auto -80px;
  width: 210px;
  height: 210px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(106, 182, 8, 0.22), transparent 70%);
  pointer-events: none;
}

.auth-card {
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.page-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  color: var(--green-2);
  font-size: 13px;
  font-weight: 700;
}

.page-kicker::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 7px rgba(106, 182, 8, 0.1);
}

.page-kicker--danger {
  color: var(--danger);
}

.page-kicker--danger::before {
  background: var(--danger);
  box-shadow: 0 0 0 7px rgba(255, 92, 122, 0.14);
}

.hero-title {
  margin: 0;
  font-size: clamp(25px, 7vw, 40px);
  line-height: 1.35;
  letter-spacing: -0.6px;
}

.hero-copy {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.section-head h1,
.section-head h2 {
  margin-bottom: 4px;
}

.users-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.users-head .page-kicker {
  margin: 0;
}

.card h1,
.card h2 {
  margin: 0 0 12px;
  font-weight: 700;
}

.card h1 {
  font-size: clamp(24px, 5.8vw, 34px);
  line-height: 1.35;
}

.card h2 {
  font-size: clamp(18px, 4.8vw, 24px);
  line-height: 1.45;
}

.muted {
  color: var(--muted);
}

.muted-sm {
  color: var(--muted);
  font-size: 13px;
}

.field {
  display: grid;
  gap: 8px;
  margin: 14px 0;
}

.input-wrap {
  position: relative;
}

label {
  font-size: 13px;
  color: var(--muted);
  font-weight: 700;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="file"],
select {
  width: 100%;
  min-height: 48px;
  padding: 13px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(8, 7, 13, 0.62);
  color: var(--text);
  outline: none;
  font-family: var(--font);
  font-size: 15px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.input-wrap input {
  padding-inline-end: 54px;
}

input:focus {
  border-color: rgba(141, 59, 247, 0.74);
  background: rgba(8, 7, 13, 0.8);
  box-shadow: 0 0 0 4px rgba(141, 59, 247, 0.18);
}

select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(14px + 6px) calc(50% + 1px), 14px calc(50% + 1px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-inline-end: 36px;
}

.alert {
  padding: 13px 15px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 92, 122, 0.35);
  background: linear-gradient(135deg, rgba(255, 92, 122, 0.12), rgba(255, 92, 122, 0.06));
  color: #ffd6de;
  margin: 12px 0;
  font-size: 14px;
}

.alert.error {
  border-color: rgba(255, 92, 122, 0.35);
  background: linear-gradient(135deg, rgba(255, 92, 122, 0.12), rgba(255, 92, 122, 0.06));
  color: #ffd6de;
}

.alert.ok {
  border-color: rgba(106, 182, 8, 0.35);
  background: linear-gradient(135deg, rgba(106, 182, 8, 0.14), rgba(106, 182, 8, 0.06));
  color: #e8ffd4;
}

.alert.info {
  border-color: rgba(141, 59, 247, 0.35);
  background: linear-gradient(135deg, rgba(141, 59, 247, 0.14), rgba(141, 59, 247, 0.06));
  color: #eadfff;
}

.user-feedback {
  margin-bottom: 14px;
}

.grid {
  display: grid;
  gap: 16px;
}

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

.progress {
  height: 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
  border: 1px solid var(--line);
}

.progress>span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--violet), var(--violet-2), var(--green));
  box-shadow: 0 0 22px rgba(141, 59, 247, 0.35);
  transition: width 0.18s ease;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.pill.success {
  color: #e8ffd4;
  border-color: rgba(106, 182, 8, 0.35);
  background: rgba(106, 182, 8, 0.1);
}

.stat-card {
  display: grid;
  gap: 8px;
  min-height: 128px;
}

.stat-value {
  font-size: clamp(26px, 8vw, 42px);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.stat-label {
  color: var(--muted);
  font-size: 13px;
}

.rules-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rules-list li {
  position: relative;
  padding: 11px 40px 11px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
  color: var(--muted);
}

.rules-list li::before {
  content: "";
  position: absolute;
  right: 14px;
  top: 17px;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--violet), var(--green));
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
}

.table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0;
  font-size: 14px;
  min-width: 680px;
}

.table th,
.table td {
  border-bottom: 1px solid var(--line);
  padding: 13px 12px;
  text-align: right;
  vertical-align: top;
}

.table th {
  color: var(--muted);
  font-weight: 600;
  background: rgba(255, 255, 255, 0.035);
}

.table tr:last-child td {
  border-bottom: 0;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  word-break: break-all;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.16s ease;
  cursor: pointer;
}

.icon-btn:hover {
  color: var(--text);
  border-color: rgba(141, 59, 247, 0.45);
  background: rgba(141, 59, 247, 0.13);
}

.icon-btn-danger {
  color: #ffd6de;
}

.icon-btn-danger:hover {
  color: #fff2f5;
  border-color: rgba(255, 92, 122, 0.52);
  background: rgba(255, 92, 122, 0.16);
}

.icon-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.icon-btn svg {
  width: 20px;
  height: 20px;
}

#toggle-password {
  position: absolute;
  top: 50%;
  inset-inline-end: 7px;
  transform: translateY(-50%);
}

.password-toggle {
  position: absolute;
  top: 50%;
  inset-inline-end: 7px;
  transform: translateY(-50%);
}

#toggle-password .icon-eye-off,
.password-toggle .icon-eye-off {
  display: none;
}

#toggle-password.is-hidden .icon-eye-on,
.password-toggle.is-hidden .icon-eye-on {
  display: none;
}

#toggle-password.is-hidden .icon-eye-off,
.password-toggle.is-hidden .icon-eye-off {
  display: inline-flex;
}

.bundle-empty-state {
  margin-top: 8px;
  padding: 28px 22px 26px;
  text-align: center;
  border: 1px dashed rgba(141, 59, 247, 0.35);
  border-radius: var(--radius-sm);
  background: linear-gradient(160deg, rgba(141, 59, 247, 0.07), rgba(106, 182, 8, 0.04));
}

.bundle-empty-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
  color: rgba(244, 242, 251, 0.45);
}

.bundle-empty-icon svg {
  width: 56px;
  height: 56px;
}

.bundle-empty-title {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.45;
}

.bundle-empty-copy {
  margin: 0 auto;
  max-width: 28rem;
  font-size: 14px;
  line-height: 1.65;
  color: var(--muted);
}

.bundle-empty-cta {
  margin-top: 18px;
}

.user-list {
  display: grid;
  gap: 12px;
}

.user-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02));
}

.user-meta {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.user-meta strong {
  overflow: hidden;
  color: var(--text);
  font-size: 16px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-meta span {
  color: var(--muted);
  font-size: 13px;
}

.user-actions {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.bundle-card {
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}

.bundle-card-owner {
  display: flex;
  align-items: center;
  flex-direction: row;
  justify-content: space-between;
  min-width: 0;
}

.bundle-card-owner .bundle-owner {
  display: inline-flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.5;
  word-break: break-word;
  overflow-wrap: anywhere;
  white-space: normal;
}

.bundle-card-row2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.bundle-expiry {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  flex: 1 1 auto;
  min-width: 0;
}

.bundle-card-actions {
  flex: 0 0 auto;
}

.bundle-owner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.bundle-owner svg {
  width: 18px;
  height: 18px;
  color: var(--muted);
}

.copy-share-btn .icon-check {
  display: none;
}

.copy-share-btn.is-copied .icon-copy {
  display: none;
}

.copy-share-btn.is-copied .icon-check {
  display: inline-flex;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(4, 3, 8, 0.68);
  backdrop-filter: blur(16px);
}

.modal-backdrop.is-open {
  display: flex;
}

.modal-card {
  width: min(480px, 100%);
  padding: 20px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background:
    radial-gradient(300px 180px at 10% 0%, rgba(141, 59, 247, 0.18), transparent 68%),
    linear-gradient(180deg, rgba(31, 26, 42, 0.98), rgba(13, 11, 18, 0.98));
  box-shadow: var(--shadow);
}

.modal-card-sm {
  width: min(420px, 100%);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.modal-head h2 {
  margin: 0;
  font-size: 19px;
}

.modal-close {
  width: 36px;
  height: 36px;
  border-radius: 12px;
}

.modal-copy {
  margin: 8px 0 18px;
  color: var(--muted);
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(8, 7, 13, 0.38);
  margin-top: 10px;
}

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

.file-name {
  font-weight: 700;
  word-break: break-word;
}

.file-slot {
  position: relative;
  border: 1px dashed rgba(141, 59, 247, 0.45);
  padding: 14px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(141, 59, 247, 0.09), rgba(106, 182, 8, 0.045));
  margin-top: 10px;
}

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

.file-slot-title {
  margin: 0;
}

.file-slot-remove {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  color: #ffd6de;
  border-color: rgba(255, 92, 122, 0.35);
  background: rgba(255, 92, 122, 0.1);
}

.file-slot-remove:hover {
  color: #fff2f5;
  border-color: rgba(255, 92, 122, 0.62);
  background: rgba(255, 92, 122, 0.2);
}

.file-slot-remove svg {
  width: 16px;
  height: 16px;
}

.upload-panel {
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(12, 11, 18, 0.65);
}

.upload-result,
.upload-error {
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(141, 59, 247, 0.08), rgba(106, 182, 8, 0.08));
  padding: 16px;
}

.upload-result h3,
.upload-error h3 {
  margin: 14px 0 6px;
}

.share-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-top: 12px;
}

.download-url {
  min-height: 46px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.26);
  display: flex;
  align-items: center;
  padding: 10px 12px;
}

.copy-btn {
  width: 46px;
  height: 46px;
  border-radius: 14px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
}

.loader {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-top-color: var(--violet);
  animation: spin 0.8s linear infinite;
}

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

footer.note {
  margin-top: 18px;
  color: var(--muted);
  font-size: 13px;
}

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

.full-width {
  width: 100%;
}

.centered {
  text-align: center;
}

.form-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.form-inline input {
  flex: 1 1 190px;
}

@media (max-width: 720px) {
  .shell {
    padding-top: 12px;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
    position: static;
  }

  .nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .nav .btn,
  .actions .btn {
    width: 100%;
  }

  .actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 15px;
  }

  .card {
    margin-top: 16px;
  }

  .section-head {
    display: block;
  }

  .users-head,
  .user-card:not(.bundle-card),
  .modal-actions {
    align-items: stretch;
    display: grid;
    grid-template-columns: 1fr;
    grid-auto-flow: column;
  }


  .bundle-card-actions {
    justify-content: flex-end;
  }

  .users-head .btn,
  .modal-actions .btn {
    width: 100%;
  }

  .user-actions {
    justify-content: flex-end;
  }

  .file-row {
    align-items: stretch;
    flex-direction: column;
  }

  .file-row .btn {
    width: 100%;
  }

  .share-row {
    grid-template-columns: 1fr;
  }

  .copy-btn {
    width: 100%;
  }

  .form-inline {
    display: grid;
  }
}

.contnetdetdiv {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.bundle-expiry svg {
  WIDTH: 18px;
}