/* === DECISIONS.CSS ===
   assets/css/decisions.css
   НАЗНАЧЕНИЕ: Стили модуля "Решения" - двухколоночный layout
   СВЯЗИ: decisions.js, app.css (переменные)
   РАЗМЕР: ~200 строк
*/

/* === LAYOUT === */
.tf-dec-wrap {
    display: flex;
    height: calc(100vh - 52px);
    gap: 0;
}

.tf-dec-list {
    width: 360px;
    min-width: 280px;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.tf-dec-detail {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-left: 6px;
    overflow: hidden;
}

/* === LIST HEADER === */
.tf-dec-list-header {
    flex: 0 0 auto;
    padding: 8px 10px;
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tf-dec-list-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tf-dec-list-title {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.tf-dec-filters {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.tf-dec-filters select {
    font-family: var(--font-body);
    font-size: 11px;
    padding: 3px 6px;
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    outline: none;
}

.tf-dec-filters select:focus {
    border-color: var(--border-focus);
}

/* === LIST BODY === */
.tf-dec-list-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.tf-dec-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px 10px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.15s;
}

.tf-dec-item:hover {
    background: var(--bg-hover);
}

.tf-dec-item.active {
    background: hsla(217, 91%, 60%, 0.08);
    border-left: 3px solid var(--color-primary);
    padding-left: 7px;
}

.tf-dec-item-title {
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.3;
}

.tf-dec-item-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.tf-dec-item-date {
    font-size: 10px;
    color: var(--text-muted);
    flex: 0 0 auto;
}

/* === BADGES === */
.tf-dec-badge {
    padding: 1px 7px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 500;
    white-space: nowrap;
    flex: 0 0 auto;
}

.tf-dec-badge-draft { background: hsla(0, 0%, 50%, 0.15); color: var(--text-secondary); }
.tf-dec-badge-approved { background: hsla(217, 91%, 60%, 0.15); color: var(--color-primary); }
.tf-dec-badge-in_progress { background: hsla(38, 92%, 50%, 0.15); color: var(--color-warning); }
.tf-dec-badge-implemented { background: hsla(142, 71%, 45%, 0.15); color: var(--color-success); }
.tf-dec-badge-cancelled { background: hsla(0, 84%, 60%, 0.1); color: var(--text-muted); }
.tf-dec-badge-archived { background: hsla(0, 0%, 50%, 0.1); color: var(--text-muted); }

.tf-dec-badge-strategic { background: hsla(262, 65%, 65%, 0.15); color: hsl(262, 65%, 65%); }
.tf-dec-badge-operational { background: hsla(217, 91%, 60%, 0.12); color: var(--color-primary); }
.tf-dec-badge-technical { background: hsla(180, 60%, 45%, 0.15); color: hsl(180, 60%, 50%); }
.tf-dec-badge-financial { background: hsla(38, 92%, 50%, 0.15); color: var(--color-warning); }
.tf-dec-badge-hr { background: hsla(330, 60%, 55%, 0.15); color: hsl(330, 60%, 55%); }
.tf-dec-badge-process { background: hsla(142, 71%, 45%, 0.12); color: var(--color-success); }

.tf-dec-badge-low { color: var(--text-muted); }
.tf-dec-badge-normal { color: var(--text-secondary); }
.tf-dec-badge-high { color: var(--color-warning); }
.tf-dec-badge-critical { color: var(--color-danger); }

/* === DETAIL HEADER === */
.tf-dec-detail-header {
    flex: 0 0 auto;
    padding: 10px;
    border-bottom: 1px solid var(--border);
}

.tf-dec-detail-title {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.tf-dec-detail-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.tf-dec-detail-actions {
    display: flex;
    gap: 4px;
    margin-top: 8px;
}

/* === DETAIL BODY === */
.tf-dec-detail-body {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.tf-dec-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 10px;
}

.tf-dec-field {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tf-dec-field-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tf-dec-field-value {
    font-size: 12px;
    color: var(--text-primary);
}

.tf-dec-summary {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 10px;
    white-space: pre-wrap;
}

/* === SECTIONS (links, actions, log) === */
.tf-dec-sec {
    margin-bottom: 10px;
}

.tf-dec-sec-title {
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tf-dec-link-item,
.tf-dec-action-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 8px;
    font-size: 11px;
    color: var(--text-primary);
    background: var(--bg-primary);
    border-radius: var(--radius);
    margin-bottom: 3px;
}

.tf-dec-link-type {
    font-size: 9px;
    color: var(--text-muted);
    text-transform: uppercase;
    flex: 0 0 auto;
    min-width: 60px;
}

.tf-dec-action-status {
    margin-left: auto;
    flex: 0 0 auto;
}

.tf-dec-log-item {
    display: flex;
    gap: 8px;
    padding: 4px 0;
    font-size: 10px;
    color: var(--text-muted);
    border-bottom: 1px solid hsla(0, 0%, 50%, 0.08);
}

.tf-dec-log-time {
    flex: 0 0 auto;
    white-space: nowrap;
}

.tf-dec-log-event {
    color: var(--text-secondary);
}

/* === BUTTONS === */
.tf-dec-btn {
    font-family: var(--font-body);
    font-size: 11px;
    padding: 4px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-input);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.tf-dec-btn:hover {
    background: var(--bg-hover);
    border-color: var(--border-focus);
}

.tf-dec-btn-primary {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

.tf-dec-btn-primary:hover {
    background: var(--color-primary-hover);
}

.tf-dec-btn-success {
    background: var(--color-success);
    color: #fff;
    border-color: var(--color-success);
}

.tf-dec-btn-sm {
    font-size: 10px;
    padding: 2px 7px;
}

/* === EMPTY STATE === */
.tf-dec-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
    font-size: 12px;
    font-style: italic;
}

/* === MODAL (inline) === */
.tf-dec-form {
    padding: 10px;
}

.tf-dec-form label {
    display: block;
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 3px;
    margin-top: 8px;
}

.tf-dec-form label:first-child {
    margin-top: 0;
}

.tf-dec-form input,
.tf-dec-form textarea,
.tf-dec-form select {
    width: 100%;
    font-family: var(--font-body);
    font-size: 12px;
    padding: 6px 8px;
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    outline: none;
    box-sizing: border-box;
}

.tf-dec-form input:focus,
.tf-dec-form textarea:focus,
.tf-dec-form select:focus {
    border-color: var(--border-focus);
}

.tf-dec-form textarea {
    resize: vertical;
    min-height: 60px;
}

.tf-dec-form-actions {
    display: flex;
    gap: 6px;
    margin-top: 10px;
}
