* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: Arial, sans-serif;
  background: #0f0f11;
  color: #f2f2f2;
}

.hidden {
  display: none !important;
}

.app {
  min-height: 100vh;
}

.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
}

.login-card,
.panel,
.stat-card,
operator-card {
  background: #171719;
  border: 1px solid #2a2a2f;
}

.login-card {
  width: 100%;
  max-width: 380px;
  border-radius: 24px;
  padding: 32px;
}

.login-card h1 {
  margin-bottom: 8px;
}

.login-card p,
.muted {
  color: #9a9aa0;
}

.login-card p {
  margin-bottom: 24px;
}

form {
  display: grid;
  gap: 14px;
}

input,
select,
button {
  border: none;
  outline: none;
  font-size: 15px;
  border-radius: 14px;
}

input,
select {
  background: #101013;
  color: #f2f2f2;
  border: 1px solid #2a2a2f;
  padding: 14px;
}

button {
  cursor: pointer;
  padding: 14px 18px;
  background: #7c7cff;
  color: #fff;
  font-weight: 700;
  transition: 0.2s ease;
}

button:hover {
  transform: translateY(-1px);
  opacity: 0.92;
}

#loginError {
  display: block;
  color: #f97066;
  margin-top: 16px;
  font-size: 14px;
}

.dashboard {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 240px 1fr;
}

.sidebar {
  background: #121214;
  border-right: 1px solid #2a2a2f;
  padding: 28px 20px;
}

.sidebar h2 {
  margin-bottom: 28px;
  font-size: 28px;
}

.nav-btn {
  width: 100%;
  background: transparent;
  color: #9a9aa0;
  text-align: left;
  margin-bottom: 10px;
}

.nav-btn.active,
.nav-btn:hover {
  background: #1f1f24;
  color: #fff;
}

.content {
  padding: 32px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 24px;
}

.topbar h1 {
  font-size: 34px;
}

.topbar p {
  color: #9a9aa0;
  margin-top: 4px;
}

#logoutBtn,
.toggle-btn {
  background: #24242a;
  border: 1px solid #2a2a2f;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  border-radius: 22px;
  padding: 22px;
}

.stat-card span {
  color: #9a9aa0;
}

.stat-card strong {
  display: block;
  font-size: 30px;
  margin-top: 10px;
}

.panel {
  border-radius: 24px;
  padding: 22px;
  margin-bottom: 24px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 20px;
}

.panel-header h2 {
  font-size: 26px;
}

.muted {
  font-size: 14px;
  margin-top: 5px;
}

.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.filters select,
.filters input {
  min-width: 150px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1050px;
}

th,
td {
  padding: 14px;
  border-bottom: 1px solid #2a2a2f;
  text-align: left;
  font-size: 14px;
}

th {
  color: #9a9aa0;
  font-weight: 600;
}

.status {
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.status.pending {
  background: #332b14;
  color: #fdb022;
}

.status.accepted {
  background: #123222;
  color: #32d583;
}

.status.rejected {
  background: #351716;
  color: #f97066;
}

.percent-calculator {
  display: grid;
  grid-template-columns: 1.1fr repeat(3, 1fr);
  gap: 14px;
}

.calc-result {
  background: #101013;
  border: 1px solid #2a2a2f;
  border-radius: 18px;
  padding: 16px;
}

.calc-result span {
  display: block;
  color: #9a9aa0;
  font-size: 13px;
  margin-bottom: 8px;
}

.calc-result strong {
  font-size: 24px;
}

.user-form {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.form-message {
  color: #32d583;
  margin-bottom: 16px;
  font-size: 14px;
}

.danger-btn {
  background: #351716;
  color: #f97066;
}

.collapsible-content {
  overflow: hidden;
  max-height: 700px;
  opacity: 1;
  transform: translateY(0);
  transition: max-height 0.35s ease, opacity 0.25s ease, transform 0.25s ease;
}

.collapsible-content.collapsed {
  max-height: 0;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
}

.chart-card {
  background: #101013;
  border: 1px solid #2a2a2f;
  border-radius: 22px;
  padding: 28px;
  min-height: 400px;
}

.chart-bars {
  height: 320px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 20px;
  align-items: end;
}

.chart-item {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: end;
  gap: 10px;
}

.chart-bar-wrap {
  height: 240px;
  display: flex;
  align-items: end;
}

.chart-bar {
  width: 100%;
  min-height: 8px;
  border-radius: 16px 16px 8px 8px;
  background: linear-gradient(180deg, #8b8bff, #5454d8);
  transition: height 0.35s ease;
}

.chart-value {
  text-align: center;
  font-weight: 800;
}

.chart-label {
  text-align: center;
  color: #9a9aa0;
  font-size: 13px;
}

.operator-page {
  min-height: 100vh;
  padding: 32px;
  background: #0f0f11;
}

.operator-shell {
  max-width: 980px;
  margin: 0 auto;
}

.operator-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.operator-card {
  background: #171719;
  border: 1px solid #2a2a2f;
  border-radius: 24px;
  padding: 24px;
}

.check-form,
.platforms-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.field {
  display: grid;
  gap: 8px;
}

.field label {
  color: #9a9aa0;
  font-size: 13px;
}

.full,
.check-form .full {
  grid-column: 1 / -1;
}

@media (max-width: 1100px) {
  .stats,
  .percent-calculator {
    grid-template-columns: 1fr 1fr;
  }

  .user-form {
    grid-template-columns: 1fr 1fr;
  }
}

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

  .sidebar {
    display: none;
  }

  .content {
    padding: 20px;
  }

  .stats,
  .percent-calculator,
  .user-form,
  .check-form,
  .platforms-grid {
    grid-template-columns: 1fr;
  }

  .topbar,
  .panel-header,
  .operator-topbar {
    align-items: flex-start;
    flex-direction: column;
  }
}

.table-danger-btn {
  background: #351716;
  color: #f97066;
  padding: 9px 12px;
  font-size: 13px;
  border: 1px solid #5b2422;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 7, 0.72);
  backdrop-filter: blur(10px);
  display: grid;
  place-items: center;
  z-index: 1000;
  padding: 20px;
}

.drop-modal {
  width: 100%;
  max-width: 420px;
  background: #171719;
  border: 1px solid #2a2a2f;
  border-radius: 38px 38px 38px 12px;
  padding: 28px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  animation: dropPop 0.32s ease;
}

.drop-modal h3 {
  font-size: 26px;
  margin-bottom: 10px;
}

.drop-modal p {
  color: #9a9aa0;
  line-height: 1.5;
  margin-bottom: 24px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.ghost-btn {
  background: #24242a;
  border: 1px solid #2a2a2f;
}

@keyframes dropPop {
  0% {
    opacity: 0;
    transform: translateY(18px) scale(0.92);
    border-radius: 60px 60px 60px 14px;
  }

  70% {
    opacity: 1;
    transform: translateY(-4px) scale(1.02);
  }

  100% {
    transform: translateY(0) scale(1);
  }
}

.status-btn {
  border: none;
  cursor: pointer;
  padding: 7px 12px;
}

.status-btn:hover {
  transform: translateY(-1px);
  opacity: 0.85;
}

.export-btn {
  background: #24242a;
  color: #f2f2f2;
  border: 1px solid #2a2a2f;
  white-space: nowrap;
}