/* Movex — dark theme, full width */
:root {
  --mvx-bg: #07080d;
  --mvx-surface: #0e1018;
  --mvx-elev: #141824;
  --mvx-border: rgba(255, 255, 255, 0.08);
  --mvx-text: #e5e7eb;
  --mvx-muted: #9ca3af;
  --mvx-accent: #5eead4;
  --mvx-accent2: #2dd4bf;
  --mvx-danger: #fb7185;
  --mvx-font: "DM Sans", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  width: 100%;
  font-family: var(--mvx-font);
  background: var(--mvx-bg);
  color: var(--mvx-text);
  -webkit-font-smoothing: antialiased;
}

.mvx-body {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.mvx-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  background-color: var(--mvx-bg);
}

.mvx-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(45, 212, 191, 0.12), transparent);
}

.mvx-header {
  position: sticky;
  top: 0;
  z-index: 40;
  width: 100%;
  border-bottom: 1px solid var(--mvx-border);
  background: rgba(7, 8, 13, 0.88);
  backdrop-filter: blur(12px);
}

.mvx-header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  width: 100%;
  padding: 0.75rem 1rem;
}

@media (min-width: 640px) {
  .mvx-header-inner {
    padding: 0.75rem 1.5rem;
  }
}

@media (min-width: 1024px) {
  .mvx-header-inner {
    padding: 0.85rem 2.5rem;
  }
}

.mvx-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: inherit;
}

.mvx-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.65rem;
  font-weight: 700;
  font-size: 0.9rem;
  color: #0a0a0a;
  background: linear-gradient(135deg, var(--mvx-accent), #0891b2);
  box-shadow: 0 8px 32px rgba(45, 212, 191, 0.25);
}

.mvx-brand-name {
  display: block;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.mvx-brand-sub {
  display: block;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--mvx-muted);
}

.mvx-nav-toggle {
  display: inline-flex;
  margin-left: auto;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  border: 1px solid var(--mvx-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--mvx-text);
  font-size: 1.25rem;
  cursor: pointer;
}

@media (min-width: 1024px) {
  .mvx-nav-toggle {
    display: none;
  }
}

.mvx-nav {
  display: none;
  flex-direction: column;
  width: 100%;
  gap: 0.25rem;
  padding: 0.5rem 0 0;
}

.mvx-nav.is-open {
  display: flex;
}

@media (min-width: 1024px) {
  .mvx-nav {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    width: auto;
    align-items: center;
    padding: 0;
    margin: 0 auto 0 1.5rem;
  }
}

.mvx-nav a {
  text-decoration: none;
  color: var(--mvx-muted);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
}

.mvx-nav a:hover {
  color: var(--mvx-text);
  background: rgba(255, 255, 255, 0.05);
}

.mvx-nav a.is-active {
  color: #ccfbf1;
  background: rgba(94, 234, 212, 0.12);
  box-shadow: 0 0 0 1px rgba(94, 234, 212, 0.25);
}

.mvx-userbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.mvx-user-pill {
  font-size: 0.75rem;
  color: var(--mvx-muted);
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--mvx-border);
  background: rgba(255, 255, 255, 0.03);
}

.mvx-badge {
  margin-left: 0.35rem;
  padding: 0.1rem 0.35rem;
  border-radius: 0.25rem;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(94, 234, 212, 0.2);
  color: #99f6e4;
}

.mvx-btn-ghost {
  text-decoration: none;
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--mvx-text);
  padding: 0.45rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid var(--mvx-border);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
}

.mvx-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
}

.mvx-main {
  position: relative;
  z-index: 1;
  flex: 1;
  width: 100%;
  padding: 1.25rem 1rem 2rem;
}

@media (min-width: 640px) {
  .mvx-main {
    padding: 1.5rem 1.5rem 2.5rem;
  }
}

@media (min-width: 1024px) {
  .mvx-main {
    padding: 2rem 2.5rem 3rem;
  }
}

.mvx-footer {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 1rem 1.25rem;
  text-align: center;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: #6b7280;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.mvx-footer-login {
  border-top: none;
  margin-top: 2rem;
  padding-bottom: 1.5rem;
  color: #52525b;
  font-size: 0.7rem;
  text-transform: none;
  letter-spacing: 0.02em;
}

/* Page */
.mvx-page-head {
  margin-bottom: 1.5rem;
}

.mvx-h1 {
  margin: 0;
  font-size: 1.65rem;
  font-weight: 600;
  letter-spacing: -0.03em;
}

