/* ===== Variables & base ===== */
:root {
  --bg-dark: #0d0f12;
  --bg-card: #14171c;
  --bg-card-hover: #1a1e25;
  --accent: #00e5cc;
  --accent-dim: #00b8a3;
  --accent-glow: rgba(0, 229, 204, 0.5);
  --text: #e8eaed;
  --text-muted: #9ca3af;
  --border: rgba(0, 229, 204, 0.2);
  --font-display: 'Orbitron', sans-serif;
  --font-body: 'Rajdhani', sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg-dark);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  font-weight: 500;
  line-height: 1.5;
}

/* ===== Grid background ===== */
.grid-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(135deg, rgba(0, 229, 204, 0.03) 0%, transparent 50%),
    linear-gradient(225deg, rgba(0, 229, 204, 0.02) 0%, transparent 50%),
    var(--bg-dark);
  background-image:
    linear-gradient(rgba(0, 229, 204, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 204, 0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 40%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 40%, transparent 70%);
}

/* ===== Header & nav ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(13, 15, 18, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 0.1em;
  text-shadow: 0 0 20px var(--accent-glow);
  transition: text-shadow 0.3s ease;
}

.logo:hover {
  text-shadow: 0 0 30px var(--accent-glow), 0 0 40px rgba(0, 229, 204, 0.3);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--text);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--accent);
}

.nav-account,
.nav-panel,
.nav-user {
  color: var(--text-muted);
}

/* Menu déroulant utilisateur (connecté) */
.nav-user-dropdown-wrap {
  position: relative;
  display: inline-block;
}
.nav-user-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--text);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color 0.2s ease;
}
.nav-user-trigger:hover {
  color: var(--accent);
}
.nav-user-chevron {
  font-size: 0.6em;
  opacity: 0.8;
  transition: transform 0.2s ease;
}
.nav-user-dropdown-wrap.is-open .nav-user-chevron {
  transform: rotate(180deg);
}
.nav-user-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.5rem;
  min-width: 160px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  padding: 0.5rem 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 200;
}
.nav-user-dropdown.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav-user-dropdown a,
.nav-user-dropdown .nav-user-logout {
  display: block;
  width: 100%;
  padding: 0.6rem 1rem;
  text-align: left;
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  border: none;
  background: none;
  cursor: pointer;
  font-family: var(--font-body);
  transition: background 0.2s, color 0.2s;
}
.nav-user-dropdown a:hover,
.nav-user-dropdown .nav-user-logout:hover {
  background: rgba(0, 229, 204, 0.1);
  color: var(--accent);
}
.nav-user-dropdown .nav-user-logout {
  border-top: 1px solid var(--border);
  margin-top: 0.25rem;
  padding-top: 0.6rem;
}

.nav-user {
  font-size: 0.9rem;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

/* ===== Hero ===== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 1.5rem 4rem;
  position: relative;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 10vw, 5.5rem);
  font-weight: 800;
  letter-spacing: 0.15em;
  color: var(--accent);
  text-shadow:
    0 0 20px var(--accent-glow),
    0 0 40px var(--accent-glow),
    0 0 60px rgba(0, 229, 204, 0.3);
  margin-bottom: 0.75rem;
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  letter-spacing: 0.05em;
}

.hero-desc {
  max-width: 560px;
  font-size: 1.1rem;
  color: var(--text);
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 3rem;
}

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 0.85rem 1.75rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
  border-radius: 6px;
  transition: all 0.25s ease;
  cursor: pointer;
}

.btn-primary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--accent);
  box-shadow: 0 0 15px rgba(0, 229, 204, 0.2);
}

.btn-primary:hover {
  background: rgba(0, 229, 204, 0.1);
  box-shadow: 0 0 25px var(--accent-glow);
  color: var(--accent);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.6);
  color: #fff;
}

/* ===== Scroll indicator ===== */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--accent);
  animation: bounce 2s ease-in-out infinite;
}

.scroll-indicator svg {
  filter: drop-shadow(0 0 8px var(--accent-glow));
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* ===== Sections ===== */
.section {
  padding: 5rem 1.5rem;
  max-width: 1280px;
  margin: 0 auto;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 600;
  text-align: center;
  margin-bottom: 0.5rem;
}

.section-title .accent {
  color: var(--accent);
  text-shadow: 0 0 20px var(--accent-glow);
}

.section-desc {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  font-size: 1.1rem;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
}

/* ===== Cards (serveurs) ===== */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
}

