:root {
    color-scheme: dark;
    --bg: #07111f;
    --surface: #0d1a2b;
    --surface-soft: #122238;
    --border: #213550;
    --text: #f3f7fc;
    --muted: #91a4ba;
    --primary: #42d3ff;
    --primary-deep: #0b8db7;
    --success: #55e6a5;
    --shadow: 0 20px 55px rgba(0, 0, 0, .28);
    --card-radius: 15px;
    --card-padding: 1.1rem;
    --card-gap: .75rem;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { min-height: 100%; }

body {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at 92% 8%, rgba(30, 126, 170, .15), transparent 32rem),
        var(--bg);
    color: var(--text);
    font-size: 1rem;
}

a { color: inherit; }
button, input { font: inherit; }

.site-header {
    border-bottom: 1px solid rgba(145, 164, 186, .16);
    background: rgba(7, 17, 31, .88);
    backdrop-filter: blur(18px);
}

.header-inner,
.main-content {
    width: min(1180px, calc(100% - 2.5rem));
    margin: 0 auto;
}

.header-inner {
    min-height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: .75rem;
    color: var(--text);
    font-size: 1.25rem;
    font-weight: 750;
    letter-spacing: -.035em;
    text-decoration: none;
}

.brand > span:last-child > span,
.mobile-brand .brand > span { color: var(--primary); }

.brand-mark {
    width: 32px;
    height: 32px;
    position: relative;
    display: inline-block;
}

.brand-mark span {
    width: 8px;
    height: 8px;
    position: absolute;
    border: 2px solid var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 16px rgba(66, 211, 255, .45);
}

.brand-mark span:first-child { left: 1px; top: 12px; }
.brand-mark span:nth-child(2) { right: 1px; top: 2px; }
.brand-mark span:last-child { right: 1px; bottom: 2px; }
.brand-mark::before,
.brand-mark::after {
    content: "";
    width: 19px;
    height: 1px;
    position: absolute;
    left: 7px;
    top: 15px;
    background: var(--primary);
    transform-origin: left center;
}
.brand-mark::before { transform: rotate(-28deg); }
.brand-mark::after { transform: rotate(28deg); }

.header-actions,
.user-summary {
    display: flex;
    align-items: center;
}

.header-actions { gap: 1.25rem; }
.user-summary { gap: .65rem; }

.avatar {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(66, 211, 255, .4);
    border-radius: 50%;
    background: rgba(66, 211, 255, .1);
    color: var(--primary);
    font-weight: 700;
}

.user-name { color: #d9e4ef; font-size: .9rem; }

.admin-link,
.logout-button {
    border: 0;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-size: .9rem;
    text-decoration: none;
}

.admin-link:hover,
.logout-button:hover { color: var(--text); }

.main-content { padding: 2.75rem 0 4rem; }

.hero {
    min-height: 215px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    overflow: hidden;
    padding: 2.25rem;
    border: 1px solid var(--border);
    border-radius: 18px;
    background:
        linear-gradient(125deg, rgba(18, 34, 56, .96), rgba(8, 24, 42, .84)),
        var(--surface);
    box-shadow: 0 16px 40px rgba(0, 0, 0, .22);
}

.hero h1,
.login-intro h1 {
    max-width: 720px;
    margin: .55rem 0 .8rem;
    font-size: clamp(2.25rem, 5vw, 4rem);
    line-height: 1.02;
    letter-spacing: -.055em;
}

.hero p,
.login-intro p {
    max-width: 630px;
    margin: 0;
    color: var(--muted);
    font-size: 1.08rem;
    line-height: 1.65;
}

.eyebrow {
    color: var(--primary);
    font-size: .78rem;
    font-weight: 750;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.connection-graphic {
    width: 260px;
    height: 180px;
    position: relative;
    flex: 0 0 auto;
    opacity: .55;
}

.node {
    width: 18px;
    height: 18px;
    position: absolute;
    z-index: 2;
    border: 4px solid var(--primary);
    border-radius: 50%;
    background: var(--surface);
    box-shadow: 0 0 26px rgba(66, 211, 255, .7);
}
.node-a { left: 10px; top: 78px; }
.node-b { right: 18px; top: 18px; }
.node-c { right: 18px; bottom: 16px; }
.line {
    width: 225px;
    height: 1px;
    position: absolute;
    left: 23px;
    top: 86px;
    background: linear-gradient(90deg, var(--primary), rgba(66, 211, 255, .15));
    transform-origin: left;
}
.line-a { transform: rotate(-16deg); }
.line-b { transform: rotate(16deg); }

.tools-section { margin-top: 2.5rem; }

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.section-heading h2 {
    margin: 0 0 .35rem;
    font-size: 1.65rem;
    letter-spacing: -.03em;
}

.section-heading p { margin: 0; color: var(--muted); }

.tool-count {
    padding: .45rem .75rem;
    border: 1px solid var(--border);
    border-radius: 99px;
    color: var(--muted);
    font-size: .78rem;
}

.tool-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--card-gap);
}

