/**
 * 代理后台 · 电子游戏 UI 主题（与总后台浅色办公风区分）
 */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@500;700&family=Noto+Sans+SC:wght@400;500;600;700&display=swap');

:root {
    --agent-bg-deep: #070a12;
    --agent-bg-panel: rgba(12, 18, 32, 0.88);
    --agent-border: rgba(0, 245, 255, 0.22);
    --agent-neon: #00f5ff;
    --agent-neon-dim: rgba(0, 245, 255, 0.35);
    --agent-magenta: #ff2e97;
    --agent-gold: #ffd60a;
    --agent-text: #e8f4ff;
    --agent-muted: #7a8aa0;
    --agent-danger: #ff4757;
    --agent-success: #00ff9d;
    --agent-warn: #ffc233;
    --agent-font-ui: "Noto Sans SC", "Segoe UI", "Microsoft YaHei", sans-serif;
    --agent-font-display: "Orbitron", var(--agent-font-ui);
}

.agent-skin {
    margin: 0;
    min-height: 100vh;
    font-family: var(--agent-font-ui);
    color: var(--agent-text);
    background: var(--agent-bg-deep);
    position: relative;
}

/* 背景：网格 + 径向光晕 */
.agent-bg-grid {
    pointer-events: none;
    position: fixed;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(0, 245, 255, 0.12), transparent 50%),
        radial-gradient(ellipse 60% 40% at 100% 50%, rgba(255, 46, 151, 0.08), transparent 45%),
        radial-gradient(ellipse 50% 35% at 0% 80%, rgba(0, 255, 157, 0.06), transparent 40%),
        linear-gradient(180deg, #070a12 0%, #0c1224 50%, #070a12 100%);
}
.agent-bg-grid::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 245, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 245, 255, 0.04) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 70%);
}

.agent-shell {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 顶栏 */
.agent-topbar {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 1.5rem;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.95) 0%, rgba(10, 15, 28, 0.92) 100%);
    border-bottom: 1px solid var(--agent-border);
    box-shadow: 0 0 32px rgba(0, 245, 255, 0.08);
}
.agent-brand {
    display: flex;
    align-items: baseline;
    gap: 0.65rem;
}
.agent-brand-logo {
    font-family: var(--agent-font-display);
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: 0.12em;
    color: var(--agent-neon);
    text-shadow: 0 0 20px var(--agent-neon-dim);
}
.agent-brand-sub {
    font-size: 0.72rem;
    color: var(--agent-muted);
    letter-spacing: 0.2em;
    text-transform: uppercase;
}
.agent-topbar-meta {
    font-size: 0.82rem;
    color: var(--agent-muted);
}
.agent-topbar-meta strong {
    color: var(--agent-text);
    font-weight: 600;
}
.agent-topbar-actions a {
    display: inline-block;
    margin-left: 0.65rem;
    padding: 0.4rem 0.9rem;
    font-size: 0.85rem;
    color: var(--agent-neon);
    text-decoration: none;
    border: 1px solid var(--agent-border);
    border-radius: 6px;
    transition: background 0.2s, box-shadow 0.2s;
}
.agent-topbar-actions a:hover {
    background: rgba(0, 245, 255, 0.1);
    box-shadow: 0 0 16px rgba(0, 245, 255, 0.2);
}
.agent-topbar-actions a.agent-btn-logout {
    color: var(--agent-magenta);
    border-color: rgba(255, 46, 151, 0.35);
}
.agent-topbar-actions a.agent-btn-logout:hover {
    background: rgba(255, 46, 151, 0.12);
    box-shadow: 0 0 16px rgba(255, 46, 151, 0.15);
}

/* 主内容区 */
.agent-main {
    flex: 1;
    padding: 1.35rem 1.5rem 2rem;
    overflow: auto;
}
.agent-main-inner {
    max-width: 1280px;
    margin: 0 auto;
}

.agent-page-title {
    font-family: var(--agent-font-display);
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    margin: 0 0 1.15rem;
    color: var(--agent-text);
    text-shadow: 0 0 24px rgba(0, 245, 255, 0.25);
}