.card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(0, 229, 204, 0.4);
  box-shadow: 0 0 30px rgba(0, 229, 204, 0.1);
}

.card-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.card h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.card p {
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
}

.card-link {
  display: inline-block;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.05em;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

.card-link:hover {
  color: var(--accent-dim);
  text-shadow: 0 0 12px var(--accent-glow);
}

/* Plan cards (machines) */
.cards-plans { margin-top: 2rem; }
.card-plan { position: relative; }
.card-plan-featured {
  border-color: var(--accent);
  box-shadow: 0 0 30px rgba(0, 229, 204, 0.15);
}
.card-plan-featured:hover {
  box-shadow: 0 0 40px rgba(0, 229, 204, 0.25);
}
.plan-badge {
  position: absolute;
  top: -10px;
  right: 1rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent);
  background: rgba(0, 229, 204, 0.15);
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  border: 1px solid var(--border);
}
.plan-name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  text-shadow: 0 0 15px var(--accent-glow);
  margin-bottom: 0.75rem;
}
.plan-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.plan-specs span {
  padding: 0.2rem 0.5rem;
  background: rgba(0, 229, 204, 0.1);
  border-radius: 4px;
  border: 1px solid var(--border);
}
.plan-desc {
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
}

/* ===== Community & Contact sections ===== */
.section-community .container,
.section-contact .container {
  text-align: center;
}

.section-projects .container {
  text-align: center;
}

/* Features list (landing) */
.features-list {
  list-style: none;
  max-width: 480px;
  margin: 0 auto;
  text-align: left;
}

.features-list li {
  padding: 0.6rem 0;
  padding-left: 1.5rem;
  position: relative;
  color: var(--text);
}

.features-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-glow);
}

/* ===== Footer ===== */
.footer {
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem;
  margin-top: 4rem;
}

.footer .container {
  max-width: 1280px;
  margin: 0 auto;
  text-align: center;
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
  text-shadow: 0 0 15px var(--accent-glow);
  margin-bottom: 0.5rem;
}

.footer-copy {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ===== Page Connexion ===== */
.login-main {
  min-height: calc(100vh - 60px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 1.5rem 4rem;
}
.login-section {
  width: 100%;
  max-width: 400px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 0 40px rgba(0, 229, 204, 0.08);
}
.login-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  text-shadow: 0 0 20px var(--accent-glow);
  margin-bottom: 0.5rem;
}
.login-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}
.login-form .form-group {
  margin-bottom: 1.25rem;
}
.login-form label {
  display: block;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}
.login-form input[type="email"],
.login-form input[type="password"],
.login-form input[type="text"] {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: border-color 0.2s;
}
.form-optional {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 400;
}
.form-hint {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}
.login-register-link,
.register-login-link {
  text-align: center;
  margin-top: 1.25rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}
.login-register-link a,
.register-login-link a {
  color: var(--accent);
  text-decoration: none;
}
.login-register-link a:hover,
.register-login-link a:hover {
  text-decoration: underline;
}
.login-form input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(0, 229, 204, 0.2);
}
.login-form input::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}
.login-error {
  color: #f44336;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}
.settings-success {
  color: #4caf50;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}
.btn-block {
  width: 100%;
  margin-top: 0.5rem;
}

/* ===== Mobile menu ===== */
@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: rgba(13, 15, 18, 0.98);
    backdrop-filter: blur(12px);
    flex-direction: column;
    padding: 1.5rem;
    gap: 1rem;
    border-bottom: 1px solid var(--border);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }

  .nav-links.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-toggle {
    display: flex;
  }

  .hero {
    padding-top: 5rem;
  }

  .hero-cta {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    max-width: 280px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero-title {
    letter-spacing: 0.08em;
  }

  .cards {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   PANEL (dashboard)
   ============================================ */
.panel-body {
  padding-top: 56px;
}

.grid-bg-panel {
  mask-image: none;
  -webkit-mask-image: none;
}

.panel-glow {
  position: fixed;
  pointer-events: none;
  z-index: 0;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.15;
}
.panel-glow-1 {
  width: 400px;
  height: 400px;
  background: var(--accent);
  top: -100px;
  right: -100px;
}
.panel-glow-2 {
  width: 300px;
  height: 300px;
  background: var(--accent);
  bottom: 20%;
  left: -80px;
  opacity: 0.08;
}

.header-panel .nav {
  max-width: none;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.panel-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--accent);
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  margin-left: 1rem;
  box-shadow: 0 0 20px rgba(0, 229, 204, 0.15);
}
.panel-badge-dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: panel-dot-pulse 2s ease-in-out infinite;
}
@keyframes panel-dot-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 var(--accent-glow); }
  50% { opacity: 0.8; box-shadow: 0 0 0 4px transparent; }
}

