* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #080a0e;
  --bg2: #101319;
  --panel: #12161d;
  --panel2: #181d26;
  --border: #292f3a;

  --text: #f4f6f8;
  --muted: #8c96a8;

  --green: #58f28d;
  --red: #ff5e68;
  --yellow: #ffd45e;

  --accent: #d6ff4f;
  --accent-dark: #b6dc3a;
}

html,
body {
  width: 100%;
  min-height: 100%;
}

body {
  background:
    radial-gradient(
      circle at top,
      #161b21 0%,
      #080a0e 50%
    );

  color: var(--text);

  font-family:
    Inter,
    Arial,
    Helvetica,
    sans-serif;
}


/* ============================== */
/* GENERAL */
/* ============================== */

.screen {
  min-height: 100vh;
}

.hidden {
  display: none !important;
}

.eyebrow {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 2px;
}


/* ============================== */
/* LOGIN */
/* ============================== */

.login-screen {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 30px;
}

.login-card {
  width: 100%;
  max-width: 410px;

  background:
    linear-gradient(
      145deg,
      #141922,
      #0d1016
    );

  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 42px;

  box-shadow:
    0 35px 90px rgba(0, 0, 0, 0.55);
}

.brand-logo {
  width: 72px;
  height: 72px;

  display: flex;
  justify-content: center;
  align-items: center;

  margin: auto;
  margin-bottom: 18px;

  border-radius: 20px;

  background: var(--accent);

  color: #111;
  font-size: 38px;

  box-shadow:
    0 0 40px rgba(214, 255, 79, 0.15);
}

.login-card h1 {
  text-align: center;
  font-size: 28px;
  letter-spacing: 3px;
}

.subtitle {
  text-align: center;
  color: var(--muted);

  margin-top: 8px;
  margin-bottom: 32px;
}

.field {
  margin-bottom: 20px;
}

.field label {
  display: block;

  color: #b9c1cf;
  font-size: 13px;

  margin-bottom: 9px;
}

.field input {
  width: 100%;
  height: 48px;

  padding: 0 15px;

  background: #090c11;
  color: white;

  border: 1px solid #2e3541;
  border-radius: 11px;

  outline: none;
  font-size: 15px;

  transition: 0.2s;
}

.field input:focus {
  border-color: var(--accent);

  box-shadow:
    0 0 0 3px rgba(214, 255, 79, 0.07);
}

.password-wrapper {
  position: relative;
}

.password-wrapper input {
  padding-right: 50px;
}

.password-toggle {
  position: absolute;

  top: 50%;
  right: 8px;

  transform: translateY(-50%);

  width: 35px;
  height: 35px;

  background: transparent;
  border: none;

  color: white;

  cursor: pointer;
}

.login-error {
  min-height: 20px;

  margin-bottom: 8px;

  color: var(--red);

  text-align: center;
  font-size: 13px;
}

.login-button {
  width: 100%;
  height: 50px;

  border: none;
  border-radius: 11px;

  background: var(--accent);
  color: #111;

  cursor: pointer;

  font-weight: 800;
  letter-spacing: 1px;

  transition: 0.2s;
}

.login-button:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
}

.login-footer {
  margin-top: 28px;

  text-align: center;

  color: #596274;
  font-size: 11px;
}


/* ============================== */
/* TOP BAR */
/* ============================== */

.topbar {
  min-height: 72px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 0 28px;

  background: rgba(10, 12, 16, 0.94);

  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
}

.brand-icon {
  width: 42px;
  height: 42px;

  display: flex;
  justify-content: center;
  align-items: center;

  border-radius: 12px;

  background: var(--accent);

  font-size: 22px;
}

.brand h2 {
  font-size: 16px;
  letter-spacing: 2px;
}

.brand span {
  display: block;

  margin-top: 3px;

  color: var(--muted);

  font-size: 9px;
  letter-spacing: 2px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.local-badge {
  background: rgba(88, 242, 141, 0.1);

  border: 1px solid rgba(88, 242, 141, 0.2);

  color: var(--green);

  padding: 7px 11px;

  border-radius: 8px;

  font-size: 11px;
  font-weight: 700;
}

.logout-button {
  background: transparent;

  border: 1px solid var(--border);

  color: #a9b2c2;

  padding: 8px 13px;

  border-radius: 8px;

  cursor: pointer;
}

.logout-button:hover {
  border-color: var(--red);
  color: var(--red);
}


/* ============================== */
/* DASHBOARD */
/* ============================== */

.dashboard {
  width: min(1460px, 100%);

  margin: auto;

  padding: 24px 28px 34px;
}

.dashboard-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;

  margin-bottom: 20px;
}

