/* =====================================================================
   MCL Growth Partners - Workspace
   Mismo sistema de diseno que mclgrowthpartners.com:
   negro premium + acento crema #F5E6D3, Plus Jakarta Sans / Playfair.
   ===================================================================== */

:root {
  --bg: #0A0A0A;
  --bg-soft: #111111;
  --bg-card: #141414;
  --border: rgba(245, 230, 211, 0.14);
  --border-strong: rgba(245, 230, 211, 0.3);
  --accent: #F5E6D3;
  --accent-soft: #FAEBD7;
  --accent-dim: rgba(245, 230, 211, 0.65);
  --text: #EDEDEA;
  --text-muted: #9C9C94;
  --danger: #E5A19B;
  --ok: #A8D5B5;
  --radius: 16px;
  --font: "Plus Jakarta Sans", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: "Playfair Display", Georgia, serif;
  --mono: "JetBrains Mono", "SFMono-Regular", Menlo, Consolas, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent); color: #0A0A0A; }
a { color: var(--accent); text-decoration: none; }

/* ---------- Botones (identicos al sitio) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s, background .2s, border-color .2s, opacity .2s;
  border: 1px solid transparent;
}
.btn-primary { background: var(--accent); color: #0A0A0A; }
.btn-primary:hover { background: var(--accent-soft); transform: translateY(-2px); box-shadow: 0 8px 30px rgba(245, 230, 211, .18); }
.btn-primary:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-ghost { background: transparent; color: var(--accent); border-color: var(--border-strong); }
.btn-ghost:hover { border-color: var(--accent); }
.btn-sm { padding: 8px 18px; font-size: .84rem; }

.eyebrow {
  display: inline-block;
  padding: 7px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent-dim);
}

/* =====================================================================
   LOGIN
   ===================================================================== */
.login-body {
  display: grid;
  place-items: center;
  min-height: 100dvh;
  padding: 24px;
  position: relative;
  overflow: hidden;
}

/* Halo crema, el mismo gesto que el hero del sitio */
.glow {
  position: fixed;
  top: -280px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 620px;
  background: radial-gradient(ellipse at center, rgba(245, 230, 211, .09) 0%, transparent 66%);
  pointer-events: none;
  z-index: 0;
}
.glow-bottom {
  position: fixed;
  bottom: -340px;
  left: 50%;
  transform: translateX(-50%);
  width: 760px;
  height: 520px;
  background: radial-gradient(ellipse at center, rgba(245, 230, 211, .05) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.grid-bg {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(245, 230, 211, .028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(245, 230, 211, .028) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 78%);
  pointer-events: none;
  z-index: 0;
}

.login-wrap { position: relative; z-index: 1; width: 100%; max-width: 440px; }

.login-card {
  background: linear-gradient(180deg, rgba(20, 20, 20, .96) 0%, rgba(14, 14, 14, .96) 100%);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 40px 36px 30px;
  text-align: center;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(245, 230, 211, .06);
  animation: rise .5s cubic-bezier(.2, .7, .3, 1) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.login-logo {
  width: min(300px, 78%);
  height: auto;
  display: block;
  margin: 0 auto 22px;
}

.login-card h1 {
  font-family: var(--serif);
  font-size: 2.1rem;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.1;
  margin: 18px 0 10px;
}
.login-card h1 em { font-style: normal; color: var(--accent); }

.login-card .sub {
  font-size: .93rem;
  color: var(--text-muted);
  margin-bottom: 26px;
}

.field-label {
  display: block;
  text-align: left;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent-dim);
  margin: 0 0 8px 2px;
}

.field { position: relative; }

.field input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 48px 14px 16px;
  color: var(--text);
  font-family: var(--font);
  font-size: 1.05rem;
  letter-spacing: .22em;
  transition: border-color .2s, box-shadow .2s;
}
.field input::placeholder { letter-spacing: .3em; color: #4A4A46; }
.field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(245, 230, 211, .08);
}

.reveal {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: transparent;
  border: none;
  border-radius: 10px;
  color: var(--text-muted);
  cursor: pointer;
  transition: color .2s, background .2s;
}
.reveal:hover { color: var(--accent); background: rgba(245, 230, 211, .06); }
.reveal svg { width: 19px; height: 19px; }

.msg {
  min-height: 22px;
  margin: 12px 2px 4px;
  font-size: .84rem;
  color: var(--danger);
  text-align: left;
  opacity: 0;
  transition: opacity .2s;
}
.msg.show { opacity: 1; }
.msg.ok { color: var(--ok); }

.login-card .btn-primary { width: 100%; margin-top: 8px; }

.login-foot {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(245, 230, 211, .08);
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #6A6A64;
}
.login-foot sup { font-size: .7em; }

.shake { animation: shake .4s cubic-bezier(.36, .07, .19, .97) both; }
@keyframes shake {
  10%, 90% { transform: translateX(-1px); }
  20%, 80% { transform: translateX(2px); }
  30%, 50%, 70% { transform: translateX(-4px); }
  40%, 60% { transform: translateX(4px); }
}

/* =====================================================================
   PANEL
   ===================================================================== */
.panel-body {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  overflow: hidden;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  height: 76px;
  flex: 0 0 auto;
  padding: 0 22px;
  background: rgba(10, 10, 10, .9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  z-index: 10;
}

.topbar-left, .topbar-right { display: flex; align-items: center; gap: 14px; }

.mark img { height: 46px; width: auto; display: block; }

.vr { width: 1px; height: 26px; background: var(--border); }

.workspace-name {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--text);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-soft);
  font-size: .76rem;
  color: var(--text-muted);
  white-space: nowrap;
}
.chip i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 0 rgba(168, 213, 181, .55);
  animation: pulse 2.4s infinite;
}
.chip.off i { background: var(--danger); animation: none; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(168, 213, 181, .5); }
  70% { box-shadow: 0 0 0 7px rgba(168, 213, 181, 0); }
  100% { box-shadow: 0 0 0 0 rgba(168, 213, 181, 0); }
}