.nav-user-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(0, 229, 204, 0.2);
  border: 1px solid var(--border);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  margin-right: 0.4rem;
  vertical-align: middle;
}

.panel-layout {
  display: flex;
  min-height: calc(100vh - 56px);
}

/* Sidebar */
.panel-sidebar {
  width: 260px;
  min-width: 260px;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  padding: 1.5rem 0;
  flex-shrink: 0;
}

.sidebar-section {
  margin-bottom: 1.5rem;
}

.sidebar-title {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  text-transform: uppercase;
  padding: 0 1.25rem;
  margin-bottom: 0.75rem;
}

.server-picker {
  display: grid;
  gap: 0.45rem;
  padding: 0 1.25rem;
  margin-bottom: 0.6rem;
}

.server-search-input {
  width: 100%;
  height: 34px;
  padding: 0 0.65rem;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #070b10;
  color: var(--text);
  font-size: 0.85rem;
}

#server-dropdown {
  background: #070b10;
  color: #e6f1ff;
}

#server-dropdown option {
  background: #070b10;
  color: #e6f1ff;
}

.server-search-input::placeholder {
  color: var(--text-muted);
  opacity: 0.8;
}

.server-search-input:focus {
  outline: none;
  border-color: rgba(0, 229, 204, 0.45);
  box-shadow: 0 0 0 2px rgba(0, 229, 204, 0.13);
}
.server-list-hidden {
  display: none;
}

.server-list,
.panel-nav {
  list-style: none;
}

.server-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.6rem 1.25rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
  border-left: 3px solid transparent;
}
.server-status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.server-status-online {
  background: #4caf50;
  box-shadow: 0 0 8px rgba(76, 175, 80, 0.6);
}
.server-status-starting {
  background: #ff9800;
  box-shadow: 0 0 8px rgba(255, 152, 0, 0.6);
}
.server-status-offline {
  background: #f44336;
  box-shadow: 0 0 8px rgba(244, 67, 54, 0.5);
}
.server-list-loading,
.server-list-empty {
  padding: 0.6rem 1.25rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.server-item-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.panel-nav-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.6rem 1.25rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
  border-left: 3px solid transparent;
}
.panel-nav-icon {
  font-size: 0.85rem;
  opacity: 0.8;
  width: 1.2em;
  text-align: center;
}

.server-item:hover,
.panel-nav-item:hover {
  color: var(--text);
  background: rgba(0, 229, 204, 0.05);
}

.server-item.active,
.panel-nav-item.active {
  color: var(--accent);
  border-left-color: var(--accent);
  background: rgba(0, 229, 204, 0.08);
}

/* Panel hero (banner serveur) */
.panel-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1.5rem 1.75rem;
  margin: -0.5rem -0.5rem 1.5rem -0.5rem;
  background: linear-gradient(135deg, rgba(0, 229, 204, 0.08) 0%, rgba(0, 229, 204, 0.02) 100%);
  border: 1px solid var(--border);
  border-radius: 12px;
  position: relative;
  overflow: hidden;
}
.panel-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.6;
}
.panel-hero-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.05em;
  margin: 0 0 0.35rem 0;
}
.panel-hero-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.panel-hero-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
}
.panel-hero-status-online {
  color: #4caf50;
  background: rgba(76, 175, 80, 0.15);
  border: 1px solid rgba(76, 175, 80, 0.4);
}
.status-pulse {
  width: 6px;
  height: 6px;
  background: currentColor;
  border-radius: 50%;
  animation: status-pulse 1.5s ease-in-out infinite;
}
@keyframes status-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.2); }
}
.panel-hero-id {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.panel-hero-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.btn-hero {
  padding: 0.6rem 1.25rem;
  font-size: 0.9rem;
}
.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
}

/* Main content */
.panel-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 1.5rem;
}

.panel-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.panel-view-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
}

