/* ─────────────────────────────────────────
   CSS VARIABLES — light theme
   Legacy var names preserved so ALL
   JS-rendered inline styles resolve correctly:
   var(--teal), var(--red), var(--orange),
   var(--yellow), var(--green), var(--purple),
   var(--text0..3), var(--bg0..4), etc.
───────────────────────────────────────── */
:root {
    /* Surfaces */
    --bg0:    #f5f9f8;
    --bg1:    #ffffff;
    --bg2:    #f5f9f8;
    --bg3:    #eaf4f1;
    --bg4:    #e1f5ee;

    /* Brand accent — site brand green replaces teal */
    --teal:   #4eb39a;
    --teal2:  #3a9b83;
    --teal3:  #0e2d27;
    --teal-d: rgba(78,179,154,0.08);
    --teal-b: rgba(78,179,154,0.2);

    /* Semantic colours — preserved exactly (used in JS renders) */
    --red:      #dc2626;
    --red-d:    rgba(220,38,38,0.08);
    --orange:   #d97706;
    --orange-d: rgba(217,119,6,0.08);
    --yellow:   #ca8a04;
    --yellow-d: rgba(202,138,4,0.08);
    --green:    #16a34a;
    --green-d:  rgba(22,163,74,0.08);
    --purple:   #7c3aed;
    --purple-d: rgba(124,58,237,0.08);

    /* Borders */
    --border:  rgba(78,179,154,0.15);
    --border2: rgba(78,179,154,0.3);

    /* Text — used in JS inline styles */
    --text0:  #1a2e2b;
    --text1:  #334155;
    --text2:  #5f7a74;
    --text3:  #94aaa6;

    /* Font stacks — DM Sans/Mono loaded by header.php */
    --pj:     'DM Sans', sans-serif;
    --mono:   'DM Mono', monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

.cw-page {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg0);
    min-height: 100vh;
    color: var(--text0);
}

