*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
[data-theme="dark"] {
  --bg: #07080f;
  --surface: #0d0e1a;
  --card: #111220;
  --card2: #181926;
  --border: rgba(255, 255, 255, 0.07);
  --border2: rgba(255, 255, 255, 0.12);
  --text: #e6e6f0;
  --muted: #55566e;
  --muted2: #8a8ba8;
  --hi: #f2eeff;
  --inp: #0a0b16;
  --shadow: rgba(0, 0, 0, 0.5);
  --toggle-knob: #a78bfa;
}
[data-theme="light"] {
  --bg: #f0f1f8;
  --surface: #ffffff;
  --card: #ffffff;
  --card2: #ecedf8;
  --border: rgba(0, 0, 0, 0.08);
  --border2: rgba(0, 0, 0, 0.14);
  --text: #18192e;
  --muted: #9090ae;
  --muted2: #4a4b68;
  --hi: #18192e;
  --inp: #f5f5fc;
  --shadow: rgba(100, 100, 180, 0.12);
  --toggle-knob: #7c3aed;
}
:root {
  --a: #7c3aed;
  --a2: #a855f7;
  --a3: #c084fc;
  --green: #22c55e;
  --gd: rgba(34, 197, 94, 0.12);
  --red: #ef4444;
  --rd: rgba(239, 68, 68, 0.12);
  --yel: #f59e0b;
  --yd: rgba(245, 158, 11, 0.12);
  --blu: #3b82f6;
  --bd: rgba(59, 130, 246, 0.12);
  --tel: #14b8a6;
}
body {
  font-family: "DM Sans", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  transition:
    background 0.3s,
    color 0.3s;
}
[data-theme="dark"] body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(
      ellipse 65% 45% at 12% 4%,
      rgba(124, 58, 237, 0.1) 0%,
      transparent 55%
    ),
    radial-gradient(
      ellipse 45% 35% at 88% 95%,
      rgba(168, 85, 247, 0.07) 0%,
      transparent 55%
    );
  pointer-events: none;
  z-index: 0;
}
.view {
  display: none;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}
.view.on {
  display: flex;
}

.toggle-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.toggle-label {
  font-size: 0.75rem;
  color: var(--muted2);
  user-select: none;
}
.toggle-switch {
  width: 46px;
  height: 26px;
  background: var(--card2);
  border: 1px solid var(--border2);
  border-radius: 99px;
  position: relative;
  cursor: pointer;
  transition: background 0.3s;
  flex-shrink: 0;
}
.toggle-switch::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--toggle-knob);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}
[data-theme="light"] .toggle-switch::after {
  transform: translateX(20px);
}

#va {
  align-items: center;
  justify-content: center;
  padding: 24px;
  flex-direction: column;
}
.auth-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 460px;
  margin-bottom: 28px;
  animation: fd 0.5s ease both;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
}
.mark {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--a), var(--a2));
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Inter", sans-serif;
  font-weight: 800;
  font-size: 18px;
  color: #fff;
}
.brand-text {
  font-family: "Inter", sans-serif;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--hi);
  letter-spacing: -0.02em;
}
.brand-sub {
  font-size: 0.65rem;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.auth-card {
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: 22px;
  padding: 42px 46px;
  width: 100%;
  max-width: 460px;
  animation: fu 0.5s ease 0.1s both;
  position: relative;
  overflow: hidden;
  box-shadow: 0 24px 64px var(--shadow);
}
.auth-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--a), var(--a3), transparent);
}
.tabs {
  display: flex;
  background: var(--surface);
  border-radius: 11px;
  padding: 4px;
  margin-bottom: 30px;
  border: 1px solid var(--border);
}
.tab {
  flex: 1;
  padding: 9px;
  text-align: center;
  font-size: 0.87rem;
  font-weight: 500;
  color: var(--muted);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  background: none;
  font-family: "DM Sans", sans-serif;
}
.tab.on {
  background: var(--card2);
  color: var(--hi);
  box-shadow: 0 2px 8px var(--shadow);
}
.aform {
  display: none;
}
.aform.on {
  display: block;
}
.ftitle {
  font-family: "Inter", sans-serif;
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--hi);
  margin-bottom: 5px;
  letter-spacing: -0.02em;
}
.fsub {
  font-size: 0.86rem;
  color: var(--muted);
  margin-bottom: 24px;
  line-height: 1.6;
}
.frow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}
.fg {
  margin-bottom: 15px;
}
.flabel {
  display: block;
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--muted2);
  margin-bottom: 7px;
  letter-spacing: 0.03em;
}
.finput {
  width: 100%;
  padding: 11px 15px;
  background: var(--inp);
  border: 1px solid var(--border2);
  border-radius: 9px;
  color: var(--text);
  font-family: "DM Sans", sans-serif;
  font-size: 0.88rem;
  font-weight: 300;
  outline: none;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
.finput:focus {
  border-color: rgba(124, 58, 237, 0.5);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}
.finput::placeholder {
  color: var(--muted);
}
.ftextarea {
  width: 100%;
  padding: 11px 15px;
  background: var(--inp);
  border: 1px solid var(--border2);
  border-radius: 9px;
  color: var(--text);
  font-family: "DM Sans", sans-serif;
  font-size: 0.88rem;
  font-weight: 300;
  outline: none;
  resize: vertical;
  min-height: 100px;
  transition: border-color 0.2s;
}
.ftextarea:focus {
  border-color: rgba(124, 58, 237, 0.5);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}
.ftextarea::placeholder {
  color: var(--muted);
}
.btnp {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, var(--a), var(--a2));
  border: none;
  border-radius: 9px;
  color: #fff;
  font-family: "DM Sans", sans-serif;
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  transition:
    opacity 0.2s,
    transform 0.2s;
  margin-top: 6px;
}
.btnp:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}
.btnp:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}
.fnote {
  font-size: 0.77rem;
  color: var(--muted);
  text-align: center;
  margin-top: 13px;
  line-height: 1.6;
}
.fnote span {
  color: var(--a3);
  cursor: pointer;
}
.alert {
  padding: 11px 15px;
  border-radius: 9px;
  font-size: 0.82rem;
  margin-bottom: 15px;
  display: none;
  line-height: 1.5;
}
.alert.ok {
  background: var(--gd);
  border: 1px solid rgba(34, 197, 94, 0.25);
  color: #22c55e;
  display: block;
}
.alert.err {
  background: var(--rd);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #ef4444;
  display: block;
}
.alert.warn {
  background: var(--yd);
  border: 1px solid rgba(245, 158, 11, 0.25);
  color: #f59e0b;
  display: block;
}

