/* ===== GLOBAL ===== */
body {
  margin: 0;
  font-family: 'Segoe UI', Arial, sans-serif;
  background: #0b0b0b;
  color: #ddd;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

body.admin-body {
  display: block;
  align-items: unset;
}

/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  height: 60px;
  background: #121212;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  box-shadow: 0 3px 15px rgba(0,0,0,0.8);
  border-bottom: 1px solid #1f1f1f;
  z-index: 1000;
  box-sizing: border-box;
}

.nav-left {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  margin-left: 1rem;
}

.nav-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-weight: bold;
  color: #c8a165;
  font-size: 1.1rem;
  pointer-events: none;
}

.nav-right {
  margin-left: auto;
  display: flex;
  gap: 1rem;
  align-items: center;
}

.nav-user-area {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-username {
  color: #c8a165;
  font-weight: 500;
  font-size: 0.9rem;
}

.nav-active {
  color: #c8a165 !important;
}

.navbar a {
  color: #ccc;
  text-decoration: none;
  font-weight: 500;
  transition: 0.2s ease;
}

.navbar a:hover {
  color: #c8a165;
}

.navbar-btn {
  padding: 0.4rem 0.9rem;
  background: #1e1e1e;
  border: 1px solid #2a2a2a;
  border-radius: 6px;
  color: #c8a165 !important;
  cursor: pointer;
  text-decoration: none;
  font-size: 0.875rem;
  transition: 0.3s ease, box-shadow 0.3s ease;
  margin-right: 20px;
}

.navbar-btn:hover {
  background: #2a2a2a;
  box-shadow: 0 0 10px #c8a16550;
  border-color: #c8a165;
}

.navbar-btn-sm {
  padding: 0.3rem 0.75rem;
  font-size: 0.8rem;
  margin-right: 0;
}

.admin-badge {
  background: #c8a16520;
  border: 1px solid #c8a16560;
  color: #c8a165;
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ===== FORM CONTAINER ===== */
.form-container {
  background: #1a1a1a;
  padding: 2rem;
  border-radius: 14px;
  box-shadow: 0px 10px 30px rgba(0,0,0,0.7);
  width: 320px;
  margin-top: 60px;
  border: 1px solid #2a2a2a;
}

.bugs-container {
  width: 480px;
}

.form-container h2 {
  text-align: center;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #c8a165;
}

.form-subtitle {
  text-align: center;
  color: #777;
  font-size: 0.85rem;
  margin: 0 0 1.25rem 0;
}

.form-error {
  background: #2a1010;
  border: 1px solid #5c1a1a;
  color: #e05c5c;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-size: 0.85rem;
  margin-bottom: 1rem;
  text-align: center;
}

.form-link-text {
  text-align: center;
  font-size: 0.85rem;
  color: #777;
  margin: 0;
}

.form-link-text a {
  color: #c8a165;
  text-decoration: none;
}

.form-link-text a:hover {
  text-decoration: underline;
}

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

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: #aaa;
  font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.5rem;
  background: #222;
  border: 1px solid #333;
  border-radius: 6px;
  color: #eee;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
  font-family: inherit;
  font-size: 0.95rem;
  resize: vertical;
}

.form-group textarea {
  line-height: 1.5;
  min-height: 140px;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #c8a165;
  box-shadow: 0 0 6px #c8a16540;
}

.char-counter {
  text-align: right;
  font-size: 0.78rem;
  color: #666;
  margin-top: 0.3rem;
}

/* ===== DIVIDER ===== */
.divider {
  border: none;
  border-top: 1px solid #2a2a2a;
  margin: 1.25rem 0;
}

/* ===== BUTTONS ===== */
button {
  width: 100%;
  padding: 0.5rem;
  background: #292929;
  color: #c8a165;
  border: 1px solid #3a3a3a;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  transition: 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}

button:hover {
  background: #333;
  box-shadow: 0 0 8px #c8a16550;
}

.reset-toggle-btn {
  background: transparent;
  border: none;
  color: #777;
  font-size: 0.82rem;
  padding: 0;
  width: auto;
  cursor: pointer;
  text-align: center;
  display: block;
  margin: 0 auto;
  box-shadow: none;
  transition: color 0.2s;
}

.reset-toggle-btn:hover {
  color: #c8a165;
  background: transparent;
  box-shadow: none;
}

/* ===== MESSAGE ===== */
.message {
  margin-top: 1rem;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  text-align: center;
  font-size: 0.875rem;
  opacity: 0;
  transition: opacity 0.5s ease;
  border: 1px solid transparent;
}

.message.show {
  opacity: 1;
}

.message.msg-error {
  background: #2a1010;
  border-color: #5c1a1a;
  color: #e05c5c;
}

.message.msg-success {
  background: #0f1f0f;
  border-color: #2a4a2a;
  color: #7cc46a;
}

/* ===== RECOVERY CODE MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal-box {
  background: #1a1a1a;
  border: 1px solid #c8a16540;
  border-radius: 14px;
  padding: 2rem;
  width: 420px;
  max-width: 90vw;
  box-shadow: 0 20px 60px rgba(0,0,0,0.9), 0 0 40px #c8a16510;
  text-align: center;
}

.modal-icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.modal-box h3 {
  color: #c8a165;
  font-size: 1.2rem;
  margin: 0 0 0.75rem 0;
}

.modal-desc {
  color: #999;
  font-size: 0.875rem;
  line-height: 1.6;
  margin: 0 0 1.25rem 0;
}

.modal-desc strong {
  color: #e0c080;
}

.recovery-code-box {
  background: #0e0e0e;
  border: 1px solid #c8a16560;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-family: 'Courier New', monospace;
  font-size: 1rem;
  color: #c8a165;
  letter-spacing: 0.1em;
  word-break: break-all;
  margin-bottom: 1rem;
  user-select: all;
}

.modal-copy-btn {
  background: #222;
  border: 1px solid #3a3a3a;
  color: #aaa;
  font-size: 0.85rem;
  padding: 0.4rem 0.75rem;
  width: auto;
  margin-bottom: 0.75rem;
  cursor: pointer;
  border-radius: 6px;
  transition: 0.2s;
}

.modal-copy-btn:hover {
  color: #c8a165;
  border-color: #c8a165;
  box-shadow: none;
  background: #222;
}

.modal-confirm-btn {
  background: #c8a16515;
  border: 1px solid #c8a165;
  color: #c8a165;
  font-size: 0.95rem;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  width: 100%;
  transition: 0.2s;
}

.modal-confirm-btn:hover {
  background: #c8a16525;
  box-shadow: 0 0 12px #c8a16530;
}

/* ===== FAQ PAGE ===== */
.faq-wrapper {
  width: 100%;
  margin-top: 80px;
  display: flex;
  justify-content: center;
}

.faq-container {
  background: #1a1a1a;
  padding: 2rem;
  border-radius: 14px;
  box-shadow: 0px 10px 30px rgba(0,0,0,0.7);
  width: 600px;
  border: 1px solid #2a2a2a;
}

.faq-container h2 {
  text-align: center;
  margin-bottom: 1.5rem;
  color: #c8a165;
}

.faq-item {
  margin-bottom: 1rem;
  border-bottom: 1px solid #2a2a2a;
  padding-bottom: 0.75rem;
}

.faq-question {
  cursor: pointer;
  font-weight: bold;
  padding: 0.5rem 0;
  color: #ddd;
  transition: color 0.2s ease;
}

.faq-question:hover {
  color: #c8a165;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  font-size: 0.9rem;
  color: #aaa;
}

.faq-item.active .faq-answer {
  max-height: 250px;
  margin-top: 0.5rem;
}

/* ===== ADMIN LAYOUT ===== */
.admin-layout {
  display: flex;
  height: calc(100vh - 60px);
  margin-top: 60px;
}

.admin-sidebar {
  width: 200px;
  background: #111;
  border-right: 1px solid #1f1f1f;
  flex-shrink: 0;
  padding: 1.25rem 0;
}

.admin-sidebar ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.admin-sidebar li {
  margin-bottom: 0.25rem;
}

.sidebar-btn {
  width: 100%;
  background: transparent;
  border: none;
  border-radius: 0;
  color: #888;
  font-size: 0.9rem;
  padding: 0.65rem 1.25rem;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  box-shadow: none;
}

.sidebar-btn:hover {
  background: #1a1a1a;
  color: #ccc;
  box-shadow: none;
}

.sidebar-btn.active {
  background: #1e1e1e;
  color: #c8a165;
  border-left: 2px solid #c8a165;
  box-shadow: none;
}

.admin-main {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem 2rem;
  background: #0e0e0e;
}

.admin-panel {
  display: none;
}

.admin-panel.active {
  display: block;
}

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

.panel-header h2 {
  color: #c8a165;
  margin: 0;
  font-weight: 500;
  font-size: 1.2rem;
}

.admin-search {
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 6px;
  color: #ddd;
  padding: 0.4rem 0.75rem;
  font-size: 0.875rem;
  width: 240px;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.2s;
}

.admin-search:focus {
  border-color: #c8a165;
}

.admin-filter-row {
  margin-bottom: 0.75rem;
}

.filter-label {
  color: #888;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
}

/* ===== ADMIN TABLE ===== */
.admin-table-wrap {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid #1f1f1f;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.admin-table thead th {
  background: #161616;
  color: #888;
  font-weight: 600;
  padding: 0.6rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid #222;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

.admin-table tbody tr {
  border-bottom: 1px solid #1a1a1a;
  transition: background 0.1s;
}

.admin-table tbody tr:hover {
  background: #141414;
}

.admin-table tbody td {
  padding: 0.65rem 0.75rem;
  color: #ccc;
  vertical-align: top;
}

.loading-row {
  text-align: center;
  color: #555;
  padding: 1.5rem !important;
}

.report-cell {
  max-width: 400px;
  white-space: pre-wrap;
  word-break: break-word;
  color: #bbb;
  font-size: 0.83rem;
  line-height: 1.5;
}

.row-resolved td {
  opacity: 0.5;
}

.row-banned td {
  color: #a06060;
}

.action-cell {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

/* ===== BADGES ===== */
.status-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: inline-block;
}

.status-badge.open {
  background: #1a2a1a;
  color: #4caf50;
  border: 1px solid #2a4a2a;
}

.status-badge.resolved {
  background: #1a1a2a;
  color: #7080c0;
  border: 1px solid #2a2a4a;
}

.status-badge.banned {
  background: #2a1010;
  color: #e05c5c;
  border: 1px solid #4a2020;
}

.status-badge.active-user {
  background: #1a2a1a;
  color: #4caf50;
  border: 1px solid #2a4a2a;
}

.status-badge.admin {
  background: #2a2010;
  color: #c8a165;
  border: 1px solid #4a3820;
}

.user-pill {
  background: #1e1e1e;
  border: 1px solid #2a2a2a;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.82rem;
  color: #bbb;
  font-family: monospace;
}

/* ===== ACTION BUTTONS ===== */
.action-btn {
  width: auto;
  padding: 0.25rem 0.6rem;
  font-size: 0.78rem;
  border-radius: 4px;
  cursor: pointer;
  transition: 0.15s;
  border: 1px solid #333;
  background: #1e1e1e;
  color: #aaa;
  box-shadow: none;
}

.action-btn:hover {
  box-shadow: none;
}

.action-resolve:hover, .action-mk-admin:hover {
  border-color: #4caf50;
  color: #4caf50;
  background: #1a2a1a;
}

.action-unresolve:hover, .action-rm-admin:hover {
  border-color: #c8a165;
  color: #c8a165;
  background: #1e1a10;
}

.action-ban:hover {
  border-color: #e05c5c;
  color: #e05c5c;
  background: #2a1010;
}

.action-unban:hover {
  border-color: #4caf50;
  color: #4caf50;
  background: #1a2a1a;
}

/* ===== LOGS ===== */
.logs-layout {
  display: flex;
  gap: 1rem;
  height: calc(100vh - 200px);
  min-height: 400px;
}

.log-file-list {
  width: 260px;
  flex-shrink: 0;
  border: 1px solid #1f1f1f;
  border-radius: 8px;
  overflow-y: auto;
  background: #111;
  padding: 0.5rem 0;
}

.log-file-item {
  padding: 0.6rem 1rem;
  cursor: pointer;
  border-bottom: 1px solid #1a1a1a;
  transition: background 0.1s;
}

.log-file-item:hover {
  background: #1a1a1a;
}

.log-file-item.selected {
  background: #1e1a10;
  border-left: 2px solid #c8a165;
}

.log-file-name {
  display: block;
  color: #ccc;
  font-size: 0.85rem;
  font-family: monospace;
  word-break: break-all;
}

.log-file-meta {
  display: block;
  color: #555;
  font-size: 0.75rem;
  margin-top: 0.2rem;
}

.log-viewer {
  flex: 1;
  border: 1px solid #1f1f1f;
  border-radius: 8px;
  overflow-y: auto;
  background: #080808;
  padding: 1rem;
}

.log-placeholder {
  color: #444;
  text-align: center;
  margin-top: 2rem;
  font-size: 0.9rem;
}

.log-content {
  margin: 0;
  font-family: 'Courier New', monospace;
  font-size: 0.78rem;
  line-height: 1.6;
  color: #888;
  white-space: pre-wrap;
  word-break: break-all;
}

.log-error  { color: #e05c5c; }
.log-warning { color: #c8a165; }
.log-info   { color: #6ab0d8; }

/* ===== TOAST ===== */
.admin-toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: #1a3a1a;
  border: 1px solid #4caf50;
  color: #4caf50;
  padding: 0.65rem 1.25rem;
  border-radius: 8px;
  font-size: 0.875rem;
  z-index: 9999;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.25s, transform 0.25s;
  pointer-events: none;
}

.admin-toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* ===== RESET FORM CONTAINER ===== */
.reset-form-container {
  display: none;
}

/* ===== WS STATUS INDICATOR ===== */
.sidebar-ws-status {
  position: absolute;
  bottom: 1rem;
  left: 0;
  width: 200px;
  padding: 0 1rem;
  box-sizing: border-box;
}

.ws-status {
  display: block;
  font-size: 0.72rem;
  padding: 0.35rem 0.6rem;
  border-radius: 4px;
  border: 1px solid transparent;
  text-align: center;
  line-height: 1.4;
  word-break: break-word;
}

.ws-connecting   { background: #1a1a10; border-color: #4a4a20; color: #a0a060; }
.ws-connected    { background: #0f1f0f; border-color: #2a4a2a; color: #4caf50; }
.ws-disconnected { background: #1f0f0f; border-color: #4a2020; color: #a06060; }
.ws-error        { background: #2a1010; border-color: #5c2020; color: #e05c5c; }

.admin-sidebar {
  position: relative;
}

/* ===== PAGINATION ===== */
.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 0.75rem 0 0.25rem;
}

.pagination-btn {
  width: auto;
  padding: 0.35rem 0.9rem;
  font-size: 0.82rem;
  background: #1e1e1e;
  border: 1px solid #2a2a2a;
  border-radius: 6px;
  color: #c8a165;
  cursor: pointer;
  transition: 0.2s;
  box-shadow: none;
}

.pagination-btn:hover:not(:disabled) {
  background: #2a2a2a;
  border-color: #c8a165;
  box-shadow: 0 0 8px #c8a16530;
}

.pagination-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.pagination-info {
  font-size: 0.82rem;
  color: #666;
  min-width: 200px;
  text-align: center;
}