/* ─────────────────────────────────────────
   HERO — dark gradient matching site pattern
   (replaces .cw-header + .cw-hero)
───────────────────────────────────────── */
.cw-hero {
    background: linear-gradient(145deg, #0e2d27 0%, #1a4a3d 60%, #0e3530 100%);
    border-bottom: 1px solid rgba(78,179,154,0.2);
    padding: 2.25rem 2rem 2rem;
    position: relative;
    overflow: hidden;
}
.cw-hero::before {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(ellipse 55% 80% at 75% 50%, rgba(78,179,154,0.08) 0%, transparent 65%);
    pointer-events: none;
}
.cw-hero::after {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, #0e2d27, #4eb39a, #3a9b83, #4eb39a, #0e2d27);
    background-size: 200% 100%;
    animation: hdrFlow 4s linear infinite;
}
@keyframes hdrFlow { 0%{background-position:0%} 100%{background-position:200%} }

.cw-hero-inner {
    max-width: 1200px; margin: 0 auto; position: relative; z-index: 1;
    display: grid; grid-template-columns: 1fr 300px;
    gap: 3rem; align-items: center;
}

/* Badges + status in hero */
.cw-hpills {
    display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: .9rem;
}
.cw-hpill {
    font-family: var(--mono); font-size: 0.6rem; font-weight: 500;
    padding: 3px 9px; border-radius: 4px; border: 1px solid;
    letter-spacing: .06em; text-transform: uppercase;
    display: flex; align-items: center; gap: 5px;
}
.hp-teal  { color: #6fd1b3; border-color: rgba(111,209,179,.3); background: rgba(78,179,154,0.1); }
.hp-green { color: #6fd1b3; border-color: rgba(111,209,179,.25); background: rgba(78,179,154,0.08); }
.pulse-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.3} }

/* Hero text */
.cw-eyebrow {
    font-family: var(--mono); font-size: 0.62rem; color: #6fd1b3;
    letter-spacing: .14em; text-transform: uppercase;
    margin-bottom: .6rem; display: flex; align-items: center; gap: 8px; opacity: .9;
}
.cw-eyebrow::before { content: '>>'; opacity: .45; font-size: 0.55rem; }

.cw-hero h1, .cw-hero h2 {
    font-size: clamp(1.4rem, 4vw, 2.2rem);
    font-weight: 700; color: #fff; line-height: 1.15;
    letter-spacing: -.02em; margin-bottom: .5rem;
}
.cw-hero h1 em, .cw-hero h2 em { font-style: normal; color: #6fd1b3; }
.cw-hero p { font-size: 0.875rem; color: rgba(255,255,255,0.5); line-height: 1.8; max-width: 500px; }

.cw-feat-list { display: flex; flex-direction: column; gap: 5px; margin-top: .9rem; }
.cw-feat {
    display: flex; align-items: center; gap: 7px;
    font-family: var(--mono); font-size: 0.62rem; color: rgba(255,255,255,0.4);
}
.cw-feat::before { content: '▸'; color: #6fd1b3; font-size: 0.5rem; }

/* Hero stat panel */
.cw-hero-panel {
    background: rgba(0,0,0,0.2); border: 1px solid rgba(78,179,154,0.2);
    border-radius: 12px; padding: 1.25rem; display: none;
    backdrop-filter: blur(4px);
}
.cw-hero-panel.show { display: block; }
.cw-hp-title { font-family: var(--mono); font-size: 0.6rem; color: #6fd1b3; letter-spacing: .1em; text-transform: uppercase; margin-bottom: .85rem; }
.cw-hp-rows  { display: flex; flex-direction: column; gap: 4px; }
.cw-hp-row   { display: flex; justify-content: space-between; padding: 4px 0; border-bottom: 1px solid rgba(255,255,255,.05); }
.cw-hp-row:last-child { border-bottom: none; }
.cw-hp-k { font-family: var(--mono); font-size: 0.62rem; color: rgba(255,255,255,0.4); }
.cw-hp-v { font-family: var(--mono); font-size: 0.68rem; font-weight: 600; color: #fff; }
.cw-hp-v.teal   { color: #6fd1b3; }
.cw-hp-v.red    { color: #fca5a5; }
.cw-hp-v.yellow { color: #fcd34d; }
.cw-hp-v.green  { color: #6fd1b3; }

/* ─────────────────────────────────────────
   MAIN LAYOUT
───────────────────────────────────────── */
.cw-main { max-width: 1200px; margin: 0 auto; padding: 2rem; }

/* ─────────────────────────────────────────
   INPUT PANEL — white card
───────────────────────────────────────── */
.input-panel {
    background: #fff; border: 1px solid var(--border);
    border-radius: 12px; margin-bottom: 1.5rem; overflow: hidden;
    transition: box-shadow .2s;
}
.input-panel:hover { box-shadow: 0 4px 14px rgba(0,0,0,0.06); }

.ip-head {
    background: #f5f9f8;
    border-bottom: 1px solid var(--border);
    padding: .85rem 1.4rem;
    display: flex; align-items: center; justify-content: space-between;
    gap: 1rem; flex-wrap: wrap;
}
.ip-title {
    font-family: var(--mono); font-size: 0.68rem; font-weight: 700;
    color: #3a9b83; letter-spacing: .1em; text-transform: uppercase;
    display: flex; align-items: center; gap: 7px;
}
.ip-title svg { width: 13px; height: 13px; stroke: currentColor; fill: none; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.btn-primary {
    background: #4eb39a; border: none; border-radius: 8px;
    padding: 9px 20px; font-family: 'DM Sans', sans-serif;
    font-size: 0.875rem; font-weight: 700; color: #0e2d27;
    cursor: pointer; transition: background .15s, transform .12s;
    display: inline-flex; align-items: center; gap: 7px;
}
.btn-primary:hover { background: #3a9b83; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(78,179,154,.3); }
.btn-primary:active { transform: scale(.98); }
.btn-primary:disabled { background: #e1f5ee; color: #94aaa6; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-primary svg { width: 14px; height: 14px; stroke: currentColor; fill: none; }

.btn-ghost {
    background: transparent; border: 1px solid rgba(78,179,154,0.25);
    border-radius: 8px; padding: 8px 15px;
    font-family: 'DM Sans', sans-serif; font-size: 0.82rem; font-weight: 600;
    color: var(--text2); cursor: pointer; transition: border-color .15s, color .15s, background .15s;
    display: inline-flex; align-items: center; gap: 6px;
}
.btn-ghost:hover { border-color: #4eb39a; color: #3a9b83; background: #e1f5ee; }
.btn-ghost svg { width: 13px; height: 13px; stroke: currentColor; fill: none; }

.ip-body { padding: 1.25rem 1.4rem; }

/* Drop zone */
.drop-zone {
    border: 2px dashed rgba(78,179,154,0.3); border-radius: 10px;
    padding: 1.75rem 2rem; text-align: center;
    cursor: pointer; transition: all .2s;
    position: relative; background: #f5f9f8; margin-bottom: 1rem;
}
.drop-zone:hover, .drop-zone.drag { border-color: #4eb39a; background: rgba(78,179,154,0.05); }
.drop-zone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dz-icon { width: 38px; height: 38px; background: #e1f5ee; border: 1px solid rgba(78,179,154,0.25); border-radius: 9px; display: flex; align-items: center; justify-content: center; margin: 0 auto .7rem; }
.dz-icon svg { width: 18px; height: 18px; stroke: #3a9b83; fill: none; }
.drop-zone h3 { font-size: 0.875rem; font-weight: 700; color: #0e2d27; margin-bottom: 2px; }
.drop-zone p  { font-family: var(--mono); font-size: 0.62rem; color: var(--text2); }

/* OR divider */
.or-div {
    display: flex; align-items: center; gap: .85rem;
    font-family: var(--mono); font-size: 0.62rem; color: var(--text3); margin: .7rem 0;
}
.or-div::before, .or-div::after { content: ''; flex: 1; height: 1px; background: rgba(78,179,154,0.15); }

/* Textarea — keep dark for log legibility */
.cw-textarea {
    width: 100%; min-height: 190px;
    background: #0e2d27; border: 1px solid rgba(78,179,154,0.2);
    border-radius: 10px; padding: .9rem 1rem;
    font-family: var(--mono); font-size: 0.75rem; color: #e1f5ee;
    resize: vertical; outline: none; line-height: 1.65; tab-size: 4;
    transition: border-color .2s;
}
.cw-textarea::placeholder { color: rgba(255,255,255,.2); }
.cw-textarea:focus { border-color: rgba(78,179,154,.5); }

/* Sample row */
.sample-row { display: flex; gap: 7px; margin-top: .7rem; flex-wrap: wrap; align-items: center; }
.sample-lbl { font-family: var(--mono); font-size: 0.62rem; color: var(--text3); font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.sample-btn {
    font-family: var(--mono); font-size: 0.62rem; font-weight: 500;
    padding: 3px 10px; border-radius: 4px;
    border: 1px solid rgba(78,179,154,0.2); background: #f5f9f8; color: var(--text2);
    cursor: pointer; transition: all .15s;
}
.sample-btn:hover { border-color: #4eb39a; color: #3a9b83; background: #e1f5ee; }

/* ─────────────────────────────────────────
   RESULTS
───────────────────────────────────────── */
#cw-results { display: none; }

/* Section title */
.sec-title {
    font-family: var(--mono); font-size: 0.68rem; font-weight: 700;
    letter-spacing: .1em; text-transform: uppercase; color: var(--text2);
    margin-bottom: .7rem; display: flex; align-items: center; gap: 10px;
}
.sec-title::after { content: ''; flex: 1; height: 1px; background: rgba(78,179,154,0.15); }

/* Settings bar */
.settings-bar {
    background: #fff; border: 1px solid var(--border); border-radius: 10px;
    padding: .7rem 1rem; margin-bottom: 1.1rem;
    display: flex; gap: 1.4rem; flex-wrap: wrap; align-items: center;
}
.setting-item { display: flex; align-items: center; gap: 7px; }
.setting-item label {
    font-family: var(--mono); font-size: 0.62rem; color: var(--text2);
    letter-spacing: .04em; text-transform: uppercase; white-space: nowrap;
    display: flex; align-items: center; gap: 5px;
}
.setting-item select, .setting-item input[type="number"] {
    font-family: var(--mono); font-size: 0.68rem; color: var(--text0);
    background: #f5f9f8; border: 1px solid var(--border2); border-radius: 6px;
    padding: 4px 8px; outline: none;
}
.setting-item input[type="number"] { width: 80px; }
.setting-item input[type="checkbox"] { accent-color: #4eb39a; }
.setting-unit { font-family: var(--mono); font-size: 0.6rem; color: var(--text3); }
.setting-check label { text-transform: none; letter-spacing: 0; }

/* Copy-to-clipboard buttons used in tables */
.copy-btn {
    border: 1px solid var(--border2); background: transparent; border-radius: 4px;
    color: var(--text2); font-size: 10px; padding: 0 4px; cursor: pointer; line-height: 1.6;
    margin-left: 4px; vertical-align: middle;
}
.copy-btn:hover { border-color: #4eb39a; color: #3a9b83; background: rgba(78,179,154,.08); }

/* Stat grid */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px,1fr)); gap: 10px; margin-bottom: 1.5rem; }
.stat-card {
    background: #fff; border: 1px solid var(--border);
    border-top: 2px solid var(--sc-accent, #4eb39a);
    border-radius: 10px; padding: 1rem 1.1rem;
    transition: box-shadow .15s;
}
.stat-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.06); }
.sc-lbl { font-family: var(--mono); font-size: 0.6rem; color: var(--text2); letter-spacing: .07em; text-transform: uppercase; margin-bottom: .35rem; }
.sc-val { font-family: 'DM Sans', sans-serif; font-size: 1.5rem; font-weight: 700; color: #0e2d27; line-height: 1; letter-spacing: -.02em; }
.sc-sub { font-family: var(--mono); font-size: 0.62rem; color: var(--text2); margin-top: 3px; }

/* Chart row */
.chart-row { display: grid; grid-template-columns: 1fr 260px; gap: 12px; margin-bottom: 1.5rem; }
.chart-card {
    background: #fff; border: 1px solid var(--border);
    border-radius: 12px; overflow: hidden; transition: box-shadow .15s;
}
.chart-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.06); }
.chart-head {
    padding: .7rem 1.1rem; border-bottom: 1px solid var(--border);
    background: #f5f9f8;
    font-family: var(--mono); font-size: 0.62rem; font-weight: 700; color: var(--text2);
    letter-spacing: .1em; text-transform: uppercase;
    display: flex; align-items: center; gap: 7px;
}
.chart-head svg { width: 12px; height: 12px; stroke: #3a9b83; fill: none; }
.chart-body { padding: .9rem 1.1rem; height: 170px; position: relative; }

/* Tabs */
.tab-nav {
    display: flex; gap: 2px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.5rem; overflow-x: auto;
}
.tab-btn {
    font-family: var(--mono); font-size: 0.65rem; font-weight: 600;
    letter-spacing: .06em; text-transform: uppercase;
    padding: .6rem 1rem; border: none; background: transparent;
    color: var(--text2); cursor: pointer;
    border-bottom: 2px solid transparent; margin-bottom: -1px;
    transition: all .15s; white-space: nowrap;
    display: flex; align-items: center; gap: 6px;
}
.tab-btn:hover { color: var(--text0); }
.tab-btn.active { color: #3a9b83; border-bottom-color: #4eb39a; }
.tab-count {
    font-family: var(--mono); font-size: 0.58rem; font-weight: 700;
    padding: 1px 6px; border-radius: 4px;
    background: rgba(78,179,154,0.1); color: #3a9b83;
    border: 1px solid rgba(78,179,154,0.25);
}
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ─────────────────────────────────────────
   ERROR / ANOMALY PANEL
───────────────────────────────────────── */
.error-panel {
    background: #fff; border: 1px solid var(--border);
    border-radius: 12px; margin-bottom: 1.5rem; overflow: hidden;
}
.error-item {
    display: flex; align-items: flex-start; gap: 12px;
    padding: .75rem 1.1rem;
    border-bottom: 1px solid rgba(78,179,154,0.07);
    cursor: pointer; transition: background .1s;
}
.error-item:last-child { border-bottom: none; }
.error-item:hover { background: rgba(78,179,154,0.04); }
.error-badge {
    font-family: var(--mono); font-size: 0.6rem; font-weight: 600;
    padding: 2px 8px; border-radius: 4px; border: 1px solid;
    letter-spacing: .04em; text-transform: uppercase; flex-shrink: 0; margin-top: 1px;
}
.eb-error    { color: #991b1b; border-color: rgba(220,38,38,.3);  background: rgba(220,38,38,.08); }
.eb-warn     { color: #92400e; border-color: rgba(202,138,4,.3);  background: rgba(202,138,4,.08); }
.eb-info     { color: #3a9b83; border-color: rgba(78,179,154,.3); background: rgba(78,179,154,.08); }
.eb-critical { color: #fff;    border-color: #dc2626;             background: #dc2626; }

.error-body { flex: 1; min-width: 0; }
.error-msg  { font-family: var(--mono); font-size: 0.75rem; color: var(--text0); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 2px; }
.error-meta { font-family: var(--mono); font-size: 0.62rem; color: var(--text2); }
.error-count{ font-family: var(--mono); font-size: 0.68rem; color: #3a9b83; font-weight: 600; flex-shrink: 0; }

/* Tip box */
.tip-box {
    display: none;
    background: #f0fdf4; border: 1px solid rgba(22,163,74,.2);
    border-radius: 8px; padding: .7rem 1rem;
    font-family: var(--mono); font-size: 0.68rem; color: #065f46;
    line-height: 1.65; margin: .5rem 1.1rem .75rem;
}
.tip-box.show { display: block; }
.tip-box strong { display: block; font-size: 0.6rem; letter-spacing: .08em; text-transform: uppercase; color: #16a34a; margin-bottom: 3px; }

/* ─────────────────────────────────────────
   CONTACT FLOW PANE
───────────────────────────────────────── */
.cf-timeline { display: flex; flex-direction: column; gap: 4px; margin-bottom: 1.5rem; }
.cf-item {
    display: flex; align-items: flex-start; gap: 10px;
    background: #fff; border: 1px solid var(--border);
    border-radius: 8px; padding: .55rem .9rem;
    font-family: var(--mono); font-size: 0.68rem;
    transition: background .1s;
}
.cf-item:hover { background: #f5f9f8; }
.cf-item.cf-error { border-color: rgba(220,38,38,.25); background: rgba(220,38,38,.04); }
.cf-item.cf-warn  { border-color: rgba(202,138,4,.25);  background: rgba(202,138,4,.04); }
.cf-ts   { color: var(--text2); white-space: nowrap; min-width: 90px; font-size: 0.62rem; }
.cf-type { flex-shrink: 0; }
.cf-type-badge {
    font-size: 0.6rem; font-weight: 600; padding: 1px 7px; border-radius: 4px;
    border: 1px solid; text-transform: uppercase; letter-spacing: .04em;
}
.ct-flow-entry { color: #166534;  border-color: rgba(22,163,74,.3);   background: rgba(22,163,74,.08); }
.ct-block-exec { color: #3a9b83;  border-color: rgba(78,179,154,.3);  background: rgba(78,179,154,.08); }
.ct-error-exec { color: #991b1b;  border-color: rgba(220,38,38,.3);   background: rgba(220,38,38,.08); }
.ct-transfer   { color: #5b21b6;  border-color: rgba(124,58,237,.3);  background: rgba(124,58,237,.08); }
.ct-generic    { color: var(--text2); border-color: rgba(94,154,134,.2); background: rgba(94,154,134,.05); }
.cf-msg  { flex: 1; color: var(--text1); font-size: 0.68rem; }
.cf-cid  { font-size: 0.58rem; color: var(--text3); white-space: nowrap; }

/* ─────────────────────────────────────────
   LAMBDA PANE
───────────────────────────────────────── */
.lambda-summary { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px,1fr)); gap: 10px; margin-bottom: 1.5rem; }
.lambda-card {
    background: #fff; border: 1px solid var(--border);
    border-radius: 10px; padding: .9rem 1rem;
    display: flex; align-items: flex-start; gap: 10px;
    transition: box-shadow .15s;
}
.lambda-card:hover { box-shadow: 0 3px 10px rgba(0,0,0,0.05); }
.lc-icon { width: 28px; height: 28px; border-radius: 7px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.lc-lbl { font-family: var(--mono); font-size: 0.6rem; color: var(--text2); letter-spacing: .06em; text-transform: uppercase; }
.lc-val { font-family: 'DM Sans', sans-serif; font-size: 1.1rem; font-weight: 700; color: #0e2d27; line-height: 1.1; margin-top: 2px; }
.lc-sub { font-family: var(--mono); font-size: 0.58rem; color: var(--text2); margin-top: 2px; }
.req-table-wrap { background: #fff; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; margin-bottom: 1.5rem; }
.req-table { width: 100%; border-collapse: collapse; }
.req-table th { padding: .5rem .9rem; text-align: left; font-family: var(--mono); font-size: 0.6rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--text2); background: #eaf4f1; border-bottom: 1px solid rgba(78,179,154,0.15); white-space: nowrap; }
.req-table td { padding: .45rem .9rem; font-family: var(--mono); font-size: 0.68rem; color: var(--text1); border-bottom: 1px solid rgba(78,179,154,0.06); }
.req-table tr:hover td { background: rgba(78,179,154,0.03); }
.req-table tr:last-child td { border-bottom: none; }

/* ─────────────────────────────────────────
   LOG VIEWER
───────────────────────────────────────── */
.log-filters {
    background: #fff; border: 1px solid var(--border);
    border-radius: 10px; padding: .75rem 1rem;
    display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
    margin-bottom: .85rem;
}
.log-search {
    flex: 1; min-width: 180px;
    background: #f5f9f8; border: 1px solid rgba(78,179,154,0.2);
    border-radius: 6px; padding: 6px 10px;
    font-family: var(--mono); font-size: 0.72rem; color: var(--text0);
    outline: none; transition: border-color .2s;
}
.log-search::placeholder { color: var(--text3); }
.log-search:focus { border-color: #4eb39a; background: #fff; }
.log-select {
    background: #f5f9f8; border: 1px solid rgba(78,179,154,0.2);
    border-radius: 6px; padding: 6px 9px;
    font-family: var(--mono); font-size: 0.72rem; color: var(--text0);
    outline: none; cursor: pointer; transition: border-color .2s;
}
.log-select:focus { border-color: #4eb39a; }
.regex-toggle {
    font-family: var(--mono); font-size: 0.62rem; color: var(--text2);
    cursor: pointer; padding: 5px 9px;
    border: 1px solid rgba(78,179,154,0.2); border-radius: 5px;
    background: #f5f9f8; transition: all .15s;
    display: flex; align-items: center; gap: 5px;
}
.regex-toggle.on { color: #3a9b83; border-color: rgba(78,179,154,0.4); background: #e1f5ee; }

.log-wrap { background: #fff; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; margin-bottom: 1rem; }
.log-table { width: 100%; border-collapse: collapse; font-size: 0.72rem; }
.log-table thead th {
    padding: .45rem .9rem; text-align: left;
    font-family: var(--mono); font-size: 0.6rem; font-weight: 700;
    letter-spacing: .07em; text-transform: uppercase; color: var(--text2);
    background: #eaf4f1; border-bottom: 1px solid rgba(78,179,154,0.15);
    white-space: nowrap; position: sticky; top: 0; z-index: 1;
}
.log-tbody { max-height: 480px; display: block; overflow-y: auto; }
.log-tbody tr { display: table; width: 100%; table-layout: fixed; }
.log-thead { display: table; width: 100%; table-layout: fixed; }
.log-row { border-bottom: 1px solid rgba(78,179,154,0.06); cursor: pointer; transition: background .08s; }
.log-row:hover { background: rgba(78,179,154,0.04); }
.log-row.row-error { background: rgba(220,38,38,.04); }
.log-row.row-warn  { background: rgba(202,138,4,.03); }
.log-row td { padding: .4rem .9rem; font-family: var(--mono); font-size: 0.68rem; color: var(--text1); vertical-align: top; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log-row td:first-child { color: var(--text3); font-size: 0.62rem; width: 175px; }
.log-row td:nth-child(2){ width: 80px; }
.log-row td:nth-child(3){ width: 140px; color: var(--text2); }
.log-row td:last-child { max-width: 0; }
.log-row.expanded td:last-child { white-space: pre-wrap; word-break: break-all; max-width: none; }

/* Level badges — light-bg versions */
.lv-badge { display: inline-block; padding: 1px 6px; border-radius: 4px; font-size: 0.58rem; font-weight: 700; border: 1px solid; letter-spacing: .04em; text-transform: uppercase; }
.lv-error  { color: #991b1b; border-color: rgba(220,38,38,.3);    background: rgba(220,38,38,.08); }
.lv-warn   { color: #92400e; border-color: rgba(202,138,4,.3);    background: rgba(202,138,4,.08); }
.lv-info   { color: #3a9b83; border-color: rgba(78,179,154,.3);   background: rgba(78,179,154,.08); }
.lv-debug  { color: #64748b; border-color: rgba(100,116,139,.25); background: rgba(100,116,139,.08); }
.lv-trace  { color: #94a3b8; border-color: rgba(148,163,184,.3);  background: rgba(148,163,184,.08); }
.lv-report { color: #5b21b6; border-color: rgba(124,58,237,.3);   background: rgba(124,58,237,.08); }

.log-footer {
    padding: .55rem .9rem; border-top: 1px solid var(--border);
    background: #f5f9f8;
    display: flex; align-items: center; justify-content: space-between;
    font-family: var(--mono); font-size: 0.62rem; color: var(--text2);
    flex-wrap: wrap; gap: .4rem;
}
.pg-btn {
    background: #fff; border: 1px solid var(--border);
    border-radius: 4px; padding: 3px 9px;
    font-family: var(--mono); font-size: 0.62rem; color: var(--text2);
    cursor: pointer; transition: all .15s;
}
.pg-btn:hover { border-color: #4eb39a; color: #3a9b83; background: #e1f5ee; }

/* ─────────────────────────────────────────
   SEO / FAQ CARD
───────────────────────────────────────── */
.seo-block { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 1.75rem 2rem; margin-top: 2rem; }
.seo-block h2 { font-size: 1.05rem; font-weight: 700; color: var(--text0); margin-bottom: .5rem; }
.seo-block > p { font-size: 0.875rem; color: var(--text2); line-height: 1.8; }
.faq-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px,1fr)); gap: 10px; margin-top: 1.2rem; }
.faq-card { background: #f5f9f8; border: 1px solid rgba(78,179,154,0.15); border-radius: 10px; padding: 1rem; }
.faq-q { font-size: 0.875rem; font-weight: 600; color: var(--text0); margin-bottom: .3rem; }
.faq-a { font-size: 0.82rem; color: var(--text2); line-height: 1.7; }

/* ─────────────────────────────────────────
   TOAST
───────────────────────────────────────── */
.cw-toast {
    position: fixed; bottom: 2rem; right: 2rem;
    background: #0e2d27; border: 1px solid rgba(78,179,154,0.35);
    border-radius: 8px; padding: .65rem 1.1rem;
    font-family: var(--mono); font-size: 0.72rem; color: #e1f5ee;
    z-index: 999; transform: translateY(60px); opacity: 0;
    transition: all .3s; pointer-events: none;
}
.cw-toast.show { transform: translateY(0); opacity: 1; }

/* ─────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────── */
@media (max-width: 768px) {
    .cw-hero-inner { grid-template-columns: 1fr; }
    .cw-main       { padding: 1rem; }
    .chart-row     { grid-template-columns: 1fr; }
    .stat-grid     { grid-template-columns: repeat(2,1fr); }
    .cw-hero       { padding: 1.75rem 1.25rem 1.5rem; }
    .seo-block     { padding: 1.25rem; }
}
