:root {
  --yellow: #f9dc3b;
  --yellow-deep: #efc900;
  --black: #15120d;
  --black-soft: #28231a;
  --white: #ffffff;
  --paper: #fffaf0;
  --cream: #fff6cf;
  --line: rgba(21, 18, 13, 0.13);
  --muted: #746a55;
  --red: #ff7b66;
  --radius-lg: 24px;
  --shadow-card: 0 16px 34px rgba(21, 18, 13, 0.10), 0 2px 0 rgba(255, 255, 255, 0.9) inset;
  --shadow-lift: 0 28px 80px rgba(21, 18, 13, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  background:
    radial-gradient(circle at 14% 10%, rgba(249, 220, 59, 0.42), transparent 26rem),
    radial-gradient(circle at 90% 2%, rgba(255, 255, 255, 0.95), transparent 22rem),
    linear-gradient(135deg, #fff9dc 0%, #fffdf6 44%, #fff1b3 100%);
  color: var(--black);
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.18;
  background-image:
    linear-gradient(rgba(21, 18, 13, 0.35) 1px, transparent 1px),
    linear-gradient(90deg, rgba(21, 18, 13, 0.35) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 72%);
}

button,
select {
  font: inherit;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 34px;
  line-height: 1.02;
  font-weight: 650;
}

h2 {
  font-size: 25px;
  line-height: 1.15;
  font-weight: 650;
}

h3 {
  font-size: 20px;
  font-weight: 650;
}

.topbar {
  min-height: 104px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 34px;
  border-bottom: 1px solid rgba(21, 18, 13, 0.08);
  background: rgba(255, 255, 255, 0.74);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
  z-index: 5;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand-mark {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 26%, #fff9c6 0 10%, transparent 11%),
    var(--yellow);
  color: var(--black);
  font-size: 29px;
  line-height: 1;
  font-weight: 700;
  box-shadow: 0 16px 26px rgba(21, 18, 13, 0.16), 0 0 0 8px rgba(249, 220, 59, 0.24);
}

.brand-line {
  color: var(--muted);
  margin-top: 7px;
  font-size: 14px;
}

.eyebrow {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  margin-bottom: 7px;
  font-weight: 700;
}

.session-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px 9px 15px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(21, 18, 13, 0.10);
  box-shadow: 0 12px 28px rgba(21, 18, 13, 0.10);
  font-weight: 800;
}

.session-pill button {
  border: 0;
  border-radius: 999px;
  padding: 9px 12px;
  background: var(--black);
  color: var(--white);
  cursor: pointer;
  font-weight: 800;
}

.login-screen {
  min-height: calc(100vh - 104px);
  display: grid;
  place-items: center;
  padding: 34px;
  position: relative;
  z-index: 1;
}

.login-card {
  width: min(560px, 100%);
  padding: 30px;
  border-radius: 32px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(255, 246, 207, 0.92)),
    var(--white);
  border: 1px solid rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-lift);
}

.login-card h2 {
  margin-bottom: 10px;
}

.login-form,
.reset-box {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.login-form button,
.reset-box button {
  border: 0;
  border-radius: 18px;
  padding: 14px 16px;
  background: var(--black);
  color: var(--white);
  font-weight: 850;
  cursor: pointer;
  box-shadow: 0 14px 28px rgba(21, 18, 13, 0.16);
}

.reset-box button {
  background: var(--yellow);
  color: var(--black);
}

.demo-logins {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.demo-logins button {
  border: 1px solid rgba(21, 18, 13, 0.10);
  border-radius: 16px;
  padding: 11px 12px;
  background: rgba(249, 220, 59, 0.22);
  cursor: pointer;
  font-weight: 800;
}

.form-message {
  min-height: 20px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.form-message.error {
  color: #b73525;
  font-weight: 800;
}

.sync-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 999px;
  background: var(--black);
  color: var(--white);
  box-shadow: 0 14px 32px rgba(21, 18, 13, 0.18);
  white-space: nowrap;
}

.sync-status.error {
  background: var(--red);
  color: var(--black);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 0 0 5px rgba(249, 220, 59, 0.18);
}

.layout {
  display: grid;
  grid-template-columns: 318px minmax(0, 1fr);
  gap: 24px;
  padding: 26px 34px 44px;
  position: relative;
  z-index: 1;
}

.sidebar {
  align-self: start;
  position: sticky;
  top: 130px;
  display: grid;
  gap: 18px;
}

.sidebar section,
.panel,
.hero-panel,
.kpi {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.sidebar section {
  padding: 22px;
}

.sidebar section:first-child {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 250, 230, 0.92)),
    var(--white);
}

.sidebar h2 {
  margin-bottom: 16px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 14px;
  font-weight: 650;
}

select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 14px;
  background: var(--white);
  color: var(--black);
  box-shadow: 0 8px 18px rgba(21, 18, 13, 0.06);
  outline: none;
}

select:focus {
  border-color: var(--black);
  box-shadow: 0 0 0 4px rgba(249, 220, 59, 0.36);
}

