:root {
    --bg: #0f172a;
    --card: #1e293b;
    --text: #e2e8f0;
    --muted: #94a3b8;
    --accent: #d89904;
    --accent-dark: #af7d08;
    --danger: #f87171;
}
* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
}
a { color: var(--accent); text-decoration: none; }
header, main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.5rem;
}
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: rgba(15,23,42,0.85);
    backdrop-filter: blur(8px);
    position: sticky;
    top: 0;
    z-index: 10;
}
nav .links a { margin-left: 1rem; font-weight: 600; }
.card {
    background: var(--card);
    border-radius: 14px;
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 15px 35px rgba(2,8,23,0.45);
}
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.25rem;
}
input, select, button {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    border: none;
    margin-top: 0.5rem;
    background: #0f172a;
    color: var(--text);
}
button {
    cursor: pointer;
    background: var(--accent);
    font-weight: 600;
}
button:hover { background: var(--accent-dark); }
.button-danger { background: var(--danger); }
.button-danger:hover { background: #dc2626; }
.button-warning { background: #fb923c; color: #0f172a; }
.button-warning:hover { background: #f97316; }
.button-system { background: #60a5fa; color: #0f172a; }
.button-system:hover { background: #3b82f6; }
.button-soft { background: #86efac; color: #0f172a; }
.button-soft:hover { background: #4ade80; color: #0f172a; }
.button-outline {
    background: transparent;
    border: 1px solid rgba(148, 163, 184, 0.6);
}
.button-outline:hover {
    background: rgba(148, 163, 184, 0.2);
}
.command-group {
    margin-bottom: 0.75rem;
}
.command-group h4 {
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.07em;
}
.status-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.status-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}
.status-row-full .status-item,
.status-item-full {
    grid-column: 1 / -1;
}
.status-item span:first-child { color: var(--muted); display: block; font-size: 0.85rem; }
.time-relative {
    color: var(--muted);
    font-size: 0.85em;
}
.flash {
    padding: 0.8rem 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    background: rgba(56,189,248,0.15);
}
.flash.error { background: rgba(248,113,113,0.2); }
form.inline { display: inline; }
.remote-actions button { margin-top: 0.5rem; }

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}
.button-row button {
    flex: 1;
    min-width: 160px;
}
.message-card {
    margin-top: 1rem;
}
.message-card textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    border: none;
    background: #0f172a;
    color: var(--text);
    margin-top: 0.5rem;
}
.message-options {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}
.message-options label {
    flex: 1;
}
.message-options input[type="number"] {
    width: 100%;
}
.checkbox-inline {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.checkbox-inline input {
    width: auto;
    margin-top: 0;
}
.checkbox-inline span {
    flex: 1;
}
.command-flash,
.message-flash {
    margin-top: 0.5rem;
}
.field-hint {
    display: block;
    color: var(--muted);
    font-size: 0.8rem;
    margin-top: 0.35rem;
}
.form-note {
    color: var(--muted);
    margin-top: 0;
}
.consent-box {
    margin-top: 0.75rem;
    align-items: flex-start;
}
.consent-box input {
    margin-top: 0.15rem;
}
.legal-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    color: var(--muted);
}
.legal-card {
    max-width: 860px;
}
.legal-section + .legal-section {
    margin-top: 1.25rem;
}
.legal-section h3 {
    margin-bottom: 0.5rem;
}
.legal-list {
    margin: 0.6rem 0 0;
    padding-left: 1.2rem;
}
.legal-list li + li {
    margin-top: 0.35rem;
}
@media (max-width: 640px) {
    nav {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    nav .links {
        display: flex;
        flex-wrap: wrap;
        gap: 0.75rem;
    }
    nav .links a {
        margin-left: 0;
    }
}
