Files
A-Team-Security-Infra-Agent…/frontend/src/index.css

574 lines
15 KiB
CSS

@import 'tailwindcss/theme' layer(theme);
@import 'tailwindcss/preflight' layer(base);
@import 'tailwindcss/utilities' layer(utilities);
/* ── Oracle Dark Premium Theme (in theme layer) ── */
@layer theme {
:root, html.light {
--bg: #f4f2ef; --bg1: #ffffff; --bg2: #faf9f7; --bg3: #efeee9; --bg4: #e5e3dd;
--bd: #ddd9d2; --bdf: #c5c0b8;
--t1: #1c1917; --t2: #44403c; --t3: #78716c; --t4: #a8a29e;
--ac: #c74634; --ach: #b13d2e; --acd: #9a3427; --acl: rgba(199,70,52,.06); --acl2: rgba(199,70,52,.1);
--gn: #16a34a; --gnl: rgba(22,163,74,.08); --rd: #dc2626; --rdl: rgba(220,38,38,.06);
--bl: #2563eb; --bll: rgba(37,99,235,.06); --yl: #ca8a04; --yll: rgba(202,138,4,.06);
--pp: #7c3aed; --ppl: rgba(124,58,237,.06);
--ok: #16a34a; --w: #ca8a04; --err: #dc2626;
--r: 12px; --rl: 16px; --rr: 20px;
--sh1: 0 1px 2px rgba(28,25,23,.04), 0 1px 3px rgba(28,25,23,.06);
--sh2: 0 4px 6px -1px rgba(28,25,23,.05), 0 2px 4px -2px rgba(28,25,23,.04);
--sh3: 0 10px 15px -3px rgba(28,25,23,.06), 0 4px 6px -4px rgba(28,25,23,.04);
--shh: 0 20px 25px -5px rgba(28,25,23,.08), 0 8px 10px -6px rgba(28,25,23,.04);
--tb-bg: rgba(255,255,255,.8);
--fm: 'JetBrains Mono', monospace;
--fs: 'Plus Jakarta Sans', -apple-system, system-ui, sans-serif;
--trans: cubic-bezier(.22,1,.36,1);
}
html.dark {
--bg: #0d0f14; --bg1: #151820; --bg2: #1a1e28; --bg3: #222733; --bg4: #2a3040;
--bd: #2a3040; --bdf: #3a4258;
--t1: #f0f0f4; --t2: #c8cad0; --t3: #8b8fa3; --t4: #5a5e6e;
--ac: #c74634; --ach: #d9523f; --acd: #a83428; --acl: rgba(199,70,52,.1); --acl2: rgba(199,70,52,.16);
--gn: #34c759; --gnl: rgba(52,199,89,.1); --rd: #ff453a; --rdl: rgba(255,69,58,.1);
--bl: #0a84ff; --bll: rgba(10,132,255,.1); --yl: #ffd60a; --yll: rgba(255,214,10,.1);
--pp: #bf5af2; --ppl: rgba(191,90,242,.1);
--ok: #34c759; --w: #ffd60a; --err: #ff453a;
--sh1: 0 1px 3px rgba(0,0,0,.3), 0 1px 2px rgba(0,0,0,.2);
--sh2: 0 4px 8px rgba(0,0,0,.3), 0 2px 4px rgba(0,0,0,.2);
--sh3: 0 10px 20px rgba(0,0,0,.35), 0 4px 8px rgba(0,0,0,.2);
--shh: 0 20px 30px rgba(0,0,0,.4), 0 8px 12px rgba(0,0,0,.25);
--tb-bg: rgba(21,24,32,.85);
}
}
/* ── Base resets (in base layer) ── */
@layer base {
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
body {
font-family: var(--fs);
background: var(--bg);
color: var(--t1);
height: 100vh;
overflow: hidden;
-webkit-font-smoothing: antialiased;
}
::selection { background: rgba(199,70,52,.2); color: var(--t1); }
html.light *, html.dark * {
transition: background-color .25s var(--trans), border-color .25s var(--trans), color .15s var(--trans);
}
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bd); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--bdf); }
@keyframes fadeIn {
from { opacity: 0; transform: translateY(12px); }
to { opacity: 1; transform: translateY(0); }
}
/* Form elements */
select {
appearance: none;
background: var(--bg1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2378716c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right 12px center;
border: 1px solid var(--bd);
border-radius: var(--r);
padding: 9px 36px 9px 14px;
font-size: .82rem;
font-family: var(--fs);
color: var(--t1);
cursor: pointer;
transition: border-color .2s, box-shadow .2s;
min-width: 0;
}
select:focus {
outline: none;
border-color: var(--ac);
box-shadow: 0 0 0 3px var(--acl);
}
select:hover { border-color: var(--bdf); }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="search"],
textarea {
background: var(--bg1);
border: 1px solid var(--bd);
border-radius: var(--r);
padding: 9px 14px;
font-size: .82rem;
font-family: var(--fs);
color: var(--t1);
transition: border-color .2s, box-shadow .2s;
width: 100%;
}
input[type="text"]:focus, input[type="email"]:focus, input[type="password"]:focus,
input[type="number"]:focus, input[type="search"]:focus, textarea:focus {
outline: none;
border-color: var(--ac);
box-shadow: 0 0 0 3px var(--acl);
}
input[type="checkbox"] {
appearance: none;
width: 18px;
height: 18px;
border: 2px solid var(--bd);
border-radius: 5px;
background: var(--bg1);
cursor: pointer;
transition: all .15s;
flex-shrink: 0;
position: relative;
}
input[type="checkbox"]:checked {
background: var(--ac);
border-color: var(--ac);
}
input[type="checkbox"]:checked::after {
content: '';
position: absolute;
left: 4px;
top: 1px;
width: 6px;
height: 10px;
border: solid white;
border-width: 0 2px 2px 0;
transform: rotate(45deg);
}
}
/* ── Focus-visible for accessibility ── */
button:focus-visible, a:focus-visible, [role="button"]:focus-visible {
outline: 2px solid var(--ac);
outline-offset: 2px;
}
/* ── Component styles — OUTSIDE layers so they override Tailwind utilities ── */
/* Nav item hover */
nav a:hover { background: var(--bg3); color: var(--t1) !important; }
/* Page wrapper */
.page {
padding: 28px 32px;
max-width: 1280px;
animation: fadeIn .35s ease;
}
.page-full {
height: 100%;
animation: fadeIn .35s ease;
}
/* Page header */
.page-header {
display: flex;
align-items: center;
gap: 14px;
margin-bottom: 24px;
}
.page-header h1 {
font-size: 1.35rem;
font-weight: 700;
color: var(--t1);
letter-spacing: -.01em;
}
.page-header .subtitle {
font-size: .8rem;
color: var(--t3);
margin-top: 2px;
}
.page-header .spacer { flex: 1; }
.page-header .count {
font-size: .75rem;
font-weight: 600;
color: var(--t3);
background: var(--bg3);
padding: 4px 12px;
border-radius: 20px;
}
/* Cards */
.card {
background: var(--bg1);
border: 1px solid var(--bd);
border-radius: var(--rl);
box-shadow: var(--sh1);
padding: 20px 24px;
margin-bottom: 16px;
}
.card-header {
display: flex;
align-items: center;
gap: 10px;
margin-bottom: 16px;
padding-bottom: 12px;
border-bottom: 1px solid var(--bd);
}
.card-header h2 {
font-size: .92rem;
font-weight: 700;
color: var(--t1);
}
.card-header .icon {
width: 36px;
height: 36px;
border-radius: 10px;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
}
/* Tables */
.data-table {
width: 100%;
border-collapse: separate;
border-spacing: 0;
font-size: .82rem;
}
.data-table thead th {
text-align: left;
font-size: .7rem;
font-weight: 700;
text-transform: uppercase;
letter-spacing: .06em;
color: var(--t3);
padding: 10px 14px;
background: var(--bg2);
border-bottom: 1px solid var(--bd);
}
.data-table thead th:first-child { border-radius: var(--r) 0 0 0; }
.data-table thead th:last-child { border-radius: 0 var(--r) 0 0; }
.data-table tbody td {
padding: 12px 14px;
color: var(--t2);
border-bottom: 1px solid var(--bg3);
vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: var(--bg2); }
/* Buttons */
.btn {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 9px 18px;
border-radius: var(--r);
font-size: .82rem;
font-weight: 600;
font-family: var(--fs);
cursor: pointer;
border: 1px solid transparent;
transition: all .2s var(--trans);
white-space: nowrap;
}
.btn:disabled {
opacity: .5;
cursor: not-allowed;
}
.btn-primary {
background: var(--ac);
color: #fff;
border-color: var(--ac);
}
.btn-primary:hover:not(:disabled) { background: var(--ach); }
.btn-secondary {
background: var(--bg1);
color: var(--t2);
border-color: var(--bd);
}
.btn-secondary:hover:not(:disabled) { background: var(--bg3); color: var(--t1); }
.btn-danger {
background: transparent;
color: var(--rd);
border-color: var(--rd);
}
.btn-danger:hover:not(:disabled) { background: var(--rdl); }
.btn-success {
background: var(--gn);
color: #fff;
border-color: var(--gn);
}
.btn-sm {
padding: 6px 12px;
font-size: .75rem;
border-radius: 8px;
}
/* Badges */
.badge {
display: inline-flex;
align-items: center;
gap: 4px;
padding: 3px 10px;
border-radius: 20px;
font-size: .68rem;
font-weight: 600;
white-space: nowrap;
}
.badge-green { background: var(--gnl); color: var(--gn); }
.badge-red { background: var(--rdl); color: var(--rd); }
.badge-blue { background: var(--bll); color: var(--bl); }
.badge-yellow { background: var(--yll); color: var(--yl); }
.badge-purple { background: var(--ppl); color: var(--pp); }
.badge-gray { background: var(--bg3); color: var(--t3); }
/* Empty state */
.empty-state {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 60px 20px;
text-align: center;
color: var(--t4);
}
.empty-state svg { opacity: .35; margin-bottom: 12px; }
.empty-state h3 { font-size: .92rem; font-weight: 600; color: var(--t3); margin-bottom: 4px; }
.empty-state p { font-size: .78rem; }
/* KPI cards */
.kpi-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
gap: 16px;
margin-bottom: 24px;
}
.kpi-card {
background: var(--bg1);
border: 1px solid var(--bd);
border-radius: var(--rl);
padding: 18px 20px;
box-shadow: var(--sh1);
}
.kpi-card .label {
font-size: .7rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: .06em;
color: var(--t3);
margin-bottom: 8px;
}
.kpi-card .value {
font-size: 1.5rem;
font-weight: 800;
color: var(--t1);
letter-spacing: -.02em;
}
.kpi-card .sub {
font-size: .72rem;
color: var(--t4);
margin-top: 4px;
}
/* Form groups */
.form-group {
margin-bottom: 16px;
}
.form-group label {
display: block;
font-size: .75rem;
font-weight: 600;
color: var(--t2);
margin-bottom: 6px;
}
.form-row {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 16px;
}
/* Tags/pills */
.tag {
display: inline-flex;
align-items: center;
gap: 4px;
padding: 4px 10px;
border-radius: 20px;
font-size: .72rem;
font-weight: 500;
background: var(--bg3);
color: var(--t2);
border: 1px solid var(--bd);
}
.tag button {
background: none;
border: none;
cursor: pointer;
color: var(--t3);
padding: 0;
font-size: .82rem;
line-height: 1;
}
.tag button:hover { color: var(--rd); }
/* Section divider */
.section-title {
font-size: .72rem;
font-weight: 700;
text-transform: uppercase;
letter-spacing: .08em;
color: var(--t4);
margin: 24px 0 12px;
padding-bottom: 8px;
border-bottom: 1px solid var(--bg3);
}
/* ── Chat Markdown Styling ───────────────────────────────────── */
.chat-markdown {
font-size: .82rem;
line-height: 1.7;
color: var(--t1);
}
.chat-markdown p {
margin: 0 0 .65em;
overflow-wrap: break-word;
word-break: break-word;
}
.chat-markdown p:last-child { margin-bottom: 0; }
/* Headings */
.chat-markdown h1, .chat-markdown h2, .chat-markdown h3,
.chat-markdown h4, .chat-markdown h5, .chat-markdown h6 {
font-weight: 700;
color: var(--t1);
margin: 1em 0 .4em;
line-height: 1.3;
}
.chat-markdown h1 { font-size: 1.15em; }
.chat-markdown h2 { font-size: 1.05em; }
.chat-markdown h3 { font-size: .95em; }
.chat-markdown h4, .chat-markdown h5, .chat-markdown h6 { font-size: .88em; }
.chat-markdown > h1:first-child,
.chat-markdown > h2:first-child,
.chat-markdown > h3:first-child { margin-top: 0; }
/* Lists */
.chat-markdown ul, .chat-markdown ol {
margin: .4em 0 .65em;
padding-left: 1.5em;
}
.chat-markdown ul { list-style: disc; }
.chat-markdown ol { list-style: decimal; }
.chat-markdown li { margin: .2em 0; }
.chat-markdown li > ul, .chat-markdown li > ol { margin: .15em 0; }
.chat-markdown li > p { margin: .15em 0; }
/* Inline code */
.chat-markdown code:not(pre code) {
background: color-mix(in srgb, var(--ac) 10%, transparent);
color: var(--ac);
padding: .12em .35em;
border-radius: 4px;
font-size: .88em;
font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
word-break: break-all;
}
/* Code blocks */
.chat-markdown pre {
background: #1e1e2e;
color: #cdd6f4;
border-radius: 8px;
padding: .85em 1em;
margin: .5em 0 .75em;
overflow-x: auto;
max-width: 100%;
font-size: .78rem;
line-height: 1.55;
border: 1px solid color-mix(in srgb, var(--bd) 50%, transparent);
}
.chat-markdown pre code {
background: none !important;
color: inherit !important;
padding: 0 !important;
border-radius: 0 !important;
font-size: inherit !important;
word-break: normal;
font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
}
/* Tables */
.chat-markdown table {
border-collapse: collapse;
margin: .5em 0 .75em;
font-size: .8rem;
display: block;
overflow-x: auto;
max-width: 100%;
}
.chat-markdown th, .chat-markdown td {
border: 1px solid var(--bd);
padding: .4em .7em;
text-align: left;
}
.chat-markdown th {
background: color-mix(in srgb, var(--ac) 8%, transparent);
font-weight: 700;
font-size: .78rem;
white-space: nowrap;
}
.chat-markdown tr:nth-child(even) {
background: color-mix(in srgb, var(--bd) 15%, transparent);
}
/* Blockquotes */
.chat-markdown blockquote {
border-left: 3px solid var(--ac);
margin: .5em 0 .75em;
padding: .4em .8em;
background: color-mix(in srgb, var(--ac) 5%, transparent);
color: var(--t2);
border-radius: 0 6px 6px 0;
}
.chat-markdown blockquote p { margin: 0; }
/* Horizontal rule */
.chat-markdown hr {
border: none;
border-top: 1px solid var(--bd);
margin: .8em 0;
}
/* Links */
.chat-markdown a {
color: var(--ac);
text-decoration: underline;
text-underline-offset: 2px;
}
/* Strong / emphasis */
.chat-markdown strong { font-weight: 700; color: var(--t1); }
.chat-markdown em { font-style: italic; }
/* ── Syntax Highlighting (Catppuccin Mocha) ─────────────────── */
.hljs-keyword, .hljs-selector-tag { color: #cba6f7; }
.hljs-string, .hljs-attr { color: #a6e3a1; }
.hljs-number, .hljs-literal { color: #fab387; }
.hljs-comment { color: #6c7086; font-style: italic; }
.hljs-built_in, .hljs-builtin-name { color: #89dceb; }
.hljs-function .hljs-title, .hljs-title.function_ { color: #89b4fa; }
.hljs-type, .hljs-title.class_ { color: #f9e2af; }
.hljs-variable, .hljs-template-variable { color: #f38ba8; }
.hljs-meta { color: #fab387; }
.hljs-punctuation { color: #bac2de; }
.hljs-tag { color: #89b4fa; }
.hljs-name { color: #89b4fa; }
.hljs-attribute { color: #f9e2af; }
/* ── Prose overflow (legacy compat) ─────────────────────────── */
.prose pre { overflow-x: auto; max-width: 100%; }
.prose table { overflow-x: auto; display: block; max-width: 100%; }
.prose code { word-break: break-all; }
.prose p { overflow-wrap: break-word; word-break: break-word; }
/* Tooltip-like labels */
.field-label {
font-size: .7rem;
font-weight: 600;
color: var(--t3);
text-transform: uppercase;
letter-spacing: .04em;
}