#vapp {
  flex-direction: column;
}
.topbar {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 0 28px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 18px var(--shadow);
  transition: background 0.3s;
}
.tlogo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.tlogo .mark {
  width: 30px;
  height: 30px;
  font-size: 14px;
  border-radius: 8px;
}
.tlogo .brand-text {
  font-size: 1rem;
}
.tbadge {
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--a3);
  background: rgba(124, 58, 237, 0.12);
  border: 1px solid rgba(124, 58, 237, 0.2);
  padding: 3px 9px;
  border-radius: 99px;
  margin-left: 4px;
}
.tright {
  display: flex;
  align-items: center;
  gap: 14px;
}
.upill {
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 5px 14px 5px 5px;
}
.uavatar {
  width: 26px;
  height: 26px;
  background: linear-gradient(135deg, var(--a), var(--a2));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  color: #fff;
  font-family: "Inter", sans-serif;
}
.uname {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text);
}
.btnout {
  padding: 6px 13px;
  background: transparent;
  border: 1px solid var(--border2);
  border-radius: 7px;
  color: var(--muted);
  font-size: 0.77rem;
  cursor: pointer;
  font-family: "DM Sans", sans-serif;
  transition: all 0.2s;
}
.btnout:hover {
  border-color: var(--red);
  color: var(--red);
}
.appbody {
  display: flex;
  flex: 1;
}

.sidebar {
  width: 228px;
  min-height: calc(100vh - 60px);
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 22px 13px;
  flex-shrink: 0;
  transition: background 0.3s;
}
.slabel {
  font-size: 0.61rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 7px;
  padding: 0 10px;
}
.ssec {
  margin-bottom: 26px;
}
.sitem {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border-radius: 9px;
  font-size: 0.84rem;
  color: var(--muted2);
  cursor: pointer;
  transition: all 0.18s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: "DM Sans", sans-serif;
}
.sitem:hover {
  background: var(--card2);
  color: var(--text);
}
.sitem.on {
  background: rgba(124, 58, 237, 0.12);
  color: var(--a3);
  font-weight: 500;
}
.sitem svg {
  flex-shrink: 0;
  opacity: 0.7;
}
.sitem.on svg {
  opacity: 1;
}

.main {
  flex: 1;
  padding: 34px 38px;
  overflow-y: auto;
}
.panel {
  display: none;
  animation: fu 0.3s ease both;
}
.panel.on {
  display: block;
}
.ph {
  margin-bottom: 30px;
}
.ptitle {
  font-family: "Inter", sans-serif;
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--hi);
  letter-spacing: -0.03em;
  margin-bottom: 5px;
}
.psub {
  font-size: 0.87rem;
  color: var(--muted);
  font-weight: 300;
}

.hgrid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 30px;
}
.hcard {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px 20px;
  cursor: pointer;
  transition:
    transform 0.25s,
    box-shadow 0.25s,
    border-color 0.25s;
  position: relative;
  overflow: hidden;
}
.hcard::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  opacity: 0;
  transition: opacity 0.25s;
}
.hcard.cp::before {
  background: linear-gradient(90deg, var(--a), var(--a3));
}
.hcard.cg::before {
  background: linear-gradient(90deg, var(--green), #4ade80);
}
.hcard.cb::before {
  background: linear-gradient(90deg, var(--blu), #60a5fa);
}
.hcard.ct::before {
  background: linear-gradient(90deg, var(--tel), #2dd4bf);
}
.hcard.co::before {
  background: linear-gradient(90deg, #f97316, #fb923c);
}
.hcard:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px var(--shadow);
}
.hcard.cp:hover {
  border-color: rgba(124, 58, 237, 0.35);
}
.hcard.cb:hover {
  border-color: rgba(59, 130, 246, 0.35);
}
.hcard.cg:hover {
  border-color: rgba(34, 197, 94, 0.35);
}
.hcard.ct:hover {
  border-color: rgba(20, 184, 166, 0.35);
}
.hcard.co:hover {
  border-color: rgba(249, 115, 22, 0.35);
}
.hcard:hover::before {
  opacity: 1;
}
.hcico {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  font-size: 1.3rem;
}
.hcico.cp {
  background: rgba(124, 58, 237, 0.13);
}
.hcico.cb {
  background: rgba(59, 130, 246, 0.12);
}
.hcico.cg {
  background: rgba(34, 197, 94, 0.12);
}
.hcico.ct {
  background: rgba(20, 184, 166, 0.12);
}
.hcico.co {
  background: rgba(249, 115, 22, 0.12);
}
.hctitle {
  font-family: "Inter", sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--hi);
  margin-bottom: 7px;
  letter-spacing: -0.02em;
}
.hcdesc {
  font-size: 0.79rem;
  color: var(--muted);
  line-height: 1.65;
  font-weight: 300;
}
.harrow {
  position: absolute;
  top: 20px;
  right: 20px;
  color: var(--muted);
  opacity: 0;
  transition: all 0.2s;
}
.hcard:hover .harrow {
  opacity: 1;
  transform: translate(2px, -2px);
}

.cf-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 20px;
  min-height: calc(100vh - 180px);
}
.cf-sidebar {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  overflow-y: auto;
  max-height: calc(100vh - 180px);
  position: sticky;
  top: 90px;
}
.cf-sidebar-title {
  font-family: "Inter", sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--hi);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.cf-page-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
  font-size: 0.82rem;
  color: var(--muted2);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: "DM Sans", sans-serif;
  line-height: 1.4;
}
.cf-page-item:hover {
  background: var(--card2);
  color: var(--text);
}
.cf-page-item.on {
  background: rgba(124, 58, 237, 0.12);
  color: var(--a3);
  font-weight: 500;
}
.cf-page-item .cf-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--muted);
  flex-shrink: 0;
  margin-top: 6px;
  transition: background 0.15s;
}
.cf-page-item.on .cf-dot {
  background: var(--a3);
}
.cf-page-item.child {
  padding-left: 22px;
}
.cf-content {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 32px 38px;
  overflow-y: auto;
  min-height: 400px;
}
.cf-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.cf-breadcrumb span {
  cursor: pointer;
  transition: color 0.15s;
}
.cf-breadcrumb span:hover {
  color: var(--a3);
}
.cf-breadcrumb .sep {
  opacity: 0.4;
}
.cf-page-title {
  font-family: "Inter", sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--hi);
  letter-spacing: -0.03em;
  margin-bottom: 6px;
}
.cf-page-meta {
  font-size: 0.74rem;
  color: var(--muted);
  margin-bottom: 26px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.cf-body {
  font-size: 0.9rem;
  line-height: 1.75;
  color: var(--text);
}
.cf-body h1,
.cf-body h2,
.cf-body h3,
.cf-body h4 {
  font-family: "Inter", sans-serif;
  color: var(--hi);
  margin: 24px 0 10px;
  letter-spacing: -0.02em;
}
.cf-body h1 {
  font-size: 1.4rem;
}
.cf-body h2 {
  font-size: 1.2rem;
}
.cf-body h3 {
  font-size: 1rem;
}
.cf-body p {
  margin-bottom: 14px;
}
.cf-body a {
  color: var(--a3);
  text-decoration: none;
}
.cf-body a:hover {
  text-decoration: underline;
}
.cf-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 0.84rem;
}
.cf-body th {
  background: rgba(124, 58, 237, 0.08);
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
  border: 1px solid var(--border2);
  color: var(--hi);
}
.cf-body td {
  padding: 9px 14px;
  border: 1px solid var(--border);
  vertical-align: top;
}
.cf-body tr:nth-child(even) td {
  background: rgba(124, 58, 237, 0.03);
}
.cf-body pre,
.cf-body code {
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: monospace;
  font-size: 0.82rem;
}
.cf-body pre {
  padding: 14px 16px;
  overflow-x: auto;
  margin: 12px 0;
  white-space: pre-wrap;
}
.cf-body code {
  padding: 2px 6px;
}
.cf-body ul,
.cf-body ol {
  padding-left: 22px;
  margin-bottom: 14px;
}
.cf-body li {
  margin-bottom: 5px;
}
.cf-body img {
  max-width: 100%;
  border-radius: 6px;
  margin: 10px 0;
}
.cf-body blockquote {
  border-left: 3px solid var(--a);
  padding: 10px 16px;
  background: rgba(124, 58, 237, 0.06);
  border-radius: 0 6px 6px 0;
  margin: 14px 0;
  color: var(--muted2);
}
.cf-body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 20px 0;
}

