:root {
  --canvas: #101416;
  --surface: #191e21;
  --surface-raised: #202629;
  --line: #30383b;
  --muted: #a2adaf;
  --accent: #9aebce;
  --bs-body-bg: var(--canvas);
  --bs-body-color: #edf3f1;
  --bs-border-color: var(--line);
  --bs-font-sans-serif: "Segoe UI", system-ui, -apple-system, sans-serif;
}
[hidden] { display: none !important; }
body { margin: 0; min-width: 320px; -webkit-font-smoothing: antialiased; }
button, textarea, a { -webkit-tap-highlight-color: transparent; }
a, button, textarea, [tabindex]:focus-visible { outline-offset: 4px; }
:focus-visible { outline: 2px solid var(--accent) !important; box-shadow: none !important; }
.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 10; padding: 12px; background: var(--accent); color: #10221b; }
.skip-link:focus { top: 12px; }
.container-xxl { max-width: 1280px; padding-inline: 36px; }
.app-header { border-bottom: 1px solid var(--line); }
.header-inner { min-height: 90px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; color: #f0f5f3; text-decoration: none; font-size: 15px; font-weight: 650; line-height: 1.3; letter-spacing: -.2px; }
.brand-second { display: block; color: var(--muted); font-weight: 400; font-size: 13px; letter-spacing: .3px; }
.brand-mark { display: grid; place-items: center; width: 39px; height: 39px; border-radius: 12px; background: var(--accent); color: #1c352c; }
.workspace-label { color: var(--muted); font-size: 12px; display: flex; align-items: center; gap: 9px; }
.status-dot { width: 6px; height: 6px; background: var(--accent); border-radius: 50%; }
.header-badge { font-size: 10px; font-weight: 600; letter-spacing: 1.3px; border: 1px solid var(--line); border-radius: 5px; padding: 7px 9px; color: #bfcbc7; }
.header-actions { display: flex; align-items: center; gap: 12px; }
.logout-button { font-size: 11px; color: #c7d1ce; border: 1px solid #3a4447; border-radius: 6px; min-height: 35px; padding: 6px 10px; display: flex; align-items: center; gap: 6px; }
.logout-button:hover { background: #2a3833; color: #e6f8ed; border-color: #628574; }
.login-page { min-height: 100vh; }
.login-workspace { max-width: 480px; padding-top: 72px; }
.login-card { padding: 32px 28px; }
.login-card h1 { margin-bottom: 12px; }
.login-card .intro-description { margin-bottom: 24px; }
.login-input { background: #13181b; border: 1px solid #3a4447; border-radius: 9px; padding: 12px 14px; font-size: 14px; color: #e8eeeb; margin-bottom: 16px; }
.login-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px #9aebce10; }
#login-form .form-label { display: block; margin-bottom: 8px; }
#login-form .analyze-button { margin-top: 8px; }
.workspace { padding-top: 48px; }
.page-intro { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 32px; }
.eyebrow { font-size: 10px; font-weight: 600; letter-spacing: 1.7px; color: var(--muted); margin: 0 0 13px; display: flex; align-items: center; gap: 10px; }
.eyebrow-line { width: 19px; height: 1px; background: var(--accent); }
h1 { font-size: clamp(29px, 3.2vw, 41px); font-weight: 550; line-height: 1.18; letter-spacing: -1.4px; margin: 0 0 16px; }
h1 span { color: #aebdb7; }
.intro-description { color: var(--muted); font-size: 13px; line-height: 1.7; margin: 0; }
.workflow-note { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--muted); white-space: nowrap; padding-bottom: 5px; }
.step-dot { width: 21px; height: 21px; border: 1px solid #425149; border-radius: 50%; display: grid; place-items: center; color: #c4d5cc; font-size: 10px; }
.step-connector { width: 20px; height: 1px; background: #435048; margin-inline: 3px; }
.workspace-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 8px 35px #0000000d; padding: 27px; }
.panel-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.section-icon { display: grid; place-items: center; width: 37px; height: 37px; border: 1px solid #3a4545; border-radius: 10px; color: #c0cfc9; }
h2 { font-size: 17px; letter-spacing: -.35px; font-weight: 600; margin: 0; }
.panel-heading p { color: var(--muted); font-size: 12px; margin: 5px 0 0; }
.editor-label-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; }
.form-label { font-size: 12px; font-weight: 500; margin: 0; }
.btn-link { color: var(--muted); font-size: 11px; padding: 4px 0 4px 12px; text-decoration: none; min-height: 32px; }
.btn-link:hover { color: var(--accent); }
.message-input { background: #13181b; border: 1px solid #3a4447; border-radius: 9px; padding: 15px; min-height: 224px; font-size: 13px; line-height: 1.8; resize: vertical; color: #e8eeeb; }
.message-input::placeholder { color: #869294; }
.message-input:focus { background: #141b1d; color: #f3f6f5; border-color: var(--accent); box-shadow: 0 0 0 3px #9aebce10; }
.message-input[aria-invalid="true"] { border-color: #ef9d9d; }
.editor-meta { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 10px; margin-top: 9px; font-variant-numeric: tabular-nums; }
.validation-message { margin: 9px 0 0; color: #ffb3b3; font-size: 12px; }
.sample-section { margin: 25px 0; }
.sample-label { font-size: 11px; color: var(--muted); margin: 0 0 10px; }
.sample-button { background: #242b2e; border: 1px solid #3a4447; border-radius: 6px; color: #c7d1ce; font-size: 10px; padding: 8px 10px; min-height: 35px; }
.sample-button span { color: #9bacaa; margin-left: 5px; }
.sample-button:hover { background: #2a3833; color: #e6f8ed; border-color: #628574; }
.analyze-button { --bs-btn-bg: var(--accent); --bs-btn-border-color: var(--accent); --bs-btn-color: #122a20; --bs-btn-hover-bg: #b4f4dd; --bs-btn-hover-border-color: #b4f4dd; --bs-btn-hover-color: #102319; --bs-btn-active-bg: #83d9b9; --bs-btn-active-border-color: #83d9b9; --bs-btn-active-color: #102319; --bs-btn-disabled-bg: #9aebce; --bs-btn-disabled-border-color: #9aebce; --bs-btn-disabled-color: #17382a; display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 48px; font-size: 13px; font-weight: 650; border-radius: 8px; }
.button-arrow { width: 17px; margin-left: auto; }
.analyze-button > .icon:first-child { margin-right: auto; }
.editor-footnote { color: var(--muted); text-align: center; font-size: 10px; line-height: 1.6; margin: 12px 4px 0; }
.review-note { display: flex; gap: 10px; margin: 21px 9px 0; color: #c0cdc6; font-size: 11px; }
.note-mark { border: 1px solid #53655b; color: #afc7b9; width: 15px; height: 15px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; margin-top: 2px; flex-shrink: 0; }
.review-note p { margin: 0; line-height: 1.75; }
.review-note p span { color: var(--muted); }
.analysis-card { min-height: 606px; }
.analysis-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 24px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.analysis-header .eyebrow { font-size: 9px; margin-bottom: 8px; }
.state-badge { color: #b2bfb9; background: #252e2a; border: 1px solid #3a4840; border-radius: 5px; padding: 6px 8px; font-size: 10px; white-space: nowrap; }
.empty-state, .loading-state { text-align: center; margin: auto 0; padding: 34px 0 64px; }
.empty-art { position: relative; width: 160px; height: 160px; margin: 0 auto 26px; display: grid; place-items: center; }
.orbit { position: absolute; border: 1px solid #303c36; border-radius: 50%; }
.orbit-one { width: 150px; height: 150px; border-style: dashed; }
.orbit-two { width: 110px; height: 110px; }
.empty-icon { width: 65px; height: 65px; display: grid; place-items: center; background: #26382e; border: 1px solid #435c49; border-radius: 18px; transform: rotate(-8deg); color: #a3d4b4; }
.empty-icon .icon { width: 31px; height: 31px; transform: rotate(8deg); stroke-width: 1.2; }
.orbit-dot { position: absolute; width: 8px; height: 8px; background: #7b9f85; border: 2px solid var(--surface); border-radius: 50%; right: 17px; top: 33px; }
.empty-state h3, .loading-state h3 { font-size: 17px; font-weight: 500; letter-spacing: -.35px; margin-bottom: 12px; }
.empty-state p, .loading-state p { font-size: 12px; line-height: 1.9; color: var(--muted); margin: 0; }
.empty-tags { display: flex; justify-content: center; gap: 15px; font-size: 10px; color: #adbcb3; margin-top: 28px; }
.tag-divider { color: #65766b; }
.loading-mark { margin: 45px 0 30px; color: var(--accent); }
.skeleton-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 35px 16px 0; }
.skeleton-grid span { height: 50px; background: #252e2a; border-radius: 8px; animation: pulse 1.8s ease-in-out infinite; }
.metric-card { height: 100%; padding: 16px; border: 1px solid var(--line); background: #1e2527; border-radius: 9px; }
.metric-card h3, .summary-section h3, .response-heading h3, .confidence-label h3 { font-size: 11px; font-weight: 500; color: var(--muted); margin: 0 0 11px; }
.metric-card p { font-size: 14px; line-height: 1.5; font-weight: 500; margin: 0; overflow-wrap: anywhere; }
.value-badge { padding: 4px 8px; border-radius: 5px; background: #303a3d; color: #d4dfe1; display: inline-block; font-size: 12px; }
.value-badge[data-tone="positive"], .value-badge[data-tone="low"] { color: #a5e5c3; background: #263f33; }
.value-badge[data-tone="negative"], .value-badge[data-tone="urgent"] { color: #ffc0b9; background: #482e2d; }
.value-badge[data-tone="mixed"], .value-badge[data-tone="high"] { color: #f2d39d; background: #443c2e; }
.value-badge[data-tone="medium"] { color: #b7caff; background: #2e3650; }
.summary-section { margin-block: 24px; }
.result-text { font-size: 13px; line-height: 1.85; white-space: pre-wrap; overflow-wrap: anywhere; margin-bottom: 0; }
.response-card { background: #202f28; border: 1px solid #3f5849; border-radius: 9px; padding: 18px; }
.response-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 13px; }
.response-heading h3 { display: flex; align-items: center; gap: 7px; color: #c3e6ce; margin: 0; }
.response-heading h3 .icon { width: 15px; height: 15px; }
.copy-button { display: flex; align-items: center; gap: 6px; font-size: 10px; color: #d4e5d9; border: 1px solid #516459; padding: 6px 8px; min-height: 32px; }
.copy-button:hover { color: #fff; background: #364e3e; border-color: #81a38d; }
.copy-button .icon { width: 13px; height: 13px; }
.copy-status { color: #bbd4c4; font-size: 11px; margin: 0; }
.copy-status:not(:empty) { margin-top: 10px; }
.telegram-actions { margin-top: 20px; }
.telegram-button { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 14px; border: 1px solid #516459; color: #d4e5d9; background: #24352e; }
.telegram-button:hover:not(:disabled) { color: #fff; background: #364e3e; border-color: #81a38d; }
.telegram-button:disabled { opacity: .6; }
#telegram-toast.toast { display: none; background: #24302c; color: #e6f3ea; border: 1px solid #4a6658; }
#telegram-toast.toast.show { display: block; opacity: 1; }
.confidence-section { margin-top: 23px; }
.confidence-label { display: flex; justify-content: space-between; align-items: center; margin-bottom: 9px; }
.confidence-label h3 { margin: 0; }
.confidence-label > span { font-size: 12px; color: var(--accent); font-variant-numeric: tabular-nums; }
.progress { height: 5px; background: #323c37; }
.progress-bar { background: #9bd4b0; width: 0; }
.confidence-section > p { font-size: 10px; color: var(--muted); margin: 9px 0 0; }
.alert-danger { background: #372425; color: #ffd1d1; border-color: #744448; font-size: 12px; overflow-wrap: anywhere; }
.workspace-footer { display: flex; justify-content: space-between; gap: 20px; margin-top: 42px; padding-block: 20px 26px; border-top: 1px solid var(--line); color: #94a09d; font-size: 10px; }
@keyframes pulse { 50% { opacity: .4; } }
@media (min-width: 992px) { .editor-card { padding: 25px; } }
@media (max-width: 991px) { .workflow-note { display: none; } .analysis-card { min-height: 520px; } .empty-state { padding-bottom: 35px; } }
@media (max-width: 575px) {
  .container-xxl { padding-inline: 18px; }
  .header-inner { min-height: 74px; }
  .workspace-label { display: none; }
  .header-badge { font-size: 8px; padding: 6px; }
  .workspace { padding-top: 30px; }
  h1 { letter-spacing: -.8px; }
  .page-intro { margin-bottom: 25px; }
  .workspace-card { padding: 20px; }
  .analysis-header { align-items: flex-start; }
  .state-badge { font-size: 9px; }
  .metric-card { padding: 13px; }
  .response-card { padding: 14px; }
  .response-heading { align-items: flex-start; }
  .response-heading h3 { line-height: 1.7; }
  .workspace-footer { flex-direction: column; gap: 6px; margin-top: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
