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

:root {
  --bg: #05060a;
  --bg-soft: #0b0d16;
  --accent: #f2a0ff;
  --accent-soft: rgba(242,160,255,0.18);
  --text-main: #f7f7ff;
  --text-muted: #a9acc4;
  --border-soft: rgba(255,255,255,0.08);
  --glass: rgba(5,6,12,0.72);
}

/* GENERAL LAYOUT */

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #05060a;
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  align-items: stretch;
  justify-content: center;
  overflow-x: hidden;
}

.page {
  width: 100%;
  min-height: 100vh;
  position: relative;
}

/* BACKGROUND LAYERS */

.bg-face {
  position: fixed;
  top: 0;
  left: 0;
  width: 35vw;
  height: 100vh;
  background-image:
    linear-gradient(to bottom, rgba(0,0,0,0.25), rgba(0,0,0,0.7)),
    url("../img/donna.png");
  background-size: cover;
  background-position: left center;
  background-repeat: no-repeat;
  z-index: -2;
  opacity: 0.95;
}

.bg-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 0%, rgba(242,160,255,0.18), transparent 60%),
    radial-gradient(circle at 90% 90%, rgba(68,142,255,0.2), transparent 55%),
    linear-gradient(to bottom, rgba(5,6,12,0.5), rgba(5,6,12,0.96));
  z-index: -1;
}

/* GRID SHELL */

.shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 16px 40px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: relative;
}

/* HEADER */

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 40px;
}

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

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 20% 0%, #f2a0ff, #3d2f74);
  box-shadow: 0 0 20px rgba(242,160,255,0.4),
              0 10px 30px rgba(0,0,0,0.7);
  font-size: 16px;
  font-weight: 600;
  color: #05060a;
}

.brand-text-main {
  font-weight: 600;
  letter-spacing: 0.12em;
  font-size: 12px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.brand-text-sub {
  font-size: 11px;
  color: rgba(169,172,196,0.8);
}

.chip-soon {
  border-radius: 999px;
  padding: 6px 14px;
  border: 1px solid rgba(242,160,255,0.4);
  background: linear-gradient(to right,
    rgba(242,160,255,0.12),
    rgba(10,10,20,0.9));
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: radial-gradient(circle, #f2a0ff, #e341ff);
  box-shadow: 0 0 12px rgba(242,160,255,0.8);
}

/* MAIN CONTENT */

main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
}

.hero-card {
  background: linear-gradient(135deg, rgba(10,12,26,0.95), rgba(10,10,20,0.98));
  border-radius: 24px;
  padding: 28px 26px 24px;
  border: 1px solid var(--border-soft);
  box-shadow: 0 18px 45px rgba(0,0,0,0.9),
              0 0 0 1px rgba(255,255,255,0.02);
  backdrop-filter: blur(18px);
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-muted);
  background: radial-gradient(circle at 0 0, var(--accent-soft), transparent 55%);
  border: 1px solid rgba(255,255,255,0.09);
  margin-bottom: 14px;
}

h1 {
  font-size: clamp(32px, 4vw, 42px);
  line-height: 1.1;
  margin-bottom: 10px;
  letter-spacing: 0.02em;
}

h1 .highlight {
  background: linear-gradient(120deg, #f2a0ff, #a8c7ff);
  -webkit-background-clip: text;
  color: transparent;
}

.hero-sub {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 20px;
}

/* BUTTON */

.btn-primary {
  border: none;
  border-radius: 999px;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: radial-gradient(circle at 0 0, #f2a0ff, #a45bff);
  color: #05060a;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 0 20px rgba(242,160,255,0.5),
              0 14px 30px rgba(0,0,0,0.9);
  margin-bottom: 10px;
}

.btn-primary-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #05060a;
  opacity: 0.8;
}

/* FOOTER */

footer {
  margin-top: 40px;
  font-size: 11px;
  color: rgba(135,139,163,0.9);
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 14px;
  padding-bottom: 8px;
  flex-wrap: wrap;
}

/* LOGIN MODAL */

.login-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.login-modal-content {
  background: #0b0d16;
  border-radius: 18px;
  padding: 22px 20px 18px;
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 18px 45px rgba(0,0,0,0.9);
  width: 100%;
  max-width: 340px;
  color: var(--text-main);
}

.login-modal-content h3 {
  margin-bottom: 10px;
  font-size: 18px;
}

.login-close {
  float: right;
  cursor: pointer;
  font-size: 20px;
  color: var(--text-muted);
}

.login-modal-content label {
  display: block;
  font-size: 12px;
  margin-top: 10px;
  margin-bottom: 4px;
  color: var(--text-muted);
}

.login-modal-content input {
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.18);
  background: #05060a;
  color: var(--text-main);
  font-size: 13px;
}

.login-modal-content button[type="submit"] {
  width: 100%;
  margin-top: 14px;
  border-radius: 999px;
  border: none;
  padding: 9px 14px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: radial-gradient(circle at 0 0, #f2a0ff, #a45bff);
  color: #05060a;
  cursor: pointer;
  box-shadow: 0 0 16px rgba(242,160,255,0.4);
}

.login-error {
  margin-top: 8px;
  font-size: 12px;
  color: #ff6b81;
  min-height: 16px;
}

/* RESPONSIVE TWEAKS */

@media (max-width: 1100px) {
  .bg-face {
    display: none;
  }

  .shell {
    padding: 24px 16px 32px;
  }

  header {
    margin-bottom: 24px;
  }

  main {
    padding: 24px 16px;
  }

  footer {
    margin-top: 24px;
  }
}

/* ----- DASHBOARD LAYOUT ----- */

.dash-page {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

/* HEADER */
.dash-header {
  height: 60px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #0f0f12;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

/* MAIN LAYOUT: SIDEBAR + CONTENT */
.dash-layout {
  flex: 1;
  display: flex;
  overflow: hidden;
}

/* SIDEBAR */
.dash-sidebar {
  width: 260px;
  padding: 20px;
  background: #121217;
  border-right: 1px solid rgba(255,255,255,0.05);
  overflow-y: auto;
}

.sidebar-section {
  margin-bottom: 30px;
}

.sidebar-create-btn {
  width: 100%;
  padding: 12px;
  font-size: 16px;
  border-radius: 12px;
}

.persona-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.persona-item-empty {
  padding: 10px 0;
  opacity: 0.7;
}

/* MAIN CONTENT */
.dash-main {
  flex: 1;
  padding: 30px;
  overflow-y: auto;
}

/* CHAT CONTAINER */
.chat-window {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 160px);
  border-radius: 12px;
  background: #18181d;
  padding: 20px;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding-right: 10px;
}

.msg {
  margin-bottom: 20px;
}

.msg-label {
  font-size: 12px;
  opacity: 0.6;
  margin-bottom: 4px;
}

.msg-text {
  background: #23232a;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 15px;
  line-height: 1.4;
  max-width: 75%;
}

.msg-user .msg-text {
  background: #5b2d82;
  margin-left: auto;
}

/* CHAT INPUT */
.chat-input {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.chat-input textarea {
  flex: 1;
  resize: none;
  padding: 12px;
  border-radius: 10px;
}

.chat-input button {
  padding: 0 20px;
  border-radius: 10px;
}

/* MODULE HEADER FIX */
.module-header {
  margin-bottom: 20px;
}

.module-title {
  margin-bottom: 10px;
}

.module-heading {
  font-size: 32px;
  font-weight: 700;
  margin: 0;
  color: #ffffff;
}

.module-subtitle {
  opacity: 0.8;
  margin-top: 5px;
  font-size: 15px;
}