.panel-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-small {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

.btn-danger {
  border-color: #e53935;
  color: #ff6b6b;
}

.btn-danger:hover {
  background: rgba(229, 57, 53, 0.15);
  color: #ff6b6b;
}

.panel-content {
  flex: 1;
  background: rgba(20, 23, 28, 0.6);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  overflow: auto;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

.panel-view {
  display: none;
}

.panel-view.active {
  display: block;
}

/* Console */
.console-wrap {
  background: #0a0c0e;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.console-header {
  padding: 0.5rem 1rem;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.console-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
}

.console-dot:first-child { background: #00e5cc; box-shadow: 0 0 8px var(--accent); }
.console-title {
  margin-left: 0.5rem;
  font-size: 0.8rem;
}
.console-scanline {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.03) 2px,
    rgba(0, 0, 0, 0.03) 4px
  );
  border-radius: 0 0 8px 8px;
}
.console-wrap {
  position: relative;
}

.console-iframe-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 420px;
}
.console-iframe-hint {
  margin: 0 0 0.75rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}
.console-embedded-wrap {
  flex: 1;
  min-height: 360px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.console-iframe-wrap:not(.has-server) .console-embedded-wrap {
  display: none;
}
.console-embedded-wrap .console-output {
  flex: 1;
  max-height: 480px;
  min-height: 260px;
}
.console-iframe-wrap.has-server .console-iframe-hint {
  display: block;
  margin-bottom: 0.5rem;
}
.console-iframe-login-hint {
  margin: 0.75rem 0 0;
  color: var(--text-muted);
  font-size: 0.8rem;
  opacity: 0.85;
}

.console-output {
  padding: 1.25rem 1.5rem;
  margin: 0;
  font-family: 'JetBrains Mono', 'Consolas', monospace;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text);
  min-height: 260px;
  max-height: 480px;
  overflow-x: hidden;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.console-output code {
  color: inherit;
  white-space: pre-wrap;
  word-break: break-word;
}
.console-line {
  display: block;
  color: var(--text-muted);
  white-space: pre-wrap;
  word-break: break-word;
}
.console-line-success {
  color: #4caf50;
  text-shadow: 0 0 10px rgba(76, 175, 80, 0.3);
}
.console-line-error {
  color: #ff8a80;
  background: rgba(255, 82, 82, 0.08);
  border-left: 2px solid rgba(255, 82, 82, 0.45);
  padding-left: 0.45rem;
}
.console-line-warn {
  color: #ffd180;
  background: rgba(255, 171, 64, 0.08);
  border-left: 2px solid rgba(255, 171, 64, 0.45);
  padding-left: 0.45rem;
}
.console-line-info {
  color: #81d4fa;
}
.console-line-command {
  color: #d1c4e9;
}
.console-line-system {
  color: var(--accent);
  opacity: 0.9;
}
.console-line.console-input {
  color: var(--text-muted);
}
.console-ansi-part { white-space: pre-wrap; }
.console-ansi-bold { font-weight: 700; }
/* Palette ANSI ajustée pour un fond console sombre */
.console-ansi-black { color: #8c95a3; } /* évite le noir invisible */
.console-ansi-red { color: #ef9a9a; }
.console-ansi-green { color: #a5d6a7; }
.console-ansi-yellow { color: #ffe082; }
.console-ansi-blue { color: #90caf9; }
.console-ansi-magenta { color: #ce93d8; }
.console-ansi-cyan { color: #80deea; }
.console-ansi-white { color: #e8edf3; }
.console-ansi-bright-black { color: #b0b8c4; }
.console-ansi-bright-red { color: #ffab91; }
.console-ansi-bright-green { color: #c5e1a5; }
.console-ansi-bright-yellow { color: #fff59d; }
.console-ansi-bright-blue { color: #9fa8da; }
.console-ansi-bright-magenta { color: #f48fb1; }
.console-ansi-bright-cyan { color: #b2ebf2; }
.console-ansi-bright-white { color: #ffffff; }
.console-cursor {
  display: inline-block;
  color: var(--accent);
  animation: console-blink 1s step-end infinite;
}
@keyframes console-blink {
  50% { opacity: 0; }
}

.console-input-wrap {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
  gap: 0.5rem;
}

.console-prompt {
  color: var(--accent);
  font-family: monospace;
}

.console-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text);
  font-family: monospace;
  font-size: 0.9rem;
  outline: none;
}

.console-input::placeholder {
  color: var(--text-muted);
}

/* Dashboard */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-bottom: 2rem;
}
.dashboard-card {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.dashboard-card:hover {
  border-color: rgba(0, 229, 204, 0.3);
  box-shadow: 0 0 20px rgba(0, 229, 204, 0.05);
}
.dashboard-card-wide {
  grid-column: 1 / -1;
}
.dashboard-card-title {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.dashboard-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.dashboard-stat {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto auto;
  gap: 0.25rem 1rem;
  align-items: center;
}
.dashboard-stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.dashboard-stat-bar-wrap {
  grid-column: 1 / -1;
  height: 8px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 4px;
  overflow: hidden;
}
.dashboard-stat-bar {
  height: 100%;
  width: calc(var(--value) * 1%);
  background: linear-gradient(90deg, var(--accent), var(--accent-dim));
  border-radius: 4px;
  transition: width 0.5s ease;
  box-shadow: 0 0 12px var(--accent-glow);
}
.dashboard-stat-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  color: var(--text);
}
.dashboard-status-big {
  font-size: 1.25rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.dashboard-number {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  text-shadow: 0 0 20px var(--accent-glow);
}

.dashboard-copy-address {
  display: inline-block;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-align: left;
  position: relative;
  transition: opacity 0.2s;
}
.dashboard-copy-address:hover {
  opacity: 0.9;
}
.dashboard-copy-address:focus {
  outline: 1px solid var(--accent);
  outline-offset: 4px;
}
.dashboard-copy-feedback {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  pointer-events: none;
  color: #4caf50;
  transition: opacity 0.2s;
}
.dashboard-copy-address.copied .dashboard-copy-text {
  opacity: 0;
}
.dashboard-copy-address.copied .dashboard-copy-feedback {
  opacity: 1;
}
.dashboard-card-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
}
.dashboard-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.dashboard-activity {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.activity-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.activity-list li {
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  font-size: 0.95rem;
  color: var(--text);
}
.activity-list li:last-child { border-bottom: none; }
.activity-list-empty {
  padding: 0.6rem 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.activity-time {
  display: inline-block;
  min-width: 100px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-right: 0.5rem;
}
.activities-full-wrap {
  max-width: 720px;
}
.activities-full-wrap .dashboard-card-title {
  margin-bottom: 0.25rem;
}
.activities-hint {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.activity-list-full {
  margin-top: 0.5rem;
}

/* Control (stats) */
.control-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}
.control-card {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  transition: border-color 0.2s;
}
.control-card:hover {
  border-color: rgba(0, 229, 204, 0.25);
}
.control-card-big {
  grid-column: 1 / -1;
}
.control-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.control-uptime {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
}
.control-progress {
  height: 8px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 4px;
  overflow: hidden;
  margin: 0.5rem 0;
}
.control-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-dim));
  border-radius: 4px;
  transition: width 0.4s ease;
  box-shadow: 0 0 10px var(--accent-glow);
}
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
}
.control-actions-block {
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.control-actions-title {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.control-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.control-label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.control-value {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--text);
}

.status-online {
  color: #4caf50;
}

/* Files */
#view-files.panel-view.active {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 0;
}

.files-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  padding: 0.75rem 0 1rem 0;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
  flex-shrink: 0;
  width: 100%;
  box-sizing: border-box;
}

.files-path-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  min-width: 200px;
}
.files-path-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  white-space: nowrap;
}
.files-path {
  flex: 1;
  min-width: 120px;
  padding: 0.5rem 0.75rem;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
}
.file-col-name { min-width: 0; }
.file-col-size { min-width: 80px; text-align: right; }
.file-col-date { min-width: 140px; color: var(--text-muted); font-size: 0.85rem; }
.file-row.dir .file-col-name { color: var(--accent); }
.file-row:not(.header):hover {
  background: rgba(0, 229, 204, 0.05);
  cursor: pointer;
}

.files-list {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  width: 100%;
  box-sizing: border-box;
  margin-top: 0.25rem;
}

.file-row {
  display: grid;
  grid-template-columns: 36px 2fr 1fr 1fr;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  align-items: center;
}
.file-col-check {
  display: flex;
  align-items: center;
  justify-content: center;
}
.file-row input[type="checkbox"] {
  margin: 0;
  cursor: pointer;
}
.file-row.selected {
  background: rgba(0, 229, 204, 0.12);
}
.files-list-body {
  max-height: 420px;
  overflow-y: auto;
}
.files-list-empty {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.file-row.file-row-dir {
  cursor: pointer;
}

.files-editor {
  margin-top: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.35);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.files-editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.75rem;
  background: rgba(0, 0, 0, 0.35);
  border-bottom: 1px solid var(--border);
  gap: 0.75rem;
  flex-shrink: 0;
}
.files-editor-path-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  font-size: 0.85rem;
}
.files-editor-path-label {
  color: var(--text-muted);
}
.files-editor-path {
  font-family: 'JetBrains Mono', monospace;
  color: var(--accent);
  word-break: break-all;
}
.files-editor-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.files-editor-mode {
  padding: 0.35rem 0.6rem;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 4px;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.8rem;
}
.files-editor-body {
  padding: 0.5rem 0.75rem 0.75rem;
  display: flex;
  flex-direction: column;
}
/* ~30 lignes visibles, le reste en scroll (1.5 line-height × 0.9rem ≈ 21px/ligne → 30 × 21 ≈ 630px) */
.files-editor-body .CodeMirror-wrap,
.files-editor-body .CodeMirror {
  height: 630px;
  max-height: 630px;
  border-radius: 6px;
  border: 1px solid var(--border);
}
.files-editor-body .CodeMirror-scroll {
  max-height: 630px;
}
.files-editor-body .CodeMirror {
  font-size: 0.9rem;
  line-height: 1.5;
}
.files-editor-text {
  width: 100%;
  height: 630px;
  max-height: 630px;
  min-height: 200px;
  padding: 0.75rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #050608;
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  line-height: 1.5;
  white-space: pre;
  overflow: auto;
}
.files-editor-body.hide-textarea .files-editor-text {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.file-row:last-child {
  border-bottom: none;
}

.file-row.header {
  background: rgba(0, 0, 0, 0.2);
  color: var(--text-muted);
  font-size: 0.8rem;
}

.file-row.dir span:first-child {
  color: var(--accent);
}

.panel-hint {
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Modals (fichiers) */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.modal-overlay[aria-hidden="false"] {
  display: flex;
}
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  min-width: 320px;
  max-width: 90vw;
}
.modal-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--text);
}
.modal-body {
  margin-bottom: 1rem;
}
.modal-body input[type="text"],
.modal-body input[type="number"] {
  width: 100%;
  padding: 0.5rem 0.75rem;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 0.95rem;
}
.modal-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}

.panel-ptero-hint {
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  background: rgba(0, 200, 180, 0.08);
  border: 1px solid rgba(0, 200, 180, 0.2);
  border-radius: 6px;
}
.panel-ptero-hint a {
  color: var(--accent);
  font-weight: 600;
}

.settings-onboarding {
  margin-bottom: 1.5rem;
  padding: 1rem 1.25rem;
  background: rgba(0, 200, 180, 0.06);
  border: 1px solid rgba(0, 200, 180, 0.25);
  border-radius: 8px;
}
.settings-steps {
  margin: 0.75rem 0 1rem 1.25rem;
  padding: 0;
  color: var(--text-muted);
}
.settings-steps li {
  margin-bottom: 0.35rem;
}
.settings-section-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent);
  margin: 1.5rem 0 0.5rem;
  font-family: var(--font-body);
}
.settings-section-title:first-of-type { margin-top: 0; }
.settings-ptero-profile { margin-bottom: 1.5rem; }
.settings-ptero-ok {
  padding: 0.75rem 1rem;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 8px;
  color: var(--text);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

/* Databases */
.db-toolbar,
.schedules-toolbar,
.users-toolbar,
.backups-toolbar {
  margin-bottom: 1rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.backups-list-empty {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* SFTP */
.sftp-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.sftp-card {
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color 0.2s;
}
.sftp-card:hover {
  border-color: rgba(0, 229, 204, 0.25);
}
.sftp-card.sftp-card-actions {
  display: flex;
  align-items: center;
  justify-content: center;
}
.sftp-label {
  display: block;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
}
.sftp-value {
  font-size: 1.05rem;
  color: var(--text);
  word-break: break-all;
}
.sftp-value-monospace {
  font-family: var(--font-mono), monospace;
}
.sftp-hint {
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
}
#sftp-launch-btn {
  text-decoration: none;
  cursor: pointer;
}

.db-list,
.schedules-list,
.users-list,
.backups-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.db-item,
.schedule-item,
.user-item,
.backup-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color 0.2s;
}
.db-item:hover,
.schedule-item:hover,
.user-item:hover,
.backup-item:hover {
  border-color: rgba(0, 229, 204, 0.2);
}
.db-item-main,
.schedule-item-main,
.user-item-main,
.backup-item-main {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
  min-width: 0;
}
.db-item-actions,
.schedule-item-actions,
.backup-item-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.db-item-empty {
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.95rem;
}
.db-name,
.schedule-name {
  font-weight: 600;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1rem;
}

.db-info,
.schedule-cron,
.schedule-desc,
.user-perms,
.backup-item .backup-item-main {
  flex-direction: column;
  align-items: flex-start;
}
.backup-meta {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.schedules-list-empty {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
}
.hidden { display: none !important; }
.schedule-cron-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.schedule-options { margin-bottom: 1rem; }
.schedule-check-wrap {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  cursor: pointer;
}
.schedule-check-wrap input { margin-right: 0.5rem; }
/* Cartes liste schedules (style Pterodactyl) */
.schedule-card {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 0.75rem;
}
.schedule-card-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  flex: 1 1 200px;
}
.schedule-card-icon { font-size: 1.25rem; opacity: 0.8; }
.schedule-card-meta { display: flex; flex-direction: column; gap: 0.25rem; }
.schedule-last-run { font-size: 0.85rem; color: var(--text-muted); }
.schedule-card-cron {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: flex-start;
}
.schedule-cron-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 50px;
}
.schedule-cron-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}
.schedule-cron-value {
  font-size: 0.95rem;
  font-weight: 600;
  font-family: var(--font-mono), monospace;
  color: var(--accent);
}
.schedule-badge {
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.schedule-badge-active { background: rgba(34, 197, 94, 0.2); color: #22c55e; border: 1px solid rgba(34, 197, 94, 0.4); }
.schedule-badge-inactive { background: rgba(156, 163, 175, 0.2); color: var(--text-muted); }
.schedule-item-actions { display: flex; gap: 0.5rem; flex-shrink: 0; }
/* Vue détail schedule */
.schedule-detail-header { margin-bottom: 1rem; }
.schedule-detail-title-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}
.schedule-detail-modal .modal-title { margin-bottom: 0; }
.schedule-detail-badge {
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}
.schedule-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.schedule-detail-header-actions { display: flex; gap: 0.5rem; margin-bottom: 1rem; }
.schedule-detail-cron-boxes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  border: 1px solid var(--border);
}
.schedule-detail-cron-box {
  flex: 1 1 80px;
  min-width: 70px;
  padding: 0.5rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  text-align: center;
}
.schedule-detail-cron-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}
.schedule-detail-cron-value {
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font-mono), monospace;
  color: var(--accent);
}
.btn-link-style { background: transparent; border: none; color: var(--text-muted); }
.btn-link-style:hover { color: #ef4444; text-decoration: underline; }
.schedule-detail-actions { margin-bottom: 1rem; }
.schedule-detail-status { font-weight: 500; }
.schedule-tasks-title { font-size: 0.95rem; margin: 1rem 0 0.5rem; }
.schedule-tasks-list { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1rem; }
.schedule-task-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  font-size: 0.9rem;
}
.schedule-task-row .task-action { font-weight: 500; min-width: 80px; }
.schedule-task-row .task-payload { flex: 1; min-width: 0; word-break: break-all; color: var(--text-muted); }
.schedule-task-row .task-offset { color: var(--text-muted); font-size: 0.85rem; }
/* Modal tâche (style Pterodactyl) */
.schedule-task-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin: 1rem 0 0.35rem;
}
.schedule-task-label:first-child { margin-top: 0; }
.schedule-task-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0.35rem 0 0;
  line-height: 1.4;
}
.schedule-task-textarea {
  min-height: 80px;
  resize: vertical;
}
.schedule-task-toggle-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  margin: 0.5rem 0;
}
.schedule-task-toggle {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.schedule-task-toggle-slider {
  position: relative;
  width: 44px;
  height: 24px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 24px;
  transition: background 0.2s;
}
.schedule-task-toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: transform 0.2s;
}
.schedule-task-toggle:checked + .schedule-task-toggle-slider {
  background: rgba(0, 229, 204, 0.3);
  border: 1px solid var(--accent);
}
.schedule-task-toggle:checked + .schedule-task-toggle-slider::before {
  transform: translateX(20px);
  background: var(--accent);
}

