/* ================================================================
   American Sports Tools — Corporate Design
   Primary #CC0000  |  Dark #333333  |  BG #f5f5f5
   ================================================================ */

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

body {
    font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
    background: #f5f5f5;
    color: #555555;
    line-height: 1.5;
    font-size: 15px;
}

/* ── Layout ── */
.container {
    max-width: 980px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* ── Navigation ── */
nav {
    background: #333333;
    color: #fff;
    padding: 0 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 52px;
    border-bottom: 3px solid #CC0000;
}
nav img     { filter: drop-shadow(0 0 1px rgba(255,255,255,.675)) drop-shadow(0 0 3px rgba(255,255,255,.525)) drop-shadow(0 0 8px rgba(255,255,255,.375)) drop-shadow(0 0 16px rgba(255,255,255,.19)); }
nav strong  { color: #fff; font-size: .95rem; letter-spacing: .02em; }
nav a       { color: #cccccc; text-decoration: none; font-size: .9rem; }
nav a:hover { color: #CC0000; }
.nav-right  { display: flex; align-items: center; gap: .75rem; }

/* ── Language switcher (nav / dark bg) ── */
.lang-btn               { background: none; border: none; cursor: pointer; font-size: .8rem; font-weight: 700; padding: .15rem .3rem; color: #888; letter-spacing: .05em; }
.lang-btn:hover         { color: #bbb; }
.lang-btn.active        { color: #CC0000; }

/* Login-page lang switcher (light bg) */
.login-lang             { text-align: right; margin-bottom: 1.25rem; }
.login-lang .lang-btn   { color: #bbb; }
.login-lang .lang-btn:hover   { color: #777; }
.login-lang .lang-btn.active  { color: #CC0000; }

/* ── Login page ── */
.login-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 8vh;
    min-height: 100vh;
    background: #f5f5f5;
    position: relative;
}
.login-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 10;
}

/* ── Login Status Web (spider-web with glowing beams) ── */
.login-status-web {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 100vh;
    pointer-events: none;
    z-index: 5;
}
.login-status-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}
.login-beam {
    stroke: #CC0000;
    stroke-width: 1.5;
    fill: none;
    stroke-linejoin: miter;
    filter: url(#beam-glow);
    animation: beamPulse 3s ease-in-out infinite;
}
@keyframes beamPulse {
    0%, 100% { opacity: .25; stroke-width: 1;   }
    50%      { opacity: .7;  stroke-width: 2.5; }
}
@keyframes nodePulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        box-shadow: 0 2px 10px rgba(0,0,0,.08);
        border-top-color: rgba(204,0,0,.4);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.04);
        box-shadow: 0 0 20px rgba(204,0,0,.35), 0 0 40px rgba(204,0,0,.12);
        border-top-color: #CC0000;
    }
}
.login-status-node {
    position: absolute;
    transform: translate(-50%, -50%);
    pointer-events: auto;
    background: #ffffff;
    border-radius: 6px;
    padding: .6rem .8rem .5rem;
    box-shadow: 0 2px 12px rgba(0,0,0,.1);
    border-top: 2px solid #CC0000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .25rem;
    min-width: 130px;
    max-width: 170px;
    text-align: center;
    z-index: 2;
    transition: transform .25s, box-shadow .25s;
    animation: nodePulse 3s ease-in-out infinite;
}
.login-status-node:hover {
    animation: none;
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 0 24px rgba(204,0,0,.35), 0 4px 20px rgba(0,0,0,.15);
    border-top-color: #CC0000;
}
.login-status-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 36px;
}
.login-status-logo img {
    max-width: 70px;
    max-height: 36px;
    object-fit: contain;
}
.login-status-name {
    font-size: .72rem;
    font-weight: 700;
    color: #222;
    line-height: 1.2;
}
.login-status-details {
    font-size: .68rem;
    color: #555;
    line-height: 1.5;
    text-align: left;
    width: 100%;
}
.login-status-details strong { color: #333; }
.login-status-time {
    font-size: .62rem;
    color: #999;
    margin-top: .15rem;
}
.login-box {
    background: #ffffff;
    border-radius: 4px;
    padding: 2rem 2.5rem;
    box-shadow: 0 2px 16px rgba(0,0,0,.1);
    width: 100%;
    max-width: 380px;
    border-top: 4px solid #CC0000;
}
.login-box h1 {
    font-size: 1.25rem;
    font-weight: 800;
    color: #222222;
    text-transform: uppercase;
    letter-spacing: .06em;
    text-align: center;
    margin-bottom: 1.5rem;
}

/* ── Forms ── */
.form-group             { margin-bottom: 1rem; }
.form-group label       { display: block; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #444; margin-bottom: .35rem; }

input[type=text], input[type=email], input[type=url],
input[type=password], input[type=number], select {
    width: 100%;
    padding: .5rem .75rem;
    border: 1px solid #dddddd;
    border-radius: 4px;
    font-size: .93rem;
    color: #222;
    background: #fff;
    transition: border-color .15s;
}
input:focus { outline: none; border-color: #CC0000; }

.form-stack { display: flex; flex-direction: column; gap: .75rem; max-width: 440px; }
.form-stack label { font-size: .82rem; font-weight: 600; color: #333; margin-bottom: .25rem; display: block; }

/* ── Buttons ── */
.btn {
    display: inline-block;
    padding: .5rem 1.25rem;
    border: none;
    border-radius: 4px;
    font-size: .88rem;
    font-weight: 700;
    letter-spacing: .03em;
    cursor: pointer;
    text-decoration: none;
    line-height: 1.4;
    transition: background .15s;
}
.btn-primary        { background: #CC0000; color: #fff; }
.btn-primary:hover  { background: #aa0000; }
.btn-green          { background: #28a745; color: #fff; }
.btn-green:hover    { background: #218838; }
.btn-teal           { background: #17a2b8; color: #fff; }
.btn-teal:hover     { background: #138496; }
.btn-block          { width: 100%; text-align: center; padding-top: .65rem; padding-bottom: .65rem; font-size: .95rem; }

/* Badge buttons — category active/inactive toggles */
.btn-badge          { padding: .2rem .65rem; font-size: .78rem; border-radius: 3px; font-weight: 700; letter-spacing: .04em; }
.btn-badge-on       { background: #CC0000; color: #fff; }
.btn-badge-on:hover { background: #aa0000; }
.btn-badge-off      { background: #666666; color: #fff; }

/* ── Alerts ── */
.alert          { padding: .75rem 1rem; border-radius: 4px; margin-bottom: 1.25rem; font-size: .9rem; border-left: 3px solid; }
.alert-error    { background: #fff0f0; color: #CC0000;  border-color: #CC0000; }
.alert-success  { background: #f0fff4; color: #276749;  border-color: #28a745; }

/* ── Page heading ── */
h2 {
    font-size: 1.15rem;
    font-weight: 800;
    color: #222222;
    letter-spacing: .04em;
    margin-bottom: .75rem;
}

/* ── Tool cards (dashboard) ── */
.tools-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.25rem;
    margin-top: 1rem;
    padding-bottom: 2rem;
}
.tool-card {
    width: 260px;
    background: #ffffff;
    border-radius: 4px;
    padding: 1.5rem;
    padding-bottom: 2.2rem;
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
    text-decoration: none;
    color: inherit;
    display: block;
    text-align: left;
    border-top: 3px solid #CC0000;
    transition: box-shadow .15s, transform .12s;
    position: relative;
}
.tool-card:hover        { box-shadow: 0 4px 16px rgba(0,0,0,.12); transform: translateY(-2px); }
.tool-card-disabled     { opacity: .45; cursor: default; pointer-events: none; }
.tool-version-disabled  { pointer-events: auto; cursor: pointer; position: absolute; bottom: .6rem; right: .8rem; font-size: .6rem; font-weight: 600; color: #CC0000 !important; }
.tool-card h3           { font-size: .95rem; font-weight: 700; color: #222222; text-transform: uppercase; letter-spacing: .05em; margin-bottom: .4rem; }
.tool-card p            { font-size: .84rem; color: #777; }

/* ── Stats strip ── */
.stats {
    display: flex;
    gap: 1px;
    margin: 0 0 1.5rem;
    background: #bbbbbb;
    border-radius: 4px;
    overflow: hidden;
    flex-wrap: wrap;
}
.stat {
    background: #333333;
    flex: 1;
    min-width: 130px;
    padding: .9rem 1.5rem;
    color: #aaaaaa;
    font-size: .74rem;
    text-transform: uppercase;
    letter-spacing: .07em;
    transition: background .15s, transform .1s;
}
.stat-filter:hover {
    background: #444444;
    transform: translateY(-1px);
}
.stat-filter.active {
    background: #555555;
    box-shadow: inset 0 -3px 0 #CC0000;
}
.stat strong {
    display: block;
    font-size: 1.75rem;
    font-weight: 800;
    color: #CC0000;
    letter-spacing: 0;
    line-height: 1.2;
    margin-bottom: .1rem;
}

/* ── Panels / sections ── */
.section {
    background: #ffffff;
    border-radius: 4px;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 1px 4px rgba(0,0,0,.07);
    margin-bottom: 1.25rem;
    border-left: 3px solid #CC0000;
}
.section h3 {
    margin: 0 0 1rem;
    font-size: .76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: #333333;
}
.section-admin-label { font-weight: normal; color: #999; font-size: .75rem; text-transform: none; letter-spacing: 0; }

/* ── Tables ── */
table.data                  { width: 100%; border-collapse: collapse; font-size: .875rem; }
table.data th,
table.data td               { padding: .45rem .7rem; border-bottom: 1px solid #eeeeee; text-align: left; }
table.data th               { background: #333333; color: #fff; font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; }
table.data tr:last-child td { border-bottom: none; }
table.data tbody tr:hover td { background: #fafafa; }
.td-nowrap                  { white-space: nowrap; }
.td-url                     { font-size: .8rem; color: #888; }

/* Category table — parent/child row distinction */
.cat-table tr.cat-parent td  { background: #f0f0f0; }
.cat-table tr.cat-parent:hover td { background: #e0e0e0; }
.cat-table tr.cat-child td   { background: #ffffff; }
.cat-table tr.cat-child:hover td  { background: #f9f9f9; }

/* Line colour tokens — overridden per effect class */
.cat-table                   { --line-bg: #CC0000; --line-sh: none; }
.cat-table.effect-glass      { --line-bg: rgba(204,0,0,0.6); --line-sh: 0 0 4px rgba(204,0,0,0.3), inset 0 0 2px rgba(255,255,255,0.25); }
.cat-table.effect-slide      { --line-bg: #CC0000; --line-sh: none; }
.cat-table.effect-glow       { --line-bg: #CC0000; --line-sh: 0 0 8px #CC0000; }

/* Only tr needs position:relative — tds must NOT be positioned so that
   their ::after pseudo-elements use tr as containing block (JS-measured px values) */
.cat-table tr.cat-parent,
.cat-table tr.cat-child      { position: relative; }

/* ── Horizontal bottom line (tr::after) ── */
/* left/width driven by JS via --nose-left / --nose-right on each tr */
.cat-table tr.cat-parent::after,
.cat-table tr.cat-child::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: var(--nose-left, 0px);
    width: calc(var(--nose-right, 100%) - var(--nose-left, 0px));
    background: var(--line-bg);
    box-shadow: var(--line-sh);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 200ms ease;
    pointer-events: none;
    z-index: 2;
}
.cat-table tr.cat-parent::after { height: 2px; }
.cat-table tr.cat-child::after  { height: 1px; }
.cat-table tr:hover::after      { transform: scaleX(1); }

/* ── Left nose (td:first-child::after, positioned relative to tr) ── */
.cat-table td:first-child::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: var(--nose-left, 0px);
    background: var(--line-bg);
    box-shadow: var(--line-sh);
    opacity: 0;
    transition: opacity 70ms ease;        /* fast fade-out on leave */
    z-index: 2;
}
.cat-table tr.cat-parent td:first-child::after { width: 2px; height: 8px; }
.cat-table tr.cat-child  td:first-child::after { width: 1px; height: 5px; }
.cat-table tr:hover td:first-child::after {
    opacity: 1;
    transition: opacity 60ms ease 0ms;    /* appears immediately */
}

/* ── Right nose (td:last-child::after, positioned relative to tr) ── */
.cat-table td:last-child::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: var(--nose-right, 100%);
    background: var(--line-bg);
    box-shadow: var(--line-sh);
    opacity: 0;
    transition: opacity 70ms ease;        /* fast fade-out on leave */
    z-index: 2;
}
.cat-table tr.cat-parent td:last-child::after { width: 2px; height: 8px; }
.cat-table tr.cat-child  td:last-child::after { width: 1px; height: 5px; }
.cat-table tr:hover td:last-child::after {
    opacity: 1;
    transition: opacity 60ms ease 180ms; /* delayed — appears as line tip arrives */
}

/* ── Glow pulse (all three elements) ── */
@keyframes glowPulse {
    0%, 100% { opacity: 1;   filter: brightness(1);   }
    50%       { opacity: 0.7; filter: brightness(1.6); }
}
.cat-table.effect-glow tr:hover::after,
.cat-table.effect-glow tr:hover td:first-child::after,
.cat-table.effect-glow tr:hover td:last-child::after { animation: glowPulse 1.2s ease infinite; }

/* Effect control picker */
.effect-picker        { display: flex; gap: 1.25rem; flex-wrap: wrap; margin-top: .4rem; }
.effect-picker label  { font-size: .9rem; color: #555; cursor: pointer; display: flex; align-items: center; gap: .35rem; }

/* Progress bar */
.progress-track { background: #e8e8e8; border-radius: 4px; height: 8px; overflow: visible; margin-bottom: .4rem; position: relative; }
.progress-fill  { height: 100%; background: #CC0000; width: 0%; border-radius: 4px; transition: width .5s ease; }
.progress-fill.glow { box-shadow: 0 0 8px #CC0000, 0 0 16px rgba(204,0,0,0.4); animation: progressGlow 1.2s ease infinite; }
@keyframes progressGlow {
    0%, 100% { box-shadow: 0 0 8px #CC0000, 0 0 16px rgba(204,0,0,0.4); filter: brightness(1); }
    50%      { box-shadow: 0 0 14px #CC0000, 0 0 28px rgba(204,0,0,0.6); filter: brightness(1.3); }
}
.progress-info  { font-size: .8rem; color: #888; }

/* ── Run section ── */
.btn-row                    { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.btn-row .download-link     { font-size: .88rem; color: #CC0000; text-decoration: none; margin-left: .25rem; }
.btn-row .download-link:hover { text-decoration: underline; }

/* ── Run progress indicator ── */
.run-indicator {
    align-items: center;
    gap: .5rem;
    margin-bottom: .75rem;
    color: #c65100;
    font-weight: 600;
    font-size: .9rem;
}

/* ── Add-category form ── */
.add-cat-form {
    margin-top: 1rem;
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}
.add-cat-form input[type=text]  { flex: 1; min-width: 120px; }
.add-cat-form input[type=url]   { flex: 3; min-width: 200px; }

/* ── Log level colours ── */
.log-INFO   { color: #2e7d32; }
.log-WARN   { color: #c65100; }
.log-ERROR  { color: #CC0000; font-weight: 700; }

/* ── Status badges (read-only) ── */
.badge         { display:inline-block; padding:.15rem .5rem; font-size:.75rem; font-weight:700; border-radius:3px; letter-spacing:.04em; }
.badge-on      { background:#d4edda; color:#155724; }
.badge-off     { background:#f0f0f0; color:#666666; }

/* ── Help / warning text ── */
.help   { display: block; color: #999; font-size: .77rem; margin-top: .2rem; }
.warn   { color: #CC0000; font-size: .8rem; font-weight: 700; }

/* ── Version badge ── */
.tool-version { font-size: .7rem; font-weight: 600; color: #999; letter-spacing: .03em; vertical-align: middle; text-decoration: none; }
a.tool-version:hover, .tool-version[data-changelog]:hover { color: #CC0000; cursor: pointer; }
a.tool-card .tool-version { position: absolute; bottom: .6rem; right: .8rem; font-size: .6rem; font-weight: 600; color: #CC0000 !important; }
a.tool-card .tool-version:hover { text-decoration: underline; }

/* ── Shop Monitor ── */

/* Category section + header */
.monitor-category-section { margin-bottom: .5rem; }
.monitor-category-header {
    font-size: .76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: #999;
    border-bottom: 1px solid #ddd;
    padding-bottom: .35rem;
    margin-bottom: .75rem;
    margin-top: 1.25rem;
}
.monitor-category-section:first-child .monitor-category-header { margin-top: 0; }

.monitor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-top: .5rem;
    padding-bottom: 1rem;
}
.monitor-card {
    background: #ffffff;
    border-radius: 4px;
    padding: 1.25rem;
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
    border-top: 3px solid #CC0000;
    cursor: pointer;
    transition: box-shadow .15s, transform .12s;
    text-align: left;
    display: flex;
    flex-direction: column;
    position: relative;
}
.monitor-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,.12);
    transform: translateY(-2px);
}

/* Status dot — top left corner */
.monitor-status-dot {
    position: absolute;
    top: .75rem;
    left: .75rem;
}

.monitor-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 60px;
    margin-bottom: .75rem;
}
.monitor-logo img {
    max-width: 120px;
    max-height: 60px;
    object-fit: contain;
}
.monitor-logo-placeholder {
    width: 50px;
    height: 50px;
    background: #CC0000;
    color: #fff;
    font-size: 1.5rem;
    font-weight: 800;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Name — fixed height so details always align */
.monitor-name {
    font-size: .9rem;
    font-weight: 700;
    color: #222;
    text-align: center;
    min-height: 2.4em;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: .5rem;
    line-height: 1.2;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    background: #ccc;
    flex-shrink: 0;
}
.status-dot.up {
    background: #28a745;
    box-shadow: 0 0 6px rgba(40,167,69,.5);
}
.status-dot.down {
    background: #CC0000;
    box-shadow: 0 0 6px rgba(204,0,0,.5);
    animation: pulse-dot 1.5s ease infinite;
}
.status-dot.ssl-warn {
    background: #f0ad4e;
    box-shadow: 0 0 6px rgba(240,173,78,.5);
}
@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: .5; }
}
.monitor-details {
    font-size: .82rem;
    color: #555;
    line-height: 1.6;
    text-align: left;
}
.monitor-details strong {
    color: #333;
}
.monitor-time {
    font-size: .75rem;
    color: #999;
    margin-top: .25rem;
}
.ssl-warn-text {
    color: #f0ad4e !important;
    font-weight: 700;
}

/* Re-check button */
.btn-recheck {
    margin-top: .5rem;
    padding: .25rem .6rem;
    font-size: .75rem;
    font-weight: 700;
    color: #CC0000;
    background: #fff0f0;
    border: 1px solid #CC0000;
    border-radius: 3px;
    cursor: pointer;
    transition: background .15s;
    align-self: flex-start;
}
.btn-recheck:hover { background: #CC0000; color: #fff; }
.btn-recheck:disabled { opacity: .6; cursor: wait; }
.btn-recheck-loading { animation: pulse-dot 1s ease infinite; }

/* Monitor Modal */
.monitor-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.monitor-modal-content {
    background: #fff;
    border-radius: 4px;
    padding: 1.5rem;
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0,0,0,.2);
    border-top: 3px solid #CC0000;
}
.monitor-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: .75rem;
}
.monitor-modal-header h3 {
    font-size: .9rem;
    font-weight: 700;
    color: #222;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin: 0;
}
.monitor-modal-close {
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
    line-height: 1;
}
.monitor-modal-close:hover {
    color: #CC0000;
}
.monitor-modal-tabs {
    display: flex;
    gap: .5rem;
    margin-bottom: .75rem;
}

/* ── Monitor Widget (Dashboard / Login compact view) ── */
.monitor-widget { margin: 2rem 0 1rem; text-align: left; }
.monitor-widget-title {
    font-size: .82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: #555;
    text-align: center;
    margin-bottom: .5rem;
    border-bottom: 2px solid #CC0000;
    padding-bottom: .5rem;
}
.monitor-widget-compact .monitor-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .75rem; }
.monitor-widget-compact .monitor-card {
    padding: .75rem .75rem .6rem;
    border-top-width: 2px;
    cursor: default;
}
.monitor-widget-compact .monitor-card:hover { transform: none; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.monitor-widget-compact .monitor-logo { height: 36px; margin-bottom: .4rem; }
.monitor-widget-compact .monitor-logo img { max-width: 80px; max-height: 36px; }
.monitor-widget-compact .monitor-logo-placeholder { width: 32px; height: 32px; font-size: 1rem; }
.monitor-widget-compact .monitor-name { font-size: .8rem; min-height: 1.8em; margin-bottom: .25rem; }
.monitor-widget-compact .monitor-details { font-size: .75rem; }
.monitor-widget-compact .monitor-time { font-size: .7rem; }
.monitor-widget-compact .monitor-status-dot { top: .5rem; left: .5rem; }
.monitor-widget-compact .monitor-category-header { font-size: .7rem; margin-top: .75rem; }

/* ── Tool tabs (sub-navigation within a tool) ── */
.tool-tabs {
    display: flex;
    gap: 2px;
    margin-bottom: 1.25rem;
}
.tool-tab {
    padding: .65rem 1.5rem;
    font-size: .85rem;
    font-weight: 700;
    text-decoration: none;
    border-radius: 4px 4px 0 0;
    background: #e8e8e8;
    color: #999;
    transition: background .15s, color .15s;
}
.tool-tab:hover:not(.active) {
    background: #d0d0d0;
    color: #666;
}
.tool-tab.active {
    background: #333;
    color: #fff;
}

/* ── Responsive: Tablet ── */
@media (max-width: 768px) {
    /* Login spider-web → stacked fallback */
    .login-status-web {
        position: relative;
        width: 100%;
        height: auto;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: .5rem;
        padding: 1rem .5rem;
    }
    .login-status-svg { display: none; }
    .login-status-node {
        position: relative !important;
        left: auto !important;
        top: auto !important;
        transform: none !important;
        animation: none !important;
        min-width: 90px;
        max-width: 120px;
    }
    .login-status-node:hover {
        transform: scale(1.05) !important;
    }
    .container          { padding: 0 .75rem; }
    .tool-card          { width: 100%; }
    .stat               { min-width: 0; }
    .stat strong         { font-size: 1.3rem; }
    nav                 { height: auto; min-height: 48px; flex-wrap: wrap; padding: .5rem .75rem; gap: .5rem; }
    nav img             { height: 28px; }
    .section            { padding: 1rem; }
    table.data th,
    table.data td       { padding: .35rem .5rem; font-size: .8rem; }
    .add-cat-form input { min-width: 0; flex-basis: 100%; }
    .adcell-wide        { max-width: 100%; }
    .monitor-grid       { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem; }
    .monitor-widget-compact .monitor-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
    .monitor-modal-content { width: 95%; padding: 1rem; }
}

/* ── Responsive: Mobil ── */
@media (max-width: 480px) {
    .stat               { flex-basis: calc(50% - 1px); }
    h2                  { font-size: 1rem; }
    .section            { padding: .75rem; }
    .monitor-grid       { grid-template-columns: 1fr 1fr; }
}
