:root{color-scheme:dark;--bg:#111;--panel:#1c1c1cee;--panel2:#252525;--line:#ffffff1f;--text:#f3f3f3;--muted:#aaa;--accent:#f0a329;--danger:#db5a5a;--ok:#62c584}*{box-sizing:border-box}html,body{margin:0;min-height:100%;font-family:Inter,system-ui,-apple-system,"Segoe UI",sans-serif;background:radial-gradient(circle at 70% 15%,#4b321c55,transparent 28%),var(--bg);color:var(--text)}button,input,select{font:inherit}.hidden{display:none!important}.topbar{height:76px;display:flex;align-items:center;justify-content:space-between;padding:10px clamp(16px,4vw,56px);border-bottom:1px solid var(--line);background:#151515e8;backdrop-filter:blur(12px);position:sticky;top:0;z-index:20}.brand{display:flex;align-items:center;gap:12px;color:var(--text);text-decoration:none;font-weight:800}.brand img{width:50px;height:50px;object-fit:contain}.top-actions,.hero-actions,.action-grid{display:flex;gap:10px;flex-wrap:wrap}.button{border:1px solid var(--line);background:#292929;color:var(--text);padding:10px 16px;border-radius:7px;text-decoration:none;cursor:pointer}.button:hover{border-color:#ffffff55}.button.primary{background:var(--accent);border-color:var(--accent);color:#17120a;font-weight:800}.button.ghost{background:transparent}.button.warning{background:#7e5b23}.button.danger{background:#752f2f}.hero{min-height:calc(100vh - 76px);display:grid;grid-template-columns:minmax(0,1.3fr) minmax(300px,.7fr);align-items:center;gap:5vw;padding:clamp(36px,7vw,100px)}.eyebrow{color:var(--accent);font-weight:800;letter-spacing:.12em;font-size:.77rem}.hero h1{font-size:clamp(2.5rem,6vw,5.8rem);line-height:.98;margin:.25em 0}.hero h1 span{color:var(--accent)}.lead{max-width:800px;font-size:clamp(1rem,2vw,1.3rem);line-height:1.7;color:#ccc}.hero-logo img{width:min(100%,520px);filter:drop-shadow(0 30px 50px #000)}.feature-grid,.stats-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-top:42px}.feature-grid article,.stat,.panel,.chat-panel{border:1px solid var(--line);background:var(--panel);border-radius:10px;padding:18px}.feature-grid article{display:grid;gap:8px}.feature-grid span,.hint{color:var(--muted);line-height:1.5}.portal{display:grid;grid-template-columns:280px 1fr;min-height:calc(100vh - 76px)}.sidebar{border-right:1px solid var(--line);background:#171717;padding:20px}.profile-card{display:grid;gap:5px;padding:15px;border:1px solid var(--line);border-radius:9px}.profile-card span{color:var(--muted)}.badge{width:max-content;padding:4px 8px;border-radius:999px;font-size:.75rem}.badge.pending{background:#73531f}.badge.approved{background:#245f3a}.badge.rejected{background:#702e2e}.sidebar nav{display:grid;gap:7px;margin-top:18px}.nav-button{text-align:left;border:0;background:transparent;color:#bbb;padding:12px;border-radius:7px;cursor:pointer}.nav-button.active,.nav-button:hover{background:#2a2a2a;color:white}.workspace{padding:clamp(20px,4vw,54px);min-width:0}.page-title{display:flex;justify-content:space-between;align-items:center;margin-bottom:24px}.page-title h2,.panel h2{font-size:2rem;margin:.1em 0}.stat{display:grid;gap:10px}.stat span{color:var(--muted)}.stat strong{font-size:1.8rem}.chips{display:flex;gap:8px;flex-wrap:wrap}.chip{background:#303030;border-radius:999px;padding:7px 11px}.chat-panel{height:calc(100vh - 190px);display:grid;grid-template-rows:1fr auto}.messages{overflow:auto;padding:5px}.message{padding:9px 0;border-bottom:1px solid #ffffff0c}.message strong{color:var(--accent)}.message time{color:#777;font-size:.75rem;margin-left:8px}.chat-panel form{display:grid;grid-template-columns:1fr auto;gap:10px;border-top:1px solid var(--line);padding-top:14px}.chat-panel input,.filters input,.filters select,.auth-form input{background:#151515;border:1px solid var(--line);color:white;border-radius:7px;padding:11px}.table-wrap{overflow:auto;border:1px solid var(--line);border-radius:9px}table{border-collapse:collapse;width:100%;background:#181818}th,td{text-align:left;padding:11px;border-bottom:1px solid var(--line);white-space:nowrap}th{color:var(--muted);font-size:.8rem}.mini-actions{display:flex;gap:5px}.mini-actions button{padding:5px 8px;font-size:.75rem}.console{min-height:160px;background:#090909;border:1px solid var(--line);border-radius:8px;padding:14px;white-space:pre-wrap}.filters{display:flex;gap:9px;flex-wrap:wrap;margin-bottom:15px}dialog{width:min(520px,calc(100vw - 30px));border:1px solid var(--line);border-radius:12px;background:#1a1a1a;color:white;padding:25px}dialog::backdrop{background:#000a;backdrop-filter:blur(4px)}.dialog-close{position:absolute;right:12px;top:8px;background:none;border:0;color:white;font-size:1.8rem;cursor:pointer}.auth-tabs{display:flex;gap:5px;margin-bottom:18px}.auth-tabs button{flex:1;padding:10px;background:#222;border:1px solid var(--line);color:white}.auth-tabs button.active{border-color:var(--accent)}.auth-form{display:grid;gap:13px}.auth-form label{display:grid;gap:6px;color:#bbb}.form-message{min-height:1.4em;color:var(--accent)}@media(max-width:850px){.hero{grid-template-columns:1fr}.hero-logo{display:none}.feature-grid,.stats-grid{grid-template-columns:1fr}.portal{grid-template-columns:1fr}.sidebar{border-right:0;border-bottom:1px solid var(--line)}.sidebar nav{display:flex;overflow:auto}.nav-button{white-space:nowrap}.topbar{padding:8px 12px}.brand span{display:none}.workspace{padding:18px}}

.server-access-card {
  margin-top: 1.5rem;
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: rgba(20, 24, 29, 0.92);
}

.server-access-heading h2 {
  margin-top: 0.25rem;
  margin-bottom: 0.5rem;
}

.server-address-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.25rem 0;
  flex-wrap: wrap;
}