.db-toolbar a.btn {
  color: inherit;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: transparent;
}
.db-toolbar a.btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.6);
}
.db-list-header {
  margin-bottom: 0.75rem;
}
.db-list-count {
  font-size: 0.9rem;
  color: var(--text-muted);
}
.db-list-empty {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
}
.db-list-body { display: flex; flex-direction: column; gap: 0.75rem; }
.db-form-label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.db-form-input {
  width: 100%;
  margin-bottom: 1rem;
  padding: 0.5rem 0.75rem;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 0.95rem;
  box-sizing: border-box;
}
.db-info-grid { display: flex; flex-direction: column; gap: 0.75rem; }
.db-info-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.db-info-label { min-width: 120px; font-size: 0.9rem; color: var(--text-muted); }
.db-info-value {
  flex: 1;
  min-width: 0;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  word-break: break-all;
}
.db-info-value.db-info-password { font-family: var(--font-mono); }
.db-info-hint { margin-top: 1rem; font-size: 0.85rem; color: var(--text-muted); }
.modal.modal-wide { max-width: 520px; }
.modal.modal-schedule-with-help { max-width: 780px; }
.schedule-modal-body {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}
.schedule-modal-form { flex: 1; min-width: 0; }
.schedule-cron-help {
  flex-shrink: 0;
  width: 280px;
  padding: 0.75rem;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 8px;
  border: 1px solid var(--border);
}
.schedule-cron-help-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 0.5rem;
  font-family: var(--font-body);
}
.schedule-cron-help-title:not(:first-child) { margin-top: 1rem; }
.schedule-cron-help-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.schedule-cron-help-table td {
  padding: 0.25rem 0.5rem 0.25rem 0;
  vertical-align: top;
}
.schedule-cron-help-table td:first-child { white-space: nowrap; }
.schedule-cron-help-table code {
  font-family: var(--font-mono), monospace;
  font-size: 0.8rem;
  color: var(--accent);
  background: rgba(0, 229, 204, 0.1);
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
}
@media (max-width: 700px) {
  .schedule-modal-body { flex-direction: column; }
  .schedule-cron-help { width: 100%; }
}
.btn-copy { flex-shrink: 0; }

