:root {
  --juma-bg: #070a12;
  --juma-surface: rgba(17, 24, 39, 0.82);
  --juma-surface-strong: #101827;
  --juma-card: rgba(255, 255, 255, 0.08);
  --juma-border: rgba(255, 255, 255, 0.14);
  --juma-text: #f8fafc;
  --juma-muted: #a7b2c4;
  --juma-primary: #58c7ff;
  --juma-accent: #f4c76b;
  --juma-danger: #ff6b7a;
  --juma-success: #55d68a;
  --juma-radius: 8px;
  --juma-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  --juma-sidebar: 260px;
  --juma-font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body.juma-auth,
body.juma-app,
body.juma-admin {
  min-height: 100vh;
  margin: 0;
  background: radial-gradient(circle at 18% 10%, rgba(88, 199, 255, 0.22), transparent 34%),
    radial-gradient(circle at 84% 18%, rgba(244, 199, 107, 0.14), transparent 28%),
    var(--juma-bg);
  color: var(--juma-text);
  font-family: var(--juma-font);
  letter-spacing: 0;
}

body.juma-auth {
  display: grid;
  place-items: center;
  padding: 32px 16px;
  overflow-x: hidden;
}

.auth-bg-video {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.22;
  z-index: -2;
}

.auth-backdrop {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, rgba(7, 10, 18, 0.94), rgba(7, 10, 18, 0.74));
  z-index: -1;
}

.auth-shell {
  width: min(1080px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 28px;
  align-items: stretch;
}

.auth-brand,
.auth-card,
.juma-panel,
.admin-panel,
.market-card {
  border: 1px solid var(--juma-border);
  background: var(--juma-surface);
  box-shadow: var(--juma-shadow);
  backdrop-filter: blur(18px);
  border-radius: var(--juma-radius);
}

.auth-brand {
  min-height: 560px;
  padding: 42px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--juma-text);
  text-decoration: none;
  font-weight: 800;
  font-size: 24px;
}

.brand-mark img {
  width: 44px;
  height: 44px;
}

.auth-hero h1 {
  max-width: 620px;
  margin: 0 0 18px;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 0.95;
}

.auth-hero p {
  max-width: 560px;
  margin: 0;
  color: var(--juma-muted);
  font-size: 18px;
  line-height: 1.6;
}

.auth-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.auth-pill,
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid var(--juma-border);
  border-radius: 999px;
  color: var(--juma-text);
  background: rgba(255, 255, 255, 0.07);
  font-size: 13px;
  font-weight: 700;
}

.auth-card {
  padding: 34px;
  align-self: center;
}

.auth-card h2,
.admin-title h1,
.market-hero h1 {
  margin: 0;
  font-size: 32px;
}

.auth-card p,
.admin-title p,
.market-hero p {
  color: var(--juma-muted);
  line-height: 1.55;
}

.juma-form {
  display: grid;
  gap: 16px;
  margin-top: 26px;
}

.field label {
  display: block;
  margin-bottom: 8px;
  color: var(--juma-muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.field input,
.field textarea,
.field select,
.juma-form input,
.juma-form textarea,
.juma-form select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--juma-border);
  border-radius: var(--juma-radius);
  background: rgba(255, 255, 255, 0.08);
  color: var(--juma-text);
  padding: 12px 14px;
  font: inherit;
  outline: none;
}

.field input:focus,
.field textarea:focus,
.field select:focus,
.juma-form input:focus,
.juma-form textarea:focus,
.juma-form select:focus {
  border-color: var(--juma-primary);
  box-shadow: 0 0 0 3px rgba(88, 199, 255, 0.18);
}

.juma-btn,
.auth-submit,
.admin-container button,
.admin-container .btn,
.gallery-header button,
.perfil button,
.perfil .apply-now {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  border: 0;
  border-radius: var(--juma-radius);
  background: linear-gradient(135deg, var(--juma-primary), #8ee6ff);
  color: #06101f;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

.juma-btn.secondary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--juma-text);
  border: 1px solid var(--juma-border);
}

.auth-links {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
  font-size: 14px;
}

.auth-links a,
.market-nav a,
.admin-topbar a {
  color: var(--juma-primary);
  text-decoration: none;
  font-weight: 800;
}

.juma-alert {
  padding: 12px 14px;
  border-radius: var(--juma-radius);
  background: rgba(255, 107, 122, 0.12);
  border: 1px solid rgba(255, 107, 122, 0.32);
  color: #ffd5da;
}

.juma-alert.success {
  background: rgba(85, 214, 138, 0.12);
  border-color: rgba(85, 214, 138, 0.32);
  color: #c9f8dc;
}

.juma-alert ul {
  margin: 0;
  padding-left: 18px;
}

.language-selector-modern {
  display: flex;
  gap: 8px;
  margin-top: 22px;
}

