/* =========================
   WAR HOUNDS Dashboard CSS
   Reconstructed from screenshots
========================= */

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: #14141F;
  color: #FAFAFA;
  line-height: 1.6;
}

/* =========================
   Layout Structure
========================= */

.layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 260px;
  background: #1E1428;
  border-right: 1px solid #2A2A3D;
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
}

.sidebar .logo {
  padding: 24px 20px;
  border-bottom: 1px solid #2A2A3D;
  text-align: center;
}

.sidebar .logo img {
  max-width: 100%;
  height: auto;
}

.sidebar nav {
  display: flex;
  flex-direction: column;
  padding: 20px 0;
  flex: 1;
}

.sidebar nav a {
  padding: 12px 20px;
  color: #8a8a8a;
  text-decoration: none;
  transition: all 0.2s ease;
  font-weight: 500;
  font-size: 14px;
  border-left: 3px solid transparent;
}

.sidebar nav a:hover {
  background: rgba(255, 255, 255, 0.02);
  color: #FAFAFA;
}

.sidebar nav a.active {
  background: rgba(255, 65, 54, 0.1);
  color: #ff4136;
  border-left-color: #ff4136;
}

.content {
  flex: 1;
  margin-left: 260px;
  padding: 40px;
  background: #14141F;
  min-height: 100vh;
}

/* =========================
   Typography
========================= */

h1, .page-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 32px;
  font-weight: 400;
  margin-bottom: 8px;
  color: #FAFAFA;
  letter-spacing: 1px;
  text-transform: uppercase;
}

h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 20px;
  font-weight: 400;
  color: #FAFAFA;
  margin-bottom: 16px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

h3 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 18px;
  font-weight: 400;
  color: #FAFAFA;
  margin-bottom: 12px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* =========================
   Cards
========================= */

.card {
  background: #1E1428;
  border: 1px solid #2A2A3D;
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 24px;
}

.card h2 {
  margin-top: 0;
}

.card h3 {
  margin-top: 0;
}

/* Bot Info Cards */
.bot-info-card {
  background: #1E1428;
  border: 1px solid #2A2A3D;
  border-radius: 8px;
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.bot-info-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid #2A2A3D;
}

.bot-info-header h2 {
  margin: 0;
  font-size: 18px;
}

.bot-info-content {
  flex: 1;
}

.bot-info-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #2A2A3D;
}

.bot-info-row:last-child {
  border-bottom: none;
}

.bot-info-label {
  color: #8a8a8a;
  font-weight: 500;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.bot-info-value {
  color: #FAFAFA;
  font-weight: 600;
}

.bot-info-value.online {
  color: #23A55A;
}

/* Status Indicator Dots */
.status-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #5C5C6A;
  display: inline-block;
  position: relative;
}

.status-indicator.online {
  background: #23A55A;
  animation: pulse 2s ease-in-out infinite;
}

.status-indicator.offline {
  background: #F23F43;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(35, 165, 90, 0.4);
  }
  50% {
    opacity: 0.9;
    box-shadow: 0 0 0 4px rgba(35, 165, 90, 0);
  }
}

.bot-info-footer {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #2A2A3D;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.bot-info-footer small {
  color: #6B6B7C;
  font-size: 12px;
}

/* Reaction Roles Card */
.reaction-roles-card {
  background: #1E1428;
  border: 1px solid #2A2A3D;
  border-radius: 8px;
  padding: 24px;
}

/* =========================
   Forms
========================= */

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  color: #8a8a8a;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="password"],
.form-group input[type="email"],
.form-group select,
.form-group textarea {
  width: 100%;
  background: #141428;
  border: 1px solid #2A2A3D;
  color: #FAFAFA;
  padding: 12px 16px;
  border-radius: 4px;
  font-family: inherit;
  font-size: 14px;
  transition: border-color 0.2s ease;
}

