:root {
    --bg: #0d1117;
    --card: #161b22;
    --accent: #58a6ff;
    --danger: #f85149;
    --success: #238636;
    --text: #c9d1d9;
    --border: #30363d;
    --modal: #21262d;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: sans-serif;
    padding: 20px;
    display: flex;
    justify-content: center;
    padding-bottom: 120px;
}

.container {
    width: 100%;
    max-width: 900px;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.pill-box {
    display: flex;
    gap: 10px;
    align-items: center;
    position: relative;
}

.status-pill {
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: 900;
    font-size: 0.75rem;
    border: 1px solid;
    cursor: pointer;
    user-select: none;
}

.context-pill {
    padding: 9px 18px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.7rem;
    border: 1px solid;
    text-transform: uppercase;
}

.active {
    background: #3e1b1b;
    color: var(--danger);
    border-color: var(--danger);
}
.idle {
    background: #1b3e2b;
    color: var(--success);
    border-color: var(--success);
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.val {
    font-size: 1.3rem;
    font-weight: bold;
    margin: 10px 0;
    color: white;
}

button {
    width: 100%;
    padding: 12px;
    border-radius: 4px;
    border: 1px solid #363b42;
    background: #21262d;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
}

button:hover {
    background: #30363d;
}

.dropdown-menu {
    position: absolute;
    top: 115%;
    right: 35px;
    background: var(--modal);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px;
    display: none;
    flex-direction: column;
    gap: 5px;
    min-width: 220px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.dropdown-menu.show {
    display: flex;
}

.dropdown-item {
    padding: 10px 15px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    color: white;
    cursor: pointer;
    text-align: left;
    border: none;
    background: transparent;
    transition: 0.2s;
    width: 100%;
}

.dropdown-item:hover {
    background: var(--border);
}
.dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 5px 0;
}

.row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.85rem;
}

.topic-tag {
    background: #23416b;
    color: var(--accent);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: bold;
}

.cog {
    cursor: pointer;
    color: #8b949e;
    transition: 0.3s;
    font-size: 1.2rem;
}
.cog:hover {
    color: white;
    transform: rotate(45deg);
}

label {
    display: block;
    color: #8b949e;
    font-size: 0.65rem;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 8px;
    margin-top: 15px;
}

input {
    background: var(--bg);
    border: 1px solid var(--border);
    color: white;
    padding: 12px;
    border-radius: 4px;
    outline: none;
    width: 100%;
    box-sizing: border-box;
}

.server-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 10px;
}

#modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal {
    background: var(--modal);
    width: 100%;
    max-width: 600px;
    border-radius: 12px;
    border: 1px solid var(--border);
    padding: 30px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
}
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #30363d;
    transition: 0.4s;
    border-radius: 34px;
    border: 1px solid #444;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--success);
    border-color: var(--success);
}
input:checked + .slider:before {
    transform: translateX(18px);
}

.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #010409;
    border-top: 1px solid var(--border);
    padding: 15px 0;
    font-size: 0.62rem;
    color: #8b949e;
    z-index: 500;
}

.footer-inner {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 0 40px;
    box-sizing: border-box;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}
.stat-val {
    color: var(--text);
    font-weight: bold;
    font-family: monospace;
}
.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}

.clickable-stat {
    cursor: pointer;
    border-radius: 4px;
    transition: 0.2s;
    padding: 2px 4px;
}
.clickable-stat:hover {
    background: #161b22;
    color: white;
}

.divider {
    height: 14px;
    width: 1px;
    background: #333;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 12px;
}

.card-label {
    color: #8b949e;
    font-size: 0.7rem;
    font-weight: bold;
    text-transform: uppercase;
}

.action-link {
    color: var(--success);
    font-weight: bold;
    font-size: 0.75rem;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid var(--success);
    padding: 4px 10px;
    border-radius: 4px;
    transition: 0.2s;
    text-transform: uppercase;
}

.action-link:hover {
    background: rgba(35, 134, 54, 0.1);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
th {
    text-align: left;
    color: #8b949e;
    padding-bottom: 10px;
}
td {
    padding: 10px 0;
    border-bottom: 1px solid #21262d;
    vertical-align: middle;
}

.rem-x {
    color: var(--danger);
    font-weight: bold;
    cursor: pointer;
    margin-left: 10px;
    font-size: 0.8rem;
}

.white-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 15px;
}

.white-pill {
    background: #1b3e2b;
    color: var(--success);
    border: 1px solid var(--success);
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    font-weight: bold;
}
/* Addition: Status Glow Styling */
/* Addition: Updated Status Glow Styling */
.status-glow {
    position: fixed;
    /* Move it further into the corner to ensure it's "bleeding" in */
    top: -225vh;
    left: -110vw;
    width: 200vw;
    height: 325vh;
    border-radius: 50%;
    filter: blur(100vw);
    /* Increase opacity slightly if it's too faint */
    opacity: 0.25;
    transition: background 0.8s ease-in-out;
    pointer-events: none;
    z-index: -1;
}

/* Red Glow - Shield Active (Alerts Queued) */
.glow-enabled {
    background: radial-gradient(
        circle,
        rgba(255, 69, 58, 0.8) 0%,
        transparent 70%
    );
}

/* Green Glow - Shield Idle (Alerts Delivered) */
.glow-disabled {
    background: radial-gradient(
        circle,
        rgba(48, 209, 88, 0.8) 0%,
        transparent 70%
    );
}

/* Status colors */
.glow-enabled {
    background: radial-gradient(circle, var(--danger) 0%, transparent 70%);
}

.glow-disabled {
    background: radial-gradient(circle, var(--success) 0%, transparent 70%);
}