.dashboard-heading h1 {
  margin-top: 4px;

  font-size: 24px;
  letter-spacing: -0.5px;
}

.dashboard-heading p {
  margin-top: 7px;

  color: var(--muted);
  font-size: 12px;
}

.character-chip {
  display: flex;
  align-items: center;
  gap: 7px;

  padding: 10px 12px;

  border: 1px solid var(--border);
  border-radius: 10px;

  background: rgba(255, 255, 255, 0.02);

  color: var(--muted);

  font-size: 10px;
  letter-spacing: 1px;
}

.character-chip strong {
  color: white;
}

.chip-dot {
  width: 7px;
  height: 7px;

  border-radius: 50%;

  background: var(--green);

  box-shadow:
    0 0 8px rgba(88, 242, 141, 0.55);
}


/* ============================== */
/* STATUS */
/* ============================== */

.status-section {
  margin-bottom: 16px;
}

.section-title-row {
  margin-bottom: 10px;
}

.section-title-row h2 {
  margin-top: 4px;

  font-size: 14px;
}

.status-grid {
  display: grid;

  grid-template-columns:
    repeat(6, minmax(0, 1fr));

  gap: 10px;
}

.status-card {
  min-height: 72px;

  background: var(--panel);

  border: 1px solid var(--border);
  border-radius: 12px;

  padding: 13px 14px;
}

.status-name {
  display: block;

  color: var(--muted);

  font-size: 9px;
  letter-spacing: 1.5px;

  margin-bottom: 13px;
}

.status-value {
  display: flex;
  align-items: center;
  gap: 8px;

  font-size: 12px;
}

.dot {
  width: 7px;
  height: 7px;

  border-radius: 50%;
}

.green {
  background: var(--green);

  box-shadow:
    0 0 9px rgba(88, 242, 141, 0.6);
}

.red {
  background: var(--red);

  box-shadow:
    0 0 9px rgba(255, 94, 104, 0.5);
}

.yellow {
  background: var(--yellow);

  box-shadow:
    0 0 9px rgba(255, 212, 94, 0.5);
}


/* ============================== */
/* WORKSPACE */
/* ============================== */

.workspace-grid {
  display: grid;

  grid-template-columns:
    minmax(0, 1.85fr)
    minmax(350px, 0.78fr);

  gap: 16px;

  align-items: stretch;
}

.panel {
  background: var(--panel);

  border: 1px solid var(--border);
  border-radius: 15px;
}

.scene-panel {
  padding: 16px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;

  gap: 14px;

  margin-bottom: 13px;
}

.panel-header.compact {
  margin-bottom: 15px;
}

.panel-small {
  color: var(--muted);

  font-size: 8px;
  letter-spacing: 2px;
}

.panel h3 {
  font-size: 14px;

  margin-top: 5px;
}

.scene-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.scene-badge {
  color: var(--green);

  border: 1px solid rgba(88, 242, 141, 0.25);

  background: rgba(88, 242, 141, 0.08);

  padding: 7px 10px;

  border-radius: 8px;

  font-size: 9px;
  font-weight: bold;
}


/* ============================== */
/* SCENE */
/* ============================== */

.scene {
  position: relative;

  width: 100%;

  aspect-ratio: 16 / 9;

  overflow: hidden;

  display: flex;
  justify-content: center;
  align-items: center;

  background:
    linear-gradient(
      145deg,
      #050607,
      #10141b
    );

  border: 1px solid #252b35;
  border-radius: 12px;
}

.scene::before {
  content: "";

  position: absolute;

  inset: 0;

  background-image:
    linear-gradient(
      rgba(255, 255, 255, 0.025) 1px,
      transparent 1px
    ),
    linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.025) 1px,
      transparent 1px
    );

  background-size: 40px 40px;
}

