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

body {
  background: #000;
  color: #e0e0e0;
  font-family: 'Courier New', Courier, monospace;
  min-height: 100vh;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 56px;
  border-bottom: 1px solid #111;
}

.nav-brand {
  color: #fff;
  font-size: 1rem;
  font-weight: bold;
  letter-spacing: 4px;
  text-decoration: none;
  text-transform: uppercase;
}

.nav-right {
  position: relative;
}

.nav-profile {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid #222;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.2s;
}

.nav-profile:hover {
  border-color: #555;
}

.nav-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.nav-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 220px;
  background: #0a0a0a;
  border: 1px solid #1a1a1a;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.15s, visibility 0.15s, transform 0.15s;
  z-index: 100;
}

.nav-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1rem 0.75rem;
}

.dropdown-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.dropdown-name {
  color: #e0e0e0;
  font-size: 0.85rem;
  line-height: 1.2;
}

.dropdown-role {
  color: #555;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  line-height: 1.2;
}

.dropdown-divider {
  height: 1px;
  background: #1a1a1a;
  margin: 0;
}

.dropdown-item {
  display: block;
  color: #666;
  text-decoration: none;
  font-size: 0.8rem;
  padding: 0.65rem 1rem;
  letter-spacing: 1px;
  transition: color 0.15s, background 0.15s;
}

.dropdown-item:hover {
  color: #fff;
  background: #111;
}

.dropdown-item.active {
  color: #fff;
}

.dropdown-logout {
  color: #c0392b;
}

.dropdown-logout:hover {
  color: #e74c3c;
  background: #1a0a0a;
}

.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-box {
  border: 1px solid #111;
  padding: 4rem 3.5rem;
  text-align: center;
}

.logo {
  font-size: 2rem;
  color: #fff;
  letter-spacing: 6px;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.subtitle {
  color: #444;
  margin-bottom: 2rem;
  font-size: 0.85rem;
}

.discord-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #5865F2;
  color: #fff;
  padding: 12px 28px;
  text-decoration: none;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.9rem;
  transition: background 0.2s;
}

.discord-btn:hover {
  background: #4752c4;
}

.page-title {
  color: #fff;
  font-size: 1.2rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 2rem;
  font-weight: normal;
}

.dashboard {
  text-align: center;
}

.typewriter-text {
  font-size: 1.6rem;
  color: #fff;
  letter-spacing: 4px;
  min-height: 2.5rem;
}

.download-section {
  margin-top: 3rem;
  padding: 2.5rem;
  border: 1px solid #111;
}

.download-section h2 {
  color: #fff;
  font-size: 1rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  font-weight: normal;
}

.download-section p {
  color: #555;
  font-size: 0.82rem;
  margin-bottom: 1.5rem;
}

.download-btn {
  display: inline-block;
  background: #27ae60;
  color: #fff;
  padding: 1rem 3rem;
  text-decoration: none;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.95rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  transition: background 0.2s;
}

.download-btn:hover {
  background: #2ecc71;
}

.changelog-entry {
  padding: 1.5rem;
  border: 1px solid #111;
  margin-bottom: 1rem;
}

.changelog-entry h3 {
  color: #fff;
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
  font-weight: normal;
}

.changelog-entry .date {
  color: #444;
  font-size: 0.72rem;
  margin-bottom: 0.75rem;
}

.changelog-entry .content {
  color: #888;
  font-size: 0.82rem;
  line-height: 1.7;
  white-space: pre-wrap;
}

.box {
  padding: 1.5rem;
  border: 1px solid #111;
  margin-bottom: 1rem;
}

.box h3 {
  color: #fff;
  font-size: 0.95rem;
  font-weight: normal;
  margin-bottom: 0.3rem;
}

.box .label {
  color: #444;
  font-size: 0.75rem;
  margin-bottom: 0.25rem;
}