select[multiple] {
  padding: 10px;
  min-height: 210px;
}

input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 14px;
  background: var(--white);
  color: var(--black);
  box-shadow: 0 8px 18px rgba(21, 18, 13, 0.06);
  outline: none;
}

input:focus {
  border-color: var(--black);
  box-shadow: 0 0 0 4px rgba(249, 220, 59, 0.36);
}

.inline-check {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--black);
  background: rgba(249, 220, 59, 0.18);
  border-radius: 17px;
  padding: 12px 13px;
}

.inline-check input {
  width: 18px;
  height: 18px;
  padding: 0;
  box-shadow: none;
  accent-color: var(--yellow-deep);
}

.hint,
.empty-state {
  color: var(--muted);
  line-height: 1.5;
  font-size: 14px;
}

.toggle-list {
  display: grid;
  gap: 10px;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 13px;
  border-radius: 17px;
  background: rgba(249, 220, 59, 0.18);
  color: var(--black);
  font-size: 14px;
  font-weight: 650;
  border: 1px solid rgba(21, 18, 13, 0.08);
}

.toggle-row input {
  width: 19px;
  height: 19px;
  accent-color: var(--yellow-deep);
}

.content {
  min-width: 0;
}

.tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.tab,
.hero-panel button {
  border: 1px solid rgba(21, 18, 13, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--black);
  padding: 12px 17px;
  cursor: pointer;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(21, 18, 13, 0.08);
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.tab:hover,
.hero-panel button:hover {
  transform: translateY(-1px);
  box-shadow: 0 15px 28px rgba(21, 18, 13, 0.12);
}

.tab.active {
  border-color: transparent;
  color: var(--black);
  background: var(--yellow);
}

.hero-panel {
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 30px;
  margin-bottom: 18px;
  min-height: 158px;
  background:
    linear-gradient(135deg, rgba(249, 220, 59, 0.96), rgba(255, 246, 207, 0.92)),
    var(--yellow);
  box-shadow: var(--shadow-lift);
}

.hero-panel::after {
  content: "";
  position: absolute;
  right: -44px;
  top: -60px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background:
    linear-gradient(rgba(21, 18, 13, 0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(21, 18, 13, 0.18) 1px, transparent 1px);
  background-size: 22px 22px;
  opacity: 0.45;
}

.hero-panel > * {
  position: relative;
  z-index: 1;
}

.hero-panel p:last-child {
  color: rgba(21, 18, 13, 0.72);
  margin-top: 10px;
}

.hero-panel button {
  background: var(--black);
  color: var(--white);
  border: none;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.kpi {
  position: relative;
  overflow: hidden;
  padding: 20px;
  min-height: 132px;
}

.kpi::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 7px;
  background: var(--yellow);
}

.kpi span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.kpi strong {
  display: block;
  font-size: 31px;
  margin: 14px 0 9px;
  letter-spacing: 0;
}

.trend {
  color: var(--black);
  font-weight: 750;
}

.trend.down {
  color: #b73525;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.panel {
  padding: 22px;
  min-width: 0;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.panel:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 48px rgba(21, 18, 13, 0.14), 0 2px 0 rgba(255, 255, 255, 0.9) inset;
}

.panel.hidden {
  display: none;
}

.hidden {
  display: none !important;
}

.panel.wide {
  grid-column: 1 / -1;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  margin-bottom: 18px;
}

.badge {
  border-radius: 999px;
  padding: 8px 12px;
  background: var(--yellow);
  color: var(--black);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 10px 18px rgba(249, 220, 59, 0.28);
}

.badge.warning {
  background: var(--red);
  color: var(--black);
}

.badge.muted {
  background: var(--black);
  color: var(--white);
}

.recommendations {
  display: grid;
  gap: 12px;
}

.rec {
  border: 1px solid rgba(21, 18, 13, 0.09);
  background:
    linear-gradient(90deg, rgba(249, 220, 59, 0.34), rgba(255, 255, 255, 0.82)),
    var(--white);
  border-radius: 20px;
  padding: 15px;
  box-shadow: 0 10px 20px rgba(21, 18, 13, 0.07);
}

.rec strong {
  display: block;
  margin-bottom: 6px;
}

.rec span {
  color: var(--muted);
  line-height: 1.45;
}

.chart {
  min-height: 278px;
  display: grid;
  align-items: end;
  grid-template-columns: repeat(8, 1fr);
  gap: 12px;
  padding: 24px 6px 32px;
  border-radius: 22px;
  background:
    linear-gradient(rgba(21, 18, 13, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(21, 18, 13, 0.06) 1px, transparent 1px),
    #fffdf6;
  background-size: 28px 28px;
}

.bar {
  min-height: 34px;
  border-radius: 16px 16px 8px 8px;
  background: linear-gradient(180deg, #15120d, #2b2519);
  position: relative;
  box-shadow: 0 12px 22px rgba(21, 18, 13, 0.18);
}

.bar.secondary {
  background: linear-gradient(180deg, #f9dc3b, #efc900);
  border: 1px solid rgba(21, 18, 13, 0.11);
}

.bar span {
  position: absolute;
  left: 50%;
  bottom: -25px;
  transform: translateX(-50%);
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  font-weight: 700;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: 18px;
  border: 1px solid rgba(21, 18, 13, 0.08);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(255, 255, 255, 0.76);
}

th,
td {
  text-align: left;
  border-bottom: 1px solid rgba(21, 18, 13, 0.08);
  padding: 13px 11px;
  font-size: 14px;
}

th {
  color: var(--black);
  background: rgba(249, 220, 59, 0.34);
  font-weight: 800;
}

td {
  color: var(--black-soft);
}

tr:last-child td {
  border-bottom: 0;
}

.forecast,
.pnl-list {
  display: grid;
  gap: 11px;
}

.forecast-item,
.pnl-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 15px;
  border-radius: 18px;
  background: #fffdf6;
  border: 1px solid rgba(21, 18, 13, 0.08);
  box-shadow: 0 8px 18px rgba(21, 18, 13, 0.06);
}

.forecast-item span,
.pnl-row span {
  color: var(--muted);
  text-align: right;
}

.marketing-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.result-box {
  grid-column: 1 / -1;
  padding: 17px;
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(249, 220, 59, 0.38), rgba(255, 255, 255, 0.9)),
    var(--white);
  line-height: 1.5;
  border: 1px solid rgba(21, 18, 13, 0.08);
}

.guest-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.guest-grid div {
  border: 1px solid rgba(21, 18, 13, 0.08);
  border-radius: 20px;
  padding: 14px;
  min-height: 98px;
  background: #fffdf6;
  box-shadow: 0 8px 18px rgba(21, 18, 13, 0.06);
}

.guest-grid strong,
.guest-grid span {
  display: block;
}

.guest-grid span {
  color: var(--muted);
  margin-top: 8px;
  line-height: 1.4;
}

.mini-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.mini-summary div {
  border-radius: 20px;
  padding: 16px;
  background: var(--black);
  color: var(--white);
  box-shadow: 0 15px 30px rgba(21, 18, 13, 0.15);
}

.mini-summary strong,
.mini-summary span {
  display: block;
}

.mini-summary strong {
  font-size: 24px;
}

.mini-summary span {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.76);
}

.request-toolbar,
.admin-grid,
.form-grid {
  display: grid;
  gap: 14px;
}

.request-toolbar {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 14px;
}

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

.admin-card {
  border: 1px solid rgba(21, 18, 13, 0.08);
  border-radius: 24px;
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(249, 220, 59, 0.20), rgba(255, 255, 255, 0.92)),
    var(--white);
  box-shadow: 0 10px 22px rgba(21, 18, 13, 0.08);
}

.admin-card h4 {
  margin: 0 0 14px;
  font-size: 17px;
}

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

.mapping-list,
.source-list {
  display: grid;
  gap: 10px;
}

.mapping-list div,
.source-list span {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  border-radius: 17px;
  padding: 12px 13px;
  background: #fffdf6;
  border: 1px solid rgba(21, 18, 13, 0.08);
}

.mapping-list span,
.muted-text {
  color: var(--muted);
}

.chat-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 16px;
}