.language-selector-modern span,
.language-selector-modern button {
  padding: 6px 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--juma-muted);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.language-selector-modern button.active {
  border-color: var(--juma-primary);
  color: var(--juma-text);
  background: rgba(88, 199, 255, 0.16);
}

.remember-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  min-height: 24px;
  color: var(--juma-muted);
  font-size: 14px;
  font-weight: 700;
}

.remember-row input {
  width: 16px;
  height: 16px;
  min-height: 16px;
  margin: 0;
  accent-color: var(--juma-primary);
}

.app-main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

body.juma-app .app-main,
body.juma-admin .admin-container {
  margin-left: calc(var(--juma-sidebar) + 24px);
  width: calc(100% - var(--juma-sidebar) - 48px);
}

.market-nav,
.admin-topbar {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--juma-border);
  background: rgba(7, 10, 18, 0.7);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.market-grid,
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.market-hero {
  min-height: 360px;
  display: grid;
  align-content: end;
  padding: 38px;
  margin-bottom: 18px;
  background: linear-gradient(135deg, rgba(88, 199, 255, 0.18), rgba(244, 199, 107, 0.12)), var(--juma-surface);
  border: 1px solid var(--juma-border);
  border-radius: var(--juma-radius);
  box-shadow: var(--juma-shadow);
}

.market-card,
.stat-card {
  padding: 20px;
}

.market-card h3,
.stat-card span {
  margin: 0 0 8px;
  color: var(--juma-muted);
  font-size: 13px;
  text-transform: uppercase;
}

.market-card strong,
.stat-card strong {
  display: block;
  font-size: 28px;
}

.admin-container {
  max-width: none;
  padding: 28px;
  background: transparent;
  box-shadow: none;
  right: auto;
}

.admin-panel {
  padding: 22px;
  margin-top: 18px;
}

.admin-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  color: var(--juma-text);
}

.admin-table th,
.admin-table td {
  padding: 14px;
  border-bottom: 1px solid var(--juma-border);
  text-align: left;
}

.admin-table th {
  color: var(--juma-muted);
  background: rgba(255, 255, 255, 0.06);
  font-size: 12px;
  text-transform: uppercase;
}

.admin-table tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.03);
}

.status-pending {
  color: var(--juma-accent);
}

.status-approved {
  color: var(--juma-success);
}

.status-rejected {
  color: var(--juma-danger);
}

body.juma-profile {
  background: var(--juma-bg);
  color: var(--juma-text);
  font-family: var(--juma-font);
}

body.juma-profile .perfil {
  position: relative;
  right: auto;
  top: auto;
  width: min(980px, calc(100% - 32px));
  max-width: none;
  margin: 32px auto 48px;
  padding: 24px;
  background: var(--juma-surface);
  border: 1px solid var(--juma-border);
  border-radius: var(--juma-radius);
  box-shadow: var(--juma-shadow);
}

body.juma-profile .portada-container {
  top: auto;
  height: clamp(220px, 34vw, 430px);
  border-radius: var(--juma-radius);
  background: var(--juma-surface-strong);
}

body.juma-profile .seller-container,
body.juma-profile .contenedor-curso,
body.juma-profile .carrusel-container,
body.juma-profile .gallery-header,
body.juma-profile .caja-carga {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--juma-border);
  border-radius: var(--juma-radius);
  color: var(--juma-text);
}

body.juma-profile .contenedor-cargas,
body.juma-profile .followers-following-container {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

body.juma-profile .gallery-header {
  width: min(900px, 100%);
  margin: 22px auto 0;
  flex-wrap: wrap;
  gap: 12px;
}

body.juma-profile .carrusel-container {
  width: min(900px, 100%);
  max-width: 900px;
  padding: 16px;
  margin: 14px auto 28px;
  overflow: hidden;
}

body.juma-profile .carrusel img,
body.juma-profile .carrusel video {
  flex: 0 0 100%;
  width: 100%;
  max-height: 520px;
  object-fit: contain;
  border: 0;
  border-radius: var(--juma-radius);
  background: #05070d;
}

@media (max-width: 900px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-brand {
    min-height: 340px;
  }

  body.juma-app .app-main,
  body.juma-admin .admin-container {
    margin-left: 0;
    width: 100%;
    padding: 18px;
  }

  .market-grid,
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  body.juma-auth {
    padding: 14px;
  }

  .auth-brand,
  .auth-card,
  .market-hero,
  .admin-panel {
    padding: 20px;
  }

  .market-grid,
  .stats-grid,
  body.juma-profile .contenedor-cargas,
  body.juma-profile .followers-following-container {
    grid-template-columns: 1fr;
  }

  .auth-links,
  .market-nav,
  .admin-topbar {
    align-items: flex-start;
    flex-direction: column;
  }
}