.scene-glow {
  position: absolute;

  width: 400px;
  height: 400px;

  border-radius: 50%;

  background: rgba(214, 255, 79, 0.06);

  filter: blur(80px);
}


/* ============================== */
/* DOGESANTA */
/* ============================== */

.character-stage {
  position: relative;

  z-index: 2;

  width: 100%;
  height: 100%;

  display: flex;
  flex-direction: column;

  justify-content: center;
  align-items: center;
}

.character-image {
  display: block;

  width: auto;
  height: 74%;

  max-width: 85%;

  object-fit: contain;

  user-select: none;
  pointer-events: none;

  filter:
    drop-shadow(
      0 18px 25px rgba(0, 0, 0, 0.45)
    );

  transition:
    transform 0.12s ease,
    filter 0.12s ease;
}

.character-image.talking {
  transform: scale(1.015);

  filter:
    drop-shadow(
      0 20px 28px rgba(0, 0, 0, 0.5)
    )
    drop-shadow(
      0 0 18px rgba(214, 255, 79, 0.08)
    );
}

.character-name {
  margin-top: 8px;

  color: white;

  font-size: 13px;
  font-weight: 800;
  letter-spacing: 4px;
}

.character-stage small {
  margin-top: 5px;

  color: var(--muted);

  font-size: 10px;
  letter-spacing: 1px;
}


/* ============================== */
/* TALKING TEST */
/* ============================== */

.test-talking-button {
  min-height: 34px;

  padding: 0 12px;

  background: #1c222c;

  border: 1px solid #353d49;
  border-radius: 8px;

  color: #d7dde7;

  cursor: pointer;

  font-size: 10px;
  font-weight: 700;

  transition: 0.2s;
}

.test-talking-button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.test-talking-button.active {
  background:
    rgba(255, 212, 94, 0.1);

  border-color:
    rgba(255, 212, 94, 0.45);

  color: var(--yellow);
}


/* ============================== */
/* STREAM TOOLBAR */
/* ============================== */

.stream-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 14px;

  margin-top: 13px;
  padding-top: 13px;

  border-top: 1px solid var(--border);
}

.stream-toolbar-copy {
  min-width: 150px;
}

.stream-toolbar-copy strong {
  display: block;

  margin-top: 5px;

  color: #d9dee7;

  font-size: 11px;
}

.stream-controls {
  flex: 1;

  display: grid;

  grid-template-columns:
    1.4fr 0.8fr 0.8fr;

  gap: 8px;
}

.control-button {
  min-height: 42px;

  border-radius: 9px;

  font-size: 11px;
  font-weight: 800;

  cursor: pointer;

  transition: 0.2s;
}

.control-button:disabled {
  opacity: 0.35;

  cursor: not-allowed;
}

.start {
  background: var(--accent);

  border: none;

  color: #10120c;
}

.start:not(:disabled):hover {
  background: var(--accent-dark);
}

.break {
  background: #212630;

  border: 1px solid #353d49;

  color: white;
}

.stop {
  background: rgba(255, 94, 104, 0.1);

  border: 1px solid rgba(255, 94, 104, 0.35);

  color: var(--red);
}


/* ============================== */
/* SIDE COLUMN */
/* ============================== */

.side-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
}


/* ============================== */
/* VOICE PANEL */
/* ============================== */

.voice-panel {
  padding: 16px;
}

.voice-engine-badge {
  padding: 6px 8px;

  background: rgba(255, 212, 94, 0.08);

  border: 1px solid rgba(255, 212, 94, 0.22);
  border-radius: 7px;

  color: var(--yellow);

  font-size: 8px;
  font-weight: 800;
  letter-spacing: 1px;
}

.voice-label {
  display: block;

  margin-bottom: 7px;

  color: var(--muted);

  font-size: 9px;
  letter-spacing: 1px;
}

.voice-textarea {
  width: 100%;
  min-height: 84px;

  resize: vertical;

  padding: 11px 12px;

  background: #090b0f;

  border: 1px solid #2b323e;
  border-radius: 9px;

  color: #e8ecf3;

  outline: none;

  font-family: inherit;
  font-size: 12px;
  line-height: 1.5;

  transition: 0.2s;
}

