/* =========================================================
   Honeypot Dashboard — Complete Stylesheet
   ========================================================= */

:root {
  --bg: #0f1117;
  --bg-secondary: #171a22;
  --bg-tertiary: #1e2430;

  --card: #1b2130;
  --card-hover: #242c3d;

  --border: rgba(255,255,255,0.07);
  --border-hover: rgba(255,255,255,0.12);

  --text: #f5f7fb;
  --text-muted: #9aa4b2;
  --text-hint: #5c6678;

  --primary: #5865f2;
  --primary-hover: #4752c4;

  --success: #57f287;
  --danger: #ed4245;
  --warning: #faa81a;
  --info: #7289da;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  --shadow: 0 1px 3px rgba(0,0,0,0.4);
}

/* =========================================================
   Global
   ========================================================= */

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: Inter, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
}

button,
input,
textarea,
select {
  font: inherit;
}

main {
  padding: 32px 40px;
}

.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
}

/* =========================================================
   Navbar
   ========================================================= */

.navbar {
  width: 100%;
  height: 64px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 0 40px;

  background: rgba(15,17,23,0.92);
  border-bottom: 0.5px solid var(--border);

  position: sticky;
  top: 0;
  z-index: 100;

  backdrop-filter: blur(12px);
}

.logo {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.navbar .user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.navbar .user img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
}

.navbar .user span {
  color: var(--text-muted);
  font-size: 13px;
}

/* =========================================================
   Buttons
   ========================================================= */

.btn,
button {
  border: 0.5px solid var(--border-hover);
  outline: none;
  cursor: pointer;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  transition: background 0.15s, transform 0.1s;
  font-size: 13px;
  font-weight: 500;
  background: transparent;
  color: var(--text);
}

button:hover {
  background: var(--bg-tertiary);
}

button:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--primary);
  color: white;
  border-color: transparent;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: var(--card-hover);
}

.btn-danger {
  background: var(--danger);
  color: white;
  border-color: transparent;
}

.btn-danger:hover {
  background: #c73537;
}

/* =========================================================
   Home Page
   ========================================================= */

.hero {
  min-height: calc(100vh - 64px);

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  text-align: center;
  padding: 40px;
}

.hero h1 {
  font-size: 64px;
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.hero p {
  color: var(--text-muted);
  max-width: 640px;
  font-size: 17px;
  margin-bottom: 36px;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.hero-card-grid {
  margin-top: 72px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  width: 100%;
  max-width: 1100px;
}

.hero-card {
  background: var(--card);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.hero-card h3 {
  margin-bottom: 8px;
  font-size: 15px;
}

.hero-card p {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* =========================================================
   Dashboard Page (guild list)
   ========================================================= */

.page-header {
  margin-bottom: 28px;
}

.page-header h1 {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.page-header p {
  color: var(--text-muted);
  font-size: 14px;
}

.guild-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.guild-card {
  background: var(--card);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;

  transition: background 0.15s, transform 0.15s;
}

.guild-card:hover {
  background: var(--card-hover);
  transform: translateY(-2px);
}

.guild-card img {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  margin-bottom: 14px;
}

.guild-card h3 {
  text-align: center;
  font-size: 15px;
  font-weight: 500;
}

.guild-card p {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 4px;
}

/* =========================================================
   Guild Settings Layout
   ========================================================= */

.guild-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 20px;
  align-items: start;
}

/* =========================================================
   Sidebar
   ========================================================= */

.sidebar {
  position: sticky;
  top: 84px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-server-block {
  background: var(--card);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  margin-bottom: 4px;
}

.sidebar-server-block img {
  width: 60px;
  height: 60px;
  border-radius: 14px;
}

.sidebar-server-block h3 {
  font-size: 14px;
  font-weight: 500;
}

.sidebar-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-links a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}

.sidebar-links a:hover,
.sidebar-links a.active {
  background: var(--bg-tertiary);
  color: var(--text);
}

.sidebar-links a i {
  font-size: 16px;
  width: 18px;
  flex-shrink: 0;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
  transition: color 0.15s;
}

.back-link:hover {
  color: var(--text);
}

/* =========================================================
   Status Badge
   ========================================================= */

.status-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 99px;
}

.status-badge.active {
  background: rgba(87,242,135,0.12);
  color: var(--success);
}

.status-badge.inactive {
  background: rgba(237,66,69,0.12);
  color: var(--danger);
}

/* =========================================================
   Settings Content
   ========================================================= */

.settings-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.settings-card {
  background: var(--card);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.settings-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 0.5px solid var(--border);
}

.settings-card-header i {
  font-size: 17px;
  color: var(--text-muted);
}

.settings-card-header h2 {
  font-size: 14px;
  font-weight: 500;
}

.settings-card-header .description {
  font-size: 12px;
  color: var(--text-muted);
  margin-left: auto;
}

.settings-card-body {
  padding: 18px;
}

/* =========================================================
   Statistics Grid
   ========================================================= */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.stat-card {
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-number {
  font-size: 24px;
  font-weight: 600;
}

.stat-card h3 {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-muted);
}

.stat-card.caught  .stat-number { color: var(--text); }
.stat-card.banned  .stat-number { color: var(--danger); }
.stat-card.kicked  .stat-number { color: var(--warning); }
.stat-card.muted   .stat-number { color: var(--info); }
.stat-card.logged  .stat-number { color: var(--text-muted); }

/* =========================================================
   Forms
   ========================================================= */

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-group.full {
  grid-column: 1 / -1;
}

.form-group label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-group small {
  font-size: 12px;
  color: var(--text-hint);
  line-height: 1.5;
}

input[type="text"],
input[type="number"],
input[type="password"],
textarea,
select {
  width: 100%;
  background: var(--bg-secondary);
  color: var(--text);
  border: 0.5px solid var(--border);
  outline: none;
  padding: 9px 12px;
  border-radius: var(--radius-md);
  font-size: 13px;
  transition: border-color 0.15s;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--primary);
}

textarea {
  resize: vertical;
  min-height: 120px;
  font-family: 'Menlo', 'Consolas', monospace;
  font-size: 12px;
}

/* =========================================================
   Toggle Switch
   ========================================================= */

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 13px 0;
  border-bottom: 0.5px solid var(--border);
}

.switch-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.switch-row:first-child {
  padding-top: 0;
}

.switch-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.switch-info h4 {
  font-size: 14px;
  font-weight: 400;
}

.switch-info p {
  color: var(--text-muted);
  font-size: 12px;
}

.switch {
  position: relative;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  inset: 0;
  background: var(--bg-tertiary);
  border-radius: 99px;
  cursor: pointer;
  transition: background 0.2s;
  border: 0.5px solid var(--border-hover);
}

.slider::before {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  left: 3px;
  top: 3px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: transform 0.2s, background 0.2s;
}

.switch input:checked + .slider {
  background: var(--primary);
  border-color: transparent;
}

.switch input:checked + .slider::before {
  transform: translateX(18px);
  background: white;
}

/* =========================================================
   Chip / ID tags
   ========================================================= */

.chip-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 38px;
  padding: 8px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border: 0.5px solid var(--border);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 99px;
  background: var(--bg-tertiary);
  border: 0.5px solid var(--border-hover);
  font-size: 12px;
  font-family: 'Menlo', 'Consolas', monospace;
  color: var(--text);
}

