/* Global */

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

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #050608;
    color: #e5e7eb;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Top bar */

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 12px 24px;
    background: #0b0d10;
    border-bottom: 1px solid #1f2933;
}

.logo {
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 14px;
}

.top-subtitle {
    margin-left: 12px;
    font-size: 12px;
    color: #9ca3af;
}

.top-bar-right .top-link {
    margin-left: 16px;
    font-size: 13px;
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid transparent;
}

.top-bar-right .top-link:hover {
    border-color: #4b5563;
}

.top-bar-right .top-link.danger {
    border-color: #b91c1c;
    color: #fecaca;
}

/* Layout */

.dashboard-body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    padding: 16px 24px 64px;
}

@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

.card {
    background: #0b0d10;
    border-radius: 14px;
    border: 1px solid #111827;
    padding: 14px 16px;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.5);
}

.card h2 {
    font-size: 16px;
    margin-bottom: 8px;
}

.card h3 {
    font-size: 14px;
    margin: 10px 0 6px;
}

.hint {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 8px;
}

/* Specific cards */

.status-row,
.momentum-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 6px;
}

.label {
    font-size: 13px;
    color: #d1d5db;
}

.pill {
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    border: 1px solid #4b5563;
    background: #020617;
    color: #e5e7eb;
}

.pill-wide {
    min-width: 60%;
}

.btn-primary {
    padding: 8px 20px;
    border-radius: 999px;
    border: none;
    background: #16a34a;
    color: #022c22;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
}

.btn-primary:hover {
    background: #22c55e;
}

/* Momentum */

.momentum-row select {
    min-width: 60px;
}

/* Mission */

.mission-text {
    width: 100%;
    border-radius: 10px;
    border: 1px solid #111827;
    background: #020617;
    color: #e5e7eb;
    padding: 6px 8px;
    font-size: 13px;
    resize: vertical;
}

.pattern-input {
    width: 100%;
    border-radius: 10px;
    border: 1px solid #111827;
    background: #020617;
    color: #e5e7eb;
    padding: 6px 8px;
    font-size: 13px;
}

/* OODA */

.ooda-row {
    margin-top: 8px;
}

.ooda-label {
    display: inline-block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #9ca3af;
    margin-bottom: 2px;
}

.ooda-text {
    width: 100%;
    border-radius: 10px;
    border: 1px solid #111827;
    background: #020617;
    color: #e5e7eb;
    padding: 6px 8px;
    font-size: 13px;
    resize: vertical;
}

/* Threat */

.threat-indicator {
    display: flex;
    align-items: center;
    margin-top: 6px;
    font-size: 13px;
    gap: 6px;
}

.threat-indicator input[type="radio"] {
    accent-color: #16a34a;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    margin-right: 4px;
}

.dot-low {
    background: #16a34a;
}

.dot-medium {
    background: #facc15;
}

.dot-high {
    background: #dc2626;
}

/* Footer & save bar */

.footer {
    padding: 8px 24px 14px;
    font-size: 12px;
    color: #6b7280;
    display: flex;
    justify-content: space-between;
    border-top: 1px solid #111827;
}

.save-bar {
    position: fixed;
    bottom: 8px;
    right: 24px;
}

/* Login */

.login-body {
    min-height: 100vh;
    background: radial-gradient(circle at top, #111827 0, #020617 55%, #000 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    background: #020617;
    border-radius: 16px;
    padding: 24px 24px 20px;
    border: 1px solid #111827;
    width: 320px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.8);
}

.login-container h1 {
    font-size: 20px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.login-container h2 {
    font-size: 13px;
    color: #9ca3af;
    margin-top: 4px;
    margin-bottom: 16px;
}

.login-form label {
    display: block;
    font-size: 13px;
    margin-bottom: 10px;
}

.login-form input {
    width: 100%;
    margin-top: 4px;
    padding: 6px 8px;
    border-radius: 8px;
    border: 1px solid #1f2933;
    background: #020617;
    color: #e5e7eb;
    font-size: 13px;
}

.login-form input:focus {
    outline: none;
    border-color: #4b5563;
}

.alert {
    font-size: 12px;
    padding: 6px 8px;
    border-radius: 8px;
    margin-bottom: 10px;
}

.alert-error {
    background: #7f1d1d;
    color: #fecaca;
}

/* Patterns & history tables */

.patterns-main {
    padding: 16px 24px 32px;
}

.patterns-main h1 {
    font-size: 18px;
    margin-bottom: 8px;
}

.patterns-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
    font-size: 13px;
}

.patterns-table th,
.patterns-table td {
    border: 1px solid #111827;
    padding: 6px 8px;
}

.patterns-table th {
    background: #020617;
    font-weight: 500;
}

.cell-small {
    text-align: center;
    width: 60px;
}

.cell-note {
    color: #9ca3af;
}

/* Intel */

.card-intel .intel-list {
    margin-left: 16px;
    margin-top: 4px;
}

.card-intel .intel-list li {
    margin-bottom: 4px;
}
