:root {
  --von-primary: #4f46e5;
  /* Indigo 600 */
  --von-primary-hover: #4338ca;
  /* Indigo 700 */
  --von-bg: #f1f5f9;
  /* Slate 100 */
  --von-card-bg: #ffffff;
  --von-text: #1e293b;
  /* Slate 800 */
  --von-text-muted: #64748b;
  /* Slate 500 */
  --von-border: #e2e8f0;
  /* Slate 200 */
  --von-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --von-radius: 12px;
  --von-transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base resets & typography */
.von-dashboard-wrapper {
  max-width: 1200px;
  /* Wider for sidebar layout */
  margin: 40px auto;
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
  color: var(--von-text);
  line-height: 1.5;
  box-sizing: border-box;
  padding: 0 20px;
}

.von-dashboard-wrapper * {
  box-sizing: border-box;
}

/* Header */
.von-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 30px;
  background: transparent;
}

.von-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 24px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.5px;
}

.von-logo svg {
  width: 32px;
  height: 32px;
  color: var(--von-primary);
  filter: drop-shadow(0 2px 4px rgba(79, 70, 229, 0.2));
}

.von-badge-premium {
  background: linear-gradient(135deg, #fce7f3 0%, #fae8ff 100%);
  color: #db2777;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 0.5px;
  margin-left: 10px;
  border: 1px solid rgba(219, 39, 119, 0.1);
}

/* Sidebar Layout */
.von-admin-layout {
  display: flex;
  gap: 30px;
  align-items: flex-start;
}

.von-sidebar {
  width: 240px;
  flex-shrink: 0;
  position: sticky;
  top: 40px;
}

.von-main-content {
  flex-grow: 1;
  min-width: 0;
  /* Prevents overflow in flexbox */
}

/* Navigation */
.von-tabs-nav {
  display: flex;
  flex-direction: column;
  /* Vertical Sidebar */
  gap: 4px;
}

.von-tab-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: transparent;
  color: var(--von-text-muted);
  font-weight: 500;
  font-size: 14px;
  text-decoration: none;
  border-radius: 10px;
  transition: var(--von-transition);
  border: 1px solid transparent;
}

.von-tab-link .dashicons {
  font-size: 20px;
  width: 20px;
  height: 20px;
  line-height: 20px;
}

.von-tab-link:hover {
  background: rgba(79, 70, 229, 0.05);
  color: var(--von-primary);
}

.von-tab-link.active {
  background: white;
  color: var(--von-primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  border-color: var(--von-border);
  font-weight: 600;
}

.von-tab-link:focus {
  box-shadow: none;
  outline: none;
}

/* Cards */
.von-card {
  background: var(--von-card-bg);
  border-radius: var(--von-radius);
  box-shadow: var(--von-shadow);
  border: 1px solid var(--von-border);
  margin-bottom: 24px;
  overflow: hidden;
}

.von-card-header {
  padding: 24px 30px;
  border-bottom: 1px solid var(--von-border);
  background: #f8fafc;
}

.von-card h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #0f172a;
}

.von-card-desc {
  margin: 5px 0 0 0;
  font-size: 14px;
  color: var(--von-text-muted);
}

.von-card-body {
  padding: 30px;
}

/* Forms */
.von-form-group {
  margin-bottom: 24px;
}

.von-form-group:last-child {
  margin-bottom: 0;
}

.von-form-group label {
  display: block;
  font-weight: 500;
  font-size: 14px;
  margin-bottom: 8px;
  color: #334155;
}

.von-input {
  width: 100%;
  padding: 12px 16px;
  font-size: 15px;
  border: 1px solid var(--von-border);
  border-radius: 8px;
  background: #fcfcfc;
  transition: var(--von-transition);
  color: var(--von-text);
}