.cf-body .panel {
  background: rgba(59, 130, 246, 0.07);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 8px;
  padding: 14px;
  margin: 12px 0;
}
.cf-body .confluence-information-macro {
  background: rgba(59, 130, 246, 0.07);
  border-left: 3px solid var(--blu);
  border-radius: 0 8px 8px 0;
  padding: 12px 16px;
  margin: 12px 0;
}
.cf-body .confluence-information-macro-warning {
  background: rgba(245, 158, 11, 0.07);
  border-left-color: var(--yel);
}
.cf-body .confluence-information-macro-tip {
  background: rgba(34, 197, 94, 0.07);
  border-left-color: var(--green);
}
.cf-body .confluence-information-macro-note {
  background: rgba(239, 68, 68, 0.07);
  border-left-color: var(--red);
}
.cf-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}
.cf-empty-ico {
  font-size: 3rem;
  margin-bottom: 14px;
  opacity: 0.3;
}

.vgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}
.vcard {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: all 0.22s;
  cursor: pointer;
  display: block;
}
.vcard:hover {
  border-color: rgba(124, 58, 237, 0.35);
  transform: translateY(-4px);
  box-shadow: 0 14px 36px var(--shadow);
}
.vthumb {
  width: 100%;
  height: 175px;
  position: relative;
  overflow: hidden;
  background: var(--card2);
}
.vthumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}
.vcard:hover .vthumb img {
  transform: scale(1.05);
}
.vthumb-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  opacity: 0.15;
  background: linear-gradient(135deg, var(--card2), var(--surface));
}
.vplay-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.22);
  transition: background 0.2s;
}
.vcard:hover .vplay-overlay {
  background: rgba(0, 0, 0, 0.42);
}
.vplay {
  width: 54px;
  height: 54px;
  background: rgba(124, 58, 237, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.5);
}
.vcard:hover .vplay {
  transform: scale(1.12);
}
.vdur {
  position: absolute;
  bottom: 10px;
  right: 12px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 5px;
}
.vinfo {
  padding: 15px 17px;
}
.vtitle {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 7px;
  line-height: 1.45;
}
.vmeta {
  display: flex;
  align-items: center;
  gap: 9px;
}
.vtag {
  font-size: 0.63rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 9px;
  border-radius: 99px;
  background: rgba(124, 58, 237, 0.12);
  color: var(--a3);
}
.vdate {
  font-size: 0.71rem;
  color: var(--muted);
}
.vempty {
  padding: 48px;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  background: var(--card);
  border: 1px dashed var(--border2);
  border-radius: 14px;
}
.vtabs {
  display: flex;
  gap: 8px;
  margin-bottom: 22px;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0;
}
.vtab {
  padding: 10px 22px;
  font-size: 0.87rem;
  font-weight: 600;
  color: var(--muted2);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  font-family: "DM Sans", sans-serif;
  transition: all 0.2s;
  border-radius: 8px 8px 0 0;
}
.vtab:hover {
  color: var(--a3);
  background: rgba(124, 58, 237, 0.06);
}
.vtab.on {
  color: var(--a3);
  border-bottom-color: var(--a);
  background: rgba(124, 58, 237, 0.08);
}
.vempty-ico {
  font-size: 2.5rem;
  margin-bottom: 12px;
  opacity: 0.4;
}

.vmodal-bg {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
  padding: 20px;
}
.vmodal-bg.on {
  opacity: 1;
  pointer-events: all;
}
.vmodal {
  background: var(--card);
  border-radius: 18px;
  width: 100%;
  max-width: 900px;
  overflow: hidden;
  transform: scale(0.95);
  transition: transform 0.25s;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.7);
}
.vmodal-bg.on .vmodal {
  transform: scale(1);
}
.vmodal-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.vmodal-title {
  font-family: "Inter", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--hi);
  flex: 1;
  margin-right: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vmodal-tag {
  font-size: 0.63rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 9px;
  border-radius: 99px;
  background: rgba(124, 58, 237, 0.12);
  color: var(--a3);
}
.vmodal-close {
  width: 32px;
  height: 32px;
  background: var(--card2);
  border: 1px solid var(--border2);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--muted);
  transition: all 0.15s;
  margin-left: 8px;
}
.vmodal-close:hover {
  background: var(--rd);
  border-color: rgba(239, 68, 68, 0.4);
  color: var(--red);
}
.vmodal-player {
  width: 100%;
  background: #000;
  aspect-ratio: 16/9;
}
.vmodal-player video {
  width: 100%;
  height: 100%;
  display: block;
  outline: none;
}
.vmodal-fallback {
  width: 100%;
  aspect-ratio: 16/9;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #050505;
  gap: 14px;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
  padding: 20px;
}
.vmodal-fallback a {
  color: var(--a3);
}

