/* Bootstrap 5.3 supplies most dark-mode styles via data-bs-theme="dark";
   this file only overrides what isn't covered by default. */

:root[data-bs-theme="dark"] {
    --ipmgr-bg: #15181d;
    --ipmgr-panel: #1c2027;
    --ipmgr-border: #2a2f38;
}

body {
    background: var(--ipmgr-bg);
}

.login-pane {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ipmgr-bg);
    z-index: 1000;
}

.tab-pane {
    background: var(--ipmgr-panel);
    padding: 1rem;
    border: 1px solid var(--ipmgr-border);
    border-top: 0;
    border-radius: 0 0 .375rem .375rem;
}

.nav-tabs {
    border-bottom: 1px solid var(--ipmgr-border);
}

.nav-tabs .nav-link.active {
    background: var(--ipmgr-panel);
    border-color: var(--ipmgr-border) var(--ipmgr-border) var(--ipmgr-panel);
}

table code {
    background: rgba(255, 255, 255, 0.06);
    color: #e6edf3;
    padding: 1px 4px;
    border-radius: 3px;
}

.copyable {
    cursor: pointer;
}

/* Status indicator — a small colored dot, not a full pill background.
   Lower ink, easier to scan a column at a glance. */
.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
}
.status-dot-签约中    { background: #c084fc; }
.status-dot-安装中    { background: #fbbf24; }
.status-dot-安装完成  { background: #60a5fa; }
.status-dot-使用中    { background: #4ade80; }
.status-dot-等待迁移  { background: #f472b6; }
.status-dot-无计划    { background: #6b7280; }

/* Site header row — subtle accent background so the eye catches site
   boundaries at a glance, plus a thin top divider. Looks like a section
   heading, not a button card. */
tr.site-header-row > td {
    background: rgba(255, 255, 255, 0.05);
    border-top: 1px solid var(--ipmgr-border);
    padding: 0.55rem 0.5rem 0.4rem;
}
tr.site-header-row .site-header-cell:hover {
    background: rgba(255, 255, 255, 0.08);
}
tr.site-header-row .caret,
tr.site-header-row .site-code {
    cursor: pointer;
    user-select: none;
}
tr.site-header-row .caret {
    display: inline-block;
    width: 1em;
    color: var(--bs-secondary-color);
}

/* Click-to-view rows: pointer cursor + faint hover background.
   Editing requires a deliberate "编辑" click inside the detail modal — the
   row click itself only opens the read-only view. */
tr.circuit-row,
tr.site-row {
    cursor: pointer;
}
tr.circuit-row:hover > td,
tr.site-row:hover > td {
    background: rgba(255, 255, 255, 0.025);
}

/* Tighter padding so more rows fit a single screen. */
table.ipmgr-circuits td,
table.ipmgr-circuits th {
    padding: 0.35rem 0.5rem;
}
table.ipmgr-circuits tbody tr.circuit-row > td:first-child {
    padding-left: 1.5rem;   /* mild indent under the site header */
}
.tier-pill {
    font-size: 0.7rem;
    padding: 0.1rem 0.45rem;
    border-radius: 10px;
    white-space: nowrap;
}
.tier-HUB        { background: #1c4a4a; color: #8ee2e2; }
.tier-二级HUB    { background: #1f3a5e; color: #9bc7ff; }
.tier-核心站点    { background: #4a3a18; color: #ffd591; }
.tier-普通站点    { background: #2c2f36; color: #9ba3af; }