.von-input:focus {
  background: #ffffff;
  border-color: var(--von-primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
  outline: none;
}

textarea.von-input {
  min-height: 100px;
  resize: vertical;
}

/* Input Wrap - Integration */
.input-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.input-wrap .von-input {
  margin-bottom: 0;
}

.von-code-area {
  font-family: "Fira Code", "Consolas", monospace;
  font-size: 13px;
  background: #f8fafc;
  color: #475569;
  padding: 15px;
  border: 1px dashed #cbd5e1;
  line-height: 1.6;
}

/* Switch */
.von-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 28px;
  vertical-align: middle;
}

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

.von-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  transition: 0.3s;
  border-radius: 34px;
}

.von-slider:before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s ease;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

input:checked + .von-slider {
  background-color: var(--von-primary);
}

input:checked + .von-slider:before {
  transform: translateX(22px);
}

.von-switch-label {
  font-weight: 600;
  font-size: 15px;
  margin-left: 12px;
  vertical-align: middle;
  color: #0f172a;
}

/* Tables */
.von-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  font-size: 14px;
}

.von-table th,
.von-table td {
  text-align: left;
  padding: 12px 15px;
  border-bottom: 1px solid var(--von-border);
}

.von-table th {
  background: #f8fafc;
  color: var(--von-text-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.5px;
}

/* Buttons */
.von-form-actions {
  margin-top: 30px;
  text-align: right;
  padding: 20px 30px;
  background: #f8fafc;
  border-top: 1px solid var(--von-border);
  border-radius: 0 0 var(--von-radius) var(--von-radius);
  margin: 0 -30px -30px -30px;
  /* Offset card padding */
}

.von-btn-primary {
  background: linear-gradient(
    180deg,
    var(--von-primary) 0%,
    var(--von-primary-hover) 100%
  );
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.1),
    0 4px 12px rgba(79, 70, 229, 0.3);
  transition: var(--von-transition);
}

.von-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.1),
    0 6px 16px rgba(79, 70, 229, 0.4);
}

/* AI Magic Button Style - Compact Version */
.von-btn-ai {
  background: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
  color: white;
  border: none;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: var(--von-transition);
  box-shadow: 0 2px 8px rgba(168, 85, 247, 0.2);
  margin: 0;
  width: auto;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.von-btn-ai:hover {
  transform: translateY(-1px) scale(1.05);
  box-shadow: 0 4px 12px rgba(168, 85, 247, 0.4);
  filter: brightness(1.1);
}

.von-btn-ai.compact {
  padding: 4px 8px;
  min-width: 0;
  width: auto;
}

.von-btn-ai .dashicons {
  font-size: 14px;
  width: 14px;
  height: 14px;
  line-height: 14px;
}

.label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.label-row label {
  margin-bottom: 0 !important;
}

.von-ai-loading {
  animation: aiPulse 1.5s infinite;
}

@keyframes aiPulse {
  0% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.7;
    transform: scale(0.98);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Force centered rows */
.von-center-row {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  width: 100% !important;
}

/* ==========================================================================
   TUTORIAL SPECIFIC STYLES
   ========================================================================== */
.von-tutorial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.von-tutorial-item {
  background: #f8fafc;
  padding: 25px;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  transition: var(--von-transition);
}

.von-tutorial-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--von-shadow);
  border-color: var(--von-primary);
}

.von-tutorial-item h4 {
  margin: 0 0 12px 0;
  color: var(--von-primary);
  font-size: 16px;
}

.von-tutorial-item p {
  margin: 0;
  font-size: 14px;
  color: var(--von-text-muted);
  line-height: 1.6;
}

.von-tutorial-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-bottom: 30px;
}

.von-tutorial-checklist {
  list-style: none;
  padding: 0;
  margin: 0;
}

.von-tutorial-checklist li {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
  font-size: 14px;
}

.von-tutorial-checklist span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--von-primary);
  color: white;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.von-pro-tip {
  background: #fffbeb;
  border-left: 4px solid #f59e0b;
  padding: 20px;
  margin-bottom: 20px;
  border-radius: 0 12px 12px 0;
  font-size: 14px;
}