@media (min-width: 640px) {
  .mvx-h1 {
    font-size: 2rem;
  }
}

.mvx-sub {
  margin: 0.35rem 0 0;
  font-size: 0.875rem;
  color: var(--mvx-muted);
}

.mvx-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1rem;
}

@media (min-width: 640px) {
  .mvx-row {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }
}

/* Stats */
.mvx-stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  width: 100%;
}

@media (min-width: 640px) {
  .mvx-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1200px) {
  .mvx-stats {
    grid-template-columns: repeat(4, 1fr);
  }
}

.mvx-stat {
  border-radius: 1rem;
  border: 1px solid var(--mvx-border);
  background: rgba(14, 16, 24, 0.85);
  padding: 1.25rem;
}

.mvx-stat-accent {
  border-color: rgba(94, 234, 212, 0.25);
  background: linear-gradient(135deg, rgba(94, 234, 212, 0.08), transparent);
}

.mvx-stat-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--mvx-muted);
}

.mvx-stat-val {
  margin-top: 0.35rem;
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.mvx-stat-hint {
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: var(--mvx-muted);
}

/* Card & table */
.mvx-card {
  border-radius: 1rem;
  border: 1px solid var(--mvx-border);
  background: rgba(14, 16, 24, 0.9);
  padding: 1.25rem;
  box-shadow: 0 0 0 1px rgba(94, 234, 212, 0.06), 0 24px 80px -40px rgba(45, 212, 191, 0.2);
}

.mvx-card-title {
  margin: 0 0 1rem;
  font-size: 1.05rem;
  font-weight: 600;
}

.mvx-narrow {
  max-width: 32rem;
  width: 100%;
}

.mvx-table-wrap {
  width: 100%;
  overflow: hidden;
  padding: 0;
}

.mvx-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.mvx-table th,
.mvx-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.mvx-table thead th {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--mvx-muted);
  font-weight: 600;
  background: rgba(255, 255, 255, 0.02);
}

.mvx-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.mvx-mono {
  font-family: ui-monospace, monospace;
  font-size: 0.75rem;
  color: var(--mvx-muted);
}

.mvx-muted {
  color: var(--mvx-muted);
  font-size: 0.8rem;
}

.mvx-center {
  text-align: center;
  padding: 2rem !important;
}

.mvx-note {
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--mvx-muted);
  font-size: 0.8rem;
}

.mvx-actions {
  text-align: right;
  white-space: nowrap;
}

.mvx-inline {
  display: inline;
}

.mvx-tag {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(107, 114, 128, 0.2);
  color: #d1d5db;
}

.mvx-tag-admin {
  background: rgba(94, 234, 212, 0.15);
  color: #99f6e4;
}

.mvx-tag-active {
  background: rgba(52, 211, 153, 0.15);
  color: #6ee7b7;
}

.mvx-tag-paused {
  background: rgba(251, 191, 36, 0.15);
  color: #fcd34d;
}

.mvx-tag-cancelled {
  background: rgba(107, 114, 128, 0.2);
  color: #d1d5db;
}

/* Buttons */
.mvx-btn-primary {
  border: none;
  cursor: pointer;
  display: inline-block;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.55rem 1.1rem;
  border-radius: 0.65rem;
  color: #0a0a0a;
  background: linear-gradient(135deg, var(--mvx-accent), var(--mvx-accent2));
  box-shadow: 0 8px 24px rgba(45, 212, 191, 0.25);
}

.mvx-btn-primary:hover {
  filter: brightness(1.08);
}

.mvx-btn-block {
  width: 100%;
  padding: 0.75rem;
  margin-top: 0.5rem;
}

.mvx-btn-sm {
  font-size: 0.75rem;
  padding: 0.3rem 0.55rem;
  border-radius: 0.45rem;
  border: 1px solid var(--mvx-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--mvx-text);
  cursor: pointer;
  margin-right: 0.25rem;
}

.mvx-btn-sm:hover {
  background: rgba(255, 255, 255, 0.08);
}

.mvx-btn-danger {
  border-color: rgba(251, 113, 133, 0.35);
  color: #fecdd3;
  background: rgba(251, 113, 133, 0.08);
}

/* Forms */
.mvx-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--mvx-muted);
  margin-top: 0.75rem;
}

.mvx-label:first-child {
  margin-top: 0;
}

.mvx-input,
.mvx-input select {
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.55rem 0.75rem;
  border-radius: 0.65rem;
  border: 1px solid var(--mvx-border);
  background: var(--mvx-bg);
  color: var(--mvx-text);
  font-size: 0.875rem;
}

