.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--f-head);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  padding: 0.85rem 1.6rem;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.22s ease, background 0.22s ease, border-color 0.22s ease, color 0.22s ease;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}

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

.btn-solid {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
  color: #fff;
  box-shadow: var(--glow-soft);
}

.btn-solid:hover {
  color: #fff;
  box-shadow: var(--glow);
  background: linear-gradient(135deg, #4f90ff 0%, #2557d6 100%);
}

.btn-outline {
  border-color: var(--line-strong);
  color: var(--text);
  background: rgba(17, 26, 44, 0.5);
}

.btn-outline:hover {
  color: #fff;
  border-color: var(--accent);
  background: rgba(59, 130, 246, 0.12);
}

.btn-ghost {
  color: var(--text-soft);
  border-color: var(--line);
  background: transparent;
}

.btn-ghost:hover { color: var(--text); border-color: var(--line-strong); }

.btn-sm { padding: 0.5rem 0.95rem; font-size: 0.82rem; clip-path: polygon(7px 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%, 0 7px); }
.btn-lg { padding: 1.05rem 2.1rem; font-size: 1.05rem; }
.btn-full { width: 100%; }

.btn-danger { background: rgba(248, 113, 113, 0.14); border-color: rgba(248, 113, 113, 0.4); color: #fca5a5; }
.btn-danger:hover { background: rgba(248, 113, 113, 0.24); color: #fff; }

.btn-ok { background: rgba(52, 211, 153, 0.14); border-color: rgba(52, 211, 153, 0.4); color: #6ee7b7; }
.btn-ok:hover { background: rgba(52, 211, 153, 0.24); color: #fff; }

.btn[disabled] { opacity: 0.45; pointer-events: none; }

.card {
  background: linear-gradient(160deg, rgba(17, 26, 44, 0.85), rgba(11, 17, 31, 0.7));
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 1.75rem;
}

.section-head {
  margin-bottom: 2.8rem;
  max-width: 62ch;
}

.section-head h2 { margin-bottom: 0.6rem; }
.section-head p { color: var(--muted); margin: 0; }

.rule {
  width: 54px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), transparent);
  transform: skewX(var(--slant));
  margin-bottom: 1.2rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--f-head);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.32rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(59, 130, 246, 0.08);
  color: var(--text-soft);
}

.pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 8px var(--ok);
}

.pill-dot.is-off { background: var(--muted); box-shadow: none; }

.badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--f-head);
  font-size: 0.74rem;
  font-weight: 600;
  padding: 0.24rem 0.62rem;
  border-radius: var(--r-sm);
  border: 1px solid;
}

.badge-pending { color: var(--warn); border-color: rgba(251, 191, 36, 0.4); background: rgba(251, 191, 36, 0.1); }
.badge-accepted, .badge-open { color: var(--ok); border-color: rgba(52, 211, 153, 0.4); background: rgba(52, 211, 153, 0.1); }
.badge-rejected { color: var(--bad); border-color: rgba(248, 113, 113, 0.4); background: rgba(248, 113, 113, 0.1); }
.badge-closed { color: var(--muted); border-color: var(--line-strong); background: rgba(123, 138, 165, 0.1); }

.field { margin-bottom: 1.4rem; }

.field label {
  display: block;
  font-family: var(--f-head);
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
  color: var(--text);
}

.field .hint {
  display: block;
  font-size: 0.83rem;
  color: var(--muted);
  margin-bottom: 0.55rem;
  line-height: 1.5;
}

.field input[type="text"],
.field input[type="number"],
.field input[type="email"],
.field select,
.field textarea {
  width: 100%;
  background: rgba(4, 6, 12, 0.6);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--text);
  font-family: var(--f-body);
  font-size: 0.95rem;
  padding: 0.8rem 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field textarea { min-height: 150px; resize: vertical; line-height: 1.6; }

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.field input::placeholder,
.field textarea::placeholder { color: #4d5a72; }

.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='%237b8aa5' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 12px;
  padding-right: 2.5rem;
}