.von-pro-tip strong {
  display: block;
  margin-bottom: 8px;
  color: #92400e;
  font-size: 15px;
}

.von-faq-item {
  margin-bottom: 25px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--von-border);
}

.von-faq-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.faq-q {
  font-weight: 700;
  font-size: 16px;
  color: #0f172a;
  margin-bottom: 8px;
}

.faq-a {
  font-size: 14px;
  color: var(--von-text-muted);
  line-height: 1.6;
}

/* Responsive */
@media (max-width: 1024px) {
  .von-admin-layout {
    flex-direction: column;
  }

  .von-sidebar {
    width: 100%;
    position: static;
    margin-bottom: 20px;
  }

  .von-tabs-nav {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 10px;
  }

  .von-tab-link {
    white-space: nowrap;
  }
}

@media (max-width: 768px) {
  .von-tutorial-row {
    grid-template-columns: 1fr;
  }
}

/* Competitor Module Styling */
.von-competitor-intro {
  background: #f8fafc;
  padding: 15px 20px;
  border-radius: 10px;
  border-left: 4px solid var(--von-primary);
  margin-bottom: 20px;
}

.von-competitor-intro h4 {
  margin: 0 0 5px 0;
  font-size: 16px;
  color: var(--von-primary);
}

.von-competitor-intro p {
  margin: 0;
  font-size: 13px;
  color: var(--von-text-muted);
}

.competitor-table {
  margin-top: 20px;
  background: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.competitor-table td {
  font-size: 14px;
}

.competitor-table .val-gap {
  font-weight: 700;
}

.competitor-table .val-gap.good {
  color: #059669;
}

.competitor-table .val-gap.bad {
  color: #dc2626;
}

.von-ai-recommendation {
  margin-top: 25px;
  padding: 15px 20px;
  background: linear-gradient(135deg, #eff6ff 0%, #f5f3ff 100%);
  border-radius: 12px;
  border: 1px solid #dbeafe;
  font-size: 14px;
  line-height: 1.6;
  color: #1e3a8a;
}

.von-ai-recommendation strong {
  color: var(--von-primary);
}

.von-badge-ai {
  background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
  color: white;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 5px;
  vertical-align: middle;
  text-transform: uppercase;
}

/* Support & Donation Styling */
.von-support-card {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: white;
  padding: 24px 20px;
  border-radius: 20px;
  margin-top: 35px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.3),
    inset 0 1px 1px rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.von-support-card::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(79, 70, 229, 0.1) 0%,
    transparent 70%
  );
  pointer-events: none;
}

.von-support-card h4 {
  color: #fb7185;
  margin: 0 0 12px 0;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.von-support-card .dashicons-heart {
  animation: heartBeat 1.5s infinite;
  color: #ef4444;
}

.von-support-card p {
  font-size: 12px;
  color: #94a3b8;
  margin-bottom: 15px;
  line-height: 1.4;
}

.von-support-card .von-btn-donate {
  margin: 10px auto 0;
  width: fit-content;
}

.von-btn-donate {
  background: linear-gradient(180deg, #fbbf24 0%, #f59e0b 100%);
  color: #451a03;
  text-decoration: none;
  padding: 10px 24px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: var(--von-transition);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.von-btn-donate .dashicons {
  font-size: 16px;
  width: 16px;
  height: 16px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  margin: 0 !important;
}

.von-btn-donate:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
  box-shadow: 0 8px 20px rgba(245, 158, 11, 0.5);
  color: #451a03;
}

@keyframes heartBeat {
  0% {
    transform: scale(1);
  }

  15% {
    transform: scale(1.3);
  }

  30% {
    transform: scale(1);
  }

  45% {
    transform: scale(1.3);
  }

  70% {
    transform: scale(1);
  }
}
