/* box.css — Unified Theme Engine & Styling for Box Console */ :root { color-scheme: dark; --bg: #111111; --surface: #161616; --surface2: #1c1c1c; --surface3: #242424; --text: #e8e8e8; --muted: #9a9a9a; --faint: #666666; --border: #2a2a2a; --border-strong: #3a3a3a; --accent: #9fd6a4; --accent-ink: #111111; --accent-dim: #3a5a40; --accent-soft: rgba(159, 214, 164, 0.15); --link: #8ab4f8; --ok: #55dd55; --ok-bg: #0f1f14; --warn: #ddbb55; --warn-bg: #2a230f; --bad: #ee6666; --bad-bg: #221010; --violet: #d2a8ff; --violet-bg: #1f1533; --cyan: #70d8e8; --cyan-bg: #102428; --code-bg: #181818; --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace; --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; --shadow: 0 4px 12px rgba(0, 0, 0, 0.4); } html[data-theme="light"] { color-scheme: light; --bg: #f6f6f3; --surface: #ffffff; --surface2: #edede8; --surface3: #e2e2dc; --text: #1d1d1b; --muted: #5f5f5b; --faint: #9a9a94; --border: #dbdbd5; --border-strong: #bdbdb4; --accent: #2f7d44; --accent-ink: #ffffff; --accent-dim: #bcd9c2; --accent-soft: rgba(47, 125, 68, 0.12); --link: #1a5fb4; --ok: #1e7e34; --ok-bg: #d8f0d0; --warn: #8a6d00; --warn-bg: #f5e6bd; --bad: #c0392b; --bad-bg: #f9e0da; --violet: #7c3aed; --violet-bg: #e9defb; --cyan: #0b7285; --cyan-bg: #e3fafc; --code-bg: #edede8; --shadow: 0 4px 12px rgba(0, 0, 0, 0.1); } html[data-theme="sepia"] { color-scheme: light; --bg: #f3edda; --surface: #faf5e6; --surface2: #e9dfc4; --surface3: #ded2b2; --text: #433723; --muted: #6f6046; --faint: #9a8a68; --border: #d8c9a3; --border-strong: #b8a678; --accent: #5c7a35; --accent-ink: #ffffff; --accent-dim: #b3bf9a; --accent-soft: rgba(92, 122, 53, 0.14); --link: #2f5d8a; --ok: #3f7a2e; --ok-bg: #dfe8c8; --warn: #8a6d00; --warn-bg: #f0e2b8; --bad: #b03a2e; --bad-bg: #f0d5c8; --violet: #7c3aed; --violet-bg: #e4d9f2; --cyan: #1971c2; --cyan-bg: #e7f5ff; --code-bg: #e9dfc4; --shadow: 0 4px 12px rgba(80, 60, 20, 0.15); } html[data-theme="contrast"] { color-scheme: dark; --bg: #000000; --surface: #080808; --surface2: #141414; --surface3: #222222; --text: #ffffff; --muted: #e8e8e8; --faint: #b0b0b0; --border: #f0f0f0; --border-strong: #ffffff; --accent: #ffe600; --accent-ink: #000000; --accent-dim: #ffe600; --accent-soft: rgba(255, 230, 0, 0.2); --link: #7dd3ff; --ok: #00ff66; --ok-bg: #00220f; --warn: #ffe600; --warn-bg: #332c00; --bad: #ff7070; --bad-bg: #330b0b; --violet: #e08cff; --violet-bg: #2a1033; --cyan: #00ffff; --cyan-bg: #002b36; --code-bg: #141414; --shadow: none; } * { box-sizing: border-box; margin: 0; padding: 0; } body { font-family: var(--font-sans); background-color: var(--bg); color: var(--text); line-height: 1.5; font-size: 14px; min-height: 100vh; display: flex; flex-direction: column; } code, pre, .mono { font-family: var(--font-mono); } /* Header & Nav */ header.app-header { background: var(--surface); border-bottom: 1px solid var(--border); padding: 10px 20px; display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; z-index: 100; } .brand-section { display: flex; align-items: center; gap: 12px; } .brand-badge { background: var(--accent); color: var(--accent-ink); font-weight: 800; font-family: var(--font-mono); font-size: 13px; padding: 3px 8px; border-radius: 4px; letter-spacing: 1px; } .brand-title { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; } .brand-host { color: var(--muted); font-family: var(--font-mono); font-size: 12px; } .header-controls { display: flex; align-items: center; gap: 12px; } .pulse-indicator { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 6px var(--ok); animation: pulse 2s infinite; } @keyframes pulse { 0% { transform: scale(0.95); opacity: 0.8; } 50% { transform: scale(1.15); opacity: 1; } 100% { transform: scale(0.95); opacity: 0.8; } } button.btn-control { background: var(--surface2); border: 1px solid var(--border); color: var(--text); font-family: var(--font-mono); font-size: 12px; padding: 5px 12px; border-radius: 6px; cursor: pointer; display: flex; align-items: center; gap: 6px; transition: all 0.15s ease; } button.btn-control:hover { border-color: var(--border-strong); background: var(--surface3); } button.btn-control.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); } /* Nav Tabs */ nav.app-tabs { background: var(--surface); border-bottom: 1px solid var(--border); padding: 0 20px; display: flex; gap: 4px; } .tab-btn { background: transparent; border: none; border-bottom: 2px solid transparent; color: var(--muted); padding: 10px 16px; font-size: 13px; font-weight: 500; cursor: pointer; transition: all 0.15s; } .tab-btn:hover { color: var(--text); } .tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; } .tab-badge { background: var(--surface2); color: var(--muted); font-size: 11px; font-family: var(--font-mono); padding: 1px 6px; border-radius: 10px; margin-left: 6px; } /* Main Container */ main.app-main { flex: 1; max-width: 1400px; width: 100%; margin: 0 auto; padding: 24px 20px; } .tab-pane { display: none; } .tab-pane.active { display: block; } /* Fleet Cards Grid */ .grid-nodes { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 16px; margin-bottom: 24px; } .node-card { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 16px; display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow); transition: border-color 0.15s; } .node-card:hover { border-color: var(--border-strong); } .node-header { display: flex; justify-content: space-between; align-items: center; } .node-title-group { display: flex; align-items: center; gap: 8px; } .node-name { font-family: var(--font-mono); font-size: 16px; font-weight: 700; } .node-netns { font-size: 11px; color: var(--muted); font-family: var(--font-mono); } .node-status-badge { font-size: 11px; font-family: var(--font-mono); padding: 2px 8px; border-radius: 4px; display: flex; align-items: center; gap: 6px; font-weight: 600; } .badge-active { background: var(--ok-bg); color: var(--ok); border: 1px solid rgba(85,221,85,0.25); } .badge-down { background: var(--bad-bg); color: var(--bad); border: 1px solid rgba(238,102,102,0.25); } .badge-warn { background: var(--warn-bg); color: var(--warn); border: 1px solid rgba(221,187,85,0.25); } .node-body { display: flex; flex-direction: column; gap: 8px; font-size: 12px; } .node-metric-row { display: flex; justify-content: space-between; border-bottom: 1px dashed var(--border); padding-bottom: 4px; } .node-metric-row:last-child { border-bottom: none; } .node-metric-label { color: var(--muted); } .node-metric-val { font-family: var(--font-mono); font-weight: 500; } .active-page-box { background: var(--surface2); border: 1px solid var(--border); border-radius: 4px; padding: 8px; font-size: 11px; font-family: var(--font-mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .active-page-title { color: var(--text); font-weight: 600; margin-bottom: 2px; } .active-page-url { color: var(--link); font-size: 10px; } /* Filter Bar */ .filter-bar { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 12px 16px; margin-bottom: 16px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; } .filter-group { display: flex; align-items: center; gap: 8px; } .filter-label { color: var(--muted); font-size: 12px; font-weight: 600; } .filter-btn-group { display: flex; background: var(--surface2); border: 1px solid var(--border); border-radius: 6px; overflow: hidden; } .filter-chip { background: transparent; border: none; border-right: 1px solid var(--border); padding: 4px 10px; font-size: 12px; font-family: var(--font-mono); color: var(--muted); cursor: pointer; transition: all 0.15s; } .filter-chip:last-child { border-right: none; } .filter-chip:hover { color: var(--text); } .filter-chip.active { background: var(--accent); color: var(--accent-ink); font-weight: 700; } .search-input { background: var(--surface2); border: 1px solid var(--border); color: var(--text); padding: 5px 12px; border-radius: 6px; font-family: var(--font-mono); font-size: 12px; width: 200px; outline: none; } .search-input:focus { border-color: var(--accent); } /* Tables */ .table-card { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; box-shadow: var(--shadow); } table.data-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 13px; } table.data-table th { background: var(--surface2); color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; padding: 10px 14px; border-bottom: 1px solid var(--border-strong); font-family: var(--font-mono); } table.data-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; } table.data-table tr:last-child td { border-bottom: none; } table.data-table tr.table-row:hover td { background: var(--surface2); cursor: pointer; } /* Badges */ .tag-badge { display: inline-block; font-family: var(--font-mono); font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 4px; margin-right: 4px; } .tag-wo { background: var(--violet-bg); color: var(--violet); border: 1px solid rgba(210,168,255,0.3); } .tag-ack { background: var(--ok-bg); color: var(--ok); border: 1px solid rgba(85,221,85,0.3); } .tag-job { background: var(--cyan-bg); color: var(--cyan); border: 1px solid rgba(112,216,232,0.3); } .tag-result { background: var(--warn-bg); color: var(--warn); border: 1px solid rgba(221,187,85,0.3); } .tag-super { background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent); } /* Quick Action Copy Button */ button.btn-copy { background: transparent; border: 1px solid var(--border); color: var(--muted); padding: 2px 6px; border-radius: 4px; font-size: 10px; font-family: var(--font-mono); cursor: pointer; margin-left: 6px; } button.btn-copy:hover { color: var(--text); border-color: var(--border-strong); } /* Expanded Detail Row */ tr.detail-row td { background: var(--surface2); padding: 12px 18px; font-family: var(--font-mono); font-size: 12px; color: var(--text); border-bottom: 2px solid var(--border); } .detail-content { background: var(--code-bg); border: 1px solid var(--border); padding: 10px; border-radius: 6px; white-space: pre-wrap; word-break: break-all; line-height: 1.6; } /* Curl Drawer */ .curl-drawer { position: fixed; bottom: 0; right: 0; width: 520px; max-width: 90vw; background: var(--surface); border-left: 1px solid var(--border-strong); border-top: 1px solid var(--border-strong); border-radius: 8px 0 0 0; box-shadow: 0 -4px 20px rgba(0,0,0,0.5); padding: 16px; z-index: 200; transform: translateY(105%); transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1); } .curl-drawer.open { transform: translateY(0); } .curl-drawer-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; } .curl-drawer-title { font-weight: 700; font-family: var(--font-mono); font-size: 13px; color: var(--accent); } pre.curl-code { background: var(--code-bg); border: 1px solid var(--border); padding: 12px; border-radius: 6px; font-family: var(--font-mono); font-size: 12px; color: var(--cyan); overflow-x: auto; white-space: pre-wrap; } /* Global Footer */ footer.app-footer { background: var(--surface); border-top: 1px solid var(--border); padding: 10px 20px; font-size: 12px; display: flex; justify-content: space-between; align-items: center; color: var(--muted); } .footer-agents { display: flex; align-items: center; gap: 14px; font-family: var(--font-mono); } .footer-agent-item { display: flex; align-items: center; gap: 5px; } .footer-links a { color: var(--muted); text-decoration: none; margin-left: 12px; } .footer-links a:hover { color: var(--link); text-decoration: underline; } /* Loop & Strategy Section Styles */ .section-heading { display: flex; justify-content: space-between; align-items: center; margin-top: 24px; margin-bottom: 12px; } .section-title { font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text); display: flex; align-items: center; gap: 8px; } .section-subtitle { font-size: 12px; color: var(--muted); } .stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 20px; } .stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 14px; display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow); } .stat-card-header { display: flex; justify-content: space-between; align-items: center; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; font-family: var(--font-mono); } .stat-card-value { font-size: 24px; font-weight: 800; font-family: var(--font-mono); color: var(--text); display: flex; align-items: baseline; gap: 6px; } .stat-card-sub { font-size: 11px; color: var(--muted); display: flex; justify-content: space-between; } .progress-bar-container { height: 6px; background: var(--surface2); border-radius: 3px; overflow: hidden; margin-top: 4px; } .progress-bar-fill { height: 100%; border-radius: 3px; transition: width 0.3s ease; } .btn-sm { padding: 3px 8px; font-size: 11px; border-radius: 4px; font-family: var(--font-mono); cursor: pointer; border: 1px solid var(--border); background: var(--surface2); color: var(--text); transition: all 0.15s; } .btn-sm:hover { background: var(--surface3); border-color: var(--border-strong); } .btn-action-resolve { background: var(--ok-bg); color: var(--ok); border-color: rgba(85,221,85,0.3); } .btn-action-resolve:hover { background: rgba(85,221,85,0.25); border-color: var(--ok); } .btn-action-nudge { background: var(--warn-bg); color: var(--warn); border-color: rgba(221,187,85,0.3); } .btn-action-nudge:hover { background: rgba(221,187,85,0.25); border-color: var(--warn); } /* Modal Dialog */ .modal-backdrop { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.7); z-index: 500; align-items: center; justify-content: center; backdrop-filter: blur(2px); } .modal-backdrop.open { display: flex; } .modal-card { background: var(--surface); border: 1px solid var(--border-strong); border-radius: 8px; width: 90%; max-width: 550px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); display: flex; flex-direction: column; overflow: hidden; max-height: 85vh; } .modal-header { padding: 14px 18px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-family: var(--font-mono); font-size: 14px; } .modal-body { padding: 18px; overflow-y: auto; font-size: 13px; display: flex; flex-direction: column; gap: 14px; } .modal-footer { padding: 12px 18px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; background: var(--surface2); } .form-group { display: flex; flex-direction: column; gap: 4px; } .form-label { font-size: 11px; color: var(--muted); text-transform: uppercase; font-family: var(--font-mono); font-weight: 600; } .form-input { background: var(--surface2); border: 1px solid var(--border); border-radius: 4px; padding: 7px 10px; color: var(--text); font-family: var(--font-mono); font-size: 13px; } .form-input:focus { outline: none; border-color: var(--accent); }