.form-group input[type="text"]:focus,
.form-group input[type="number"]:focus,
.form-group input[type="password"]:focus,
.form-group input[type="email"]:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #ff4136;
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.form-group small {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: #6B6B7C;
  font-weight: normal;
  text-transform: none;
  letter-spacing: normal;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

/* Editor Grid */
.editor-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.editor-field {
  display: flex;
  flex-direction: column;
}

.editor-field.full-width {
  grid-column: 1 / -1;
}

.editor-field label {
  display: block;
  color: #8a8a8a;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.editor-field input[type="text"],
.editor-field input[type="number"],
.editor-field input[type="password"],
.editor-field input[type="email"],
.editor-field select,
.editor-field textarea {
  width: 100%;
  background: #141428;
  border: 1px solid #2A2A3D;
  color: #FAFAFA;
  padding: 12px 16px;
  border-radius: 4px;
  font-family: inherit;
  font-size: 14px;
  transition: border-color 0.2s ease;
}

.editor-field input:focus,
.editor-field select:focus,
.editor-field textarea:focus {
  outline: none;
  border-color: #ff4136;
}

.editor-field textarea {
  resize: vertical;
  min-height: 80px;
}

.editor-field small {
  display: block;
  color: #6B6B7C;
  font-size: 12px;
  margin-top: 4px;
  font-weight: normal;
  text-transform: none;
  letter-spacing: normal;
}

/* Editor Split Layout */
.editor-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

.editor-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 0;
  border-top: 1px solid #2A2A3D;
  margin-top: 20px;
}

/* Panel (for Reaction Roles) */
.panel {
  background: #1E1428;
  border: 1px solid #2A2A3D;
  border-radius: 8px;
  padding: 20px;
}

.panel h3 {
  margin-top: 0;
  margin-bottom: 16px;
}

/* Preview Box */
.preview-box {
  background: #141428;
  border: 1px solid #2A2A3D;
  border-radius: 4px;
  padding: 16px;
  color: #DCDDDE;
  font-size: 14px;
}

.preview-box strong {
  display: block;
  color: #FFFFFF;
  font-size: 16px;
  margin-bottom: 8px;
}

/* Divider */
.divider {
  border: none;
  border-top: 1px solid #2A2A3D;
  margin: 24px 0;
}

/* =========================
   Buttons
========================= */

.primary-btn {
  background: #ff4136;
  color: #FFFFFF;
  border: none;
  padding: 12px 24px;
  font-weight: 600;
  font-size: 14px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.primary-btn:hover {
  background: #e63027;
}

.primary-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.secondary-btn {
  background: transparent;
  color: #8a8a8a;
  border: 1px solid #2A2A3D;
  padding: 10px 20px;
  font-weight: 500;
  font-size: 14px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.secondary-btn:hover {
  background: rgba(42, 42, 61, 0.3);
  color: #FAFAFA;
  border-color: #ff4136;
}

.danger-btn {
  background: transparent;
  color: #ff4136;
  border: 1px solid #ff4136;
  padding: 10px 20px;
  font-weight: 500;
  font-size: 14px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.danger-btn:hover {
  background: rgba(255, 65, 54, 0.1);
}

.delete-btn {
  background: #ff4136;
  color: #FFFFFF;
  border: none;
  padding: 8px 16px;
  font-weight: 500;
  font-size: 13px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.delete-btn:hover {
  background: #e63027;
}

/* Emoji Button (for Reaction Roles) */
.emoji-btn {
  background: #141428;
  border: 1px solid #2A2A3D;
  color: #FAFAFA;
  padding: 8px 12px;
  font-size: 18px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.emoji-btn:hover {
  border-color: #ff4136;
  background: rgba(255, 65, 54, 0.1);
}

/* =========================
   Tables
========================= */

table {
  width: 100%;
  border-collapse: collapse;
}

.roles-table,
.existing-table,
.admin-users-table,
.streamers-table,
.leaderboard-table,
.rewards-table {
  width: 100%;
  border-collapse: collapse;
  background: #1E1428;
  border: 1px solid #2A2A3D;
  border-radius: 8px;
  overflow: hidden;
}

.roles-table thead,
.existing-table thead,
.admin-users-table thead,
.streamers-table thead,
.leaderboard-table thead,
.rewards-table thead {
  background: rgba(42, 42, 61, 0.5);
}

.roles-table th,
.existing-table th,
.admin-users-table th,
.streamers-table th,
.leaderboard-table th,
.rewards-table th {
  padding: 12px 16px;
  text-align: left;
  color: #8a8a8a;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid #2A2A3D;
}

/* Specific alignment for roles table */
.roles-table th:nth-child(1) {
  width: 30px;
  text-align: center;
}

.roles-table th:nth-child(2) {
  width: 30px;
  text-align: center;
}

.roles-table th:nth-child(3) {
  width: 120px;
  text-align: center;
}

.roles-table th:nth-child(4) {
  text-align: left;
}

.roles-table th:nth-child(5) {
  width: 60px;
  text-align: center;
}

.roles-table td:nth-child(1) {
  text-align: center;
  width: 30px;
  padding: 8px;
}

.roles-table td:nth-child(2) {
  text-align: center;
  width: 30px;
  padding: 8px;
}

.roles-table td:nth-child(3) {
  text-align: center;
  width: 120px;
}

.roles-table td:nth-child(4) {
  text-align: left;
}

.roles-table td:nth-child(5) {
  text-align: center;
  width: 60px;
}

.roles-table td,
.existing-table td,
.admin-users-table td,
.streamers-table td,
.leaderboard-table td,
.rewards-table td {
  padding: 12px 16px;
  color: #FAFAFA;
  border-bottom: 1px solid #2A2A3D;
  font-size: 14px;
}

.roles-table tr:last-child td,
.existing-table tr:last-child td,
.admin-users-table tr:last-child td,
.streamers-table tr:last-child td,
.leaderboard-table tr:last-child td,
.rewards-table tr:last-child td {
  border-bottom: none;
}

.roles-table tbody tr:hover,
.existing-table tbody tr:hover,
.admin-users-table tbody tr:hover,
.streamers-table tbody tr:hover,
.leaderboard-table tbody tr:hover,
.rewards-table tbody tr:hover {
  background: rgba(42, 42, 61, 0.3);
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 24px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #2A2A3D;
  transition: 0.3s;
  border-radius: 26px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: #6B6B7C;
  transition: 0.3s;
  border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
  background-color: #ff4136;
  border-color: #ff4136;
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(22px);
  background-color: #FFFFFF;
}

/* Checkbox Label */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 8px 0;
  font-size: 14px;
  color: #FAFAFA;
}

.checkbox-label input[type="checkbox"] {
  accent-color: #ff4136;
  width: 18px;
  height: 18px;
  cursor: pointer;
}

/* =========================
   Welcome Page Styles
========================= */

.message-type-btn {
  flex: 1;
  transition: all 0.2s;
}

.message-type-btn.active {
  background: #ff4136;
  color: white;
  border-color: #ff4136;
}

.message-fields {
  /* Container for message type fields */
}

.message-item {
  background: #1E1428;
  border: 1px solid #2A2A3D;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 10px;
  cursor: move;
  transition: all 0.2s;
}

.message-item:hover {
  background: rgba(42, 42, 61, 0.5);
  border-color: #ff4136;
}

.message-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.message-item-type {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.message-item-type.image {
  background: #ff4136;
  color: white;
}

.message-item-type.embed {
  background: #57F287;
  color: #1E1E2E;
}

.message-item-type.text {
  background: #FEE75C;
  color: #1E1E2E;
}

.message-item-actions {
  display: flex;
  gap: 10px;
}

.message-item-actions button {
  padding: 6px 12px;
  font-size: 13px;
}

.message-item-preview {
  padding: 10px;
  background: #141428;
  border-radius: 6px;
  border-left: 4px solid #ff4136;
}

.message-item-preview.embed {
  border-left-color: var(--embed-color, #ff4136);
}

.message-item-preview img {
  max-width: 100%;
  max-height: 200px;
  border-radius: 4px;
}

/* Discord-style embed preview */
.discord-embed-preview {
  background: #2B2D31;
  border-radius: 4px;
  display: flex;
  overflow: hidden;
  max-width: 520px;
}

.embed-color-bar {
  width: 4px;
  background: #ff4136;
  flex-shrink: 0;
}

.embed-content {
  padding: 12px 16px;
  flex: 1;
}

.embed-title {
  font-weight: 600;
  color: #FFFFFF;
  margin-bottom: 8px;
  font-size: 16px;
}

.embed-body {
  color: #DCDDDE;
  font-size: 14px;
  line-height: 1.4;
  white-space: pre-wrap;
}

.embed-footer {
  color: #B5BAC1;
  font-size: 12px;
  margin-top: 8px;
}

.embed-thumbnail {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 4px;
  margin: 12px 16px 12px 0;
}

/* =========================
   File Inputs
========================= */

input[type="file"] {
  padding: 10px;
  background: #141428;
  border: 1px solid #2A2A3D;
  border-radius: 4px;
  color: #E0E0E0;
  cursor: pointer;
  width: 100%;
}

input[type="file"]:hover {
  border-color: #ff4136;
}

input[type="color"] {
  height: 45px;
  cursor: pointer;
  border: 1px solid #2A2A3D;
  border-radius: 4px;
  background: transparent;
}

/* =========================
   Responsive Design
========================= */

@media (max-width: 1024px) {
  .content {
    margin-left: 0;
    padding: 20px;
  }

  .sidebar {
    transform: translateX(-100%);
  }

  .editor-grid,
  .editor-split,
  .form-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  h1, .page-title {
    font-size: 24px;
  }

  .card {
    padding: 16px;
  }

  .editor-grid {
    gap: 16px;
  }
}

/* Role Row (for Reaction Roles) */
.role-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(42, 42, 61, 0.3);
  border: 1px solid #2A2A3D;
  border-radius: 4px;
  margin-bottom: 8px;
  width: 100%;
  box-sizing: border-box;
}

.role-row .drag-handle {
  cursor: grab;
  color: #6B6B7C;
  font-size: 18px;
  width: 20px;
  flex-shrink: 0;
  text-align: center;
}

.role-row .drag-handle:active {
  cursor: grabbing;
}

.role-row .role-checkbox {
  accent-color: #ff4136;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  cursor: pointer;
  margin: 0;
}

.role-row .emoji-btn {
  width: 120px;
  flex-shrink: 0;
}

.role-row .role-name {
  flex: 1;
  color: #FAFAFA;
  font-weight: 500;
}

}
