/* =========================================================
   MarketView - Setări
   ========================================================= */
.st-tabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 12px; padding-bottom: 2px; }
.st-tabs button {
    display: flex; align-items: center; gap: 8px; white-space: nowrap; border: 1px solid var(--border); background: #fff;
    color: #3a4658; padding: 9px 14px; border-radius: 8px; font-size: 13px; font-weight: 500;
}
.st-tabs button:hover { border-color: #b8c7dd; }
.st-tabs button.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.st-panel { display: none; }
.st-panel.active { display: block; }

/* Rezumat */
.st-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 10px; }
.st-sum { display: grid; grid-template-columns: 52px minmax(0, 1fr); grid-template-rows: auto auto; gap: 4px 12px; align-items: start; padding: 14px; }
.st-sum-ic { grid-row: span 2; width: 52px; height: 52px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 22px; }
.st-sum-ic.purple { background: #f1ebff; color: #7c3aed; } .st-sum-ic.blue { background: #e8f0fe; color: var(--primary); }
.st-sum-ic.sky { background: #e0f2fe; color: #0284c7; } .st-sum-ic.green { background: #e7f7ec; color: var(--green); }
.st-sum small { display: block; font-size: 13px; font-weight: 700; color: var(--text); }
.st-sum b { display: block; font-size: 19px; font-weight: 800; margin: 3px 0 2px; }
.st-sum > div span { display: block; font-size: 12px; color: #4b5669; }
.st-sum .btn { grid-column: 2; justify-self: end; }

.st-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 10px; align-items: start; }
.st-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-items: start; }
.st-card { padding: 16px; }
.st-narrow { max-width: 760px; }
.st-card-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.st-card-head > i { width: 40px; height: 40px; border-radius: 10px; background: #f2f5f9; color: #1f3b66; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.st-card-head > div { flex: 1; min-width: 0; }
.st-card-head h3 { font-size: 15px; font-weight: 800; }
.st-card-head p { margin: 2px 0 0; font-size: 12px; color: #4b5669; }
.st-head-btn { align-self: center; flex-shrink: 0; }

.st-row { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 10px; align-items: center; margin-bottom: 9px; font-size: 12.5px; }
.st-row > label { color: #3a4658; }
.st-row .select, .st-row .input { height: 34px; }
.st-row .select:disabled { background: #f8fafc; color: #6b778a; }
.st-help { font-size: 11.5px; color: var(--muted); margin: 4px 0 10px; line-height: 1.45; }
.st-save { margin-top: 6px; }
.st-form .field.invalid .input, .st-form .field.invalid .select, .st-row.invalid .input, .st-row.invalid .select { border-color: var(--red); }
.st-err { color: var(--red); font-size: 11px; grid-column: 2; margin-top: -4px; }
.st-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.st-form-grid .span-2 { grid-column: span 2; }

.st-switch-row { display: flex !important; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 0; font-size: 12.5px; cursor: pointer; }
.switch { position: relative; width: 40px; height: 22px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch i { position: absolute; inset: 0; background: #cbd5e1; border-radius: 12px; transition: .2s; }
.switch i::before { content: ''; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + i { background: var(--primary); }
.switch input:checked + i::before { transform: translateX(18px); }
.switch input:focus-visible + i { outline: 2px solid var(--primary); outline-offset: 2px; }

.st-checks { display: flex; flex-direction: column; gap: 2px; margin-bottom: 4px; }
.st-colors-head { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; margin: 6px 0 6px; }
.st-chain-colors { list-style: none; margin: 0 0 8px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 3px 10px; font-size: 12px; }
.st-chain-colors li { display: flex; align-items: center; gap: 8px; }
.st-chain-colors i { width: 11px; height: 11px; border-radius: 50%; }

.st-users-mini td { padding: 7px 5px; font-size: 12px; white-space: nowrap; }
.st-users-mini td:nth-child(2) { max-width: 140px; overflow: hidden; text-overflow: ellipsis; }
.st-user { display: flex; align-items: center; gap: 8px; }
.st-avatar { width: 28px; height: 28px; border-radius: 50%; background: #6d28d9; color: #fff; font-size: 10.5px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.st-more { text-align: right; margin: 8px 0 0; font-size: 12.5px; }
.st-int-list { list-style: none; margin: 0; padding: 0; }
.st-int-list li { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid #eef1f5; }
.st-int-list li:last-child { border-bottom: 0; }
.st-int-list i.ic { width: 26px; font-size: 18px; color: #1f3b66; text-align: center; }
.st-int-list .txt { flex: 1; min-width: 0; font-size: 12px; color: #4b5669; }
.st-int-list .txt b { display: block; font-size: 13px; color: var(--text); }
.st-dl { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin: 0 0 14px; font-size: 12.5px; }
.st-dl dt { color: #3a4658; }
.st-dl dd { margin: 0; font-weight: 600; display: flex; gap: 8px; align-items: center; justify-content: flex-end; }

.st-note { background: #eef4ff; border: 1px solid #cfdcf6; color: #1f3b66; border-radius: 8px; padding: 9px 12px; font-size: 12.5px; margin-bottom: 12px; }
.st-note i { color: var(--primary); margin-right: 4px; }
.st-license { display: flex; flex-direction: column; gap: 3px; font-size: 11.5px; color: #4b5669; min-width: 150px; }
.st-users td { white-space: nowrap; }
.st-perms th, .st-perms td { text-align: center; }
.st-perms th:first-child, .st-perms td:first-child { text-align: left; font-weight: 600; }
.st-perms select { height: 30px; font-size: 12px; min-width: 120px; }
.st-perms select[data-level="edit"] { border-color: #86efac; background: #f0fdf4; }
.st-perms select[data-level="view"] { border-color: #93c5fd; background: #eff6ff; }
.st-perms select[data-level="none"] { color: var(--muted); }
.st-cmd { display: flex; gap: 6px; align-items: center; margin-top: 6px; }
.st-cmd code { flex: 1; min-width: 0; background: #0c1a2e; color: #e2e8f0; border-radius: 6px; padding: 7px 10px; font-size: 11px; overflow-x: auto; white-space: nowrap; }
.st-counts td { padding: 6px 4px; font-size: 12.5px; }
.st-counts td:last-child { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.st-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.st-danger { margin-top: 16px; border: 1px solid #fecaca; background: #fff7f7; border-radius: 8px; padding: 12px; font-size: 12.5px; }
.st-danger b { color: #b42318; }
.st-danger p { margin: 4px 0 8px; color: #4b5669; }
.st-presets { display: flex; gap: 8px; margin: -2px 0 10px 160px; }
.st-presets button { width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--border); }
.st-presets button.current { box-shadow: 0 0 0 2px var(--text); }
.st-chain-edit { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; margin-bottom: 12px; }
.st-chain-edit label { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.st-chain-edit input[type=color] { width: 36px; height: 28px; border: 1px solid var(--border); border-radius: 6px; padding: 1px; background: #fff; }
.st-log td { white-space: nowrap; font-size: 12px; }
.st-log td:nth-child(5) { white-space: normal; min-width: 260px; }
.st-log .act { font-size: 11px; }

@media (max-width: 1400px) {
    .st-grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .st-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
    .st-grid3, .st-grid2, .st-summary { grid-template-columns: minmax(0, 1fr); }
    .st-row { grid-template-columns: minmax(0, 1fr); gap: 4px; }
    .st-err { grid-column: 1; }
    .st-presets { margin-left: 0; }
    .st-form-grid { grid-template-columns: 1fr; }
    .st-form-grid .span-2 { grid-column: auto; }
}

.lt-color { padding: 2px 4px; height: 34px; }
.lt-delete { margin-right: auto; color: var(--red); }

