.button { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; gap: 8px; padding: 11px 18px; border: 2px solid transparent; border-radius: 11px; font-weight: 900; line-height: 1.1; text-decoration: none; cursor: pointer; transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .18s ease; }
.button:hover { transform: translateY(-1px); }
.button-primary { border-color: var(--brand-hover); background: var(--brand-hover); color: #ffffff; }
html[data-theme="dark"] .button-primary { border-color: var(--brand); background: var(--brand); color: #10231c; }
.button-primary:hover { border-color: var(--brand-hover); background: var(--brand-hover); }
.button-secondary { border-color: var(--border-strong); background: var(--surface); color: var(--text); }
.button-secondary:hover { border-color: var(--brand); background: var(--brand-soft); }
.button-small { min-height: 40px; padding: 8px 13px; border-radius: 9px; font-size: .82rem; }
.icon-button { display: inline-grid; width: 46px; height: 46px; flex: 0 0 46px; place-items: center; border: 2px solid var(--border); border-radius: 11px; background: var(--surface); color: var(--text); cursor: pointer; transition: background-color .16s ease, border-color .16s ease, transform .16s ease; }
.icon-button:hover { border-color: var(--brand); background: var(--brand-soft); }
.icon-button svg { width: 21px; height: 21px; }
.theme-button { display: inline-flex; min-height: 46px; align-items: center; gap: 8px; padding: 8px 12px; border: 2px solid var(--border); border-radius: 11px; background: var(--surface); color: var(--text); font-weight: 800; cursor: pointer; transition: background-color .16s ease, border-color .16s ease, transform .16s ease; }
.theme-button:hover { border-color: var(--brand); background: var(--brand-soft); }
.theme-mark { font-size: 1rem; }
.panel { min-width: 0; padding: 25px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-sm); }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 19px; }
.panel-head h2, .panel-head h3 { margin: 4px 0 0; font-size: 1.18rem; }
.badge { display: inline-flex; width: max-content; max-width: 100%; align-items: center; padding: 5px 10px; border-radius: 999px; font-size: .72rem; font-weight: 900; white-space: nowrap; }
.badge-success { background: var(--brand-soft); color: var(--brand-text); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-neutral { background: var(--surface-soft); color: var(--text-soft); }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 120; display: flex; max-width: min(430px, calc(100vw - 30px)); align-items: center; gap: 11px; padding: 13px 16px; border: 2px solid var(--brand); border-radius: 13px; background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden; transform: translateY(14px); transition: opacity .2s ease, visibility .2s ease, transform .2s ease; }
.toast.is-visible { opacity: 1; visibility: visible; transform: none; }
.toast-mark { display: grid; width: 27px; height: 27px; flex: 0 0 27px; place-items: center; border-radius: 50%; background: var(--brand-soft); color: var(--brand-text); font-weight: 900; }
.context-menu { position: fixed; z-index: 105; width: min(260px, calc(100vw - 24px)); padding: 7px; border: 1px solid var(--border-strong); border-radius: 13px; background: var(--surface); box-shadow: var(--shadow-lg); }
.context-menu[hidden] { display: none; }
.context-menu a, .context-menu button { display: flex; width: 100%; min-height: 42px; align-items: center; gap: 10px; padding: 8px 11px; border: 0; border-radius: 8px; background: transparent; color: var(--text); font-weight: 800; text-align: left; text-decoration: none; cursor: pointer; }
.context-menu a:hover, .context-menu button:hover, .context-menu a:focus, .context-menu button:focus { background: var(--brand-soft); color: var(--text); outline-offset: -2px; }
.menu-separator { height: 1px; margin: 5px 7px; background: var(--border); }
.modal-layer { position: fixed; inset: 0; z-index: 110; display: grid; place-items: center; padding: 18px; opacity: 0; visibility: hidden; transition: opacity .18s ease, visibility .18s ease; }
.modal-layer.is-open { opacity: 1; visibility: visible; }
.modal-backdrop { position: absolute; inset: 0; border: 0; background: rgba(11, 28, 22, .68); }
.modal-card { position: relative; z-index: 1; width: min(100%, 620px); max-height: min(86vh, 760px); overflow-y: auto; padding: 31px; border: 2px solid var(--border-strong); border-radius: 20px; background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); }
.modal-close { position: absolute; top: 13px; right: 13px; }
.modal-body h2 { margin: 0 48px 12px 0; font-size: 1.55rem; }
.modal-body > p { color: var(--text-soft); }
.modal-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 24px; }
.modal-source[hidden] { display: none; }
.field { display: flex; flex-direction: column; }
.field span { margin-bottom: 6px; color: var(--text-soft); font-size: .78rem; font-weight: 800; }
.field input, .field select, .field textarea { width: 100%; border: 2px solid var(--border-strong); border-radius: 10px; background: var(--surface); color: var(--text); }
.field input, .field select { min-height: 46px; padding: 0 12px; }
.field textarea { min-height: 116px; padding: 11px 12px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand); outline: 3px solid var(--focus); outline-offset: 1px; }
.field-label, .choice-group legend { margin: 0 0 6px; padding: 0; color: var(--text-soft); font-size: .78rem; font-weight: 800; }
.select-native { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; white-space: nowrap !important; }
.smart-select { position: relative; width: 100%; }
.smart-select-trigger { display: flex; width: 100%; min-height: 46px; align-items: center; justify-content: space-between; gap: 12px; padding: 0 12px; border: 2px solid var(--border-strong); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; font-weight: 700; text-align: left; cursor: pointer; transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease; }
.smart-select-trigger:hover, .smart-select.is-open .smart-select-trigger { border-color: var(--brand); background: var(--brand-soft); }
.smart-select-trigger .fa-chevron-down { transition: transform .16s ease; }
.smart-select.is-open .smart-select-trigger .fa-chevron-down { transform: rotate(180deg); }
.smart-select-panel { position: absolute; top: calc(100% + 7px); right: 0; left: 0; z-index: 115; padding: 8px; border: 2px solid var(--border-strong); border-radius: 13px; background: var(--surface); box-shadow: var(--shadow-md); opacity: 0; transform: translateY(-4px); transition: opacity .14s ease, transform .14s ease; }
.smart-select.is-open .smart-select-panel { opacity: 1; transform: none; }
.smart-select-panel[hidden] { display: none; }
.smart-select-search { position: relative; display: block; margin-bottom: 7px; }
.smart-select-search .fa-solid { position: absolute; top: 50%; left: 12px; color: var(--text-soft); transform: translateY(-50%); }
.smart-select-search input { width: 100%; min-height: 42px; padding: 0 11px 0 36px; border: 2px solid var(--border); border-radius: 9px; background: var(--surface-soft); color: var(--text); font: inherit; }
.smart-select-options { max-height: 230px; overflow-y: auto; margin: 0; padding: 0; list-style: none; }
.smart-select-option[hidden] { display: none; }
.smart-select-option { display: flex; width: 100%; min-height: 42px; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--text); font: inherit; font-weight: 700; text-align: left; cursor: pointer; transition: background-color .12s ease; }
.smart-select-option:hover, .smart-select-option.is-active { background: var(--brand-soft); }
.smart-select-option[aria-selected="true"]::after { font-family: "Font Awesome 6 Free"; font-weight: 900; content: "\f058"; color: var(--brand-text); }
.smart-select-empty { margin: 8px; color: var(--text-soft); font-size: .88rem; }
.choice-group { min-width: 0; margin: 0; padding: 0; border: 0; }
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.choice-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.choice-card { position: relative; display: block; height: 100%; cursor: pointer; }
.choice-card input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.choice-card-body { display: flex; height: 100%; min-height: 70px; align-items: center; gap: 10px; padding: 11px; border: 2px solid var(--border); border-radius: 11px; background: var(--surface); color: var(--text); transition: border-color .16s ease, background-color .16s ease, transform .16s ease; }
.choice-card:hover .choice-card-body { border-color: var(--brand); transform: translateY(-1px); }
.choice-card input:checked + .choice-card-body { border-color: var(--brand-hover); background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand-hover); }
.choice-card input:focus + .choice-card-body { outline: 3px solid var(--focus); outline-offset: 2px; }
.choice-card .choice-icon { display: grid; width: 34px; height: 34px; flex: 0 0 34px; place-items: center; border-radius: 9px; background: var(--surface-soft); color: var(--brand-text); }
.choice-card strong, .choice-card small { display: block; }
.choice-card small { margin-top: 2px; color: var(--text-soft); font-size: .72rem; }
.choice-check { margin-left: auto; color: var(--brand-text); opacity: 0; transform: scale(.75); transition: opacity .12s ease, transform .12s ease; }
.choice-card input:checked + .choice-card-body .choice-check { opacity: 1; transform: scale(1); }
.file-drop-input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.file-drop-zone { display: grid; min-height: 154px; place-items: center; align-content: center; gap: 6px; padding: 20px; border: 2px dashed var(--border-strong); border-radius: 14px; background: var(--surface-soft); color: var(--text); text-align: center; cursor: pointer; transition: border-color .16s ease, background-color .16s ease, transform .16s ease; }
.file-drop-zone:hover, .file-drop.is-dragging .file-drop-zone { border-color: var(--brand-hover); background: var(--brand-soft); transform: translateY(-1px); }
.file-drop-input:focus + .file-drop-zone { outline: 3px solid var(--focus); outline-offset: 2px; }
.file-drop-zone .fa-cloud-arrow-up { margin-bottom: 4px; color: var(--brand-text); font-size: 1.7rem; }
.file-drop-zone small { color: var(--text-soft); }
.file-drop-result { display: flex; min-height: 52px; align-items: center; gap: 10px; margin-top: 9px; padding: 9px 11px; border: 1px solid var(--border); border-radius: 10px; background: var(--brand-soft); }
.file-drop-result[hidden] { display: none; }
.file-drop-result .file-name { min-width: 0; flex: 1; overflow: hidden; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.file-drop-result small { display: block; color: var(--text-soft); font-weight: 600; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.form-grid .wide { grid-column: 1 / -1; }
.check-row { display: flex; align-items: flex-start; gap: 10px; padding: 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-soft); }
.check-row input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--brand-hover); }
.check-row span { color: var(--text); font-weight: 700; }
.action-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.metric-score { color: var(--brand-text); font-size: 2rem; }
@media (max-width: 640px) { .panel { padding: 20px 17px; } .theme-label { display: none; } .modal-card { padding: 27px 19px 21px; } .modal-actions { align-items: stretch; flex-direction: column-reverse; } .modal-actions .button { width: 100%; } .form-grid { grid-template-columns: 1fr; } .form-grid .wide { grid-column: auto; } .choice-grid, .choice-grid.three { grid-template-columns: 1fr; } .toast { right: 12px; bottom: 12px; left: 12px; } }
