/* athena-web-logos: la stessa grafica di Athena Logos (colori e pagina di accesso di packages/app) */
:root {
  --bg: #05080f; --bg-2: #0a1018; --panel: #0b1420cc; --line: #152536; --line-2: #1d3a52;
  --cyan: #4fc3f7; --cyan-2: #2e9bff; --red: #f87171; --text: #dcecf8; --muted: #9fb3c8; --dim: #5d7488;
  --field: #070e16; --btn: #12324d; --btn-hover: #17405f; --user: #0f2133; --code: #0a1622;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: radial-gradient(ellipse at 55% 25%, #0b1a2b 0%, var(--bg) 62%) fixed; color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 14px;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 1px solid var(--line-2); background: transparent; color: var(--muted); border-radius: 9px; padding: 7px 12px; }
button:hover:not(:disabled) { border-color: #2f6f99; color: var(--text); }
button.primary { border-color: var(--cyan); background: var(--btn); color: var(--text); }
button.primary:hover:not(:disabled) { background: var(--btn-hover); }
button:disabled { opacity: .55; cursor: default; }
input, textarea { width: 100%; padding: 9px 11px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--field); color: var(--text); font-size: 14px; outline: 0; }
input:focus, textarea:focus { border-color: #2f6f99; }
a { color: var(--cyan); }
.muted { color: var(--muted); }
.error { color: var(--red); font-size: 13px; min-height: 1.1em; margin: 0; }

/* l'accesso: come la scheda di Logos */
.access { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.box {
  width: min(380px, 100%); display: flex; flex-direction: column; gap: 12px; padding: 26px 24px 24px;
  border: 1px solid var(--line-2); border-radius: 16px; background: var(--panel);
}
.brand { display: flex; align-items: center; gap: 12px; letter-spacing: .32em; font-size: 15px; color: var(--text); margin-bottom: 4px; }
.brand svg { width: 28px; height: 28px; color: var(--cyan); }
.box h1 { margin: 0; font-size: 20px; font-weight: 400; letter-spacing: .04em; }
.box p { margin: 0; font-size: 13px; line-height: 1.5; }
.box form { display: flex; flex-direction: column; gap: 12px; }
.box label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--muted); }
.box button.primary { margin-top: 4px; padding: 10px 14px; border-radius: 10px; font-size: 14px; }

/* la chat */
.layout { display: grid; grid-template-columns: 250px 1fr; height: 100vh; }
.layout.canvas-open { grid-template-columns: 250px 1fr 40%; }
.side { border-right: 1px solid var(--line); padding: 14px 12px; overflow: auto; display: flex; flex-direction: column; gap: 6px; background: #070d16cc; }
.side .brand { margin: 2px 4px 10px; font-size: 13px; }
.side .brand svg { width: 22px; height: 22px; }
.side .chat-item { text-align: left; border: 0; background: transparent; color: var(--muted); padding: 8px 10px; border-radius: 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side .chat-item:hover { color: var(--text); background: #0d1a28; }
.side .chat-item.on { color: var(--text); background: #10243a; }
.side .foot { margin-top: auto; display: grid; gap: 6px; }
.chat { display: flex; flex-direction: column; min-width: 0; height: 100vh; }
.top { display: flex; align-items: center; gap: 8px; padding: 10px 18px; border-bottom: 1px solid var(--line); }
.top .title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: .02em; }
.msgs { flex: 1; overflow: auto; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.msg { max-width: 760px; line-height: 1.65; overflow-wrap: anywhere; }
.msg p { margin: 0 0 8px; }
.msg.user { align-self: flex-end; background: var(--user); border: 1px solid var(--line-2); padding: 8px 13px; border-radius: 14px; white-space: pre-wrap; }
.msg pre { background: var(--code); border: 1px solid var(--line); padding: 10px; border-radius: 9px; overflow: auto; }
.msg code { background: var(--code); padding: 1px 4px; border-radius: 4px; font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 12.5px; }
.msg pre code { background: none; padding: 0; }
.tool { font-size: 12.5px; color: var(--dim); border-left: 2px solid var(--line-2); padding-left: 9px; }
.tool .ask { display: flex; gap: 6px; align-items: center; margin-top: 5px; color: var(--muted); }
.att { font-size: 12.5px; color: var(--muted); margin-top: 6px; display: flex; gap: 8px; align-items: center; }
.compose { border-top: 1px solid var(--line); padding: 10px 18px 14px; display: grid; gap: 8px; }
.compose .row { display: flex; gap: 8px; align-items: flex-end; }
.compose textarea { min-height: 46px; max-height: 200px; resize: vertical; }
.pending { display: flex; flex-wrap: wrap; gap: 6px; font-size: 12px; }
.pending span { border: 1px solid var(--line-2); padding: 2px 9px; border-radius: 999px; color: var(--muted); }
.canvas { border-left: 1px solid var(--line); display: flex; flex-direction: column; min-width: 0; height: 100vh; background: #070d16cc; }
.canvas .tabs { display: flex; gap: 6px; flex-wrap: wrap; padding: 10px; border-bottom: 1px solid var(--line); }
.canvas .body { flex: 1; overflow: auto; padding: 14px; }
.canvas textarea { width: 100%; height: 60vh; font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 13px; }
.canvas iframe { width: 100%; height: 70vh; border: 1px solid var(--line-2); border-radius: 9px; background: #fff; }
.banner { padding: 6px 18px; font-size: 12.5px; background: #0d1a28; color: var(--muted); border-bottom: 1px solid var(--line); }
#menu { display: none; }
@media (max-width: 760px) {
  .layout, .layout.canvas-open { grid-template-columns: 1fr; }
  .side { display: none; }
  #menu { display: inline-block; }
  .layout.show-side .side { display: flex; position: fixed; inset: 0; z-index: 5; background: var(--bg); }
  .canvas { position: fixed; inset: 0; z-index: 6; background: var(--bg); }
}