.voice-textarea:focus {
  border-color: var(--accent);

  box-shadow:
    0 0 0 3px rgba(214, 255, 79, 0.05);
}

.voice-row {
  display: grid;

  grid-template-columns:
    minmax(0, 1fr) auto;

  align-items: end;

  gap: 9px;

  margin-top: 11px;
}

.voice-select-wrap {
  min-width: 0;
}

.voice-select {
  width: 100%;
  height: 38px;

  padding: 0 9px;

  background: #0b0e13;

  border: 1px solid #2b323e;
  border-radius: 8px;

  color: #cfd5df;

  outline: none;

  font-size: 10px;
}

.speak-button {
  height: 38px;

  padding: 0 15px;

  border: none;
  border-radius: 8px;

  background: var(--accent);

  color: #111;

  cursor: pointer;

  font-size: 10px;
  font-weight: 900;

  transition: 0.2s;
}

.speak-button:hover {
  background: var(--accent-dark);
}

.speak-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.voice-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;

  margin-top: 9px;

  color: #687385;

  font-size: 8px;
}


/* ============================== */
/* ACTIVITY */
/* ============================== */

.activity-panel {
  padding: 16px;
}

.activity-block {
  min-height: 62px;

  padding: 2px 0;
}

.activity-label {
  color: var(--muted);

  font-size: 8px;
  letter-spacing: 2px;
}

.activity-block p {
  margin-top: 10px;

  color: #cad0da;

  font-size: 12px;
  line-height: 1.55;

  word-break: break-word;
}

.activity-divider {
  height: 1px;

  margin: 8px 0 12px;

  background: var(--border);
}


/* ============================== */
/* LOGS */
/* ============================== */

.logs-panel {
  min-height: 0;

  padding: 16px;

  display: flex;
  flex-direction: column;
}

.logs-header {
  display: flex;

  justify-content: space-between;
  align-items: center;

  margin-bottom: 13px;
}

.clear-button {
  background: transparent;

  border: 1px solid var(--border);

  color: var(--muted);

  border-radius: 7px;

  padding: 6px 9px;

  cursor: pointer;

  font-size: 9px;
}

.logs {
  min-height: 190px;
  max-height: 290px;

  overflow-y: auto;

  background: #090b0f;

  border: 1px solid #232934;
  border-radius: 10px;

  padding: 12px;

  font-family:
    Consolas,
    monospace;

  font-size: 10px;
  line-height: 1.75;
}

.log-item {
  color: #8e98a9;
}

.log-time {
  color: #4c5666;

  margin-right: 7px;
}

.log-success {
  color: var(--green);
}

.log-warning {
  color: var(--yellow);
}

.log-error {
  color: var(--red);
}


/* ============================== */
/* RESPONSIVE */
/* ============================== */

@media (max-width: 1150px) {

  .status-grid {
    grid-template-columns:
      repeat(3, 1fr);
  }

  .workspace-grid {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 760px) {

  .dashboard {
    padding: 18px 15px 28px;
  }

  .topbar {
    padding: 0 15px;
  }

  .dashboard-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .status-grid {
    grid-template-columns:
      repeat(2, 1fr);
  }

  .scene-actions {
    align-items: flex-end;
    flex-direction: column;
  }

  .stream-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .stream-controls {
    grid-template-columns: 1fr;
  }

  .voice-row {
    grid-template-columns: 1fr;
  }

  .local-badge {
    display: none;
  }

  .login-card {
    padding: 28px 22px;
  }

}
/* ============================== */
/* DOGESANTA FIXED VOICE */
/* ============================== */

.fixed-voice-card {
  display: flex;
  flex-direction: column;
  gap: 5px;

  margin-bottom: 13px;

  padding: 10px 11px;

  background: #0b0e13;

  border: 1px solid #2b323e;
  border-radius: 9px;
}

.fixed-voice-title {
  color: #eef2f8;

  font-size: 10px;
  font-weight: 800;
}

.fixed-voice-name {
  color: var(--muted);

  font-size: 8px;
  line-height: 1.4;
}

.fixed-speak-button {
  width: 100%;

  margin-top: 10px;
}


/* ============================== */
/* DOGESANTA AI TEST */
/* ============================== */

.ai-test-panel {
  padding: 16px;
}

.ai-model-badge {
  padding: 6px 8px;

  background: rgba(214, 255, 79, 0.08);

  border: 1px solid rgba(214, 255, 79, 0.22);
  border-radius: 7px;

  color: var(--accent);

  font-size: 8px;
  font-weight: 800;
  letter-spacing: 1px;
}

.ai-test-input {
  width: 100%;
  min-height: 74px;

  resize: vertical;

  padding: 11px 12px;

  background: #090b0f;

  border: 1px solid #2b323e;
  border-radius: 9px;

  color: #e8ecf3;

  outline: none;

  font-family: inherit;
  font-size: 12px;
  line-height: 1.5;

  transition: 0.2s;
}

.ai-test-input:focus {
  border-color: var(--accent);

  box-shadow:
    0 0 0 3px rgba(214, 255, 79, 0.05);
}

.ai-test-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;

  margin-top: 10px;
}

