/* --- 1. TACTICAL THEME (STRICT) --- */
:root {
    --brand-orange: #FF6600;
    --brand-blue: #0066CC;
    --brand-green: #00A86B;
    --bg-canvas: #F5F5F5;
    --bg-panel: #FFFFFF;
    --text-main: #111;
    --text-sub: #666;
    --border: #CCC;
    --font-stack: 'SF Mono', 'Menlo', 'Consolas', 'Monaco', monospace;
}

* { box-sizing: border-box; }

body {
    background-color: var(--bg-canvas);
    font-family: var(--font-stack);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

.tactical-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0; 
    padding: 20px;
    padding-bottom: 80px;
}

/* --- CLUSTERS --- */
.cluster-header {
    background: #E5E5E5;
    border: 1px solid var(--border);
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
    color: #333;
    margin-top: 30px; 
    margin-bottom: -1px;
    position: relative;
    z-index: 2;
}

.cluster-header:first-child { margin-top: 0; }
.cluster-meta { color: var(--text-sub); }

/* --- CARD --- */
.entity-card {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    margin-bottom: -1px;
    transition: all 0.2s ease;
    position: relative;
}

.entity-card:hover {
    border-color: #999;
    z-index: 10;
}

/* HEADER ALIGNED LEFT */
.card-header {
    padding: 18px 15px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    cursor: pointer;
    user-select: none;
    background: #FFF;
}

.card-header:active { background: #F9F9F9; }

.profile-flex {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
}

.avatar {
    width: 36px;
    height: 36px;
    background: #EEE;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    border: 1px solid #CCC;
    font-size: 12px;
    flex-shrink: 0;
}

.info h4 {
    margin: 0;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info span {
    font-size: 10px;
    color: var(--text-sub);
    display: block;
    margin-top: 2px;
}

/* --- BODY --- */
.card-body {
    display: none;
    border-top: 1px dashed var(--border);
    padding: 20px;
    background: #FAFAFA;
}

.entity-card.expanded .card-body {
    display: block;
    animation: slideOpen 0.2s ease-out;
}

@keyframes slideOpen {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.grid-layout {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 20px;
}

@media (max-width: 500px) {
    .grid-layout { grid-template-columns: 1fr; gap: 25px; }
}

h5 {
    margin: 0 0 10px 0;
    font-size: 10px;
    text-transform: uppercase;
    color: var(--brand-blue);
    border-bottom: 1px solid var(--brand-blue);
    display: inline-block;
    padding-bottom: 2px;
}

/* --- INFO CLEANUP --- */
.intel-text {
    font-size: 11px;
    line-height: 1.5;
    color: #333;
    margin-bottom: 15px;
}

.data-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 10px;
    color: #555;
    margin-bottom: 4px;
    font-family: var(--font-stack);
}

.action-btn {
    width: 100%;
    text-align: left;
    padding: 10px; 
    font-family: inherit;
    font-size: 10px;
    background: white;
    border: 1px solid #CCC;
    cursor: pointer;
    text-transform: uppercase;
    display: flex;
    gap: 8px;
    margin-bottom: 5px;
}

.action-btn:hover { border-color: var(--brand-blue); color: var(--brand-blue); }

/* --- AUTO-OUTREACH --- */
.protocol-group {
    border: 1px solid #DDD;
    background: #FFF;
    padding: 10px;
}

.protocol-row {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px dotted #EEE;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.protocol-row:last-child { margin-bottom: 0; padding-bottom: 0; border: none; }

.row-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.check-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 10px;
    font-weight: 700;
}

/* DATE: BLACK & FAT */
.date-label {
    color: #000;
    font-size: 11px;
    font-weight: 900; 
    letter-spacing: -0.5px;
}

.context-input {
    width: 100%;
    border: 1px solid #CCC;
    padding: 6px;
    font-family: var(--font-stack);
    font-size: 10px;
    color: #333;
    background: #FAFAFA;
    border-radius: 0;
    margin-bottom: 4px;
}

.context-input:focus { outline: none; border-color: var(--brand-blue); background: #FFF; }

.row-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: opacity 0.2s;
}

.row-controls.disabled {
    opacity: 0.4;
    pointer-events: none;
}

select {
    font-family: var(--font-stack);
    font-size: 10px;
    padding: 4px;
    border: 1px solid #CCC;
    background: #F9F9F9;
    width: 90px;
    border-radius: 0;
    cursor: pointer;
}

/* SAFETY SWITCH */
.safety-switch {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    border: 1px solid transparent;
    padding: 2px;
}

.track {
    width: 30px;
    height: 12px;
    background: #EEE;
    border: 1px solid #CCC;
    position: relative;
}

.knob {
    width: 12px;
    height: 12px;
    background: #333;
    position: absolute;
    left: -1px;
    top: -1px;
    border: 1px solid #333;
    transition: transform 0.2s cubic-bezier(0,0,0,1);
}

.state-label {
    font-size: 9px;
    text-transform: uppercase;
    font-weight: 700;
    width: 45px;
    text-align: right;
    color: var(--text-sub);
}

.safety-switch.manual .track { background: #E8F5E9; border-color: var(--brand-green); }
.safety-switch.manual .knob { background: var(--brand-green); border-color: var(--brand-green); left: -1px; }
.safety-switch.manual .state-label { color: var(--brand-green); }

.safety-switch.auto .track { background: #FFF3E0; border-color: var(--brand-orange); }
.safety-switch.auto .knob { background: var(--brand-orange); border-color: var(--brand-orange); transform: translateX(18px); }
.safety-switch.auto .state-label { color: var(--brand-orange); }