.server-address-row code {
  display: block;
  flex: 1;
  min-width: 260px;
  padding: 1rem 1.2rem;
  border-radius: 12px;
  font-size: 1.05rem;
  font-weight: 700;
  overflow-wrap: anywhere;
  background: rgba(0, 0, 0, 0.3);
}

.server-access-guide {
  margin-top: 1.25rem;
}

.server-access-guide ol {
  margin: 0.75rem 0 0;
  padding-left: 1.5rem;
}

.server-access-guide li {
  margin: 0.45rem 0;
}

.server-access-note {
  margin-top: 1.25rem;
  opacity: 0.8;
}

@media (max-width: 640px) {
  .server-address-row {
    align-items: stretch;
    flex-direction: column;
  }

  .server-address-row code {
    min-width: 0;
  }
}

.server-status-card .server-access-card,
.status-grid .server-access-card,
#serverStatus .server-access-card,
#serverStatusCard .server-access-card,
[data-section="server-status"] .server-access-card {
  width: 100%;
  margin-top: 1rem;
  padding: 1.1rem;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.18);
}

.server-status-card .server-access-heading h2,
.status-grid .server-access-heading h2,
#serverStatus .server-access-heading h2,
#serverStatusCard .server-access-heading h2 {
  font-size: 1.15rem;
}

.server-status-card .server-address-row,
.status-grid .server-address-row,
#serverStatus .server-address-row,
#serverStatusCard .server-address-row {
  margin: 0.9rem 0;
}

/* ASH_SEVEN_RESEARCH_STYLES */

.research-current {
  position: relative;
  overflow: hidden;
  margin-bottom: 1.5rem;
  background:
    radial-gradient(
      circle at 90% 0%,
      rgba(240, 163, 41, 0.2),
      transparent 42%
    ),
    var(--panel);
}

.research-current::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  right: -80px;
  top: -90px;
  border: 1px solid rgba(240, 163, 41, 0.22);
  border-radius: 50%;
}

.research-current-header {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.research-current-header h3 {
  margin: 0.35rem 0 0;
  font-size: clamp(1.35rem, 3vw, 2rem);
}

.research-current-header > strong {
  color: var(--accent);
  font-size: clamp(1.6rem, 4vw, 2.5rem);
}

.research-label {
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.research-progress {
  position: relative;
  z-index: 1;
  height: 18px;
  margin-top: 1.2rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: #111;
}

.research-progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background:
    repeating-linear-gradient(
      -45deg,
      #f0a329,
      #f0a329 12px,
      #d88613 12px,
      #d88613 24px
    );
  transition: width 0.5s ease;
}

.research-section {
  margin: 1.5rem 0;
}

.research-section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.research-section-title h3 {
  margin: 0.2rem 0 0;
}

.research-count {
  min-width: 34px;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  text-align: center;
  color: #17120a;
  background: var(--accent);
  font-weight: 800;
}

.research-queue {
  display: grid;
  gap: 0.65rem;
}

.research-queue-item {
  display: grid;
  grid-template-columns: 44px 1fr;
  align-items: center;
  gap: 0.9rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}

.research-queue-item:first-child {
  border-color: rgba(240, 163, 41, 0.45);
}

.research-queue-item > div {
  display: grid;
  gap: 0.2rem;
}

.research-queue-item small {
  color: var(--muted);
}

.research-order {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  color: var(--accent);
  background: rgba(240, 163, 41, 0.12);
  font-weight: 800;
}

.research-completed {
  margin-top: 1.5rem;
}

.research-completed summary {
  cursor: pointer;
  font-weight: 800;
}

.research-completed summary span {
  margin-left: 0.5rem;
  color: var(--accent);
}

.research-completed-grid {
  display: grid;
  grid-template-columns:
    repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.55rem;
  margin-top: 1rem;
}

.research-completed-item {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
}

.research-completed-item > span {
  color: var(--ok);
  font-weight: 900;
}

.research-empty {
  padding: 1rem;
  border: 1px dashed var(--line);
  border-radius: 9px;
  color: var(--muted);
}