.tool-card {
    min-height: 180px;
    position: relative;
    display: flex;
    flex-direction: column;
    padding: var(--card-padding);
    border: 1px solid var(--border);
    border-radius: var(--card-radius);
    background: linear-gradient(150deg, rgba(18, 34, 56, .92), rgba(10, 24, 41, .9));
    transition: border-color .2s ease, transform .2s ease;
}

.tool-card:hover {
    border-color: rgba(66, 211, 255, .42);
    transform: translateY(-3px);
}

.tool-icon {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    margin-bottom: .85rem;
    border: 1px solid rgba(66, 211, 255, .22);
    border-radius: 11px;
    background: rgba(66, 211, 255, .08);
    color: var(--primary);
}

.tool-icon svg {
    width: 22px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
}

.status-badge {
    position: absolute;
    top: 1.2rem;
    right: 1.05rem;
    color: var(--success);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.tool-card h3 { margin: 0 0 .4rem; font-size: 1rem; }
.tool-card p {
    display: -webkit-box;
    overflow: hidden;
    margin: 0;
    color: var(--muted);
    font-size: .875rem;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.tool-card-available {
    border-color: rgba(66, 211, 255, .32);
    background:
        radial-gradient(circle at 100% 0, rgba(66, 211, 255, .09), transparent 12rem),
        linear-gradient(150deg, rgba(18, 34, 56, .96), rgba(10, 24, 41, .94));
}

.status-available::before {
    content: "";
    width: 6px;
    height: 6px;
    display: inline-block;
    margin-right: .4rem;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 9px currentColor;
    vertical-align: .05rem;
}

.tool-action {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    margin-top: auto;
    padding-top: .5rem;
    color: var(--primary);
    font-size: .86rem;
    font-weight: 750;
    text-decoration: none;
}

.tool-action:hover { color: #8be6ff; }

.breadcrumb {
    display: flex;
    align-items: center;
    gap: .65rem;
    margin-bottom: 1.4rem;
    color: var(--muted);
    font-size: .86rem;
}

.breadcrumb a {
    color: var(--primary);
    text-decoration: none;
}

.tool-page-header {
    display: flex;
    align-items: center;
    gap: 1.4rem;
    margin-bottom: 1.4rem;
}

.tool-page-header h1 {
    margin: .35rem 0 .45rem;
    font-size: clamp(2rem, 4vw, 3.15rem);
    letter-spacing: -.05em;
    line-height: 1.05;
}

.tool-page-header p { margin: 0; color: var(--muted); line-height: 1.6; }

.tool-page-icon {
    width: 68px;
    height: 68px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border: 1px solid rgba(66, 211, 255, .28);
    border-radius: 19px;
    background: rgba(66, 211, 255, .08);
    color: var(--primary);
    box-shadow: 0 0 40px rgba(66, 211, 255, .08);
}

.tool-page-icon svg {
    width: 34px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.6;
}

.scanner-layout {
    display: grid;
    grid-template-columns: minmax(330px, .78fr) minmax(520px, 1.22fr);
    gap: var(--card-gap);
    align-items: stretch;
}

.scanner-panel,
.results-panel {
    min-height: 480px;
    border: 1px solid var(--border);
    border-radius: var(--card-radius);
    background: linear-gradient(150deg, rgba(18, 34, 56, .94), rgba(9, 22, 38, .94));
    box-shadow: 0 14px 34px rgba(0, 0, 0, .16);
}

.scanner-panel { padding: 1.35rem; }
.results-panel { overflow: hidden; }

.panel-heading h2,
.results-heading h2,
.results-empty h2 {
    margin: .4rem 0 .45rem;
    font-size: 1.35rem;
    letter-spacing: -.025em;
}

.panel-heading p,
.results-heading p,
.results-empty p {
    margin: 0;
    color: var(--muted);
    font-size: .9rem;
    line-height: 1.55;
}

.panel-step {
    color: var(--primary);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.scanner-form {
    display: grid;
    gap: 1rem;
    margin-top: 1.4rem;
}

.scanner-field { display: grid; gap: .52rem; }
.scanner-field label { color: #dce7f3; font-size: .88rem; font-weight: 700; }

.scanner-field input,
.scanner-field select {
    width: 100%;
    min-height: 50px;
    padding: 0 .9rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    outline: none;
    background: rgba(7, 17, 31, .7);
    color: var(--text);
    transition: border-color .2s ease, box-shadow .2s ease;
}

.scanner-field select {
    appearance: none;
    padding-right: 2.6rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2391a4ba' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right .9rem center;
}

.scanner-field select option {
    background: var(--surface);
    color: var(--text);
}

.scanner-field input:focus,
.scanner-field select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(66, 211, 255, .1);
}

.scanner-field.has-error input,
.scanner-field.has-error select { border-color: #ff7189; }
.field-help { color: var(--muted); font-size: .77rem; line-height: 1.45; }
.field-error { color: #ff9caf; font-size: .8rem; line-height: 1.45; }
.scanner-error { margin: 1.2rem 0 0; }

.scan-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .65rem;
}

.scan-button svg {
    width: 19px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-width: 2;
}

.scanner-form.is-submitting {
    pointer-events: none;
    opacity: .68;
    transition: opacity .18s ease;
}

.primary-button:disabled {
    cursor: wait;
    opacity: .86;
    transform: none;
}

.button-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(3, 20, 29, .28);
    border-top-color: #03141d;
    border-radius: 50%;
    animation: execution-spin .7s linear infinite;
}

.authorization-note {
    display: flex;
    gap: .75rem;
    align-items: flex-start;
    margin-top: 1.4rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(145, 164, 186, .14);
}

.authorization-note svg {
    width: 19px;
    flex: 0 0 auto;
    fill: none;
    stroke: var(--success);
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.authorization-note p {
    margin: 0;
    color: var(--muted);
    font-size: .77rem;
    line-height: 1.55;
}

.results-empty {
    min-height: 480px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
}

.results-panel.is-executing {
    border-color: rgba(66, 211, 255, .38);
    box-shadow: 0 0 0 1px rgba(66, 211, 255, .08), 0 18px 42px rgba(0, 0, 0, .2);
}

.execution-loader {
    min-height: 480px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
}

.execution-loader h2 {
    margin: .45rem 0 .4rem;
    font-size: 1.35rem;
    letter-spacing: -.025em;
}

.execution-loader p {
    max-width: 450px;
    margin: 0;
    color: var(--muted);
    font-size: .9rem;
    line-height: 1.55;
}

.execution-orbit {
    width: 92px;
    height: 92px;
    position: relative;
    margin-bottom: 1.25rem;
    border: 1px solid rgba(66, 211, 255, .17);
    border-radius: 50%;
    animation: execution-spin 2.4s linear infinite;
}

.execution-orbit::before,
.execution-orbit::after {
    content: "";
    position: absolute;
    border: 1px solid rgba(66, 211, 255, .12);
    border-radius: 50%;
}

.execution-orbit::before { inset: 15px; }
.execution-orbit::after { inset: 31px; }

.execution-orbit span {
    width: 9px;
    height: 9px;
    position: absolute;
    z-index: 1;
    border: 2px solid var(--primary);
    border-radius: 50%;
    background: var(--surface);
    box-shadow: 0 0 12px rgba(66, 211, 255, .65);
}

.execution-orbit span:first-child { top: -4px; left: calc(50% - 4px); }
.execution-orbit span:nth-child(2) { top: 51%; right: -4px; }
.execution-orbit span:last-child {
    bottom: 5px;
    left: 10px;
    border-color: var(--success);
    box-shadow: 0 0 12px rgba(85, 230, 165, .6);
}

.execution-progress {
    width: min(290px, 80%);
    height: 4px;
    overflow: hidden;
    margin: 1.35rem 0 .75rem;
    border-radius: 99px;
    background: rgba(145, 164, 186, .12);
}

.execution-progress span {
    width: 42%;
    height: 100%;
    display: block;
    border-radius: inherit;
    background: linear-gradient(90deg, transparent, var(--primary), var(--success));
    animation: execution-progress 1.25s ease-in-out infinite;
}

.execution-elapsed {
    color: var(--muted);
    font-size: .76rem;
    font-variant-numeric: tabular-nums;
}

.results-error .panel-step { color: #ff8ca0; }

.error-visual {
    width: 66px;
    height: 66px;
    display: grid;
    place-items: center;
    margin-bottom: 1.15rem;
    border: 1px solid rgba(255, 140, 160, .28);
    border-radius: 18px;
    background: rgba(255, 140, 160, .07);
    color: #ff8ca0;
}

.error-visual svg {
    width: 32px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
}

.error-hint {
    margin-top: 1rem;
    color: #71879e;
    font-size: .74rem;
}

@keyframes execution-spin {
    to { transform: rotate(360deg); }
}

@keyframes execution-progress {
    from { transform: translateX(-110%); }
    to { transform: translateX(240%); }
}

.radar {
    width: 96px;
    height: 96px;
    position: relative;
    margin-bottom: 1.25rem;
    border: 1px solid rgba(66, 211, 255, .2);
    border-radius: 50%;
    background:
        linear-gradient(90deg, transparent 49.5%, rgba(66, 211, 255, .13) 50%, transparent 50.5%),
        linear-gradient(transparent 49.5%, rgba(66, 211, 255, .13) 50%, transparent 50.5%);
    box-shadow: inset 0 0 35px rgba(66, 211, 255, .05), 0 0 35px rgba(66, 211, 255, .04);
}

.radar::before,
.radar::after {
    content: "";
    position: absolute;
    border: 1px solid rgba(66, 211, 255, .13);
    border-radius: 50%;
}
.radar::before { inset: 25%; }
.radar::after { inset: 8%; }
.radar span {
    width: 7px;
    height: 7px;
    position: absolute;
    top: 28px;
    right: 25px;
    z-index: 2;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 12px var(--success);
}

.results-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.35rem 1rem;
}

.scan-complete {
    padding: .38rem .65rem;
    border: 1px solid rgba(85, 230, 165, .25);
    border-radius: 99px;
    background: rgba(85, 230, 165, .07);
    color: var(--success);
    font-size: .7rem;
    font-weight: 750;
    text-transform: uppercase;
}

.result-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    margin: 0 1.35rem 1rem;
    border: 1px solid rgba(145, 164, 186, .13);
    border-radius: 12px;
    background: rgba(7, 17, 31, .35);
}

.result-summary div { padding: .72rem .85rem; border-right: 1px solid rgba(145, 164, 186, .13); }
.result-summary div:last-child { border-right: 0; }
.result-summary strong { display: block; margin-bottom: .2rem; font-size: 1.15rem; }
.result-summary span { color: var(--muted); font-size: .7rem; text-transform: uppercase; }
.result-summary .summary-open { color: var(--success); }

.result-table-wrap {
    max-height: 330px;
    overflow: auto;
    border-top: 1px solid rgba(145, 164, 186, .13);
}

.result-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.result-table th,
.result-table td { padding: .85rem 1rem; border-bottom: 1px solid rgba(145, 164, 186, .1); text-align: left; }
.result-table th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #0e1c2e;
    color: var(--muted);
    font-size: .7rem;
    font-weight: 750;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.result-table td { color: #cbd8e5; }
.result-table td:first-child strong { color: var(--text); }
.result-table td:first-child span { margin-left: .2rem; color: var(--muted); font-size: .68rem; }

.port-status {
    display: inline-flex;
    align-items: center;
    gap: .42rem;
    font-size: .78rem;
    font-weight: 700;
}
.port-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.port-status-open { color: var(--success); }
.port-status-closed { color: #91a4ba; }
.port-status-timeout { color: #ffbd69; }
.port-status-error { color: #ff8ca0; }

.scan-incomplete {
    border-color: rgba(255, 189, 105, .3);
    background: rgba(255, 189, 105, .08);
    color: #ffbd69;
}

.trace-summary { grid-template-columns: repeat(3, 1fr); }
.hop-address { font-variant-numeric: tabular-nums; }

.hop-attempts {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
}

.hop-attempts span {
    min-width: 42px;
    padding: .18rem .38rem;
    border: 1px solid rgba(145, 164, 186, .14);
    border-radius: 6px;
    background: rgba(7, 17, 31, .35);
    color: #b8c8d9;
    font-size: .72rem;
    text-align: center;
}

.hop-status {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .76rem;
    font-weight: 700;
}

.hop-status::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.hop-status-reached { color: var(--success); }
.hop-status-responding { color: var(--primary); }
.hop-status-timeout { color: #ffbd69; }

.route-preview {
    width: 150px;
    height: 72px;
    position: relative;
    margin-bottom: 1.35rem;
}

.route-preview::before {
    content: "";
    position: absolute;
    inset: 35px 18px auto;
    height: 1px;
    background: linear-gradient(90deg, rgba(66, 211, 255, .25), var(--primary), rgba(85, 230, 165, .3));
}

.route-preview span {
    width: 13px;
    height: 13px;
    position: absolute;
    top: 29px;
    z-index: 1;
    border: 3px solid var(--primary);
    border-radius: 50%;
    background: var(--surface);
    box-shadow: 0 0 14px rgba(66, 211, 255, .35);
}

.route-preview span:first-child { left: 12px; }
.route-preview span:nth-child(2) { left: calc(50% - 6px); }
.route-preview span:last-child {
    right: 12px;
    border-color: var(--success);
    box-shadow: 0 0 14px rgba(85, 230, 165, .35);
}

.dns-preview {
    width: 104px;
    height: 104px;
    position: relative;
    margin-bottom: 1.35rem;
    border: 1px solid rgba(66, 211, 255, .2);
    border-radius: 50%;
    background:
        linear-gradient(90deg, transparent 49.5%, rgba(66, 211, 255, .12) 50%, transparent 50.5%),
        linear-gradient(transparent 49.5%, rgba(66, 211, 255, .12) 50%, transparent 50.5%);
    box-shadow: inset 0 0 28px rgba(66, 211, 255, .04);
}

.dns-preview::before,
.dns-preview::after {
    content: "";
    position: absolute;
    border: 1px solid rgba(66, 211, 255, .16);
    border-radius: 50%;
}

.dns-preview::before { inset: 0 31px; }
.dns-preview::after { inset: 31px 0; }

.dns-preview span {
    width: 7px;
    height: 7px;
    position: absolute;
    z-index: 1;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 10px var(--primary);
}

.dns-preview span:first-child { top: 17px; left: 31px; }
.dns-preview span:nth-child(2) { top: 48px; right: 12px; }
.dns-preview span:last-child { bottom: 16px; left: 42px; background: var(--success); }

.dns-type {
    display: inline-block;
    min-width: 48px;
    padding: .22rem .45rem;
    border: 1px solid rgba(66, 211, 255, .22);
    border-radius: 6px;
    background: rgba(66, 211, 255, .07);
    color: var(--primary);
    font-size: .72rem;
    font-weight: 800;
    text-align: center;
}

.dns-value {
    max-width: 430px;
    overflow-wrap: anywhere;
    font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
    font-size: .78rem;
}

.inline-empty {
    display: grid;
    place-items: center;
    min-height: 245px;
    padding: 2rem;
    text-align: center;
}

.inline-empty h3 { margin: 0 0 .45rem; font-size: 1.05rem; }
.inline-empty p { margin: 0; color: var(--muted); font-size: .86rem; }

.scan-offline {
    border-color: rgba(255, 140, 160, .3);
    background: rgba(255, 140, 160, .08);
    color: #ff8ca0;
}

.latency-stats {
    display: flex;
    flex-wrap: wrap;
    gap: .65rem 1.4rem;
    padding: 0 1.35rem 1rem;
    color: var(--muted);
    font-size: .76rem;
}

.latency-stats strong {
    margin-left: .25rem;
    color: #dbe7f3;
    font-weight: 700;
}

.ping-latency {
    display: inline-block;
    min-width: 52px;
    padding: .2rem .42rem;
    border: 1px solid rgba(85, 230, 165, .2);
    border-radius: 6px;
    background: rgba(85, 230, 165, .06);
    color: var(--success);
    font-size: .74rem;
    font-weight: 700;
    text-align: center;
}

.ping-preview {
    width: 150px;
    height: 72px;
    position: relative;
    margin-bottom: 1.35rem;
}

.ping-preview::before {
    content: "";
    position: absolute;
    top: 35px;
    left: 4px;
    width: 142px;
    height: 2px;
    background: linear-gradient(
        90deg,
        transparent 0 9%,
        rgba(66, 211, 255, .25) 9% 21%,
        transparent 21% 29%,
        var(--primary) 29% 35%,
        transparent 35% 43%,
        var(--primary) 43% 55%,
        transparent 55% 63%,
        rgba(66, 211, 255, .3) 63% 76%,
        transparent 76%
    );
    filter: drop-shadow(0 0 5px rgba(66, 211, 255, .5));
}

.ping-preview span {
    width: 9px;
    height: 9px;
    position: absolute;
    top: 31px;
    right: 3px;
    border: 2px solid var(--success);
    border-radius: 50%;
    box-shadow: 0 0 12px rgba(85, 230, 165, .55);
}

.login-page { background: var(--bg); }

.login-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(420px, 1.05fr) minmax(420px, .95fr);
}

.login-intro,
.login-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-intro {
    overflow: hidden;
    padding: clamp(3rem, 7vw, 7rem);
    border-right: 1px solid var(--border);
    background:
        radial-gradient(circle at 20% 20%, rgba(66, 211, 255, .13), transparent 28rem),
        linear-gradient(145deg, #0d1b2e, #07111f 70%);
}

.login-intro .brand { position: absolute; top: 3rem; left: clamp(3rem, 7vw, 7rem); }
.brand-large { font-size: 1.5rem; }
.login-intro h1 { max-width: 620px; margin-top: .75rem; }
.network-decoration { position: absolute; inset: auto 6% -100px auto; width: 340px; height: 340px; border: 1px solid rgba(66, 211, 255, .08); border-radius: 50%; }
.network-decoration::before,
.network-decoration::after { content: ""; position: absolute; inset: 50%; width: 460px; height: 1px; background: rgba(66, 211, 255, .09); transform: translate(-50%, -50%) rotate(35deg); }
.network-decoration::after { transform: translate(-50%, -50%) rotate(-35deg); }

.login-panel { align-items: center; padding: 2.5rem; }
.login-card { width: min(430px, 100%); }
.login-card h2 { margin: .55rem 0 .4rem; font-size: 2rem; letter-spacing: -.04em; }
.login-help { margin: 0 0 1.5rem; color: var(--muted); line-height: 1.55; }
.mobile-brand { display: none; }

.form-error {
    margin-bottom: 1.25rem;
    padding: .85rem 1rem;
    border: 1px solid rgba(255, 107, 130, .35);
    border-radius: 10px;
    background: rgba(255, 107, 130, .08);
    color: #ffb5c1;
    font-size: .88rem;
    line-height: 1.45;
}

.login-form { display: grid; gap: 1rem; }
.field-group { display: grid; gap: .5rem; }
.field-group label { color: #dbe6f2; font-size: .88rem; font-weight: 650; }
.field-group input {
    width: 100%;
    min-height: 50px;
    padding: 0 .9rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    outline: none;
    background: var(--surface);
    color: var(--text);
    transition: border-color .2s ease, box-shadow .2s ease;
}
.field-group input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(66, 211, 255, .1); }

.primary-button {
    min-height: 50px;
    margin-top: .45rem;
    border: 0;
    border-radius: 10px;
    background: var(--primary);
    color: #03141d;
    cursor: pointer;
    font-weight: 800;
    transition: background .2s ease, transform .2s ease;
}
.primary-button:hover { background: #70ddff; transform: translateY(-1px); }

@media (max-width: 940px) {
    .tool-grid { grid-template-columns: repeat(2, 1fr); }
    .connection-graphic { width: 190px; }
    .scanner-layout { grid-template-columns: 1fr; }
    .scanner-panel, .results-panel { min-height: auto; }
    .results-empty { min-height: 420px; }
    .execution-loader { min-height: 420px; }
    .login-layout { grid-template-columns: 1fr; }
    .login-intro { display: none; }
    .mobile-brand { display: block; margin-bottom: 3rem; }
}

@media (max-width: 640px) {
    .header-inner, .main-content { width: min(100% - 1.5rem, 1180px); }
    .header-inner { min-height: 66px; }
    .user-name, .admin-link { display: none; }
    .header-actions { gap: .7rem; }
    .main-content { padding-top: 1.5rem; }
    .hero { min-height: auto; padding: 2rem 1.4rem; border-radius: 18px; }
    .hero h1 { font-size: 2.35rem; }
    .connection-graphic { display: none; }
    .tools-section { margin-top: 2.5rem; }
    .section-heading { align-items: start; }
    .tool-count { display: none; }
    .tool-grid { grid-template-columns: 1fr; }
    .tool-card { min-height: 0; padding: 1rem; }
    .tool-page-header { align-items: flex-start; }
    .tool-page-icon { width: 56px; height: 56px; border-radius: 15px; }
    .tool-page-icon svg { width: 28px; }
    .scanner-panel { padding: 1.25rem; }
    .result-summary { grid-template-columns: repeat(2, 1fr); margin-inline: 1.2rem; }
    .result-summary div:nth-child(2) { border-right: 0; }
    .result-summary div:nth-child(-n+2) { border-bottom: 1px solid rgba(145, 164, 186, .13); }
    .results-heading { padding-inline: 1.2rem; }
    .result-table th, .result-table td { padding-inline: .75rem; }
    .login-panel { padding: 1.5rem; }
}