/* Vue Utilisateurs */
.users-list-empty {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
}
.users-list { display: flex; flex-direction: column; gap: 0.75rem; }
.user-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.user-item-main { display: flex; align-items: center; gap: 0.75rem; }
.user-perms-summary { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.2rem; }
.modal-overlay-scroll { overflow-y: auto; }
.modal-users .modal-body { max-height: 70vh; overflow-y: auto; }
.user-modal-body .db-form-input { margin-bottom: 0.5rem; }
.user-perms-sections { margin-top: 1.5rem; }
.user-perms-section {
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.user-perms-section:last-child { border-bottom: none; }
.user-perms-head {
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--accent);
  margin: 0 0 0.35rem;
}
.user-perms-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  line-height: 1.4;
}
.user-perm-row {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  cursor: pointer;
}
.user-perm-row input { margin-right: 0.5rem; }

.user-email { font-weight: 500; color: var(--text); }
.backup-name { font-weight: 500; color: var(--text); }
.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0, 229, 204, 0.15);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
}
.schedule-next {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-right: 0.5rem;
}

/* Network */
.network-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}
.network-card {
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  transition: border-color 0.2s;
}
.network-card:hover {
  border-color: rgba(0, 229, 204, 0.25);
}
.network-value-big {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.1rem;
  color: var(--accent);
  word-break: break-all;
}
.network-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.network-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.network-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.network-label {
  color: var(--text-muted);
  min-width: 120px;
}
.network-value,
.network-addr {
  font-family: 'JetBrains Mono', monospace;
  color: var(--accent);
}