.box .value {
  color: #aaa;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.box .value:last-child {
  margin-bottom: 0;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.tabs {
  display: flex;
  gap: 0;
  margin-bottom: 2rem;
  border-bottom: 1px solid #111;
}

.tab {
  padding: 0.6rem 1.2rem;
  color: #555;
  text-decoration: none;
  font-size: 0.82rem;
  letter-spacing: 1px;
  border-bottom: 1px solid transparent;
  margin-bottom: -1px;
  transition: color 0.2s;
}

.tab:hover {
  color: #fff;
}

.tab.active {
  color: #fff;
  border-bottom-color: #fff;
}

input[type="text"],
input[type="password"],
textarea,
select {
  background: #0a0a0a;
  border: 1px solid #1a1a1a;
  color: #e0e0e0;
  padding: 0.6rem 1rem;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.85rem;
  width: 100%;
  outline: none;
  transition: border-color 0.2s;
}

input[type="text"]:focus,
textarea:focus {
  border-color: #333;
}

textarea {
  resize: vertical;
  min-height: 100px;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  color: #666;
  font-size: 0.75rem;
  margin-bottom: 0.4rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.btn {
  display: inline-block;
  background: #1a1a1a;
  color: #e0e0e0;
  padding: 0.6rem 1.5rem;
  border: 1px solid #2a2a2a;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.82rem;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  text-decoration: none;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.btn:hover {
  background: #2a2a2a;
  border-color: #444;
}

.btn-red {
  background: #c0392b;
  border-color: #c0392b;
  color: #fff;
}

.btn-red:hover {
  background: #e74c3c;
}

.btn-green {
  background: #27ae60;
  border-color: #27ae60;
  color: #fff;
}

.btn-green:hover {
  background: #2ecc71;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

th, td {
  padding: 0.6rem 1rem;
  text-align: left;
  border-bottom: 1px solid #111;
}

th {
  color: #444;
  font-weight: normal;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 1px;
}

td {
  color: #999;
}

.role-badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 0.7rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.role-admin { color: #e74c3c; border: 1px solid #e74c3c; }
.role-member { color: #27ae60; border: 1px solid #27ae60; }
.role-guest { color: #f39c12; border: 1px solid #f39c12; }

.success-msg {
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  border: 1px solid #27ae60;
  color: #27ae60;
  font-size: 0.82rem;
}

.error-msg {
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  border: 1px solid #e74c3c;
  color: #e74c3c;
  font-size: 0.82rem;
}

.activate-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.activate-box {
  border: 1px solid #111;
  padding: 3rem;
  text-align: center;
  max-width: 440px;
  width: 100%;
}

.activate-box h2 {
  color: #fff;
  font-size: 1.1rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: normal;
  margin-bottom: 0.5rem;
}

.activate-box p {
  color: #555;
  font-size: 0.82rem;
  margin-bottom: 1.5rem;
}

.activate-box .form-group {
  text-align: left;
}

.activate-box .btn {
  width: 100%;
  margin-top: 0.5rem;
}

.user-info-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
  padding: 0.75rem 1rem;
  border: 1px solid #111;
}

.user-info-bar .avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

.user-info-bar .name {
  color: #ccc;
  font-size: 0.82rem;
}

.user-info-bar .role {
  margin-left: auto;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  border: 1px solid #111;
  padding: 1.25rem;
  text-align: center;
  transition: border-color 0.2s;
}

.stat-card:hover {
  border-color: #222;
}

.stat-num {
  font-size: 1.8rem;
  color: #fff;
  font-weight: bold;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.stat-label {
  color: #555;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.stat-bar {
  height: 2px;
  background: #111;
  margin-top: 0.75rem;
  border-radius: 1px;
  overflow: hidden;
}

.stat-fill {
  height: 100%;
  background: #555;
  border-radius: 1px;
  transition: width 0.3s;
}

.stat-fill.green { background: #27ae60; }
.stat-fill.red { background: #e74c3c; }
.stat-fill.orange { background: #f39c12; }

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

.col-id { width: 40px; color: #444 !important; font-size: 0.75rem; }
.col-num { width: 50px; text-align: center !important; color: #777 !important; font-size: 0.8rem; }
.col-date { width: 100px; color: #555 !important; font-size: 0.72rem; white-space: nowrap; }
.col-ip { width: 120px; color: #555 !important; font-size: 0.72rem; font-family: inherit; }
.col-name { width: 120px; }
.col-actions { width: 100px; white-space: nowrap; text-align: right !important; }
.col-detail { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #444 !important; font-size: 0.72rem; }

.user-name { display: block; color: #ccc; font-size: 0.82rem; }
.user-discord { display: block; color: #333; font-size: 0.65rem; margin-top: 1px; }

.invite-code { font-family: monospace; letter-spacing: 1px; color: #ccc; font-size: 0.82rem; }

.tag {
  display: inline-block;
  padding: 2px 8px;
  font-size: 0.65rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  border: 1px solid #333;
  color: #666;
}

.tag-green { border-color: #27ae60; color: #27ae60; }
.tag-red { border-color: #e74c3c; color: #e74c3c; }
.tag-orange { border-color: #f39c12; color: #f39c12; }

.btn-sm {
  display: inline-block;
  background: none;
  border: 1px solid #333;
  color: #888;
  padding: 0.3rem 0.6rem;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.65rem;
  cursor: pointer;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: color 0.2s, border-color 0.2s;
}

.btn-sm:hover {
  color: #fff;
  border-color: #555;
}

.btn-sm-red {
  color: #c0392b;
  border-color: #c0392b;
}

.btn-sm-red:hover {
  color: #e74c3c;
  border-color: #e74c3c;
}

.protected {
  color: #333;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.admin-version {
  color: #333;
  font-size: 0.72rem;
}

.role-select {
  background: #0a0a0a;
  border: 1px solid #1a1a1a;
  color: #e0e0e0;
  padding: 0.3rem 0.5rem;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.75rem;
  outline: none;
  cursor: pointer;
  width: auto;
}

.form-row {
  display: flex;
  gap: 1rem;
  align-items: flex-end;
  flex-wrap: wrap;
}

.form-row .form-group {
  flex: 1;
  min-width: 160px;
}

.form-note {
  color: #555;
  font-weight: normal;
  font-size: 0.72rem;
}

.log-entry {
  border: 1px solid #111;
  margin-bottom: 1rem;
}

.log-entry-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #111;
}

.log-entry-title {
  color: #e0e0e0;
  font-size: 0.85rem;
}

.log-entry-date {
  color: #444;
  font-size: 0.72rem;
}

.log-entry-body {
  padding: 1rem;
  color: #888;
  font-size: 0.82rem;
  line-height: 1.7;
  white-space: pre-wrap;
}

.log-action {
  color: #888;
  font-size: 0.78rem;
}

.log-count {
  margin-bottom: 1rem;
  color: #555;
  font-size: 0.78rem;
}

.pagination {
  margin-top: 1.5rem;
  text-align: center;
  display: flex;
  justify-content: center;
  gap: 0.3rem;
}

.page-link {
  display: inline-block;
  padding: 0.3rem 0.7rem;
  border: 1px solid #1a1a1a;
  color: #555;
  text-decoration: none;
  font-size: 0.75rem;
  transition: color 0.2s, border-color 0.2s;
}

.page-link:hover, .page-link.active {
  color: #fff;
  border-color: #555;
}

.api-token-box {
  background: #0a0a0a;
  border: 1px solid #1a1a1a;
  padding: 0.75rem 1rem;
  font-size: 0.78rem;
  color: #888;
  word-break: break-all;
  margin-bottom: 1rem;
  font-family: 'Courier New', Courier, monospace;
}

.empty-state {
  text-align: center;
  padding: 3rem;
  color: #444;
  font-size: 0.85rem;
}

.inline-form {
  display: inline;
}