.ai-hint {
  color: #687385;

  font-size: 8px;
  line-height: 1.4;
}

.send-message-button {
  min-width: 92px;
  height: 38px;

  padding: 0 14px;

  border: none;
  border-radius: 8px;

  background: var(--accent);

  color: #111;

  cursor: pointer;

  font-size: 10px;
  font-weight: 900;

  transition: 0.2s;
}

.send-message-button:hover {
  background: var(--accent-dark);
}

.send-message-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ============================== */
/* DASHBOARD ACTIONS / STUDIO */
/* ============================== */

.dashboard-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.studio-launch-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 10px;

  padding: 7px 10px 7px 11px;

  border: 1px solid #34404e;
  border-radius: 11px;

  background:
    linear-gradient(
      145deg,
      rgba(29, 36, 46, 0.96),
      rgba(16, 20, 27, 0.96)
    );

  color: #f4f6f8;

  cursor: pointer;

  box-shadow:
    0 8px 22px rgba(0, 0, 0, 0.18);

  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    background 0.16s ease,
    box-shadow 0.16s ease;
}

.studio-launch-button:hover {
  transform: translateY(-1px);

  border-color: rgba(214, 255, 79, 0.65);

  background:
    linear-gradient(
      145deg,
      rgba(36, 45, 55, 0.98),
      rgba(18, 23, 30, 0.98)
    );

  box-shadow:
    0 10px 26px rgba(0, 0, 0, 0.24),
    0 0 0 3px rgba(214, 255, 79, 0.04);
}

.studio-launch-button:active {
  transform: translateY(0) scale(0.985);
}

.studio-launch-button:focus-visible {
  outline: none;

  border-color: var(--accent);

  box-shadow:
    0 0 0 3px rgba(214, 255, 79, 0.09);
}

.studio-launch-icon {
  width: 30px;
  height: 30px;

  display: grid;
  place-items: center;

  flex: 0 0 auto;

  border-radius: 8px;

  background: var(--accent);

  color: #111;

  font-size: 15px;

  box-shadow:
    0 0 18px rgba(214, 255, 79, 0.10);
}

.studio-launch-copy {
  min-width: 0;

  display: flex;
  flex-direction: column;
  align-items: flex-start;

  line-height: 1.05;
}

.studio-launch-copy strong {
  color: #ffffff;

  font-size: 9px;
  font-weight: 900;
  letter-spacing: 1px;

  white-space: nowrap;
}

.studio-launch-copy small {
  margin-top: 5px;

  color: #7f8a9d;

  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.35px;

  white-space: nowrap;
}

.studio-launch-arrow {
  margin-left: 2px;

  color: var(--accent);

  font-size: 15px;
  font-weight: 900;
}


/* ============================== */
/* EXTRA RESPONSIVE IMPROVEMENTS */
/* ============================== */

@media (max-width: 980px) {

  .dashboard-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-actions {
    width: 100%;

    justify-content: space-between;
  }

  .studio-launch-button {
    margin-left: auto;
  }

}

@media (max-width: 620px) {

  .dashboard {
    padding-left: 14px;
    padding-right: 14px;
  }

  .dashboard-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .character-chip {
    width: 100%;
    justify-content: center;
  }

  .studio-launch-button {
    width: 100%;
    margin-left: 0;

    justify-content: center;
  }

  .studio-launch-arrow {
    margin-left: auto;
  }

}
