.gaia-rules-btn.active {
    color: #3d9be9;
    background: rgba(61, 155, 233, 0.12);
}
.gaia-rules-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #3d9be9;
    display: inline-block;
    flex-shrink: 0;
    margin-left: 4px;
}
.gaia-rules-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 80;
}
.gaia-rules-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: min(420px, 100vw);
    height: 100vh;
    background: #0e1621;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 81;
    display: flex;
    flex-direction: column;
    box-shadow: -12px 0 40px rgba(0, 0, 0, 0.35);
}
.gaia-rules-panel.hidden,
.gaia-rules-overlay.hidden {
    display: none;
}
.gaia-rules-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.gaia-rules-head h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #e8edf2;
}
.gaia-rules-head p {
    margin: 4px 0 0;
    font-size: 12px;
    color: #7c8d9e;
}
.gaia-rules-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 18px 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.gaia-rules-field label,
.gaia-rules-toggle span:first-child {
    display: block;
    font-size: 12px;
    color: #7c8d9e;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 6px;
}
.gaia-rules-field select,
.gaia-rules-field textarea,
.gaia-rules-field input[type="number"] {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: #17212b;
    color: #e8edf2;
    font-size: 14px;
    padding: 10px 12px;
    font-family: inherit;
}
.gaia-rules-field textarea {
    min-height: 88px;
    resize: vertical;
}
.gaia-rules-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 36px;
}
.gaia-rules-hint {
    font-size: 12px;
    color: #7c8d9e;
    line-height: 1.4;
}
.gaia-rules-foot {
    display: flex;
    gap: 8px;
    padding: 14px 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.gaia-rules-foot button {
    flex: 1;
    height: 40px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.gaia-rules-save {
    background: #3d9be9;
    color: #fff;
}
.gaia-rules-save:disabled {
    opacity: 0.5;
    cursor: default;
}
.gaia-rules-cancel {
    background: rgba(255, 255, 255, 0.06);
    color: #e8edf2;
}
.gaia-rules-status {
    font-size: 12px;
    min-height: 16px;
}
.gaia-rules-status.ok { color: #4ade80; }
.gaia-rules-status.err { color: #ef6b73; }
.gaia-watch-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(61, 155, 233, 0.15);
    color: #3d9be9;
    white-space: nowrap;
}
.gaia-watch-badge.off {
    background: rgba(255, 255, 255, 0.05);
    color: #7c8d9e;
}
.gaia-rules-panel .toggle,
.gaia-rules-body .toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}
.gaia-rules-panel .toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}
.gaia-rules-panel .slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #344150;
    border-radius: 12px;
    transition: background .15s;
}
.gaia-rules-panel .slider:before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: left .15s;
}
.gaia-rules-panel .toggle input:checked + .slider {
    background: #3d9be9;
}
.gaia-rules-panel .toggle input:checked + .slider:before {
    left: 23px;
}