.mvx-input:focus {
  outline: none;
  border-color: rgba(94, 234, 212, 0.45);
  box-shadow: 0 0 0 2px rgba(94, 234, 212, 0.15);
}

.mvx-textarea {
  min-height: 4rem;
  resize: vertical;
}

.mvx-stack {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.mvx-stack .mvx-label:first-of-type {
  margin-top: 0;
}

.mvx-ellipsis {
  max-width: 22rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mvx-pre {
  margin: 0;
  padding: 0.75rem 1rem;
  max-height: 22rem;
  overflow: auto;
  font-size: 0.75rem;
  line-height: 1.45;
  border-radius: 0.65rem;
  border: 1px solid var(--mvx-border);
  background: var(--mvx-bg);
  color: var(--mvx-muted);
  white-space: pre-wrap;
  word-break: break-word;
}

/* Alerts */
.mvx-alert {
  margin-bottom: 1rem;
  padding: 0.65rem 0.85rem;
  border-radius: 0.65rem;
  font-size: 0.875rem;
}

.mvx-alert-error {
  border: 1px solid rgba(251, 113, 133, 0.35);
  background: rgba(251, 113, 133, 0.1);
  color: #fecdd3;
}

.mvx-alert-ok {
  border: 1px solid rgba(52, 211, 153, 0.35);
  background: rgba(52, 211, 153, 0.1);
  color: #a7f3d0;
}

/* Login page */
.mvx-login-page .mvx-bg::after {
  background:
    radial-gradient(ellipse 100% 80% at 50% 0%, rgba(45, 212, 191, 0.14), transparent 55%),
    radial-gradient(ellipse 60% 50% at 100% 100%, rgba(8, 145, 178, 0.1), transparent 45%);
}

.mvx-login-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem 0;
}

.mvx-login-panel {
  width: 100%;
  max-width: 26rem;
  border-radius: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(165deg, rgba(20, 24, 36, 0.92) 0%, rgba(10, 12, 18, 0.96) 100%);
  box-shadow:
    0 0 0 1px rgba(94, 234, 212, 0.08),
    0 32px 64px -24px rgba(0, 0, 0, 0.55),
    0 0 120px -40px rgba(45, 212, 191, 0.15);
  backdrop-filter: blur(20px);
  overflow: hidden;
}

.mvx-login-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.75rem 1.75rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.mvx-logo-xl {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 1rem;
  font-size: 1.35rem;
  font-weight: 700;
  flex-shrink: 0;
}

.mvx-login-brand-text {
  min-width: 0;
}

.mvx-login-title {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: #fafafa;
  line-height: 1.15;
}

.mvx-login-tagline {
  margin: 0.35rem 0 0;
  font-size: 0.9rem;
  font-weight: 500;
  color: #a1a1aa;
  line-height: 1.45;
}

.mvx-login-form {
  padding: 1.5rem 1.75rem 1.75rem;
}

.mvx-login-form-title {
  margin: 0 0 1.25rem;
  font-size: 1rem;
  font-weight: 600;
  color: #e4e4e7;
  letter-spacing: -0.02em;
}

.mvx-input-lg {
  padding: 0.75rem 0.9rem;
  font-size: 1rem;
  border-radius: 0.75rem;
}

.mvx-btn-login {
  margin-top: 1.25rem;
  padding: 0.85rem 1rem;
  font-size: 0.95rem;
  border-radius: 0.75rem;
}

.mvx-login-footnote {
  margin: 1.25rem 0 0;
  font-size: 0.72rem;
  line-height: 1.5;
  color: #71717a;
  text-align: center;
}

.mvx-login-mono {
  font-family: ui-monospace, "Cascadia Code", monospace;
  font-size: 0.78em;
  color: #a1a1aa;
}

.mvx-hint {
  margin: 0.75rem 0 0;
  font-size: 0.75rem;
  color: var(--mvx-muted);
  text-align: center;
}

.mvx-hint code {
  font-size: 0.8rem;
  color: #d1d5db;
}

@media (min-width: 480px) {
  .mvx-login-panel {
    max-width: 28rem;
  }

  .mvx-login-title {
    font-size: 2rem;
  }
}

/* Modal */
.mvx-modal[hidden] {
  display: none !important;
}

.mvx-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem;
}

@media (min-width: 640px) {
  .mvx-modal {
    align-items: center;
  }
}

.mvx-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
}

.mvx-modal-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 26rem;
  max-height: 90vh;
  overflow-y: auto;
}

.mvx-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1.25rem;
}