/* 面板卡片 */
.agent-panel {
    background: var(--agent-bg-panel);
    border: 1px solid var(--agent-border);
    border-radius: 12px;
    padding: 1.15rem 1.25rem;
    margin-bottom: 1rem;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(8px);
}

.agent-hint {
    font-size: 0.82rem;
    color: var(--agent-muted);
    line-height: 1.6;
    margin: 0 0 0.75rem;
}
.agent-hint code {
    font-size: 0.78rem;
    color: var(--agent-neon);
    background: rgba(0, 245, 255, 0.08);
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
}
.agent-hint--danger {
    color: #fca5a5;
    border-left: 3px solid var(--agent-danger);
    padding-left: 0.75rem;
}

/* 状态胶囊 */
.agent-pill {
    display: inline-block;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
}
.agent-pill.off {
    background: rgba(255, 71, 87, 0.2);
    color: #ff8a99;
    border: 1px solid rgba(255, 71, 87, 0.4);
}
.agent-pill.on {
    background: rgba(0, 255, 157, 0.15);
    color: var(--agent-success);
    border: 1px solid rgba(0, 255, 157, 0.4);
    box-shadow: 0 0 12px rgba(0, 255, 157, 0.2);
}
.agent-pill.wait {
    background: rgba(255, 194, 51, 0.15);
    color: var(--agent-warn);
    border: 1px solid rgba(255, 194, 51, 0.35);
}

/* 按钮 */
.agent-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    margin-bottom: 1rem;
}
.agent-btn {
    padding: 0.45rem 1rem;
    font-size: 0.86rem;
    font-family: inherit;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid var(--agent-border);
    background: rgba(0, 245, 255, 0.06);
    color: var(--agent-text);
    transition: all 0.2s;
}
.agent-btn:hover:not(:disabled) {
    background: rgba(0, 245, 255, 0.15);
    box-shadow: 0 0 16px rgba(0, 245, 255, 0.15);
}
.agent-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}
.agent-btn--primary {
    background: linear-gradient(135deg, rgba(0, 245, 255, 0.25) 0%, rgba(0, 180, 200, 0.2) 100%);
    border-color: rgba(0, 245, 255, 0.45);
    color: #b8fffc;
    font-weight: 600;
}
.agent-btn--primary:hover:not(:disabled) {
    box-shadow: 0 0 20px rgba(0, 245, 255, 0.35);
}

/* 标签页 */
.agent-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.75rem;
}
.agent-tabs button {
    padding: 0.4rem 0.85rem;
    font-size: 0.84rem;
    font-family: inherit;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.25);
    color: var(--agent-muted);
}
.agent-tabs button:hover {
    color: var(--agent-text);
    border-color: var(--agent-border);
}
.agent-tabs button.active {
    background: linear-gradient(180deg, rgba(0, 245, 255, 0.2) 0%, rgba(0, 100, 120, 0.15) 100%);
    border-color: rgba(0, 245, 255, 0.45);
    color: var(--agent-neon);
    font-weight: 600;
}

/* 表格 */
.agent-table-wrap {
    overflow: auto;
    border-radius: 10px;
    border: 1px solid var(--agent-border);
    background: rgba(5, 8, 18, 0.6);
}
.agent-table-wrap table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}
.agent-table-wrap th,
.agent-table-wrap td {
    padding: 0.55rem 0.5rem;
    text-align: left;
    border-bottom: 1px solid rgba(0, 245, 255, 0.08);
}
.agent-table-wrap th {
    background: rgba(0, 245, 255, 0.06);
    color: var(--agent-neon);
    font-weight: 600;
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.agent-table-wrap tbody tr:hover {
    background: rgba(0, 245, 255, 0.04);
}
.agent-table-wrap td {
    color: #c5d4e8;
}

.agent-pager {
    margin-top: 0.85rem;
    font-size: 0.86rem;
    color: var(--agent-muted);
}
.agent-pager button {
    margin-left: 0.35rem;
    padding: 0.3rem 0.65rem;
    font-size: 0.82rem;
    cursor: pointer;
    border-radius: 6px;
    border: 1px solid var(--agent-border);
    background: rgba(0, 245, 255, 0.08);
    color: var(--agent-text);
}
.agent-pager button:hover {
    background: rgba(0, 245, 255, 0.18);
}

#log {
    font-size: 0.72rem;
    color: var(--agent-muted);
    max-height: 7rem;
    overflow: auto;
    background: rgba(0, 0, 0, 0.35);
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    margin-top: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
    font-family: ui-monospace, monospace;
}