.ccard {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 15px;
  padding: 22px;
  margin-bottom: 20px;
}
.cctitle {
  font-family: "Inter", sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--hi);
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.citem {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
}
.citem:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.citem-ico {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.citem-lbl {
  font-size: 0.7rem;
  color: var(--muted);
  margin-bottom: 2px;
}
.citem-val {
  font-size: 0.84rem;
  color: var(--text);
  font-weight: 500;
}
.cfwrap {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 15px;
  padding: 26px;
}
.cftitle {
  font-family: "Inter", sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--hi);
  margin-bottom: 20px;
}

.tc-check-wrap {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(124, 58, 237, 0.06);
  border: 1px solid rgba(124, 58, 237, 0.18);
  border-radius: 10px;
  cursor: pointer;
  transition:
    background 0.2s,
    border-color 0.2s;
  margin-bottom: 16px;
  user-select: none;
}
.tc-check-wrap:hover {
  background: rgba(124, 58, 237, 0.1);
  border-color: rgba(124, 58, 237, 0.3);
}
.tc-check-wrap.accepted {
  background: rgba(34, 197, 94, 0.06);
  border-color: rgba(34, 197, 94, 0.25);
}
.tc-checkbox {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(124, 58, 237, 0.35);
  border-radius: 6px;
  background: var(--inp);
  flex-shrink: 0;
  margin-top: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.tc-checkbox.checked {
  background: var(--a);
  border-color: var(--a);
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.4);
}
.tc-checkbox-tick {
  display: none;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
}
.tc-checkbox.checked .tc-checkbox-tick {
  display: block;
}
.tc-check-label {
  font-size: 0.83rem;
  color: var(--muted2);
  line-height: 1.6;
}
.tc-check-link {
  color: var(--a3);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  font-weight: 500;
}
.tc-check-link:hover {
  color: var(--a2);
}

.tc-modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  z-index: 9500;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
  padding: 20px;
}
.tc-modal-bg.on {
  opacity: 1;
  pointer-events: all;
}
.tc-modal {
  background: var(--card);
  border-radius: 18px;
  width: 100%;
  max-width: 700px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.95);
  transition: transform 0.25s;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.75);
  border: 1px solid var(--border2);
}
.tc-modal-bg.on .tc-modal {
  transform: scale(1);
}
.tc-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  position: relative;
}
.tc-modal-head::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--a), var(--a3), transparent);
}
.tc-modal-title {
  font-family: "Inter", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--hi);
  display: flex;
  align-items: center;
  gap: 10px;
}
.tc-modal-close {
  width: 32px;
  height: 32px;
  background: var(--card2);
  border: 1px solid var(--border2);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--muted);
  transition: all 0.15s;
  flex-shrink: 0;
}
.tc-modal-close:hover {
  background: var(--rd);
  border-color: rgba(239, 68, 68, 0.4);
  color: var(--red);
}
.tc-modal-body {
  padding: 26px 28px;
  overflow-y: auto;
  flex: 1;
  font-size: 0.875rem;
  line-height: 1.75;
  color: var(--text);
}
.tc-modal-body h3 {
  font-family: "Inter", sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--hi);
  margin: 22px 0 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.tc-modal-body h3:first-child {
  margin-top: 0;
}
.tc-modal-body h3::before {
  content: "";
  width: 3px;
  height: 14px;
  background: var(--a);
  border-radius: 99px;
  display: inline-block;
  flex-shrink: 0;
}
.tc-modal-body p {
  margin-bottom: 12px;
  color: var(--muted2);
  line-height: 1.7;
}
.tc-modal-body ul {
  padding-left: 20px;
  margin-bottom: 14px;
}
.tc-modal-body li {
  margin-bottom: 7px;
  color: var(--muted2);
}
.tc-modal-body li::marker {
  color: var(--a3);
}
.tc-modal-body strong {
  color: var(--text);
  font-weight: 600;
}
.tc-highlight {
  background: rgba(124, 58, 237, 0.07);
  border: 1px solid rgba(124, 58, 237, 0.18);
  border-left: 3px solid var(--a);
  padding: 13px 16px;
  border-radius: 0 9px 9px 0;
  margin-bottom: 22px;
  font-size: 0.83rem;
  color: var(--muted2);
  line-height: 1.65;
}
.tc-highlight strong {
  color: var(--a3);
}
.tc-modal-foot {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  background: var(--card);
  flex-shrink: 0;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  align-items: center;
}
.tc-modal-foot-note {
  font-size: 0.75rem;
  color: var(--muted);
  flex: 1;
}
.tc-accept-btn {
  padding: 10px 26px;
  background: linear-gradient(135deg, var(--a), var(--a2));
  border: none;
  border-radius: 8px;
  color: #fff;
  font-family: "DM Sans", sans-serif;
  font-size: 0.86rem;
  font-weight: 500;
  cursor: pointer;
  transition:
    opacity 0.2s,
    transform 0.2s;
}
.tc-accept-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}
.tc-close-only-btn {
  padding: 10px 20px;
  background: var(--card2);
  border: 1px solid var(--border2);
  border-radius: 8px;
  color: var(--muted);
  font-family: "DM Sans", sans-serif;
  font-size: 0.86rem;
  cursor: pointer;
  transition: all 0.15s;
}
.tc-close-only-btn:hover {
  color: var(--text);
}

