
.aip-tools { display: inline-flex; align-items: center; gap: 2px; flex-shrink: 0; }
.aip-tool { width: 32px; height: 32px; display: inline-grid; place-items: center; padding: 0; border: 1px solid transparent; background: none; color: inherit; opacity: 0.85; cursor: pointer; border-radius: 0; flex-shrink: 0; }
.aip-tool:hover, .aip-tool:focus-visible { opacity: 1; border-color: rgba(255, 255, 255, 0.28); }
.aip-tool.on { color: #ffd60a; opacity: 1; }
.aip-app .aip-tool { color: #9fb4d8; } .aip-app .aip-tool:hover { color: #fff; } .aip-app .aip-tool.on { color: #ffd60a; }
.aip-mini { width: 34px; height: 38px; display: inline-grid; place-items: center; padding: 0; border: 0; background: none; color: #8fa3c8; cursor: pointer; flex-shrink: 0; }
.aip-mini:hover { color: #fff; } .aip-mini.on { color: #ffd60a; }
.aip-website .aip-mini { color: var(--text-muted, #8fa3c8); align-self: center; }

.aip-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.aip-act { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; font: inherit; font-size: 0.8rem; font-weight: 600; line-height: 1.2; color: #dbe8ff; text-decoration: none; cursor: pointer;
  background: rgba(79, 200, 255, 0.1); border: 1px solid rgba(79, 200, 255, 0.4); border-radius: 0; }
.aip-act:hover { border-color: #4fc8ff; color: #fff; background: rgba(79, 200, 255, 0.18); }
.aip-act svg { width: 14px; height: 14px; }
.aip-where { background: none; border-color: rgba(255, 255, 255, 0.22); color: #9fb4d8; }
.aip-votes { display: flex; gap: 2px; margin-top: 4px; }
.aip-vote { width: 26px; height: 24px; display: inline-grid; place-items: center; padding: 0; border: 0; background: none; color: #6f82a8; cursor: pointer; }
.aip-vote:hover:not(:disabled) { color: #fff; } .aip-vote.on { color: #ffd60a; } .aip-vote:disabled { cursor: default; }
.aip-vote svg { width: 14px; height: 14px; }

.aip-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 12px 8px; flex-shrink: 0; font-size: 0.78rem; }
.aip-app .aip-bar { background: #0b1832; }
.aip-human { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; cursor: pointer; font: inherit; font-weight: 600; color: #4fc8ff; }
.aip-human:hover { color: #fff; }
.aip-website .aip-human { color: var(--accent-2, #4fc8ff); }
.aip-key { padding: 2px 6px; border: 1px solid rgba(255, 255, 255, 0.18); color: #6f82a8; font-size: 0.68rem; font-weight: 700; white-space: nowrap; }
@media (hover: none) { .aip-key { display: none; } }
.aip-pic { display: flex; align-items: center; gap: 10px; margin: 0 10px; padding: 6px 8px; background: rgba(79, 200, 255, 0.1); border: 1px solid rgba(79, 200, 255, 0.3); font-size: 0.8rem; color: #dbe8ff; flex-shrink: 0; }
.aip-pic[hidden] { display: none; }
.aip-pic img { width: 38px; height: 38px; object-fit: cover; }
.aip-pic span { flex: 1; min-width: 0; }

.aip-sheet { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; background: #081226; color: #eaf2ff; }
.aip-sheet-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); background: #0b1832; flex-shrink: 0; }
.aip-sheet-head strong { font-size: 1rem; color: #fff; }
.aip-sheet .aip-tool { color: #9fb4d8; }
.aip-sheet-body { flex: 1; min-height: 0; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.aip-row { display: flex; align-items: center; gap: 6px; padding: 2px 4px 2px 2px; background: rgba(255, 255, 255, 0.04); border: 1px solid transparent; }
.aip-row.on { border-color: rgba(79, 200, 255, 0.55); }
button.aip-row.aip-new { padding: 11px 12px; gap: 8px; cursor: pointer; font: inherit; font-weight: 700; color: #ffd60a; text-align: left; }
.aip-open { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px 10px; border: 0; background: none; cursor: pointer; font: inherit; color: #eaf2ff; text-align: left; }
.aip-t { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.aip-open small { color: #6f82a8; font-size: 0.72rem; }
.aip-note { margin: 2px 2px 6px; color: #9fb4d8; font-size: 0.86rem; line-height: 1.5; }
.aip-done { margin: 10px 2px; color: #b8f5d0; font-weight: 600; line-height: 1.5; }
.aip-form { display: flex; flex-direction: column; gap: 9px; }
.aip-form input, .aip-form textarea { width: 100%; box-sizing: border-box; padding: 11px 12px; font: inherit; font-size: 16px; color: #fff; background: #050c1c; border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 0; resize: none; }
.aip-form input:focus, .aip-form textarea:focus { outline: none; border-color: #38b6ff; }
.aip-send { padding: 11px 14px; font: inherit; font-weight: 700; color: #06122e; background: #ffd60a; border: 0; border-radius: 0; cursor: pointer; }
.aip-send:disabled { opacity: 0.6; cursor: default; }
.aip-status { margin: 0; min-height: 1.3em; font-size: 0.82rem; color: #9fb4d8; }
.aip-status.err { color: #ffb4b4; }

.aip-nudge { position: fixed; z-index: 1200; max-width: min(300px, calc(100vw - 24px)); display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 13px; font: inherit; font-size: 0.86rem; font-weight: 600; line-height: 1.35; text-align: left;
  color: #eaf2ff; background: #10203f; border: 1px solid rgba(79, 200, 255, 0.5); border-radius: 0; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); cursor: pointer; }
.aip-nudge:hover { border-color: #4fc8ff; }
.aip-nudge-x { display: inline-grid; place-items: center; width: 22px; height: 22px; color: #9fb4d8; flex-shrink: 0; }
.aip-nudge-x:hover { color: #fff; }
.aip-nudge-corner { right: 24px; bottom: 96px; }
.aip-has-nudge { outline: 2px solid #ffd60a; outline-offset: 2px; }

.aip-spot { position: fixed; z-index: 3000; pointer-events: none; box-shadow: 0 0 0 9999px rgba(2, 7, 22, 0.68), 0 0 0 2px #4fc8ff, 0 0 22px rgba(79, 200, 255, 0.6); }
.aip-tip { position: fixed; z-index: 3001; box-sizing: border-box; padding: 13px 14px; background: #10203f; color: #eaf2ff; border: 1px solid rgba(79, 200, 255, 0.5); box-shadow: 0 14px 40px rgba(0, 0, 0, 0.55); }
.aip-tip p { margin: 0 0 10px; font-size: 0.92rem; font-weight: 600; line-height: 1.45; }
.aip-tip .aip-send { padding: 7px 14px; font-size: 0.85rem; }

.aip-website .chat-header .aip-tools { color: #fff; margin-left: auto; }
.aip-website .chat-stack { min-width: 0; }
.aip-website.chat-panel { overflow: hidden; }
.aip-website .aip-bar { border-top: 1px solid var(--border, rgba(255, 255, 255, 0.1)); }

.aip-website .chat-input .aip-mini { width: 34px; height: 38px; min-width: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; color: var(--text-muted, #8fa3c8); flex: 0 0 auto; }
.aip-website .chat-input .aip-mini:hover { color: var(--text, #fff); background: none; }
.aip-website .chat-input .aip-mini.on { color: #ffd60a; }
.aip-acts[hidden] { display: none; }

.aip-do { border-color: rgba(255, 214, 10, 0.55); color: #ffe9a3; background: rgba(255, 214, 10, 0.08); }
.aip-do:disabled { opacity: 0.7; cursor: default; }
.aip-result { margin: 6px 0 0; font-size: 0.82rem; font-weight: 600; color: #ffb4b4; }
.aip-result.ok { color: #b8f5d0; }

.aip-mini.busy { opacity: 0.5; cursor: default; }
.aip-tip .aip-open-it { display: inline-block; text-decoration: none; margin-right: 8px; }
.aip-tip .aip-later { width: auto; height: auto; padding: 7px 10px; font: inherit; font-size: 0.82rem; font-weight: 600; color: #9fb4d8; }

.aip-card { margin-top: 8px; padding: 12px; background: #0d1b36; border: 1px solid rgba(79, 200, 255, 0.4); color: #eaf2ff; font-size: 0.86rem; line-height: 1.45; display: flex; flex-direction: column; gap: 8px; max-width: 100%; box-sizing: border-box; }
.aip-card-t { color: #fff; font-size: 0.92rem; }

.aip-auto { display: flex; flex-direction: column; gap: 10px; }
.aip-auto-card { display: flex; flex-direction: column; gap: 6px; padding: 10px; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(79, 200, 255, 0.22); }
.aip-auto-card small { color: #9fb4d8; font-size: 0.78rem; line-height: 1.45; }
.aip-auto-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.aip-auto-row > strong, .aip-auto-site { flex: 1; min-width: 0; color: #fff; }
.aip-auto-site { color: #dbe7fb; overflow-wrap: anywhere; }
.aip-auto-sw { min-width: 52px; padding: 5px 10px; font: inherit; font-size: 0.8rem; font-weight: 700; color: #9fb4d8; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.2); cursor: pointer; }
.aip-auto-sw.on { color: #04111f; background: #22c55e; border-color: #22c55e; }
.aip-auto-l { color: #c9d8f2; font-size: 0.82rem; }
.aip-auto-sel { padding: 5px 8px; font: inherit; font-size: 0.82rem; color: #fff; background: #050c1c; border: 1px solid rgba(255, 255, 255, 0.2); }
.aip-auto-warn { color: #fbbf24 !important; font-size: 0.8rem; margin: 0; }
.aip-auto-log { display: flex; flex-direction: column; gap: 1px; padding: 6px 0; border-top: 1px solid rgba(255, 255, 255, 0.06); }
.aip-auto-log span { color: #dbe7fb; font-size: 0.8rem; white-space: pre-line; overflow-wrap: anywhere; }
.aip-auto-log.bad span { color: #fca5a5; }
.aip-task-now { border-color: rgba(34, 197, 94, 0.55); }
.aip-task-when { color: #7f93b8 !important; }
.aip-auto-row > a.aip-act { text-decoration: none; }

.aip-pv { display: flex; flex-direction: column; gap: 6px; }
.aip-pv-tabs { display: flex; gap: 6px; align-items: center; }
.aip-pv-tab, .aip-pv-big, .aip-pv-x { padding: 5px 11px; font: inherit; font-size: 0.78rem; color: #cfe3ff; background: rgba(79, 200, 255, 0.06); border: 1px solid rgba(79, 200, 255, 0.35); cursor: pointer; }
.aip-pv-tab.on { color: #04111f; background: #4fc8ff; border-color: #4fc8ff; font-weight: 700; }
.aip-pv-big, .aip-pv-x { margin-left: auto; }
.aip-pv-stage { position: relative; width: 100%; min-height: 60px; overflow: hidden; background: #fff; border: 1px solid rgba(255, 255, 255, 0.15); }
.aip-pv-if { position: absolute; left: 0; top: 0; border: 0; transform-origin: 0 0; pointer-events: none; background: #fff; }
.aip-pv-msg { margin: 0; padding: 18px 12px; color: #4b5a78; font-size: 0.8rem; }
.aip-pv-note { color: #9fb4d8; font-size: 0.74rem; }
.aip-pv-over { position: fixed; inset: 0; z-index: 3000; background: rgba(2, 6, 20, 0.82); display: grid; place-items: center; padding: 16px; }
.aip-pv-big-card { width: min(1180px, 100%); height: min(860px, 100%); display: flex; flex-direction: column; gap: 8px; padding: 10px; background: #0b1832; border: 1px solid rgba(79, 200, 255, 0.4); }
.aip-pv-big-host { flex: 1; min-height: 0; background: #fff; }
.aip-pv-big-host .aip-pv-if { position: static; transform: none; pointer-events: auto; width: 100%; height: 100%; border: 0; display: block; }
.aip-card-lines { margin: 0; padding-left: 18px; color: #c9d8f2; overflow-wrap: anywhere; }
.aip-card-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.aip-card .aip-send { padding: 8px 14px; font-size: 0.85rem; }
.aip-card .aip-status.ok { color: #b8f5d0; font-weight: 600; }
.aip-card.is-done { border-color: rgba(12, 163, 12, 0.6); }
.aip-check-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.aip-check-head small { color: #9fb4d8; white-space: nowrap; }
.aip-check-bar { height: 6px; background: rgba(255, 255, 255, 0.08); }
.aip-check-bar span { display: block; height: 100%; background: #ffd60a; }
.aip-check-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.aip-check-list li { display: flex; align-items: center; gap: 8px; }
.aip-check-ic { display: inline-grid; place-items: center; color: #6f82a8; flex-shrink: 0; }
.aip-check-list li.done .aip-check-ic { color: #4ade80; }
.aip-check-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.aip-check-list li.done .aip-check-tx { color: #9fb4d8; }
.aip-check-tx small { color: #9fb4d8; font-size: 0.75rem; }
.aip-check .aip-act { padding: 5px 9px; }
.aip-check > .aip-act { align-self: flex-start; }
.aip-check > .aip-act:disabled { opacity: 0.6; cursor: default; }
.aip-mem { color: #4fc8ff; }
.aip-forget { margin-top: 6px; align-self: flex-start; }
.aip-memlist { display: flex; flex-direction: column; gap: 6px; }
.aip-memlist .aip-open { cursor: default; }
.aip-nudge-fixes { flex-direction: column; align-items: stretch; gap: 6px; cursor: default; }
.aip-nudge-head { display: flex; align-items: center; gap: 8px; }
.aip-nudge-main { flex: 1; padding: 0; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.aip-nudge-fixes .aip-nudge-x { border: 0; background: none; cursor: pointer; padding: 0; }
.aip-fix { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 9px; font: inherit; font-size: 0.8rem; font-weight: 600; color: #dbe8ff; text-align: left; background: rgba(79, 200, 255, 0.1); border: 1px solid rgba(79, 200, 255, 0.35); cursor: pointer; }
.aip-fix:hover { border-color: #4fc8ff; color: #fff; }
.aip-fix svg { width: 14px; height: 14px; flex-shrink: 0; }

#chatPanel.chat-panel { background: #081226; color: #eaf2ff; border: 1px solid rgba(79, 200, 255, 0.4); box-shadow: 0 18px 50px rgba(0, 0, 0, 0.6) !important; }
#chatPanel .chat-header { background: #0b1832 !important; color: #fff; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
#chatPanel .chat-header-avatar { border: 0 !important; border-radius: 0 !important; background: none; object-fit: contain; width: 44px; height: 44px; box-shadow: none !important; }
#chatPanel .chat-header-title { color: #fff; font-size: 1rem; }
#chatPanel .chat-header-sub { color: #8fa3c8; opacity: 1; }
#chatPanel .chat-header button, #chatPanel .chat-header .aip-tool { color: #9fb4d8; }
#chatPanel .chat-header button:hover { color: #fff; }
#chatPanel .chat-messages { background: #081226; }
#chatPanel .chat-day { background: transparent; border-color: rgba(255, 255, 255, 0.1); color: #8fa3c8; }
#chatPanel .chat-row.assistant .chat-stack::before { content: "TANIX AI"; display: block; margin: 0 0 4px; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #4fc8ff; }
#chatPanel .chat-row.assistant .chat-bubble { background: #12213f; border: 1px solid rgba(255, 255, 255, 0.07); color: #eaf2ff; }
#chatPanel .chat-row.user .chat-bubble { background: #1f6fe0; color: #fff; }
#chatPanel .chat-bubble a { color: #7dd3fc; }
#chatPanel .chat-row.user .chat-bubble a { color: #fff; }
#chatPanel .chat-time { color: #6f7f9e; }
#chatPanel .chat-chip { color: #cfe3ff; background: rgba(79, 200, 255, 0.08); border: 1px solid rgba(79, 200, 255, 0.4); }
#chatPanel .chat-chip:hover { background: rgba(79, 200, 255, 0.18); color: #fff; border-color: rgba(79, 200, 255, 0.6); }
#chatPanel .chat-input { background: #0b1832; border-top: 1px solid rgba(255, 255, 255, 0.08); }
#chatPanel .chat-input textarea { background: #081226; color: #eaf2ff; border-color: rgba(79, 200, 255, 0.35); }
#chatPanel .chat-input textarea::placeholder { color: #6f7f9e; }
#chatPanel .chat-input button[type="submit"] { background: #1f7bff; }
#chatPanel .chat-input button[type="submit"]:hover { background: #3b8dff; }
#chatPanel .chat-input .chat-attach, #chatPanel .chat-input .aip-mic { background: transparent; color: #9fb4d8; }

#chatPanel .chat-header .rl-face { background: none !important; box-shadow: none !important; border: 0 !important; }

.aip-pics { display: flex; flex-wrap: wrap; gap: 6px; flex: 0 1 auto; min-width: 0; max-width: 60%; }
.aip-one { position: relative; width: 38px; height: 38px; flex: 0 0 auto; }
.aip-one img { width: 38px; height: 38px; object-fit: cover; display: block; }
.aip-one-x { position: absolute; top: -6px; right: -6px; width: 18px; height: 18px; padding: 0; display: grid; place-items: center; border: 0; border-radius: 50%; background: #0b1530; color: #fff; cursor: pointer; box-shadow: 0 0 0 1px rgba(79, 200, 255, .5); }
.aip-one-x svg { width: 10px; height: 10px; }
.aip-one.aip-file { width: auto; max-width: 150px; height: 38px; display: inline-flex; align-items: center; gap: 5px; padding: 0 28px 0 7px; background: rgba(79, 200, 255, 0.12); border: 1px solid rgba(79, 200, 255, 0.4); color: #dbe7fb; }
.aip-file svg { width: 16px; height: 16px; flex: 0 0 auto; }
.aip-file-n { font-size: 0.74rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.aip-one-x.on-file { top: 50%; right: 4px; transform: translateY(-50%); border-radius: 50% !important; }
@media (max-width: 520px) { .aip-one.aip-file { height: 32px; max-width: 120px; } }
@media (max-width: 520px) { .aip-pics { max-width: 55%; } .aip-one, .aip-one img { width: 32px; height: 32px; } }

.aip-code { display: flex; flex-direction: column; gap: 5px; font-size: 0.8rem; font-weight: 600; color: #c9d8f2; }
.aip-code input { width: 100%; background: #081329; border: 1px solid rgba(79, 200, 255, 0.45); color: #fff; padding: 9px 11px; font: inherit; font-weight: 500; }
.aip-code input:focus { outline: 2px solid #4fc8ff; outline-offset: 1px; }
