/* Centro de Control OpenClaw — Dashboard CSS */
/* MVP v1.0 · Diseño oscuro operativo, sin florituras */

:root {
    --bg: #0d1117;
    --card-bg: #161b22;
    --border: #30363d;
    --text: #e6edf3;
    --text-muted: #8b949e;
    --green: #3fb950;
    --yellow: #d29922;
    --red: #f85149;
    --blue: #58a6ff;
    --gray: #484f58;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
}

.container { max-width: 1200px; margin: 0 auto; padding: 16px; }

/* Header */
.header {
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.header-green { background: linear-gradient(135deg, #0d5320, #161b22); border: 1px solid var(--green); }
.header-yellow { background: linear-gradient(135deg, #5c4800, #161b22); border: 1px solid var(--yellow); }
.header-red { background: linear-gradient(135deg, #5c1010, #161b22); border: 1px solid var(--red); }

.header h1 { font-size: 20px; font-weight: 700; }
.header-subtitle { color: var(--text-muted); font-size: 12px; margin-top: 2px; }

.semaphore { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.header-stats { font-size: 12px; color: var(--text-muted); display: flex; gap: 12px; }

/* Counters */
.counters {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}
.counter {
    padding: 12px;
    border-radius: 6px;
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
}
.counter-num { font-size: 28px; font-weight: 800; display: block; margin-bottom: 2px; }
.counter-green { background: #0d5320; border: 1px solid var(--green); color: var(--green); }
.counter-yellow { background: #5c4800; border: 1px solid var(--yellow); color: var(--yellow); }
.counter-blue { background: #0c2d6b; border: 1px solid var(--blue); color: var(--blue); }
.counter-gray { background: #21262d; border: 1px solid var(--gray); color: var(--text-muted); }

/* Cards */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
}
.card h2 { font-size: 14px; font-weight: 600; margin-bottom: 12px; color: var(--text); }

/* Row layout */
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.half { margin-bottom: 0; }

/* Alerts */
.alert {
    display: flex;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 8px;
    align-items: flex-start;
}
.alert-red { background: #1c1010; border-left: 3px solid var(--red); }
.alert-yellow { background: #1c1a0a; border-left: 3px solid var(--yellow); }
.alert-green { background: #0d1f12; border-left: 3px solid var(--green); }
.alert-severity { font-size: 18px; }
.alert-body { flex: 1; }
.alert-body strong { font-size: 13px; }
.alert-body p { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.alert-action { color: var(--blue) !important; font-size: 11px !important; }
.alert-since { font-size: 10px; color: var(--gray); }

/* Tables */
.compact-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.compact-table th {
    text-align: left;
    padding: 6px 8px;
    border-bottom: 1px solid var(--border);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.compact-table td { padding: 6px 8px; border-bottom: 1px solid #1c2128; }
.compact-table tr:last-child td { border-bottom: none; }
.compact-table a { color: var(--blue); text-decoration: none; }
.compact-table a:hover { text-decoration: underline; }

/* Badges */
.badge {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}
.badge-green { background: #0d5320; color: var(--green); }
.badge-red { background: #5c1010; color: var(--red); }
.badge-yellow { background: #5c4800; color: var(--yellow); }
.badge-gray { background: #21262d; color: var(--text-muted); }
.badge-blue { background: #0c2d6b; color: var(--blue); }

/* Infrastructure grid */
.infra-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.infra-card {
    background: #0d1117;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 10px;
    text-align: center;
}
.infra-icon { font-size: 20px; margin-bottom: 4px; }
.infra-label { font-size: 11px; color: var(--text-muted); }

/* Decisions */
.decisions-list { list-style: none; }
.decision-item { padding: 6px 0; border-bottom: 1px solid #1c2128; font-size: 13px; }
.decision-item:last-child { border-bottom: none; }

/* Footer */
.footer {
    text-align: center;
    padding: 16px;
    font-size: 11px;
    color: var(--text-muted);
}
.footer a { color: var(--blue); text-decoration: none; }

/* Utilities */
.muted { color: var(--text-muted); }
.updated { font-size: 11px; color: var(--text-muted); margin-top: 8px; }

/* Responsive */
@media (max-width: 768px) {
    .row { grid-template-columns: 1fr; }
    .counters { grid-template-columns: repeat(2, 1fr); }
    .infra-grid { grid-template-columns: repeat(2, 1fr); }
    .header { flex-direction: column; gap: 8px; text-align: center; }
}

/* Strategy links grid */
.strategy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 6px;
}
.strategy-link {
    display: block;
    padding: 8px 12px;
    background: #0d1117;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--blue);
    text-decoration: none;
    font-size: 12px;
    transition: border-color 0.2s;
}
.strategy-link:hover {
    border-color: var(--blue);
    background: #161b22;
}

/* Knowledge section subtle heading */
.card h3 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    padding-bottom: 6px;
}

/* Code tag styling */
code {
    background: #21262d;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 11px;
    color: var(--text-muted);
}

/* Gray alert for unverifiable items */
.alert-gray {
    background: #1c1c1c;
    border-left: 3px solid var(--gray);
}
.alert-gray .alert-severity { opacity: 0.5; }