.srow {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 13px;
  margin-bottom: 26px;
}
.sbox {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 19px 21px;
}
.sval {
  font-family: "Inter", sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--hi);
  margin-bottom: 3px;
  letter-spacing: -0.03em;
}
.slb {
  font-size: 0.76rem;
  color: var(--muted);
  font-weight: 300;
}
.twrap {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 15px;
  overflow: hidden;
}
.thead2 {
  padding: 17px 21px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ttitle {
  font-family: "Inter", sans-serif;
  font-size: 0.93rem;
  font-weight: 700;
  color: var(--hi);
}
.tsearch {
  padding: 7px 13px;
  background: var(--inp);
  border: 1px solid var(--border2);
  border-radius: 7px;
  color: var(--text);
  font-size: 0.8rem;
  font-family: "DM Sans", sans-serif;
  outline: none;
  width: 190px;
}
.tsearch::placeholder {
  color: var(--muted);
}
table {
  width: 100%;
  border-collapse: collapse;
}
thead th {
  padding: 10px 17px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: left;
  border-bottom: 1px solid var(--border);
  background: rgba(124, 58, 237, 0.03);
}
tbody tr {
  transition: background 0.15s;
}
tbody tr:hover {
  background: rgba(124, 58, 237, 0.03);
}
tbody tr:not(:last-child) {
  border-bottom: 1px solid var(--border);
}
tbody td {
  padding: 12px 17px;
  font-size: 0.83rem;
  color: var(--muted2);
  vertical-align: middle;
}
tbody td:first-child {
  color: var(--text);
  font-weight: 500;
}
.sbadge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 99px;
}
.sbadge::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
}
.sbadge.approved {
  background: var(--gd);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.25);
}
.sbadge.approved::before {
  background: var(--green);
}
.sbadge.pending {
  background: var(--yd);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.25);
}
.sbadge.pending::before {
  background: var(--yel);
}
.sbadge.rejected {
  background: var(--rd);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.25);
}
.sbadge.rejected::before {
  background: var(--red);
}
.abtns {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.abtn {
  padding: 4px 10px;
  border-radius: 5px;
  font-size: 0.71rem;
  font-weight: 500;
  cursor: pointer;
  font-family: "DM Sans", sans-serif;
  transition: all 0.15s;
  border: 1px solid;
}
.aapp {
  background: var(--gd);
  border-color: rgba(34, 197, 94, 0.3);
  color: #22c55e;
}
.aapp:hover {
  background: rgba(34, 197, 94, 0.22);
}
.arej {
  background: var(--rd);
  border-color: rgba(239, 68, 68, 0.3);
  color: #ef4444;
}
.arej:hover {
  background: rgba(239, 68, 68, 0.22);
}
.adel {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.4);
  color: #ef4444;
}
.adel:hover {
  background: rgba(239, 68, 68, 0.2);
}

.vm-form-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 15px;
  padding: 26px;
  margin-bottom: 28px;
}
.vm-form-title {
  font-family: "Inter", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--hi);
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.vm-grid3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
  margin-bottom: 16px;
}
.vm-input {
  padding: 10px 13px;
  background: var(--inp);
  border: 1px solid var(--border2);
  border-radius: 8px;
  color: var(--text);
  font-family: "DM Sans", sans-serif;
  font-size: 0.84rem;
  outline: none;
  width: 100%;
  transition: border-color 0.2s;
}
.vm-input:focus {
  border-color: rgba(124, 58, 237, 0.5);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}
.vm-input::placeholder {
  color: var(--muted);
}
.vm-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 24px;
  background: linear-gradient(135deg, var(--a), var(--a2));
  border: none;
  border-radius: 8px;
  color: #fff;
  font-family: "DM Sans", sans-serif;
  font-size: 0.86rem;
  font-weight: 500;
  cursor: pointer;
  transition:
    opacity 0.2s,
    transform 0.2s;
  margin-top: 6px;
}
.vm-add-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}
.vm-add-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Patch file uploader */
.patch-dropzone {
  border: 1.5px dashed var(--border2);
  border-radius: 12px;
  background: var(--inp);
  padding: 28px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  transition:
    border-color 0.2s,
    background 0.2s;
}
.patch-dropzone:hover {
  border-color: rgba(124, 58, 237, 0.4);
}
.patch-dropzone.drag {
  border-color: var(--a);
  background: rgba(124, 58, 237, 0.06);
}
.patch-dropzone-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--a), var(--a2));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}
.patch-dropzone-text {
  font-family: "DM Sans", sans-serif;
  font-size: 0.86rem;
  color: var(--text);
  font-weight: 500;
}
.patch-dropzone-text span {
  color: var(--a);
  text-decoration: underline;
}
.patch-dropzone-hint {
  font-family: "DM Sans", sans-serif;
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 4px;
}

.patch-file-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  margin-top: 12px;
}
.pfi-icon-wrap {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--inp);
  color: var(--a);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.pfi-body {
  flex: 1;
  min-width: 0;
}
.pfi-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}
.pfi-name {
  font-family: "DM Sans", sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pfi-status {
  font-family: "DM Sans", sans-serif;
  font-size: 0.72rem;
  color: var(--muted2);
  flex-shrink: 0;
}
.pfi-status.ok {
  color: var(--green);
}
.pfi-status.err {
  color: var(--red);
}
.pfi-progress-track {
  width: 100%;
  height: 6px;
  border-radius: 4px;
  background: var(--inp);
  overflow: hidden;
}
.pfi-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--a), var(--a2));
  transition: width 0.15s ease;
}
.pfi-progress-fill.ok {
  background: var(--green);
}
.pfi-progress-fill.err {
  background: var(--red);
}
.pfi-size {
  font-family: "DM Sans", sans-serif;
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 5px;
}
.pfi-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.pfi-check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--gd);
  color: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.pfi-remove {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  padding: 2px 4px;
  border-radius: 6px;
  flex-shrink: 0;
}
.pfi-remove:hover {
  color: var(--red);
  background: var(--rd);
}
.thumb-zone {
  border: 2px dashed var(--border2);
  border-radius: 10px;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
  background: var(--inp);
}
.thumb-zone:hover {
  border-color: rgba(124, 58, 237, 0.5);
  background: rgba(124, 58, 237, 0.04);
}
.thumb-zone.filled {
  border-style: solid;
  border-color: rgba(124, 58, 237, 0.4);
  cursor: default;
  min-height: 0;
}
.thumb-zone-inner {
  text-align: center;
  pointer-events: none;
  padding: 16px;
}
.thumb-zone-ico {
  font-size: 1.8rem;
  margin-bottom: 8px;
}
.thumb-zone-txt {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.6;
}
.thumb-zone-txt b {
  color: var(--a3);
}
.thumb-zone img.tprev {
  width: 100%;
  height: 130px;
  object-fit: cover;
  display: block;
}
.thumb-clear {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 26px;
  height: 26px;
  background: rgba(239, 68, 68, 0.88);
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 0.72rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
}
.vm-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 14px;
}
.vm-card {
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.2s;
}
.vm-card:hover {
  border-color: rgba(124, 58, 237, 0.25);
}
.vm-card-thumb {
  width: 100%;
  height: 130px;
  object-fit: cover;
  display: block;
}
.vm-card-nothumb {
  width: 100%;
  height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  opacity: 0.18;
  background: linear-gradient(135deg, var(--card2), var(--surface));
}
.vm-card-body {
  padding: 12px 14px;
}
.vm-card-title {
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vm-card-url {
  font-size: 0.71rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 10px;
}
.vm-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.vm-card-tag {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 99px;
  background: rgba(124, 58, 237, 0.12);
  color: var(--a3);
}
.vm-card-del {
  padding: 4px 12px;
  background: var(--rd);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 6px;
  color: #ef4444;
  font-size: 0.72rem;
  cursor: pointer;
  font-family: "DM Sans", sans-serif;
}
.vm-card-del:hover {
  background: rgba(239, 68, 68, 0.22);
}
.vm-card-edit {
  padding: 4px 12px;
  background: rgba(124, 58, 237, 0.1);
  border: 1px solid rgba(124, 58, 237, 0.3);
  border-radius: 6px;
  color: var(--a3);
  font-size: 0.72rem;
  cursor: pointer;
  font-family: "DM Sans", sans-serif;
  transition: background 0.15s;
}
.vm-card-edit:hover {
  background: rgba(124, 58, 237, 0.22);
}
.section-hd {
  margin-bottom: 16px;
}

.doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.doc-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.22s;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.doc-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--a), var(--a3));
  opacity: 0;
  transition: opacity 0.2s;
}
.doc-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px var(--shadow);
  border-color: rgba(124, 58, 237, 0.3);
}
.doc-card:hover::before {
  opacity: 1;
}
.doc-card-ico {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}
.doc-card-ico.pdf {
  background: rgba(239, 68, 68, 0.12);
}
.doc-card-ico.doc {
  background: rgba(59, 130, 246, 0.12);
}
.doc-card-ico.other {
  background: rgba(124, 58, 237, 0.12);
}
.doc-card-info {
  flex: 1;
  min-width: 0;
}
.doc-card-title {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 6px;
  line-height: 1.4;
  word-break: break-word;
}
.doc-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.doc-card-tag {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 99px;
  background: rgba(124, 58, 237, 0.12);
  color: var(--a3);
}
.doc-card-desc {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 6px;
  line-height: 1.5;
}
.doc-card-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  color: var(--muted);
  margin-top: 8px;
}
.doc-empty {
  padding: 48px;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  background: var(--card);
  border: 1px dashed var(--border2);
  border-radius: 14px;
}
.doc-empty-ico {
  font-size: 2.5rem;
  margin-bottom: 12px;
  opacity: 0.4;
}
.doc-list-item-title {
  white-space: normal !important;
  word-break: break-word;
  line-height: 1.4;
}