/* Startup */
.startup-form {
  max-width: 640px;
}

.startup-label {
  display: block;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  margin-top: 1rem;
}

.startup-label:first-child {
  margin-top: 0;
}

.startup-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-family: monospace;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.startup-vars {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.var-row {
  display: flex;
  justify-content: space-between;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.var-row:last-child {
  border-bottom: none;
}

.var-row span:first-child {
  color: var(--accent);
  font-family: monospace;
}

/* Panel responsive */
@media (max-width: 900px) {
  .panel-sidebar {
    width: 220px;
    min-width: 220px;
  }
}

@media (max-width: 900px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-stats-row {
    grid-template-columns: 1fr;
  }
  .panel-hero {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 768px) {
  .panel-layout {
    flex-direction: column;
  }

  .panel-sidebar {
    width: 100%;
    min-width: 0;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 1rem;
  }

  .sidebar-section {
    margin-bottom: 1rem;
  }

  .server-list,
  .panel-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .server-item,
  .panel-nav-item {
    padding: 0.5rem 0.75rem;
    border-left: none;
    border-radius: 6px;
    display: inline-block;
    width: auto;
  }

  .server-item.active,
  .panel-nav-item.active {
    border-left: none;
    background: rgba(0, 229, 204, 0.15);
  }
}
