/* ============================================================
   TOVARI – components.css
   Wiederverwendbare UI-Komponenten die auf mehreren Seiten
   vorkommen: Login-Box, Seiten-Header, Passwort-Toggle usw.
   ============================================================ */

/* --- Seiten-Header (Titel + Untertitel oben auf jeder Seite) --- */
.page-header {
  text-align: center;
  margin-bottom: 50px;
  animation: fadeInDown 0.8s ease;
  position: relative;
  z-index: 10;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-30px); }
  to   { opacity: 1; transform: translateY(0); }
}

.page-header h1 {
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 16px;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}

.page-header p {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.9);
  max-width: 600px;
  margin: 0 auto;
}

/* --- Auth-Box (Login / Register / Passwort-Vergessen) --- */
.auth-box {
  background: var(--color-bg-card-deep);
  backdrop-filter: blur(20px);
  border: 1px solid var(--color-border);
  padding: 48px 40px;
  border-radius: var(--radius-xl);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(123, 97, 255, 0.1);
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  text-align: center;
  animation: fadeInUp 0.5s ease-out;
}

/* Obere Glow-Linie */
.auth-box::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(123, 97, 255, 0.8), transparent);
}

.auth-box h2 {
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 32px;
  letter-spacing: -0.02em;
}

.auth-box p {
  font-size: 14px;
  color: var(--color-text-muted);
  line-height: 1.6;
}

.auth-box a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition-normal);
}

.auth-box a:hover {
  color: var(--color-primary-light);
}

/* Passwort-Feld mit Toggle-Button */
.password-wrapper {
  position: relative;
  margin: 12px 0;
}

.password-wrapper + .password-wrapper {
  margin-top: 24px;
}

.password-wrapper input {
  margin: 0;
  padding-right: 50px;
}

.password-toggle {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  cursor: pointer;
  color: rgba(123, 97, 255, 0.6);
  transition: var(--transition-normal);
  background: none;
  border: none;
  padding: 0;
  display: flex;
  align-items: center;
}

.password-toggle:hover {
  color: var(--color-primary);
}

/* Button mit Shimmer-Effekt (wie in Login) */
.btn-shimmer {
  position: relative;
  overflow: hidden;
}

.btn-shimmer::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent);
  transition: left 0.6s ease;
}

.btn-shimmer:hover::after {
  left: 100%;
}

/* --- Erfolgs-Anzeige (nach Login, nach Bestellen etc.) --- */
.success-view {
  text-align: center;
}

.success-icon {
  width: 80px;
  height: 80px;
  background: var(--gradient-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 32px;
  box-shadow: var(--shadow-glow);
  animation: pulse-glow 2s infinite;
}

.success-icon svg {
  width: 48px;
  height: 48px;
  stroke: white;
  stroke-width: 3;
  fill: none;
}

.success-title {
  font-size: 26px;
  font-weight: 600;
  margin-bottom: 12px;
}

.success-subtitle {
  font-size: 16px;
  color: var(--color-text-muted);
  margin-bottom: 40px;
}

/* --- Dashboard Stats Karte --- */
.stat-card {
  background: var(--color-bg-card);
  padding: 30px;
  border-radius: var(--radius-lg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--color-border);
  transition: var(--transition-normal);
}

.stat-card:hover {
  transform: translateY(-5px);
  border-color: var(--color-primary);
  box-shadow: var(--shadow-card);
}

.stat-card h3 {
  font-size: 0.85rem;
  color: #a78bfa;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.stat-card .stat-value {
  font-size: 2.5rem;
  font-weight: bold;
  color: var(--color-primary);
}

/* --- Server-Karte --- */
.server-card {
  background: var(--color-bg-card);
  padding: 30px;
  border-radius: var(--radius-lg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--color-border);
  margin-bottom: 20px;
  animation: fadeInUp 0.5s ease-out;
  transition: var(--transition-normal);
}

.server-card:hover {
  border-color: var(--color-primary);
  box-shadow: 0 10px 30px rgba(139, 92, 246, 0.2);
}

.server-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--color-border);
}

.server-name {
  font-size: 1.5rem;
  color: var(--color-text);
  margin-bottom: 4px;
}

.server-plan {
  color: #a78bfa;
  font-size: 0.9rem;
}

/* Server Action Buttons */
.server-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
}

/* --- Resource Monitor (CPU/RAM/Disk) --- */
.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 20px 0;
}

.resource-item {
  background: var(--color-primary-soft);
  padding: 14px;
  border-radius: var(--radius-sm);
}

.resource-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.resource-label { color: #a78bfa; font-size: 0.9rem; }
.resource-value { color: var(--color-text); font-weight: 600; }

/* --- Tab/Slider Navigation (wie auf Angebote-Seite) --- */
.tab-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  max-width: 400px;
  margin: 0 auto 60px;
}

.tab-nav::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(19, 19, 45, 0.4);
  backdrop-filter: blur(10px);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  z-index: 0;
}

.tab-btn {
  flex: 1;
  padding: 16px 32px;
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.6);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  z-index: 2;
  transition: color 0.3s ease;
  text-align: center;
}

.tab-btn.active { color: #fff; }
.tab-btn:hover  { color: rgba(255,255,255,0.9); }

.tab-nav-slider {
  position: absolute;
  top: 0; left: 0;
  width: 50%; height: 100%;
  background: var(--gradient-primary);
  border-radius: var(--radius-md);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
  box-shadow: 0 8px 25px rgba(123, 97, 255, 0.4);
}

.tab-nav-slider.right { transform: translateX(100%); }

/* --- Loading Spinner --- */
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 40px auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .auth-box {
    padding: 32px 24px;
    margin: 20px;
    max-width: none;
  }

  .page-header h1 { font-size: 32px; }
  .page-header p  { font-size: 16px; }

  .server-card-header { flex-direction: column; gap: 12px; align-items: flex-start; }
  .server-actions     { gap: 8px; }
}
