/* m-engine public shell — MUSIC ENGINE logo palette */

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-sans, "Manrope", sans-serif);
  background-color: #1a2229;
  background-image:
    radial-gradient(ellipse 90% 70% at 40% 20%, rgba(0, 255, 180, 0.09), transparent 70%),
    radial-gradient(ellipse 70% 55% at 80% 0%, rgba(0, 255, 180, 0.04), transparent 65%);
  background-attachment: fixed;
  background-repeat: no-repeat;
  color: var(--fg, #ffffff);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--accent, #00ffb4); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---- Shell ---- */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1.5rem;
  border-bottom: 1px solid var(--line, #343f4a);
  background: rgba(26, 34, 41, 0.88);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 40;
}
.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--line, #343f4a);
  margin-top: auto;
  color: var(--muted, #9aa7b2);
  font-size: 0.875rem;
}
.site-header nav {
  display: flex;
  gap: 0.35rem 1rem;
  flex-wrap: wrap;
  align-items: center;
}
.site-header nav a {
  color: var(--muted, #9aa7b2);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: color var(--motion-micro, 120ms ease-out);
}
.site-header nav a:hover {
  color: var(--fg, #ffffff);
  text-decoration: none;
}
.site-header nav a.is-active {
  color: var(--accent, #00ffb4);
  font-weight: 600;
}
.lang-switch {
  display: inline-flex;
  gap: 0.35rem;
  margin-left: 0.35rem;
  padding-left: 0.65rem;
  border-left: 1px solid var(--line, #343f4a);
}
.lang-switch a {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--muted, #9aa7b2) !important;
  text-decoration: none !important;
}
.lang-switch a.is-active,
.lang-switch a:hover {
  color: var(--accent, #00ffb4) !important;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  transition: filter var(--motion-standard, 220ms ease-in-out);
}
.brand:hover { text-decoration: none; filter: brightness(1.06); }
.brand-me,
.hero-me {
  font-family: var(--font-brand, "Nunito", sans-serif);
  font-weight: 900;
  letter-spacing: -0.06em;
  line-height: 0.85;
  color: var(--accent, #00ffb4);
  text-shadow:
    0 0 12px rgba(0, 255, 180, 0.55),
    0 0 28px rgba(0, 255, 180, 0.28);
  font-style: normal;
}
.brand-me {
  font-size: 1.85rem;
}
.hero-me {
  font-size: clamp(4.5rem, 18vw, 8.5rem);
  margin: 0 0 1.25rem;
}

.site-main {
  width: min(960px, 100%);
  margin: 0 auto;
  padding: 1.5rem;
  flex: 1;
}
.site-main--cabinet { width: min(1120px, 100%); }
.site-main--home {
  width: min(960px, 100%);
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
  padding: 1.5rem;
}

/* ---- Home hero (first viewport) ---- */
.hero {
  position: relative;
  min-height: calc(100vh - 7.5rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 2.5rem 0 3rem;
  animation: hero-in 0.55s ease-out both;
}
.hero-lead {
  max-width: 28rem;
  margin: 0 0 1.75rem;
  font-size: clamp(1rem, 2.2vw, 1.15rem);
  line-height: 1.45;
  color: var(--muted, #9aa7b2);
}
.cta {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.home-section {
  padding: 2.5rem 0 1rem;
  border-top: 1px solid var(--line, #343f4a);
}
.home-section h2 {
  font-family: var(--font-display, "Nunito", sans-serif);
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
}

@keyframes hero-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---- Page chrome ---- */
.page-head { margin-bottom: 1.25rem; }
.page-head h1 {
  font-family: var(--font-display, "Nunito", sans-serif);
  font-size: clamp(1.6rem, 4vw, 2.1rem);
  letter-spacing: -0.03em;
  margin: 0 0 0.35rem;
}
.page-head .muted { margin: 0; }

.muted { color: var(--muted, #9aa7b2); }
.prose { white-space: pre-wrap; line-height: 1.6; }

/* ---- Lists / grids ---- */
.cat-grid, .card-list, .news-list { list-style: none; padding: 0; margin: 0; }
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
}
.cat-grid li,
.card-list li,
.news-list li {
  background: var(--card, #262f38);
  border: 1px solid var(--line, #343f4a);
  border-radius: 8px;
  padding: 0.9rem 1rem;
  transition: border-color 120ms ease-out, transform 180ms ease-out;
}
.card-list { display: grid; gap: 0.65rem; }
.news-list { display: grid; gap: 0.65rem; }
.cat-grid li:hover,
.card-list li:hover,
.news-list li:hover {
  border-color: rgba(0, 255, 180, 0.45);
  transform: translateY(-2px);
}
.cat-grid a,
.card-list a,
.news-list a { text-decoration: none; }
.cat-grid a:hover,
.card-list a:hover,
.news-list a:hover { text-decoration: none; }

.cat-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.45rem;
  list-style: none;
  padding: 0;
  margin: 1rem 0;
  align-items: center;
}
.cat-tabs li {
  display: flex;
  margin: 0;
  padding: 0;
  line-height: 1;
}
.cat-tabs a {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--line, #343f4a);
  border-radius: 6px;
  color: var(--fg, #ffffff);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}
.cat-tabs a:hover { border-color: rgba(0, 255, 180, 0.4); text-decoration: none; }
.cat-tabs a.active {
  background: var(--accent, #00ffb4);
  color: var(--text-on-accent, #0a1512);
  border-color: transparent;
}

.search-form {
  display: flex;
  gap: 0.5rem;
  margin: 1rem 0;
}
.search-form input {
  flex: 1;
  padding: 0.55rem 0.75rem;
  border-radius: 6px;
  border: 1px solid var(--line, #343f4a);
  background: var(--card, #262f38);
  color: var(--fg, #ffffff);
}
.search-form button {
  padding: 0.55rem 1rem;
  border-radius: 6px;
  border: 0;
  background: var(--accent, #00ffb4);
  color: var(--text-on-accent, #0a1512);
  font-weight: 600;
  cursor: pointer;
}

/* ---- Forms (legacy) ---- */
.cabinet-grid { display: grid; gap: 1rem; }
.cabinet-grid section {
  background: var(--card, #262f38);
  border: 1px solid var(--line, #343f4a);
  border-radius: 8px;
  padding: 1rem;
}
label { display: block; margin: 0.5rem 0 0.2rem; color: var(--muted, #9aa7b2); font-size: 0.9rem; }
input, select, textarea {
  width: 100%;
  padding: 0.5rem 0.65rem;
  border-radius: 6px;
  border: 1px solid var(--line, #343f4a);
  background: #141a20;
  color: var(--fg, #ffffff);
  font: inherit;
}
button.primary {
  margin-top: 0.75rem;
  padding: 0.55rem 1rem;
  border: 0;
  border-radius: 6px;
  background: var(--accent, #00ffb4);
  color: var(--text-on-accent, #0a1512);
  font-weight: 600;
  cursor: pointer;
}
.flash-error { color: #ff9b95; }

/* billing tables */
.data-table { width: 100%; border-collapse: collapse; margin: 0.5rem 0 1rem; }
.data-table th, .data-table td {
  text-align: left;
  padding: 0.45rem 0.6rem;
  border-bottom: 1px solid rgba(0, 255, 180, 0.08);
}
.data-table th { color: var(--muted, #9aa7b2); font-weight: 600; font-size: 0.9rem; }

/* ---- Profile / rooms ---- */
.profile-facts .fact { margin: 0.35rem 0; }
.rooms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin: 0.8rem 0;
}
.room-card img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  display: block;
}
.days label { margin-right: 10px; display: inline-flex; align-items: center; gap: 0.35rem; }
form.inline { display: inline; }
.card-move select { font-size: 0.78rem; margin-top: 6px; }
.card-form label { display: block; margin-bottom: 6px; }
.item-links { display: block; margin-top: 0.35rem; font-size: 0.85rem; }
.item-links a { margin-right: 0.35rem; }

/* ---- News article ---- */
.news-article h1 {
  font-family: var(--font-display, "Nunito", sans-serif);
  letter-spacing: -0.03em;
  margin: 0 0 0.5rem;
}
.news-article .news-meta {
  color: var(--accent, #00ffb4);
  font-size: 0.85rem;
  font-weight: 600;
  margin: 0 0 1rem;
}
.news-article img {
  max-width: 100%;
  border-radius: 8px;
  border: 1px solid var(--line, #343f4a);
}
.crumb { margin: 0 0 0.75rem; font-size: 0.875rem; }

/* ---- Auth ---- */
body.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  margin: 0;
}
.auth-box {
  width: min(420px, 92vw);
  background: var(--card, #262f38);
  border: 1px solid var(--line, #343f4a);
  border-radius: 10px;
  padding: 2rem 1.5rem;
  box-shadow: 0 0 40px rgba(0, 255, 180, 0.06);
}
.auth-box .brand {
  display: flex;
  justify-content: center;
  margin-bottom: 0.5rem;
}
.auth-box .brand-me {
  font-size: 3.4rem;
}
.auth-box .lead { text-align: center; margin: 0 0 1.25rem; }
.auth-box h1 {
  font-family: var(--font-display, "Nunito", sans-serif);
  margin: 0 0 1rem;
  text-align: center;
  font-size: 1.45rem;
  letter-spacing: -0.03em;
}
.auth-box .ui-field { margin-bottom: 0.85rem; }
.auth-box .ui-btn { width: 100%; }
.auth-links { text-align: center; margin-top: 1rem; font-size: 0.9rem; }

/* ---- Booking grid helper ---- */
.entity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
}
.booking-section { margin: 1.75rem 0; }
.booking-section h2 {
  font-family: var(--font-display, "Nunito", sans-serif);
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
}

@media (max-width: 640px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.75rem 1rem;
  }
  .site-header nav { gap: 0.5rem 0.85rem; }
  .site-main { padding: 1rem; }
  .hero { min-height: calc(100vh - 9rem); padding: 1.5rem 0 2rem; }
  .data-table th:nth-child(n+4),
  .data-table td:nth-child(n+4) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .hero { animation: none; }
  .cat-grid li,
  .card-list li,
  .news-list li { transition: none; }
}
/* --- public stats (home strip + /stats) --- */

.stats-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.6rem;
  margin: 1rem 0 1.5rem;
}

.stats-strip__item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.7rem 0.85rem;
  background: var(--surface-secondary);
  border: 1px solid var(--border-default);
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
}

.stats-strip__item:hover { border-color: var(--accent-primary); }
.stats-strip__item b { font-size: 1.25rem; color: var(--accent-primary); }
.stats-strip__item span { font-size: 0.78rem; color: var(--text-secondary); }

.stats-section { margin: 1.4rem 0; }
.stats-section h2 { margin-bottom: 0.6rem; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; }

.trend-chart { display: flex; align-items: flex-end; gap: 4px; height: 130px; }
.trend-col { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; }
.trend-bars { display: flex; align-items: flex-end; gap: 2px; flex: 1; width: 100%; }
.trend-bars .bar { flex: 1; border-radius: 2px 2px 0 0; min-height: 1px; }
.bar--release { background: var(--accent-primary); }
.bar--concert { background: #e0b341; }
.bar--wanted { background: #7dffd4; opacity: 0.75; }
.trend-week { font-size: 0.62rem; color: var(--text-tertiary); margin-top: 3px; white-space: nowrap; }

.legend { display: flex; gap: 1rem; align-items: center; font-size: 0.8rem; margin-top: 0.4rem; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-right: 3px; }
.dot--release { background: var(--accent-primary); }
.dot--concert { background: #e0b341; }
.dot--wanted { background: #7dffd4; }

.heatmap { display: grid; grid-template-columns: repeat(auto-fill, 9px); gap: 2px; }
.hm { width: 9px; height: 9px; border-radius: 2px; background: var(--surface-sunken); }
.hm--1 { background: rgba(0, 255, 180, 0.25); }
.hm--2 { background: rgba(0, 255, 180, 0.45); }
.hm--3 { background: rgba(0, 255, 180, 0.7); }
.hm--4 { background: var(--accent-primary); }

.stats-top { list-style: decimal inside; padding: 0; margin: 0; }
.stats-top li { display: flex; justify-content: space-between; gap: 0.5rem; padding: 0.3rem 0; border-bottom: 1px solid var(--border-default); font-size: 0.9rem; }
.stats-top li span { color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stats-top li b { color: var(--accent-primary); }
.stats-top li em { font-style: normal; font-size: 0.75rem; }

.stats-genres { list-style: none; padding: 0; margin: 0; }
.stats-genres li { display: flex; align-items: center; gap: 0.5rem; padding: 0.3rem 0; border-bottom: 1px solid var(--border-default); font-size: 0.9rem; }
.stats-genres li span { flex: 1; }
.stats-genres li b { color: var(--accent-primary); }
.delta--up { color: var(--status-success); font-style: normal; font-size: 0.78rem; }
.delta--down { color: var(--status-danger); font-style: normal; font-size: 0.78rem; }

.headline-fact { font-size: 1.05rem; color: var(--accent-primary); margin: 0.2rem 0 0.6rem; }
.methodology { font-size: 0.75rem; margin-top: 1.5rem; line-height: 1.5; }
.week-top li a { font-weight: 600; }