.doc-filters {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.doc-filter-btn {
  padding: 6px 16px;
  border-radius: 99px;
  font-size: 0.78rem;
  font-weight: 500;
  border: 1px solid var(--border2);
  background: var(--card);
  color: var(--muted2);
  cursor: pointer;
  font-family: "DM Sans", sans-serif;
  transition: all 0.18s;
}
.doc-filter-btn:hover {
  border-color: rgba(124, 58, 237, 0.4);
  color: var(--a3);
}
.doc-filter-btn.on {
  background: rgba(124, 58, 237, 0.12);
  border-color: rgba(124, 58, 237, 0.35);
  color: var(--a3);
  font-weight: 600;
}
.doc-search {
  padding: 8px 14px;
  background: var(--inp);
  border: 1px solid var(--border2);
  border-radius: 9px;
  color: var(--text);
  font-family: "DM Sans", sans-serif;
  font-size: 0.83rem;
  outline: none;
  width: 200px;
  margin-left: auto;
  transition: border-color 0.2s;
}
.doc-search:focus {
  border-color: rgba(124, 58, 237, 0.5);
}
.doc-search::placeholder {
  color: var(--muted);
}

.dmodal-bg {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 9100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
  padding: 16px;
}
.dmodal-bg.on {
  opacity: 1;
  pointer-events: all;
}
.dmodal {
  background: var(--card);
  border-radius: 18px;
  width: 100%;
  max-width: 1050px;
  height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.96);
  transition: transform 0.25s;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.7);
}
.dmodal-bg.on .dmodal {
  transform: scale(1);
}
.dmodal-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  gap: 12px;
}
.dmodal-title {
  font-family: "Inter", sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--hi);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dmodal-tag {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 99px;
  background: rgba(124, 58, 237, 0.12);
  color: var(--a3);
  white-space: nowrap;
}
.dmodal-close {
  width: 32px;
  height: 32px;
  background: var(--card2);
  border: 1px solid var(--border2);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--muted);
  transition: all 0.15s;
  flex-shrink: 0;
}
.dmodal-close:hover {
  background: var(--rd);
  border-color: rgba(239, 68, 68, 0.4);
  color: var(--red);
}
.dmodal-frame {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: #222;
}
.dmodal-frame iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}
.dmodal-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  font-size: 0.74rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  background: var(--card);
  flex-shrink: 0;
}
.dmodal-notice svg {
  flex-shrink: 0;
  opacity: 0.7;
}

.dm-form-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 15px;
  padding: 26px;
  margin-bottom: 28px;
}
.dm-grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}
.dm-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}
.dm-card {
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  transition: border-color 0.2s;
}
.dm-card:hover {
  border-color: rgba(124, 58, 237, 0.25);
}
.dm-card-ico {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.dm-card-body {
  flex: 1;
  min-width: 0;
}
.dm-card-title {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 2px;
  word-break: break-word;
}
.dm-card-url {
  font-size: 0.69rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 8px;
}
.dm-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
}
.dm-card-tag {
  font-size: 0.61rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 99px;
  background: rgba(124, 58, 237, 0.12);
  color: var(--a3);
}
.dm-card-del {
  padding: 4px 12px;
  background: var(--rd);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 6px;
  color: #ef4444;
  font-size: 0.71rem;
  cursor: pointer;
  font-family: "DM Sans", sans-serif;
}
.dm-card-del:hover {
  background: rgba(239, 68, 68, 0.22);
}

@media (max-width: 768px) {
  .doc-search {
    width: 100%;
    margin-left: 0;
  }
  .doc-filters {
    gap: 7px;
  }
  .dm-grid2 {
    grid-template-columns: 1fr;
  }
  .dm-list {
    grid-template-columns: 1fr;
  }
  .dmodal {
    height: 95vh;
  }
  .doc-grid {
    grid-template-columns: 1fr;
  }
}

.doc-split {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 0;
  height: calc(100vh - 200px);
  min-height: 500px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}