/* ——— 登录页（layout_login）——— */
.agent-login-page .agent-login-wrap {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}
.agent-login-card {
    width: 100%;
    max-width: 420px;
    padding: 2rem 2.25rem 2.25rem;
    background: linear-gradient(165deg, rgba(18, 24, 42, 0.95) 0%, rgba(8, 12, 24, 0.92) 100%);
    border: 1px solid var(--agent-border);
    border-radius: 16px;
    box-shadow:
        0 0 0 1px rgba(255, 46, 151, 0.12),
        0 24px 80px rgba(0, 0, 0, 0.55),
        0 0 60px rgba(0, 245, 255, 0.06);
}
.agent-login-card::before {
    content: "";
    display: block;
    height: 3px;
    margin: -2rem -2.25rem 1.5rem;
    border-radius: 16px 16px 0 0;
    background: linear-gradient(90deg, var(--agent-magenta), var(--agent-neon), var(--agent-gold));
    opacity: 0.85;
}
.agent-login-title {
    font-family: var(--agent-font-display);
    font-size: 1.35rem;
    font-weight: 700;
    text-align: center;
    margin: 0 0 0.35rem;
    letter-spacing: 0.15em;
    color: var(--agent-text);
    text-shadow: 0 0 28px rgba(0, 245, 255, 0.35);
}
.agent-login-sub {
    text-align: center;
    font-size: 0.78rem;
    color: var(--agent-muted);
    margin-bottom: 1.5rem;
    letter-spacing: 0.2em;
}

.agent-login-card .modes {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}
.agent-login-card .modes label {
    flex: 1;
    text-align: center;
    padding: 0.55rem 0.4rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    font-size: 0.86rem;
    color: var(--agent-muted);
    transition: all 0.2s;
}
.agent-login-card .modes input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.agent-login-card .modes label.active {
    border-color: rgba(0, 245, 255, 0.45);
    background: rgba(0, 245, 255, 0.1);
    color: var(--agent-neon);
    box-shadow: 0 0 20px rgba(0, 245, 255, 0.15);
}

.agent-login-card label.field {
    display: block;
    font-size: 0.82rem;
    color: var(--agent-muted);
    margin-bottom: 0.35rem;
}
.agent-login-card input {
    width: 100%;
    padding: 0.7rem 0.85rem;
    margin-bottom: 1rem;
    border-radius: 10px;
    border: 1px solid rgba(0, 245, 255, 0.2);
    background: rgba(0, 0, 0, 0.35);
    color: var(--agent-text);
    font-size: 0.95rem;
    box-sizing: border-box;
}
.agent-login-card input:focus {
    outline: none;
    border-color: var(--agent-neon);
    box-shadow: 0 0 0 3px rgba(0, 245, 255, 0.15);
}
.agent-login-card button[type="submit"] {
    width: 100%;
    margin-top: 0.25rem;
    padding: 0.8rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    font-family: var(--agent-font-display);
    letter-spacing: 0.2em;
    cursor: pointer;
    color: #051018;
    background: linear-gradient(135deg, var(--agent-neon) 0%, #00c8d8 100%);
    box-shadow: 0 4px 24px rgba(0, 245, 255, 0.35);
}
.agent-login-card button[type="submit"]:hover {
    filter: brightness(1.08);
}
.agent-login-card .hint {
    margin-top: 1.1rem;
    font-size: 0.75rem;
    color: var(--agent-muted);
    line-height: 1.55;
}
.agent-login-card .hint code {
    font-size: 0.7rem;
    color: var(--agent-neon);
}
.agent-login-card .back {
    display: block;
    text-align: center;
    margin-top: 1.25rem;
    font-size: 0.88rem;
    color: var(--agent-magenta);
    text-decoration: none;
}
.agent-login-card .back:hover {
    text-decoration: underline;
}
.agent-login-card .panel { display: none; }
.agent-login-card .panel.on { display: block; }