.chip button {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1;
  padding: 0;
}

.chip button:hover {
  color: var(--danger);
  background: none;
}

.chip-add-row {
  display: flex;
  gap: 6px;
}

.chip-add-row input {
  flex: 1;
  font-family: 'Menlo', 'Consolas', monospace;
  font-size: 12px;
}

.chip-add-row button {
  padding: 6px 12px;
  font-size: 12px;
}

/* =========================================================
   Save Bar
   ========================================================= */

.save-bar {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 4px;
}

.save-bar .btn-primary {
  padding: 9px 20px;
  font-size: 13px;
}

/* =========================================================
   Two-column channel grid
   ========================================================= */

.channel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* =========================================================
   Tables
   ========================================================= */

.table-wrapper {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  text-align: left;
  padding: 12px 16px;
  font-size: 13px;
}

.table th {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 0.5px solid var(--border);
}

.table td {
  border-bottom: 0.5px solid var(--border);
}

.table tr:last-child td {
  border-bottom: none;
}

.table tr:hover td {
  background: rgba(255,255,255,0.02);
}

/* =========================================================
   Alerts
   ========================================================= */

.alert {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  font-size: 13px;
}

.alert-success {
  background: rgba(87,242,135,0.08);
  border: 0.5px solid rgba(87,242,135,0.2);
  color: var(--success);
}

.alert-danger {
  background: rgba(237,66,69,0.08);
  border: 0.5px solid rgba(237,66,69,0.2);
  color: var(--danger);
}

.alert-warning {
  background: rgba(250,168,26,0.08);
  border: 0.5px solid rgba(250,168,26,0.2);
  color: var(--warning);
}

/* =========================================================
   Empty State
   ========================================================= */

.empty-state {
  background: var(--card);
  border: 0.5px dashed var(--border-hover);
  border-radius: var(--radius-lg);
  padding: 64px 30px;
  text-align: center;
}

.empty-state h2 {
  font-size: 18px;
  margin-bottom: 8px;
}

.empty-state p {
  color: var(--text-muted);
  font-size: 14px;
}

/* =========================================================
   Footer
   ========================================================= */

.footer {
  padding: 32px 40px;
  text-align: center;
  color: var(--text-hint);
  font-size: 13px;
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 1100px) {
  .guild-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  main {
    padding: 16px;
  }

  .navbar {
    padding: 0 16px;
  }

  .hero h1 {
    font-size: 40px;
  }

  .page-header h1 {
    font-size: 26px;
  }

  .guild-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .channel-grid {
    grid-template-columns: 1fr;
  }

  .switch-row {
    flex-direction: row;
    align-items: center;
  }
}