.topbar-link {
  font-size: .85rem;
  color: var(--text-muted);
  padding: 6px 4px;
  transition: color .2s;
}
.topbar-link:hover { color: var(--accent); }

.icon-btn {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-muted);
  cursor: pointer;
  transition: color .2s, border-color .2s;
}
.icon-btn:hover { color: var(--accent); border-color: var(--border-strong); }
.icon-btn svg { width: 17px; height: 17px; }

/* ---------- Pestanas: terminal / app de escritorio ---------- */
.tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.tab {
  padding: 8px 18px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .01em;
  white-space: nowrap;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.tab:hover { color: var(--accent); }
.tab.is-active { background: var(--accent); color: #0A0A0A; }

/* Copiar y pegar son de la terminal; las pistas del pie, de cada vista. */
body[data-view="app"] .only-cli,
body[data-view="cli"] .only-app { display: none !important; }

/* ---------- Escenario / vistas ---------- */
.views { height: 100%; }
.view { display: none; height: 100%; }
.view.is-active { display: block; }

/* ---------- Escenario / terminal ---------- */
.stage {
  flex: 1 1 auto;
  min-height: 0;
  padding: 18px 22px 0;
  position: relative;
}
.stage::before {
  content: "";
  position: absolute;
  top: -180px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 380px;
  background: radial-gradient(ellipse at center, rgba(245, 230, 211, .06) 0%, transparent 68%);
  pointer-events: none;
}

.terminal-shell {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius) var(--radius) 0 0;
  overflow: hidden;
  box-shadow: 0 -2px 60px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(245, 230, 211, .05);
  position: relative;
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 0 0 auto;
  height: 42px;
  padding: 0 16px;
  background: rgba(17, 17, 17, .9);
  border-bottom: 1px solid var(--border);
}
.dots { display: flex; gap: 7px; }
.dots i { width: 11px; height: 11px; border-radius: 50%; background: #2A2A28; display: block; }
.dots i:first-child { background: rgba(245, 230, 211, .38); }

.term-title {
  font-family: var(--mono);
  font-size: .78rem;
  color: var(--text-muted);
  letter-spacing: .02em;
}
.term-hint {
  margin-left: auto;
  font-size: .72rem;
  color: #5E5E58;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.term-frame { flex: 1 1 auto; min-height: 0; position: relative; background: var(--bg); }
.term-frame iframe { width: 100%; height: 100%; border: 0; display: block; }

.term-veil {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: var(--bg);
  color: var(--text-muted);
  font-size: .86rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  transition: opacity .4s;
}
.term-veil.hide { opacity: 0; pointer-events: none; }
.term-veil .spinner {
  width: 26px;
  height: 26px;
  margin: 0 auto 14px;
  border: 2px solid rgba(245, 230, 211, .18);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.statusbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 34px;
  padding: 0 26px;
  font-size: .72rem;
  color: #5E5E58;
  letter-spacing: .06em;
  border-top: 1px solid rgba(245, 230, 211, .07);
  background: var(--bg);
}
.statusbar kbd {
  font-family: var(--mono);
  font-size: .7rem;
  color: var(--accent-dim);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 6px;
}
.statusbar .sep { color: #33332F; margin: 0 8px; }

/* ---------- Aviso flotante (copiado / pegado) ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 58px;
  transform: translate(-50%, 12px);
  padding: 10px 22px;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--accent);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .04em;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .6);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 60;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 860px) {
  .topbar { height: auto; padding: 12px 16px; flex-wrap: wrap; }
  .mark img { height: 38px; }
  .topbar-right { width: 100%; justify-content: flex-end; }
  .hide-sm { display: none; }
  .stage { padding: 12px 12px 0; }
  .statusbar { justify-content: center; padding: 0 12px; }
}
@media (max-width: 520px) {
  .login-card { padding: 32px 22px 24px; }
  .login-logo { width: 168px; }
  .login-card h1 { font-size: 1.8rem; }
}

@media (max-width: 1180px) {
  .hide-md { display: none; }
}
@media (max-width: 980px) {
  .tab { padding: 7px 13px; font-size: .78rem; }
}

/* El escritorio necesita cada pixel: menos marco que en la terminal. */
body[data-view="app"] .stage { padding: 10px 12px 0; }
body[data-view="app"] .terminal-bar { height: 36px; }
