
@import url('fonts.css');


.dash-layout{
  display:grid;grid-template-columns:172px 1fr;min-height:100vh;
}
.dash-sidebar{
  background:var(--surface);border-inline-end:var(--stroke) solid var(--line);
  padding:0;

  position:fixed;top:0;bottom:0;inset-inline-start:0;
  width:172px;height:100vh;
  overflow:hidden;
  display:flex;flex-direction:column;
  min-width:0;
  z-index:50;
}
.has-shader .dash-sidebar{
  backdrop-filter:blur(16px) saturate(1.15);
  -webkit-backdrop-filter:blur(16px) saturate(1.15);
}

.dash-brand{
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:6px;
  padding:20px 12px 16px;border-bottom:var(--stroke) solid var(--line);
  flex:none;
  color:inherit;text-decoration:none;
  transition:opacity .18s;
  text-align:center;
}
.dash-brand:hover{opacity:.85}
.dash-brand img{
  width:40px;height:40px;object-fit:contain;
  filter:drop-shadow(0 6px 16px rgba(217,243,43,.35));
}
.dash-brand b{display:block;line-height:1.4}
.dash-brand > span{color:var(--muted);font-size:12px}


.dash-nav{
  flex:1;
  min-height:0;
  overflow-y:auto;
  display:flex;flex-direction:column;gap:2px;padding:12px 10px;
}


