.nzra-shell {
  --nzra-bg: #0c1118;
  --nzra-panel: #141c27;
  --nzra-panel-2: #1b2634;
  --nzra-text: #f4f7fb;
  --nzra-muted: #9cabbc;
  --nzra-accent: #f4a51c;
  --nzra-accent-strong: #ffc04a;
  --nzra-danger: #ef5d63;
  max-width: 1080px;
  min-height: 680px;
  margin: 32px auto;
  color: var(--nzra-text);
  background: radial-gradient(circle at top right, #23354a 0, var(--nzra-bg) 42%);
  border: 1px solid #2a394c;
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .28);
  overflow: hidden;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.nzra-shell *, .nzra-shell *::before, .nzra-shell *::after { box-sizing: border-box; }
.nzra-shell [hidden] { display: none !important; }
.nzra-card { max-width: 460px; margin: 150px auto; padding: 34px; background: rgba(20, 28, 39, .96); border: 1px solid #304055; border-radius: 16px; }
.nzra-brand { color: var(--nzra-accent); font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.nzra-card h2 { margin: 8px 0; color: var(--nzra-text); font-size: 2rem; }
.nzra-card p { color: var(--nzra-muted); }
.nzra-shell label { display: block; margin: 20px 0 7px; color: var(--nzra-text); font-weight: 700; }
.nzra-shell input, .nzra-shell textarea { width: 100%; color: var(--nzra-text); background: #0e151f; border: 1px solid #35475d; border-radius: 10px; padding: 13px 14px; outline: none; }
.nzra-shell input:focus, .nzra-shell textarea:focus { border-color: var(--nzra-accent); box-shadow: 0 0 0 3px rgba(244, 165, 28, .17); }
.nzra-shell button { appearance: none; border: 0; border-radius: 9px; padding: 11px 16px; color: #161004; background: var(--nzra-accent); font-weight: 800; cursor: pointer; transition: transform .15s ease, background .15s ease; }
.nzra-shell button:hover { background: var(--nzra-accent-strong); transform: translateY(-1px); }
.nzra-shell button:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.nzra-login button { width: 100%; margin-top: 16px; }
.nzra-error { min-height: 1.4em; margin-bottom: 0; color: #ff858a !important; }
.nzra-agent { display: grid; grid-template-rows: auto minmax(420px, 1fr) auto auto; min-height: 680px; }
.nzra-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 22px; background: rgba(13, 19, 28, .88); border-bottom: 1px solid #2a394c; }
.nzra-connection { display: inline-block; margin-top: 3px; color: var(--nzra-muted); font-size: .85rem; text-transform: capitalize; }
.nzra-toolbar-actions, .nzra-control-actions, .nzra-composer-actions { display: flex; align-items: center; gap: 9px; }
.nzra-shell button.nzra-secondary { color: var(--nzra-text); background: #253347; }
.nzra-shell button.nzra-stop { color: white; background: var(--nzra-danger); }
.nzra-messages { min-height: 420px; max-height: 65vh; overflow-y: auto; padding: 26px; scroll-behavior: smooth; }
.nzra-message { max-width: 84%; margin: 0 0 20px; }
.nzra-message.nzra-user { margin-left: auto; }
.nzra-message-label { margin: 0 0 6px; color: var(--nzra-muted); font-size: .74rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.nzra-user .nzra-message-label { text-align: right; }
.nzra-message-content { padding: 14px 16px; color: var(--nzra-text); background: var(--nzra-panel-2); border: 1px solid #2f4157; border-radius: 13px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; }
.nzra-user .nzra-message-content { color: #1d1508; background: #e8a12c; border-color: #f4b64c; }
.nzra-controls { margin: 0 22px 14px; padding: 16px; background: #2a2130; border: 1px solid #755274; border-radius: 12px; }
.nzra-controls strong { color: #ffd7ff; }
.nzra-controls p { margin: 6px 0 13px; color: #e4d4e6; white-space: pre-wrap; }
.nzra-controls textarea { margin-bottom: 10px; }
.nzra-composer { padding: 18px 22px 22px; background: rgba(13, 19, 28, .92); border-top: 1px solid #2a394c; }
.nzra-composer textarea { min-height: 82px; resize: vertical; }
.nzra-attachment { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; padding: 10px 12px; color: var(--nzra-text); background: #182333; border: 1px solid #344960; border-radius: 10px; }
.nzra-attachment > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .86rem; }
.nzra-shell button.nzra-attachment-remove { flex: 0 0 auto; padding: 6px 9px; color: #ffd4d6; background: #5b2930; font-size: .76rem; }
.nzra-composer-actions { justify-content: flex-end; margin-top: 10px; }
.nzra-composer-actions > span { margin-right: auto; color: var(--nzra-muted); font-size: .8rem; }
.nzra-shell label.nzra-attach-button { position: relative; display: inline-flex; align-items: center; margin: 0; padding: 10px 14px; color: var(--nzra-text); background: #253347; border-radius: 9px; font-size: .84rem; font-weight: 800; cursor: pointer; overflow: hidden; }
.nzra-shell label.nzra-attach-button:hover { background: #30425a; }
.nzra-shell label.nzra-attach-button:has(input:disabled) { opacity: .55; cursor: not-allowed; }
.nzra-shell .nzra-attach-button input[type="file"] { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (max-width: 700px) {
  .nzra-shell { min-height: 78vh; margin: 12px 0; border-radius: 12px; }
  .nzra-card { margin: 80px 16px; padding: 25px; }
  .nzra-agent { min-height: 78vh; grid-template-rows: auto minmax(360px, 1fr) auto auto; }
  .nzra-toolbar { align-items: flex-start; padding: 14px; }
  .nzra-toolbar-actions { flex-direction: column; align-items: stretch; }
  .nzra-toolbar-actions button { padding: 8px 10px; font-size: .78rem; }
  .nzra-messages { padding: 16px 12px; }
  .nzra-message { max-width: 94%; }
  .nzra-controls { margin: 0 12px 10px; }
  .nzra-composer { padding: 12px; }
}
