/* Strategy workspace */
.strategy-grid {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    width: 100%;
    height: 100vh;
    overflow: hidden;
    background: #080a10;
}

.strategy-sidebar {
    min-width: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 28px 20px;
    box-sizing: border-box;
    overflow: hidden;
    background: #0d111a;
    border-right: 1px solid rgba(255,255,255,0.08);
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-header h3 {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0;
    color: var(--neon-cyan);
    font-size: 0.82rem;
    letter-spacing: 0;
}

.strategy-sidebar > .btn-main-action {
    width: 100%;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 22px;
    padding: 10px 14px;
    background: rgba(0,243,255,0.08);
    color: var(--neon-cyan);
    border: 1px solid rgba(0,243,255,0.32);
}

.strategy-sidebar > .btn-main-action:hover { background: var(--neon-cyan); color: #071014; }
.strategy-sidebar > .btn-main-action:disabled { opacity: 0.45; cursor: not-allowed; }

.protocol-list {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    padding-right: 4px;
}

.strategy-nav-item {
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 12px;
    box-sizing: border-box;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 8px;
    background: rgba(255,255,255,0.025);
    transition: border-color 0.2s, background 0.2s;
}

.strategy-nav-item:hover { border-color: rgba(255,255,255,0.2); background: rgba(255,255,255,0.05); }
.strategy-nav-item.active { border-color: var(--neon-cyan); background: rgba(0,243,255,0.08); }

.protocol-info { min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.protocol-title { overflow: hidden; color: #f8fafc; font-size: 0.9rem; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.protocol-date { display: flex; align-items: center; gap: 6px; overflow: hidden; color: #94a3b8; font-size: 0.7rem; text-overflow: ellipsis; white-space: nowrap; }

.delete-hint,
.strategy-icon-button,
.entity-actions button,
.task-actions button,
.task-status-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    color: #94a3b8;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
}

.delete-hint { width: 30px; height: 30px; flex: 0 0 30px; opacity: 0; }
.strategy-nav-item:hover .delete-hint,
.delete-hint:focus-visible { opacity: 1; }
.delete-hint:hover { color: var(--neon-pink); border-color: rgba(255,0,85,0.45); background: rgba(255,0,85,0.08); }

.strategy-content {
    min-width: 0;
    height: 100%;
    overflow-y: auto;
    padding: 42px clamp(24px, 5vw, 72px);
    box-sizing: border-box;
}

.strategy-action-bar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 32px;
    padding-bottom: 26px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.strategy-heading { min-width: 0; }
.strategy-heading h2 { margin: 8px 0 0; color: #f8fafc; font-size: 2rem; letter-spacing: 0; overflow-wrap: anywhere; }
.strategy-kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; color: #94a3b8; font-size: 0.7rem; font-weight: 700; }
.strategy-kicker span { display: inline-flex; align-items: center; gap: 6px; }

.strategy-header-actions { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.strategy-icon-button { width: 40px; height: 40px; border-color: rgba(255,255,255,0.14); background: rgba(255,255,255,0.04); }
.strategy-icon-button:hover { color: var(--neon-cyan); border-color: var(--neon-cyan); }
.audit-btn { min-height: 40px; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }

.strategy-empty-state,
.hierarchy-empty-state {
    min-height: 260px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: #64748b;
    text-align: center;
}

.strategy-empty-state i,
.hierarchy-empty-state > i { color: var(--neon-cyan); font-size: 2.3rem; }
.strategy-empty-state p,
.hierarchy-empty-state p { margin: 0; }

.strategy-hierarchy { width: 100%; min-width: 0; }
.hierarchy-toolbar { min-height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 16px; color: #94a3b8; font-size: 0.75rem; }
.hierarchy-toolbar strong { color: #f8fafc; font-size: 1rem; }

.strategy-compact-button {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 7px 11px;
    cursor: pointer;
    border: 1px solid rgba(0,243,255,0.3);
    border-radius: 6px;
    background: rgba(0,243,255,0.07);
    color: var(--neon-cyan);
    font-size: 0.7rem;
    font-weight: 800;
}
.strategy-compact-button:hover { background: var(--neon-cyan); color: #071014; }

.strategy-inline-error { margin-top: 18px; padding: 14px; border: 1px solid rgba(255,0,85,0.4); border-radius: 6px; color: #fda4af; background: rgba(255,0,85,0.07); }
.drill-down-container { width: 100%; margin-top: 20px; }

.objective-section {
    margin-bottom: 34px;
    padding: 4px 0 0 22px;
    border-left: 3px solid rgba(0,243,255,0.55);
}

.objective-header,
.milestone-header,
.task-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.objective-heading { min-width: 0; }
.objective-heading h3 { margin: 8px 0 6px; color: #f8fafc; font-size: 1.25rem; letter-spacing: 0; overflow-wrap: anywhere; }
.objective-heading p { max-width: 780px; margin: 0; color: #94a3b8; font-size: 0.85rem; line-height: 1.55; }
.objective-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: #64748b; font-size: 0.68rem; text-transform: uppercase; }
.dept-badge { letter-spacing: 0; }

.entity-actions { display: flex; align-items: center; gap: 5px; flex: 0 0 auto; }
.entity-actions button { width: 32px; height: 32px; border-color: rgba(255,255,255,0.1); background: rgba(255,255,255,0.025); }
.entity-actions button:hover { color: var(--neon-cyan); border-color: rgba(0,243,255,0.45); }
.entity-actions button.danger:hover { color: var(--neon-pink); border-color: rgba(255,0,85,0.45); }

.objective-progress-row { display: grid; grid-template-columns: minmax(0, 1fr) 42px; align-items: center; gap: 12px; max-width: 620px; margin: 16px 0 20px; }
.objective-progress-row strong { color: #cbd5e1; font-size: 0.72rem; text-align: right; }
.objective-progress-track { height: 5px; overflow: hidden; border-radius: 3px; background: rgba(255,255,255,0.08); }
.objective-progress-track span { display: block; height: 100%; background: var(--neon-green); transition: width 0.2s; }

.milestone-list { display: flex; flex-direction: column; gap: 20px; }
.milestone-section { padding: 20px 0 0; border-top: 1px solid rgba(255,255,255,0.08); }
.milestone-header h4 { margin: 8px 0 0; color: #e2e8f0; font-size: 1rem; letter-spacing: 0; overflow-wrap: anywhere; }
.milestone-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; color: #64748b; font-size: 0.68rem; }
.milestone-meta span { display: inline-flex; align-items: center; gap: 6px; }

.status-pill { display: inline-flex; align-items: center; min-height: 22px; padding: 3px 8px; border: 1px solid rgba(255,255,255,0.14); border-radius: 4px; color: #cbd5e1; font-size: 0.62rem; font-weight: 800; }
.status-pill.in_progress { color: #fbbf24; border-color: rgba(251,191,36,0.4); }
.status-pill.completed { color: var(--neon-green); border-color: rgba(0,255,157,0.4); }

.task-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr)); gap: 12px; margin-top: 16px; }
.task-card { min-width: 0; padding: 16px; border: 1px solid rgba(255,255,255,0.09); border-radius: 8px; background: #111722; }
.task-card:hover { border-color: rgba(0,243,255,0.3); }
.task-card.completed { border-color: rgba(0,255,157,0.25); background: rgba(0,255,157,0.035); }

.task-status-toggle,
.task-status-icon { width: 28px; height: 28px; flex: 0 0 28px; display: inline-flex; align-items: center; justify-content: center; color: #64748b; }
.task-status-toggle:hover { color: var(--neon-green); }
.task-card.completed .task-status-toggle,
.task-card.completed .task-status-icon { color: var(--neon-green); }
.task-title-block { min-width: 0; flex: 1; }
.task-title-block h5 { margin: 2px 0 5px; color: #f1f5f9; font-size: 0.86rem; letter-spacing: 0; overflow-wrap: anywhere; }
.task-title-block > span { color: #64748b; font-size: 0.62rem; font-weight: 800; }
.task-actions { display: flex; align-items: center; gap: 3px; }
.task-actions button { width: 28px; height: 28px; }
.task-actions button:hover { color: var(--neon-cyan); }
.task-actions button:last-child:hover { color: var(--neon-pink); }
.task-description { margin: 12px 0 0 36px; color: #94a3b8; font-size: 0.78rem; line-height: 1.45; }
.task-meta { display: flex; flex-wrap: wrap; gap: 7px 12px; margin: 13px 0 0 36px; color: #64748b; font-size: 0.66rem; }
.task-meta span { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; overflow-wrap: anywhere; }

.milestone-empty { margin-top: 14px; padding: 12px 0; color: #64748b; font-size: 0.75rem; }
.milestone-empty button { margin-left: 7px; padding: 0; cursor: pointer; border: 0; background: transparent; color: var(--neon-cyan); }

.strategy-mode-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-bottom: 24px; padding: 4px; border: 1px solid rgba(255,255,255,0.09); border-radius: 8px; background: rgba(0,0,0,0.25); }
.strategy-mode-toggle button { min-height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; cursor: pointer; border: 0; border-radius: 5px; background: transparent; color: #94a3b8; font-weight: 800; }
.strategy-mode-toggle button.active { background: #f8fafc; color: #090b10; }

.strategy-form label { display: block; margin: 0 0 7px; color: #cbd5e1; font-size: 0.7rem; font-weight: 800; }
.strategy-form input,
.strategy-form textarea { width: 100%; min-width: 0; box-sizing: border-box; margin-bottom: 16px; padding: 11px 12px; border: 1px solid rgba(255,255,255,0.12); border-radius: 6px; background: rgba(0,0,0,0.28); color: #f8fafc; font: inherit; }
.strategy-form textarea { resize: vertical; line-height: 1.45; }
.strategy-form input:focus,
.strategy-form textarea:focus { outline: none; border-color: var(--neon-cyan); }
.strategy-form .neon-select { margin-bottom: 16px; }
.strategy-form > .btn-main-action { margin-top: 4px; }
.strategy-form-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }

.confirm-box { text-align: center; }
.confirm-box h3 { margin: 0 0 14px; color: var(--neon-pink); letter-spacing: 0; }
.confirm-box p { color: #94a3b8; line-height: 1.5; }
.modal-actions { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 22px; }

@media (max-width: 960px) {
    .strategy-grid { grid-template-columns: 240px minmax(0, 1fr); }
    .strategy-sidebar { padding: 22px 14px; }
    .strategy-content { padding: 32px 22px; }
    .strategy-action-bar { flex-direction: column; }
}

@media (max-width: 700px) {
    .strategy-grid { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); height: 100vh; overflow-y: auto; }
    .strategy-sidebar { height: auto; max-height: 36vh; border-right: 0; border-bottom: 1px solid rgba(255,255,255,0.08); }
    .protocol-list { max-height: 160px; }
    .strategy-content { height: auto; min-height: 64vh; overflow: visible; padding: 26px 18px 60px; }
    .strategy-heading h2 { font-size: 1.55rem; }
    .strategy-header-actions { width: 100%; }
    .audit-btn { flex: 1; justify-content: center; }
    .objective-section { padding-left: 14px; }
    .objective-header,
    .milestone-header { flex-direction: column; }
    .entity-actions { align-self: flex-end; }
    .strategy-form-grid { grid-template-columns: 1fr; gap: 0; }
    .task-description,
    .task-meta { margin-left: 0; }
}