.counter {
  display: block;
  text-align: right;
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.35rem;
  font-variant-numeric: tabular-nums;
}

.counter.is-short { color: var(--warn); }
.counter.is-ok { color: var(--ok); }

.checkline {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.92rem;
  color: var(--text-soft);
  cursor: pointer;
}

.checkline input { margin-top: 0.28rem; accent-color: var(--accent); width: 16px; height: 16px; }

.filedrop {
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-sm);
  padding: 0.9rem;
  font-size: 0.86rem;
  color: var(--muted);
  background: rgba(4, 6, 12, 0.4);
}

.filedrop input { width: 100%; color: var(--text-soft); font-size: 0.85rem; }

.notice {
  border-radius: var(--r-sm);
  padding: 0.9rem 1.1rem;
  font-size: 0.9rem;
  border-left: 3px solid;
  margin-bottom: 1.5rem;
  background: rgba(17, 26, 44, 0.7);
}

.notice p { margin: 0; }
.notice-info { border-color: var(--accent); color: var(--text-soft); }
.notice-ok { border-color: var(--ok); color: #a7f3d0; }
.notice-warn { border-color: var(--warn); color: #fde68a; }
.notice-bad { border-color: var(--bad); color: #fecaca; }

.empty {
  text-align: center;
  padding: 3.5rem 1.5rem;
  border: 1px dashed var(--line);
  border-radius: var(--r);
  color: var(--muted);
}

.empty h3 { color: var(--text-soft); margin-bottom: 0.4rem; }
.empty p { margin: 0 auto; max-width: 44ch; }

.reveal {
  opacity: 0;
  transform: translateY(26px);
}

.reveal.is-shown {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s cubic-bezier(0.22, 0.61, 0.36, 1), transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.login-gate {
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
  padding: 3rem 2rem;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: linear-gradient(160deg, rgba(17, 26, 44, 0.8), rgba(11, 17, 31, 0.6));
}

.login-gate img { width: 64px; margin: 0 auto 1.25rem; filter: drop-shadow(0 0 20px rgba(59, 130, 246, 0.6)); }
.login-gate p { margin: 0 auto 1.8rem; color: var(--muted); }

.tabs {
  display: flex;
  gap: 0.4rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 2.2rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar { display: none; }

.tab {
  position: relative;
  background: none;
  border: 0;
  color: var(--muted);
  font-family: var(--f-head);
  font-size: 1rem;
  font-weight: 600;
  padding: 0.8rem 1.2rem;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.tab::after {
  content: "";
  position: absolute;
  left: 0.9rem;
  right: 0.9rem;
  bottom: -1px;
  height: 2px;
  background: var(--accent);
  transform: skewX(var(--slant)) scaleX(0);
  transition: transform 0.25s ease;
}

.tab:hover { color: var(--text-soft); }
.tab.is-active { color: var(--text); }
.tab.is-active::after { transform: skewX(var(--slant)) scaleX(1); box-shadow: var(--glow-soft); }

.tabpane { display: none; }
.tabpane.is-active { display: block; }

.toast-wrap {
  position: fixed;
  right: 1.2rem;
  bottom: 1.2rem;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-width: min(92vw, 380px);
}

.toast {
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--accent);
  background: rgba(11, 17, 31, 0.97);
  border-radius: var(--r-sm);
  padding: 0.85rem 1.05rem;
  font-size: 0.9rem;
  color: var(--text-soft);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
  animation: toast-in 0.28s ease;
}

.toast.is-ok { border-left-color: var(--ok); }
.toast.is-bad { border-left-color: var(--bad); }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.2rem;
  background: rgba(2, 4, 9, 0.82);
  backdrop-filter: blur(6px);
}

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

.modal-box {
  width: min(100%, 520px);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  padding: 1.9rem;
  max-height: 88vh;
  overflow-y: auto;
}

.modal-box h3 { margin-bottom: 1rem; }

.modal-actions { display: flex; gap: 0.7rem; margin-top: 1.4rem; }
.modal-actions .btn { flex: 1; }