.doc-list-panel {
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
}
.doc-list-header {
  padding: 14px 14px 0;
  flex-shrink: 0;
}
.doc-list-search {
  width: 100%;
  padding: 9px 13px;
  background: var(--inp);
  border: 1px solid var(--border2);
  border-radius: 9px;
  color: var(--text);
  font-family: "DM Sans", sans-serif;
  font-size: 0.82rem;
  outline: none;
  transition: border-color 0.2s;
}
.doc-list-search:focus {
  border-color: rgba(124, 58, 237, 0.5);
}
.doc-list-search::placeholder {
  color: var(--muted);
}
#doc-list-items {
  flex: 1;
  overflow-y: auto;
  padding: 10px 8px;
}
.doc-list-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: "DM Sans", sans-serif;
}
.doc-list-item:hover {
  background: var(--card2);
}
.doc-list-item.on {
  background: rgba(124, 58, 237, 0.12);
  border-left: 3px solid var(--a2);
}
.doc-list-item-ico {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.doc-list-item-ico.pdf {
  background: rgba(239, 68, 68, 0.12);
}
.doc-list-item-ico.doc {
  background: rgba(59, 130, 246, 0.12);
}
.doc-list-item-ico.sheet {
  background: rgba(34, 197, 94, 0.12);
}
.doc-list-item-ico.slide {
  background: rgba(245, 158, 11, 0.12);
}
.doc-list-item-ico.other {
  background: rgba(124, 58, 237, 0.12);
}
.doc-list-item-info {
  flex: 1;
  min-width: 0;
}
.doc-list-item-title {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
}
.doc-list-item.on .doc-list-item-title {
  color: var(--a3);
}
.doc-cat-tab {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted2);
  background: none;
  border: none;
  cursor: pointer;
  font-family: "DM Sans", sans-serif;
  transition: all 0.15s;
  text-align: left;
  gap: 7px;
}
.doc-cat-tab:hover {
  background: var(--card2);
  color: var(--text);
}
.doc-cat-tab.on {
  background: rgba(124, 58, 237, 0.1);
  color: var(--a3);
  font-weight: 600;
}
.doc-cat-tab svg {
  flex-shrink: 0;
}
.doc-list-item-tag {
  font-size: 0.65rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.doc-list-divider {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 10px 10px 4px;
  margin-top: 6px;
}
.doc-view-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  background: var(--surface);
  overflow: hidden;
  min-height: 400px;
}
.doc-view-panel:has(.doc-view-empty) {
  align-items: center;
  justify-content: center;
}
.doc-view-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
}
#doc-iframe {
  display: none;
  width: 100%;
  height: 100%;
  border: none;
}
.doc-view-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.85rem;
  background: var(--surface);
}
.doc-chrome-block {
  position: absolute;
  left: 0;
  right: 0;
  background: var(--surface);
  z-index: 2;
  pointer-events: none;
}
.doc-view-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--card);
  flex-shrink: 0;
  position: relative;
  z-index: 4;
  width: 100%;
}
.doc-view-toolbar-title {
  font-family: "Inter", sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--hi);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.doc-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 16px;
  background: linear-gradient(135deg, var(--a), var(--a2));
  border: none;
  border-radius: 8px;
  color: #fff;
  font-family: "DM Sans", sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition:
    opacity 0.2s,
    transform 0.2s;
  flex-shrink: 0;
}
.doc-download-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}
@media (max-width: 900px) {
  .doc-split {
    grid-template-columns: 220px 1fr;
    height: calc(100vh - 170px);
  }
}
@media (max-width: 768px) {
  .doc-split {
    grid-template-columns: 1fr;
    grid-template-rows: 220px 1fr;
    height: auto;
  }
}

@media (max-width: 480px) {
  .dmodal-top {
    padding: 10px 13px;
  }
  .dmodal-title {
    font-size: 0.82rem;
  }
}

.emodal-bg {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 9100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
  padding: 20px;
}
.emodal-bg.on {
  opacity: 1;
  pointer-events: all;
}
.emodal {
  background: var(--card);
  border-radius: 18px;
  width: 100%;
  max-width: 680px;
  overflow: hidden;
  transform: scale(0.95);
  transition: transform 0.25s;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.7);
  max-height: 90vh;
  overflow-y: auto;
}
.emodal-bg.on .emodal {
  transform: scale(1);
}
.emodal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--card);
  z-index: 2;
}
.emodal-title {
  font-family: "Inter", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--hi);
}
.emodal-close {
  width: 32px;
  height: 32px;
  background: var(--card2);
  border: 1px solid var(--border2);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--muted);
  transition: all 0.15s;
  font-size: 0.85rem;
}
.emodal-close:hover {
  background: var(--rd);
  border-color: rgba(239, 68, 68, 0.4);
  color: var(--red);
}
.emodal-body {
  padding: 24px 22px;
}
.emodal-foot {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 16px 22px;
  border-top: 1px solid var(--border);
  background: var(--card);
}
.emodal-cancel {
  padding: 10px 22px;
  background: var(--card2);
  border: 1px solid var(--border2);
  border-radius: 8px;
  color: var(--muted);
  font-family: "DM Sans", sans-serif;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s;
}
.emodal-cancel:hover {
  border-color: var(--border2);
  color: var(--text);
}

.toast {
  position: fixed;
  bottom: 22px;
  right: 22px;
  background: var(--card2);
  border: 1px solid var(--border2);
  border-radius: 13px;
  padding: 13px 17px;
  display: flex;
  align-items: flex-start;
  gap: 11px;
  z-index: 9999;
  box-shadow: 0 20px 60px var(--shadow);
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.3s;
  max-width: 310px;
}
.toast.on {
  transform: translateY(0);
  opacity: 1;
}
.tasto {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.tasto.ok {
  background: var(--gd);
  color: var(--green);
}
.tasto.info {
  background: rgba(124, 58, 237, 0.15);
  color: var(--a3);
}
.tasto.err {
  background: var(--rd);
  color: var(--red);
}
.ttl {
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}
.tmsg {
  font-size: 0.74rem;
  color: var(--muted);
  line-height: 1.5;
}
.loading {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 0.84rem;
  padding: 18px 0;
}
.spin {
  width: 15px;
  height: 15px;
  border: 2px solid var(--border2);
  border-top-color: var(--a2);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.btnticket {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 26px;
  background: linear-gradient(135deg, var(--a), var(--a2));
  border: none;
  border-radius: 9px;
  color: #fff;
  font-family: "DM Sans", sans-serif;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 8px;
}
.btnticket:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
  border: none;
  background: none;
  flex-shrink: 0;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s;
}
.hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger.open span:nth-child(2) {
  opacity: 0;
}
.hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 98;
  backdrop-filter: blur(2px);
}
.sidebar-overlay.on {
  display: block;
}