.dash-burger{display:none}
.dash-nav__item{
  display:flex;align-items:center;gap:11px;
  padding:11px 14px;border-radius:var(--radius-sm);
  color:var(--muted);font-size:15px;font-weight:600;
  transition:color .18s, background .18s;
  cursor:pointer;
}
.dash-nav__item:hover,.dash-nav__item.active{color:var(--text);background:var(--surface-2)}
.dash-nav__item.active{color:var(--gold-ink);background:var(--gold-dim)}
.dash-nav__item--danger:hover{color:#f87171;background:rgba(226,59,46,.1)}

.dash-nav__icon{flex:none;display:grid;place-items:center;width:20px;height:20px}
.dash-nav__icon svg{width:18px;height:18px;display:block;stroke:currentColor}


.dash-main svg { max-width: 100%; flex: none; }
:where(.dash-main, .dash-sidebar) :where(svg:not([width])) { width: 18px; height: 18px; }

.btn :where(svg:not([width])) { width: 15px; height: 15px; display: block; stroke: currentColor; }

.dash-main{

  padding:36px 40px;max-width:var(--wrap);margin-inline:auto;width:100%;

  min-width:0;
}
.dash-page-title{font-size:clamp(22px,3vw,30px);margin-bottom:6px}
.dash-page-sub{color:var(--muted);font-size:16px;margin-bottom:0}

.dash-main{grid-column:2}


.dash-sidebar__foot{
  padding:12px 12px;
  border-top:var(--stroke) solid var(--line);
  display:flex;flex-direction:column;gap:8px;
  flex:none;
  background:var(--surface);
}
.dash-sidebar__foot .admin-name{
  display:block;
  font-size:13px;
  font-weight:700;
  color:var(--text);
  padding:0 4px;
  text-align:center;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.dash-sidebar__foot .admin-name .muted{
  color:var(--muted);
  font-weight:500;
  font-size:12px;
}
.dash-sidebar__foot .admin-actions{
  display:flex;
  align-items:stretch;
  gap:8px;
}

.dash-sidebar__foot .admin-logout,
.dash-sidebar__foot .admin-actions .nav__theme{
  flex:1;min-width:0;
  height:38px;margin:0;
  border:var(--stroke) solid var(--line);
  border-radius:var(--radius-sm);
  background:var(--surface-2);
  cursor:pointer;
  transition:color .18s, border-color .18s, background .18s;
}

.dash-sidebar__foot .admin-logout{
  display:grid;place-items:center;padding:0;
  color:var(--text);
  text-decoration:none;
}
.dash-sidebar__foot .admin-logout:hover{
  color:#f87171;
  border-color:rgba(248,113,113,.3);
  background:rgba(248,113,113,.06);
}
.dash-sidebar__foot .admin-logout svg{
  width:17px;height:17px;display:block;
  stroke:currentColor;
}

.dash-sidebar__foot .admin-actions .nav__theme{
  padding:0;
  display:grid;place-items:center;
  color:var(--text);
}
.dash-sidebar__foot .admin-actions .nav__theme:hover{
  border-color:rgba(252,172,16,.5);
  color:var(--gold-ink);
}
.dash-sidebar__foot .admin-actions .nav__theme .nav__theme-icon{
  width:17px;height:17px;
}


.has-shader .dash-card,
.has-shader .dstat,
.has-shader .notif,
.has-shader .data-table-wrap,
.has-shader .admin-table-wrap,
.has-shader .excard,
.has-shader .vcard,
.has-shader .temp-alert__content{
  backdrop-filter:blur(16px) saturate(1.15);
  -webkit-backdrop-filter:blur(16px) saturate(1.15);
}


.temp-alert{
  position:fixed;
  top:90px;
  right:20px;
  z-index:999;
  max-width:420px;
  opacity:0;
  transform:translateX(120%);
  transition:all .3s ease;
}
.temp-alert.show{
  opacity:1;
  transform:translateX(0);
}
.temp-alert__content{
  display:flex;
  align-items:flex-start;
  gap:14px;
  padding:18px 20px;
  background:var(--surface);
  border:var(--stroke) solid var(--line);
  border-radius:var(--radius);
  box-shadow:0 20px 40px -20px rgba(0,0,0,.4);
}
.temp-alert__icon{
  font-size:24px;
  flex:none;
}
.temp-alert__content strong{
  display:block;
  color:var(--text);
  font-size:15px;
  margin-bottom:4px;
}
.temp-alert__content p{
  color:var(--muted);
  font-size:14px;
  margin:0;
  line-height:1.6;
}
.temp-alert__close{
  background:transparent;
  border:none;
  color:var(--muted);
  font-size:24px;
  cursor:pointer;
  padding:0;
  margin-left:auto;
  width:24px;
  height:24px;
  display:flex;
  align-items:center;
  justify-content:center;
  transition:color .18s;
  flex:none;
}
.temp-alert__close:hover{
  color:var(--text);
}

.dash-stats{
  display:grid;grid-template-columns:repeat(3,1fr);gap:16px;
  margin:28px 0;
}
.dstat{
  padding:22px 24px;border:var(--stroke) solid var(--line);border-radius:var(--radius-sm);
  background:var(--surface);
}
.dstat__num{display:block;color:var(--gold-ink);font-size:30px;font-weight:800;line-height:1.3}
.dstat__label{color:var(--muted);font-size:13.5px}


.dash-cards{display:grid;grid-template-columns:repeat(2,1fr);gap:18px}
.dash-card{
  padding:26px 28px;border:var(--stroke) solid var(--line);border-radius:var(--radius);
  background:var(--surface);box-shadow:var(--shadow-sm);
  transition:border-color .2s, box-shadow .2s;
}
.dash-card:hover{border-color:rgba(217,243,43,.25);box-shadow:var(--shadow)}
.dash-card__head{
  display:flex;align-items:center;justify-content:space-between;
  margin-bottom:14px;
}
.dash-card__head h3{font-size:17px;font-weight:800}
.dash-card p{color:var(--muted);font-size:14.5px;line-height:1.9}


.progress-bar{
  height:8px;border-radius:var(--radius-pill);background:var(--surface-2);
  overflow:hidden;margin-bottom:10px;
}
.progress-bar__fill{
  height:100%;border-radius:var(--radius-pill);
  background:linear-gradient(90deg, var(--gold-soft), var(--gold));
  transition:width .5s ease;
}


.badge{
  display:inline-block;padding:4px 12px;border-radius:var(--radius-pill);
  font-size:12.5px;font-weight:700;
}
.badge--soon{background:var(--surface-2);border:var(--stroke) solid var(--line);color:var(--muted)}

.dash-soon-btn{pointer-events:none;opacity:.55;cursor:default}


.vcard{
  border:var(--stroke) solid var(--line);border-radius:var(--radius);
  background:var(--surface);overflow:hidden;
  transition:transform .22s, border-color .22s;
}
.vcard:hover{transform:translateY(-3px);border-color:rgba(217,243,43,.4)}

.vcard__thumb{
  display:block;position:relative;width:100%;height:0;
  padding:0 0 56.25%;border:0;cursor:pointer;
  background:var(--surface-2);overflow:hidden;
}
.vcard__thumb img{
  position:absolute;inset:0;width:100%;height:100%;
  object-fit:cover;display:block;
}

.vcard__thumb--auto{
  background:
    radial-gradient(120% 120% at 85% 10%, hsl(var(--h,210) 60% 30% / .5), transparent 62%),
    linear-gradient(140deg, hsl(var(--h,210) 38% 18%), hsl(var(--h,210) 45% 10%));
}

.vcard__thumb--auto::after{
  content:'';position:absolute;inset:0;
  background-image:
    repeating-linear-gradient(0deg, rgba(255,255,255,.055) 0 1px, transparent 1px 22px),
    repeating-linear-gradient(90deg, rgba(255,255,255,.055) 0 1px, transparent 1px 22px);
  pointer-events:none;
}

.vcard__thumb .vplay{
  position:absolute;top:50%;left:50%;translate:-50% -50%;
  width:58px;height:58px;border-radius:19px;
  box-shadow:0 12px 26px -10px rgba(252,172,16,.6), inset 0 1px 0 rgba(255,255,255,.35);
}
.vcard__thumb .vplay::before,
.vcard__thumb .vplay::after{display:none}
.vcard__thumb .vplay svg{width:24px;height:24px}
.vcard__play{
  width:48px;height:48px;border-radius:50%;
  background:rgba(217,243,43,.2);border:1px solid rgba(217,243,43,.4);
  color:var(--gold-ink);font-size:18px;
  display:grid;place-items:center;
  transition:background .18s;
}
.vcard:hover .vcard__play{background:rgba(217,243,43,.35)}
.vcard__dur{
  position:absolute;bottom:10px;left:10px;
  padding:3px 10px;border-radius:6px;background:rgba(0,0,0,.7);
  color:#fff;font-size:12.5px;font-weight:700;font-family:inherit;
}
.vcard__body{padding:14px 16px 16px}
.vcard__cat{
  display:inline-block;padding:3px 10px;border-radius:var(--radius-pill);
  background:var(--gold-dim);color:var(--gold-ink);font-size:12px;font-weight:700;
  margin-bottom:8px;
}
.vcard__body h3{font-size:15px;font-weight:700}
.vcard__desc{
  color:var(--muted);font-size:13px;line-height:1.9;margin:6px 0 0;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;
}


.dash-notif{
  display:flex;align-items:flex-start;gap:14px;
  padding:16px 20px;margin-bottom:22px;
  border:var(--stroke) solid var(--line);
  border-inline-start:3px solid var(--gold);
  border-radius:var(--radius);
  background:var(--surface);
}
.dash-notif__icon{
  flex:none;width:38px;height:38px;display:grid;place-items:center;
  border-radius:12px;background:var(--gold-dim);color:var(--gold-ink);
}
.dash-notif__icon svg{width:19px;height:19px;display:block}
.dash-notif__body{flex:1;min-width:0}
.dash-notif__title{font-size:15px;font-weight:800;margin:0 0 4px}
.dash-notif__text{color:var(--muted);font-size:13.5px;line-height:1.9;white-space:pre-line}
.dash-notif__time{display:block;margin-top:8px;color:var(--muted);font-size:12px}


.exercises{display:grid;gap:12px}
.excard{
  display:flex;align-items:center;justify-content:space-between;gap:16px;
  padding:20px 24px;border:var(--stroke) solid var(--line);border-radius:var(--radius-sm);
  background:var(--surface);transition:border-color .18s;
}
.excard:hover{border-color:rgba(217,243,43,.35)}
.excard__info{display:flex;align-items:center;gap:12px;flex:1;min-width:0}
.excard__info h3{font-size:16px;font-weight:700;margin:0 8px}
.tag--diff{padding:4px 12px;border-radius:var(--radius-pill);font-size:12px;font-weight:700}
.tag--easy{background:rgba(34,197,94,.15);color:#4ade80}
.tag--medium{background:rgba(217,243,43,.15);color:var(--gold-ink)}
.tag--hard{background:rgba(226,59,46,.15);color:#f87171}


.stages{display:grid;gap:20px}
.stage{
  position:relative;display:flex;gap:22px;
  padding:30px 28px;border:var(--stroke) solid var(--line);border-radius:var(--radius);
  background:var(--surface);
}
.stage__num{
  flex:none;display:grid;place-items:center;width:52px;height:52px;
  border-radius:16px;background:var(--gold-dim);border:1px solid rgba(217,243,43,.3);
  color:var(--gold-ink);font-size:20px;font-weight:800;
}
.stage__body h3{margin:12px 0 10px;font-size:21px}
.stage__body p{color:var(--muted);font-size:15px;line-height:2.15}
.stage__meta{display:flex;flex-wrap:wrap;gap:9px;margin-top:18px}
.stage__meta li{
  padding:6px 13px;border:var(--stroke) solid var(--line);border-radius:var(--radius-xs);
  background:var(--surface-2);color:var(--muted);font-size:13px;
}
.tag{
  display:inline-block;padding:5px 14px;border-radius:var(--radius-pill);
  font-size:12.5px;font-weight:700;
}
.tag--online{background:var(--gold-dim);color:var(--gold-ink)}
.tag--onsite{background:rgba(226,59,46,.15);color:#FF7A6E}

@media (max-width:760px){
  .dash-layout{grid-template-columns:1fr}

  .dash-sidebar{
    position:fixed;top:0;bottom:auto;inset-inline:0;
    width:auto;height:auto;
    z-index:60;
    flex-direction:row;align-items:center;justify-content:space-between;
    border-inline-end:none;border-bottom:var(--stroke) solid var(--line);
    padding:10px 14px;

    overflow:visible;
  }

  .dash-brand{
    flex-direction:row;align-items:center;justify-content:flex-start;
    padding:2px 0;border-bottom:none;gap:10px;
  }
  .dash-brand img{width:32px;height:32px}
  .dash-brand b{font-size:19px}
  .dash-brand__sub{display:none}

  .dash-burger{
    display:inline-flex;flex-direction:column;justify-content:center;gap:5px;
    width:42px;height:42px;padding:0 11px;flex:none;
    margin-inline-start:auto;
    border:var(--stroke) solid var(--line);border-radius:12px;
    background:var(--surface-2);cursor:pointer;
  }
  .dash-burger span{
    display:block;height:2px;border-radius:2px;
    background:var(--text);
    transition:transform .2s, opacity .2s;
  }
  .dash-sidebar.is-open .dash-burger span:nth-child(1){transform:translateY(7px) rotate(45deg)}
  .dash-sidebar.is-open .dash-burger span:nth-child(2){opacity:0}
  .dash-sidebar.is-open .dash-burger span:nth-child(3){transform:translateY(-7px) rotate(-45deg)}


  .dash-nav{
    display:none;
    position:absolute;top:calc(100% + 10px);inset-inline:12px;
    flex-direction:column;gap:2px;
    padding:10px;
    border:var(--stroke) solid var(--line);border-radius:22px;
    background:rgba(26,22,26,.98);
    backdrop-filter:blur(24px) saturate(1.4);
    -webkit-backdrop-filter:blur(24px) saturate(1.4);
    box-shadow:var(--shadow-lg);
    z-index:70;
  }
  .dash-sidebar.is-open .dash-nav{
    display:flex;
    animation:dashDrop .28s cubic-bezier(.2,.9,.35,1.15) both;
  }
  .dash-nav__item{
    padding:10px 14px;
    font-size:15px;
  }
  .dash-nav__item span:last-child{display:inline}

  .dash-sidebar__foot{
    flex-direction:row;align-items:center;gap:8px;
    border-top:none;padding:0;
    margin-inline-start:8px;
  }
  .dash-sidebar__foot .admin-name{display:none}
  .dash-sidebar__foot .admin-logout,
  .dash-sidebar__foot .admin-actions .nav__theme{flex:none;width:38px;height:38px}
  .dash-main{grid-column:auto;padding:24px 20px;padding-top:104px}
  .dash-stats{grid-template-columns:1fr 1fr}
  .dash-cards{grid-template-columns:1fr}
  .grid--2{grid-template-columns:1fr}
  .stage{flex-direction:column;gap:16px}
  .temp-alert{
    right:10px;
    left:10px;
    max-width:none;
  }
}
@media (max-width:420px){
  .dash-stats{grid-template-columns:1fr}
}


.notif-list{display:grid;gap:12px;margin-top:30px}
.notif{
  display:flex;align-items:flex-start;gap:15px;
  padding:20px 22px;
  border:var(--stroke) solid var(--line);border-radius:var(--radius);
  background:var(--surface);
  transition:border-color .18s;
}
.notif:hover{border-color:rgba(217,243,43,.28)}
.notif--unread{
  border-inline-start:3px solid var(--gold);
  background:
    linear-gradient(90deg, var(--gold-dim), transparent 40%),
    var(--surface);
}
.notif__icon{
  width:34px;height:34px;flex:none;
  display:grid;place-items:center;border-radius:10px;
}
.notif__icon--info{background:rgba(96,165,250,.15);color:#60a5fa}
.notif__icon--success{background:rgba(74,222,128,.15);color:#4ade80}
.notif__icon--warning{background:rgba(232,164,77,.15);color:#E8A44D}
.notif__body{flex:1}
.notif__head{display:flex;align-items:center;gap:9px}
.notif__head h3{font-size:15.5px;font-weight:800;margin:0}
.notif__dot{
  width:7px;height:7px;flex:none;
  border-radius:50%;background:var(--gold);
}
.notif__body p{color:var(--muted);font-size:14px;line-height:1.9;margin:5px 0 0}
.notif__time{display:block;margin-top:9px;color:#5E5E6B;font-size:12.5px}


@keyframes dashDrop{
  from{opacity:0;transform:translateY(-10px) scale(.98)}
  to{opacity:1;transform:none}
}


.practice-note{
  display:flex;align-items:center;gap:10px;
  margin:20px 0 30px;padding:14px 18px;
  border:1px solid rgba(217,243,43,.3);border-radius:var(--radius-sm);
  background:var(--gold-dim);color:var(--gold-ink);
  font-size:13.5px;font-weight:600;
}
.practice-note b{color:var(--text)}

.island-topic{
  margin-bottom:24px;
  padding:24px 26px 28px;
  border:var(--stroke) solid var(--line);border-radius:var(--radius);
  background:var(--surface);
}
.island-topic__head{
  display:flex;align-items:center;gap:14px;flex-wrap:wrap;
  margin-bottom:18px;
}
.island-topic__head h3{font-size:19px;margin:0}
.island-topic__head span{color:var(--muted);font-size:13px}

.island-map{
  display:flex;align-items:flex-start;gap:0;overflow-x:auto;
  padding:14px 6px 22px;
}
.island{
  position:relative;flex:none;width:118px;
  display:flex;flex-direction:column;align-items:center;gap:8px;
  background:none;border:0;padding:0;cursor:pointer;font-family:inherit;
}

.island{translate:0 var(--wave, 0)}
.island:nth-child(4n+3){--wave:20px}
.island:nth-child(4n+1){--wave:0px}
.island__node{
  width:62px;height:62px;border-radius:50%;
  display:grid;place-items:center;
  background:var(--surface-2);
  border:2px solid var(--line);
  color:var(--muted);
  transition:transform .2s, box-shadow .2s, border-color .2s;
}
.island.is-open .island__node{
  border-color:var(--gold-ink);color:var(--gold-ink);
  background:var(--gold-dim);
}
.island.is-done .island__node{
  border-color:#4ade80;color:#4ade80;
  background:rgba(74,222,128,.12);
}
.island.is-locked{cursor:not-allowed;opacity:.75}
.island:not(.is-locked):hover .island__node{transform:scale(1.1)}
.island__name{font-size:13px;font-weight:700;color:var(--text);text-align:center;line-height:1.6}
.island.is-locked .island__name{color:var(--muted)}
.island__meta{font-size:11px;color:var(--muted)}
.island.is-done .island__meta{color:#4ade80}
.island.is-open .island__meta{color:var(--gold-ink)}

.island-bridge{
  flex:none;width:44px;height:2px;margin-top:44px;
  background-image:linear-gradient(90deg, var(--line) 55%, transparent 45%);
  background-size:12px 2px;
  align-self:flex-start;
}
.island-bridge.is-passed{
  background-image:linear-gradient(90deg, rgba(74,222,128,.55) 55%, transparent 45%);
}

@media (max-width:760px){
  .island{width:104px}
  .island__node{width:54px;height:54px}
  .island-bridge{width:32px;margin-top:36px}
}


.ex-modal{position:fixed;inset:0;z-index:200}
.ex-modal[hidden]{display:none}
.ex-modal__backdrop{position:absolute;inset:0;background:rgba(8,6,8,.8);backdrop-filter:blur(6px)}
.ex-modal__dialog{
  position:relative;z-index:1;
  width:min(860px,calc(100vw - 28px));
  max-height:calc(100vh - 40px);
  margin:20px auto;border-radius:var(--radius);overflow:auto;
  border:var(--stroke) solid var(--line);background:var(--surface);
  box-shadow:0 40px 90px -30px rgba(0,0,0,.8);
  animation:dashDrop .25s ease both;
}
.ex-modal__head{
  display:flex;align-items:flex-start;justify-content:space-between;gap:14px;
  padding:20px 24px;border-bottom:var(--stroke) solid var(--line);
  position:sticky;top:0;background:var(--surface);z-index:2;
}
.ex-modal__head h3{font-size:19px;margin:4px 0 0}
.ex-modal__topic{color:var(--gold-ink);font-size:12.5px;font-weight:700}
.ex-modal__close{
  width:34px;height:34px;border:0;border-radius:10px;cursor:pointer;
  background:var(--surface-2);color:var(--muted);font-size:15px;
}
.ex-modal__close:hover{color:#f87171}
.ex-state{
  padding:5px 13px;border-radius:99px;font-size:12px;font-weight:700;
  background:var(--gold-dim);color:var(--gold-ink);
}
.ex-state--ok{background:rgba(74,222,128,.14);color:#4ade80}
.ex-modal__body{padding:22px 24px 26px}
.ex-modal__statement{
  color:var(--text);font-size:14.5px;line-height:2.1;text-align:justify;
}
.ex-modal__statement p{margin:0 0 10px}

.ex-modal__statement .katex,
.ex-modal__statement .katex-display{direction:ltr;unicode-bidi:isolate}
.ex-modal__statement .katex{font-size:1.05em}

.ex-samples{margin-top:18px;display:grid;gap:12px}
.ex-sample-pair{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.ex-sample{
  border:var(--stroke) solid var(--line);border-radius:var(--radius-sm);
  background:var(--surface);overflow:hidden;
}
.ex-sample b{
  display:block;padding:8px 14px;font-size:12.5px;color:var(--muted);
  border-bottom:var(--stroke) solid var(--line);background:var(--surface-2);
}
.ex-sample pre{
  margin:0;padding:12px 14px;direction:ltr;text-align:left;
  font-family:ui-monospace,Consolas,'Vazirmatn', monospace;font-size:13.5px;line-height:1.8;
  color:#d7e3ff;white-space:pre-wrap;
}
@media (max-width:600px){.ex-sample-pair{grid-template-columns:1fr}}

.ex-submit{margin-top:20px}
.ex-submit__head{
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  margin-bottom:10px;
}
.ex-submit__head label{font-size:14px;font-weight:700}
.ex-submit__head select{
  appearance:none;-webkit-appearance:none;
  width:33%;max-width:150px;margin-inline-start:auto;
  padding:9px 34px 9px 14px;
  border:var(--stroke) solid var(--line);border-radius:12px;
  background:var(--surface-2) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23A49CB4' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>") no-repeat left 12px center/16px;
  color:var(--text);font-family:inherit;font-size:13.5px;font-weight:600;
  cursor:pointer;transition:border-color .15s, box-shadow .15s;
}
.ex-submit__head select:hover{border-color:var(--gold-ink)}
.ex-submit__head select:focus{outline:none;border-color:var(--gold-ink);box-shadow:0 0 0 3px var(--gold-dim)}
.ex-submit__head select option{background:var(--surface);color:var(--text)}
.ex-submit textarea{
  width:100%;min-height:180px;padding:14px 16px;
  border:var(--stroke) solid var(--line);border-radius:var(--radius-sm);
  background:#100d10;color:#e8e6f0;
  font-family:ui-monospace,Consolas,'Vazirmatn', monospace;font-size:14px;line-height:1.9;
  resize:vertical;direction:ltr;text-align:left;
}
.ex-submit textarea:focus{
  outline:none;border-color:rgba(217,243,43,.6);
  box-shadow:0 0 0 3px var(--gold-dim);
}

.ex-submit .CodeMirror{
  width:100%;min-height:180px;
  border:var(--stroke) solid var(--line);border-radius:var(--radius-sm);
  background:#100d10;color:#e8e6f0;
  font-family:ui-monospace,Consolas,'Vazirmatn', monospace;font-size:14px;line-height:1.8;
  direction:ltr;text-align:left;
}
.ex-submit .CodeMirror-focused{
  outline:none;border-color:rgba(217,243,43,.6);
  box-shadow:0 0 0 3px var(--gold-dim);
}
.ex-submit .CodeMirror-gutters{background:#0d0a0e;border-right:1px solid #241f28}
.ex-submit .CodeMirror-linenumber{color:#5f5a6b}
.ex-submit .CodeMirror-lines{padding:12px 0}
.ex-submit .CodeMirror pre.CodeMirror-line,
.ex-submit .CodeMirror pre.CodeMirror-line-like{padding:0 14px}
.ex-submit .CodeMirror-selected{background:rgba(232,164,77,.22)}

.cm-s-kodkod.CodeMirror{background:#100d10;color:#e8e6f0}
.cm-s-kodkod .CodeMirror-activeline-background{background:rgba(217,243,43,.05)}
.cm-s-kodkod .cm-keyword{color:#ff7b9c}
.cm-s-kodkod .cm-def{color:#8be9fd}
.cm-s-kodkod .cm-atom{color:#f8c555}
.cm-s-kodkod .cm-number{color:#f8c555}
.cm-s-kodkod .cm-string{color:#a8e877}
.cm-s-kodkod .cm-string-2{color:#a8e877}
.cm-s-kodkod .cm-comment{color:#6d6a78;font-style:italic}
.cm-s-kodkod .cm-operator{color:#d7e3ff}
.cm-s-kodkod .cm-variable{color:#e8e6f0}
.cm-s-kodkod .cm-variable-2{color:#b3f0ff}
.cm-s-kodkod .cm-variable-3{color:#8be9fd}
.cm-s-kodkod .cm-builtin{color:#f8c555}
.cm-s-kodkod .cm-tag{color:#ff7b9c}
.cm-s-kodkod .cm-meta{color:#c8c8dc}
.cm-s-kodkod .cm-qualifier{color:#8be9fd}
.cm-s-kodkod .cm-property{color:#8be9fd}
.cm-s-kodkod .cm-bracket{color:#d7e3ff}
.cm-s-kodkod .cm-error{color:#ff718d}
.cm-s-kodkod .cm-matchingbracket{color:#e8e6f0;background:rgba(217,243,43,.18)}
.cm-s-kodkod .cm-searching{background:rgba(232,164,77,.4)}
.cm-s-kodkod .CodeMirror-cursor{border-left:2px solid #D9F32B}

.ex-submit .CodeMirror-placeholder{color:#9aa0b5;opacity:1}
.ex-submit__foot{
  display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin-top:14px;
}
.ex-submit__hint{font-size:13px;color:var(--muted)}
.ex-submit__hint.is-error{color:#f87171}

.judge-status{
  display:inline-flex;align-items:center;gap:9px;
  padding:9px 16px;border-radius:99px;font-size:13.5px;font-weight:700;
  border:var(--stroke) solid var(--line);background:var(--surface-2);color:var(--text);
}
.judge-status__dot{width:9px;height:9px;border-radius:50%;background:var(--muted)}
.judge-status--queue .judge-status__dot{background:#E8A44D;animation:pulse-dot 1.1s ease-in-out infinite}
.judge-status--run   .judge-status__dot{background:#60a5fa;animation:pulse-dot .7s ease-in-out infinite}
.judge-status--ok    .judge-status__dot{background:#4ade80}
.judge-status--ok    {border-color:rgba(74,222,128,.4);color:#4ade80}
.judge-status--no    .judge-status__dot{background:#f87171}
.judge-status--no    {border-color:rgba(248,113,113,.4);color:#f87171}
@keyframes pulse-dot{0%,100%{opacity:1;transform:scale(1)}50%{opacity:.4;transform:scale(.75)}}


.ticket-layout{display:grid;grid-template-columns:320px 1fr;gap:18px;margin-top:26px;align-items:start}
@media (max-width:900px){.ticket-layout{grid-template-columns:1fr}}

.ticket-chat--solo{flex:1;width:100%;margin-top:26px;max-width:1040px}

.ticket-list{display:grid;gap:10px}
.ticket-item{
  width:100%;text-align:start;font-family:inherit;
  display:flex;flex-direction:column;gap:6px;
  padding:16px 18px;border:var(--stroke) solid var(--line);border-radius:var(--radius-sm);
  background:var(--surface);cursor:pointer;color:var(--text);
  transition:border-color .18s, background .18s;
}
.ticket-item:hover{border-color:rgba(217,243,43,.4)}
.ticket-item.active{border-color:rgba(217,243,43,.55);background:var(--gold-dim)}
.ticket-item__top{display:flex;align-items:center;justify-content:space-between;gap:8px}
.ticket-item__top b{font-size:14.5px}
.ticket-item__time{color:var(--muted);font-size:11.5px}
.ticket-item__excerpt{
  color:var(--muted);font-size:12.5px;line-height:1.8;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}

.ticket-chat{
  border:var(--stroke) solid var(--line);border-radius:var(--radius);
  background:var(--surface);overflow:hidden;
  display:flex;flex-direction:column;min-height:620px;
}
.ticket-chat__head{
  padding:16px 20px;border-bottom:var(--stroke) solid var(--line);
  display:flex;align-items:center;justify-content:space-between;gap:10px;
}
.ticket-chat__head b{font-size:15.5px}
.ticket-chat__body{
  flex:1;padding:20px;display:flex;flex-direction:column;gap:12px;
  overflow-y:auto;min-height:480px;height:calc(100vh - 420px);
}
.msg{max-width:78%;display:flex;flex-direction:column;gap:4px}
.msg__bubble{
  padding:11px 16px;border-radius:16px;font-size:14px;line-height:1.9;
  white-space:pre-wrap;word-break:break-word;
}

.msg--user{align-self:flex-start}
.msg--user .msg__bubble{
  background:var(--gold-dim);border:1px solid rgba(217,243,43,.3);
  border-start-end-radius:16px;border-end-start-radius:4px;
}
.msg--admin{align-self:flex-end}
.msg--admin .msg__bubble{
  background:var(--surface-2);border:var(--stroke) solid var(--line);
  border-start-start-radius:16px;border-end-end-radius:4px;
}
.ticket-chat__foot{
  padding:14px 18px;border-top:var(--stroke) solid var(--line);
  display:flex;gap:10px;align-items:stretch;
}

.ticket-chat__foot .btn{
  align-self:stretch;height:auto;display:inline-flex;align-items:center;justify-content:center;
}
.ticket-chat__foot textarea{
  flex:1;min-height:46px;max-height:120px;resize:none;
  padding:11px 15px;border:var(--stroke) solid var(--line);border-radius:var(--radius-sm);
  background:rgba(255,255,255,.03);color:var(--text);
  font-family:inherit;font-size:14px;line-height:1.8;
}
.ticket-chat__foot textarea:focus{outline:none;border-color:rgba(217,243,43,.6)}
.ticket-empty{
  margin:auto;text-align:center;color:var(--muted);font-size:14px;padding:40px 20px;
}

.ticket-status{
  padding:4px 12px;border-radius:99px;font-size:11.5px;font-weight:700;
}
.ticket-status--open  {background:rgba(96,165,250,.15);color:#60a5fa}
.ticket-status--pending{background:rgba(232,164,77,.15);color:#E8A44D}
.ticket-status--closed{background:rgba(74,222,128,.15);color:#4ade80}
@media print{
  .nav,.footer,.dash-sidebar,.no-print{display:none!important}
  .dash-layout{grid-template-columns:1fr;min-height:auto}
  .dash-main{padding:0;max-width:none}
  body{background:#fff;color:#000}
  body::before{display:none}
  .dstat,.data-table-wrap{
    border-color:#ccc;background:#fff;
    box-shadow:none;
  }
  .dstat__num,.track-code{color:#000}
  .dstat__label{color:#444}
  .data-table th{background:#f2f2f2;color:#000}
  .data-table td,.data-table th{border-color:#ddd}
  .status-badge{border:1px solid #999;color:#000!important;background:none!important}
}


@media print{
  .has-shader *{box-shadow:none!important;text-shadow:none!important;filter:none!important}
}