.chat-list {
  display: grid;
  align-content: start;
  gap: 10px;
}

.chat-list button {
  border: 1px solid rgba(21, 18, 13, 0.10);
  border-radius: 17px;
  padding: 12px;
  background: var(--white);
  text-align: left;
  cursor: pointer;
  font-weight: 700;
}

.chat-list button.active {
  background: var(--yellow);
}

.chat-window {
  border-radius: 24px;
  background: #fffdf6;
  border: 1px solid rgba(21, 18, 13, 0.08);
  overflow: hidden;
}

.chat-messages {
  display: grid;
  gap: 12px;
  padding: 18px;
  min-height: 260px;
}

.message {
  max-width: 72%;
  border-radius: 20px;
  padding: 13px 15px;
  box-shadow: 0 9px 18px rgba(21, 18, 13, 0.07);
}

.message strong,
.message span {
  display: block;
}

.message span {
  margin-top: 6px;
  line-height: 1.45;
}

.message.admin {
  background: var(--black);
  color: var(--white);
}

.message.user {
  justify-self: end;
  background: var(--yellow);
}

.chat-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 14px;
  background: rgba(249, 220, 59, 0.20);
}

.chat-input button {
  border: 0;
  border-radius: 16px;
  padding: 0 18px;
  background: var(--black);
  color: var(--white);
  font-weight: 800;
  cursor: pointer;
}

@media (max-width: 1120px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .admin-grid,
  .chat-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .topbar,
  .hero-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar,
  .layout {
    padding-left: 16px;
    padding-right: 16px;
  }

  .brand-mark {
    width: 56px;
    height: 56px;
    font-size: 36px;
  }

  .sidebar,
  .dashboard-grid,
  .kpi-grid,
  .marketing-form,
  .guest-grid,
  .mini-summary,
  .request-toolbar,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .panel.wide {
    grid-column: auto;
  }
}
