:root {
  --primary: #6f7cff;
  --accent: #00eaff;
  --bg-dark: #0b0f1a;
  --bg-panel: #0e1330;
  --text-main: #e6ecff;
  --text-muted: #aab4ff;
}

/* ===========================
   GLOBAL RESET & BASE
=========================== */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  background: radial-gradient(circle at top, #12182b, #05070f);
  color: var(--text-main);
  min-height: 100vh;
}

/* ===========================
   LINKS & BUTTONS
=========================== */
a {
  color: inherit;
  text-decoration: none;
}

.btn,
.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 12px 26px;
  font-size: 14px;
  font-weight: 600;
  color: #0a0f1f;
  background: linear-gradient(135deg, #6f7cff, #00eaff);
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-secondary {
  background: linear-gradient(135deg, #1e293b, #020617);
  color: var(--text-main);
  border: 1px solid #1e293b;
}

.btn:hover,
.btn-primary:hover,
.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 234, 255, 0.35);
}

/* ===========================
   DASHBOARD LAYOUT
=========================== */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: 240px;
  height: 100vh;
  background: linear-gradient(180deg, #0e1330, #070a1a);
  padding: 24px;
  box-shadow: 4px 0 30px rgba(0, 0, 0, 0.6);
}

.sidebar-logo {
  width: 100%;
  max-width: 180px;
  margin-bottom: 28px;
}

.sidebar p {
  margin: 0 0 20px;
  font-weight: 600;
  color: #cfd6ff;
}

.sidebar a {
  display: block;
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  transition: background 0.2s ease;
}

.sidebar a:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* ===========================
   MAIN CONTENT
=========================== */
main {
  margin-left: 260px;
  padding: 40px;
}

main h1 {
  margin-top: 0;
  font-size: 32px;
}

/* ===========================
   SERVER GRID
=========================== */
.server-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
  margin-top: 30px;
}

/* ===========================
   SERVER CARD
=========================== */
.server-card {
  background: linear-gradient(180deg, #0f172a, #020617);
  border: 1px solid #1e293b;
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.35);
  display: flex;
  flex-direction: column;
}

/* Icon */
.server-card img {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  object-fit: cover;
  margin-bottom: 12px;
}

/* Info */
.server-info {
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* ===========================
   PREMIUM BADGE
=========================== */
.badge-prem {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 6px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 700;
  color: #fde68a;
  background: linear-gradient(
    135deg,
    rgba(234,179,8,0.25),
    rgba(250,204,21,0.25)
  );
  border: 1px solid rgba(234,179,8,0.45);
  border-radius: 999px;
}

.badge-prem::before {
  content: "👑 Premium";
}

/* ===========================
   TRANSFER PREMIUM BUTTON
=========================== */
.btn-transfer {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 700;
  color: #fde68a;
  background: linear-gradient(
    135deg,
    rgba(234,179,8,0.25),
    rgba(250,204,21,0.25)
  );
  border: 1px solid rgba(234,179,8,0.45);
  border-radius: 10px;
  cursor: pointer;
}

/* ===========================
   ACTIONS ALIGNMENT (FINAL)
=========================== */
.server-actions {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.server-actions a,
.server-actions button,
.server-actions span {
  width: 100%;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Order is now correct */
.server-actions .btn-transfer { order: 1; }
.server-actions .btn-secondary { order: 2; }
.server-actions .invite-btn,
.server-actions .invite-btn.installed { order: 3; }

/* ===========================
   MODAL POSITION FIX
=========================== */
.modal-backdrop {
  left: 260px;
  width: calc(100% - 260px);
}

@media (max-width: 900px) {
  .modal-backdrop {
    left: 0;
    width: 100%;
  }
}

/* ===========================
   PREMIUM MODAL DROPDOWN UI
=========================== */
.modal select {
  width: 100%;
  appearance: none;
  background:
    linear-gradient(180deg, #0f172a, #020617),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%23aab4ff' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E")
    no-repeat right 14px center;
  border: 1px solid #1e293b;
  border-radius: 12px;
  padding: 12px 44px 12px 14px;
  font-size: 14px;
  font-weight: 600;
  color: #e6ecff;
}

.modal select:focus {
  outline: none;
  border-color: #00eaff;
  box-shadow: 0 0 0 2px rgba(0, 234, 255, 0.25);
}

.modal select option {
  background: #020617;
  color: #e6ecff;
}

.modal select option:disabled {
  color: #64748b;
}

.modal select option[value=""] {
  color: #94a3b8;
}