@keyframes fu {
  from {
    opacity: 0;
    transform: translateY(17px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media print {
  body {
    display: none !important;
  }
  * {
    display: none !important;
  }
}

[data-theme="dark"] ::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
[data-theme="dark"] ::-webkit-scrollbar-track {
  background: var(--surface);
}
[data-theme="dark"] ::-webkit-scrollbar-thumb {
  background: #2d2f45;
  border-radius: 99px;
}
[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
  background: #3d3f5a;
}
[data-theme="dark"] {
  scrollbar-color: #2d2f45 var(--surface);
  scrollbar-width: thin;
}
@keyframes fd {
  from {
    opacity: 0;
    transform: translateY(-11px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (min-width: 1400px) {
  .main {
    padding: 40px 56px;
  }
  .hgrid {
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
  }
  .vgrid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  }
  .sidebar {
    width: 248px;
  }
}

@media (max-width: 1399px) and (min-width: 1101px) {
  .hgrid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 1100px) {
  .hgrid {
    grid-template-columns: repeat(2, 1fr);
  }
  .srow {
    grid-template-columns: repeat(2, 1fr);
  }
  .sidebar {
    width: 210px;
  }
  .main {
    padding: 28px 26px;
  }
}

@media (max-width: 900px) {
  .sidebar {
    width: 200px;
  }
  .main {
    padding: 24px 20px;
  }
  .hgrid {
    grid-template-columns: repeat(2, 1fr);
    gap: 13px;
  }
  .srow {
    grid-template-columns: repeat(2, 1fr);
  }
  .vm-grid3 {
    grid-template-columns: 1fr 1fr;
  }
  .vgrid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  }
  .ptitle {
    font-size: 1.4rem;
  }
  .topbar {
    padding: 0 18px;
  }
  .uname {
    display: none;
  }
  .tbadge {
    display: none;
  }
  .vm-list {
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  }
}

@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }
  .sidebar {
    position: fixed;
    left: -260px;
    top: 0;
    height: 100vh;
    width: 250px;
    z-index: 99;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: none;
    padding-top: 70px;
    overflow-y: auto;
  }
  .sidebar.open {
    left: 0;
    box-shadow: 4px 0 30px rgba(0, 0, 0, 0.4);
  }
  .appbody {
    flex-direction: column;
  }
  .main {
    padding: 20px 16px;
    width: 100%;
  }
  .hgrid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .hcard {
    padding: 18px 14px;
  }
  .hcico {
    width: 36px;
    height: 36px;
    margin-bottom: 12px;
    font-size: 1.1rem;
  }
  .hctitle {
    font-size: 0.85rem;
  }
  .hcdesc {
    font-size: 0.75rem;
  }
  .srow {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .sval {
    font-size: 1.4rem;
  }
  .vm-grid3 {
    grid-template-columns: 1fr;
  }
  .frow {
    grid-template-columns: 1fr;
  }
  .auth-card {
    padding: 28px 22px;
  }
  .ptitle {
    font-size: 1.25rem;
  }
  .vgrid {
    grid-template-columns: 1fr;
  }
  .vm-list {
    grid-template-columns: 1fr;
  }
  .topbar {
    padding: 0 16px;
    height: 56px;
  }
  .tlogo .brand-text {
    font-size: 0.9rem;
  }
  .uname {
    display: none;
  }
  .tbadge {
    display: none;
  }
  .twrap {
    overflow-x: auto;
  }
  table {
    min-width: 560px;
  }
  .thead2 {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .tsearch {
    width: 100%;
  }
  .btnticket {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .hgrid {
    grid-template-columns: 1fr;
  }
  .srow {
    grid-template-columns: repeat(2, 1fr);
  }
  .auth-card {
    padding: 24px 16px;
    border-radius: 16px;
  }
  .auth-top {
    margin-bottom: 20px;
  }
  .toggle-label {
    display: none;
  }
  .main {
    padding: 16px 12px;
  }
  .ptitle {
    font-size: 1.1rem;
  }
  .psub {
    font-size: 0.8rem;
  }
  .hcard {
    padding: 16px 13px;
  }
  .topbar {
    padding: 0 12px;
    height: 52px;
  }
  .tlogo .mark {
    width: 26px;
    height: 26px;
    font-size: 12px;
  }
  .tlogo .brand-text {
    font-size: 0.85rem;
  }
  .upill {
    padding: 4px 10px 4px 4px;
    gap: 6px;
  }
  .uavatar {
    width: 22px;
    height: 22px;
    font-size: 0.58rem;
  }
  .btnout {
    padding: 5px 10px;
    font-size: 0.72rem;
  }
  .vm-grid3 {
    grid-template-columns: 1fr;
  }
  .vmodal {
    border-radius: 12px;
  }
  .vmodal-top {
    padding: 12px 14px;
  }
  .vmodal-title {
    font-size: 0.88rem;
  }
  .abtns {
    flex-direction: column;
  }
  .abtn {
    text-align: center;
  }
}
/* --- Modal Styling --- */
.modal-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.6); /* Dark semi-transparent background */
    backdrop-filter: blur(3px);
    z-index: 9999;
    display: none; /* Hidden by default */
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* This class is toggled by JavaScript to show the modal */
.modal-bg.on {
    display: flex;
}

.modal-box {
    background: var(--surface, #ffffff) !important; /* Adapts to dark mode */
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    max-height: 90vh; 
    overflow-y: auto; 
    animation: modalFadeIn 0.2s ease-out;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border, #e5e7eb) !important;
    background: var(--bg, #f8fafc) !important; /* Adapts to dark mode */
    border-radius: 12px 12px 0 0;
    position: sticky;
    top: 0;
    z-index: 10;
}

.modal-header h3 {
    color: var(--text, #111827) !important;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.vm-input, .ftextarea {
    background-color: var(--surface); /* Use the theme's surface color */
    color: var(--text); /* Use the theme's text color */
    border: 1px solid var(--border);
}

.tf-pill {
          background: var(--surface, #ffffff);
          border: 1px solid var(--border, #e2e8f0);
          color: var(--text, #334155);
          padding: 6px 14px;
          border-radius: 20px;
          font-size: 0.85rem;
          font-family: inherit;
          cursor: pointer;
          transition: all 0.2s ease;
          display: inline-flex;
          align-items: center;
          gap: 6px;
        }
        .tf-pill:hover { background: var(--card2, #f8fafc); }
        .tf-pill.active {
          border-color: #6366f1;
          color: #6366f1;
          background: rgba(99, 102, 241, 0.05);
        }
        .tf-pill-icon { display: none; }
        .tf-pill.active .tf-pill-icon { display: inline-block; }