
* {
    box-sizing: border-box;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

input, textarea, select, [contenteditable="true"] {
    -webkit-user-select: text !important;
    user-select: text !important;
}

:root {
    color-scheme: dark;
    --bg: #070912;
    --panel: rgba(18, 24, 40, 0.72);
    --panel-solid: #121828;
    --line: rgba(176,190,230,.14);
    --text: #f4f6ff;
    --muted: #8b95b0;
    --purple: #a98aff;
    --purple-2: #7c5cff;
    --green: #3dffa8;
    --red: #ff5d7a;
    --cyan: #5ce1ff;
    --card-glow: 0 8px 32px rgba(0,0,0,.35);
    --radius: 18px;
}

html, body {
    width: 100%;
    height: 100%;
    min-width: 380px;
    min-height: 640px;
    margin: 0;
    padding: 0;
    overflow: hidden !important;
}

body {
    font-family: Inter, "Segoe UI", system-ui, Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    position: relative;
}

/* ===== HONEYCOMB BACKGROUND ===== */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 80% 50% at 15% -10%, rgba(124, 92, 255, 0.22), transparent 55%),
        radial-gradient(ellipse 70% 45% at 95% 100%, rgba(20, 140, 180, 0.14), transparent 50%),
        radial-gradient(ellipse 50% 40% at 50% 50%, rgba(80, 60, 160, 0.06), transparent 60%),
        var(--bg);
}

body::after {
    content: "";
    position: fixed;
    inset: -20%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.18;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='100' viewBox='0 0 28 50'%3E%3Cpath fill='none' stroke='%23a98aff' stroke-width='0.6' d='M14 0v10l8.66 5v10L14 30l-8.66-5V15L14 10zM14 30v10'/%3E%3C/svg%3E");
    background-size: 56px 100px;
    animation: honeycombDrift 48s linear infinite;
    filter: blur(0.2px);
}

@keyframes honeycombDrift {
    0%   { transform: translate(0, 0) rotate(0deg); }
    50%  { transform: translate(-28px, -50px) rotate(0.5deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}

/* floating soft orbs */
.app-shell::before,
.app-shell::after {
    content: "";
    position: fixed;
    border-radius: 50%;
    filter: blur(60px);
    pointer-events: none;
    z-index: 0;
    opacity: 0.35;
    animation: orbFloat 14s ease-in-out infinite alternate;
}

.app-shell::before {
    width: 280px;
    height: 280px;
    top: 8%;
    left: -80px;
    background: #7c5cff;
    animation-delay: 0s;
}

.app-shell::after {
    width: 220px;
    height: 220px;
    bottom: 5%;
    right: -60px;
    background: #1a9bb8;
    animation-delay: -4s;
}

@keyframes orbFloat {
    0%   { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, -40px) scale(1.12); }
}

button {
    font: inherit;
    outline: none;
}

/* TITLE BAR */

.titlebar {
    height: 40px;
    position: relative;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-left: 14px;
    background: #090b14;
    border-bottom: 1px solid var(--line);
    -webkit-app-region: drag;
    user-select: none;
}

.titlebar-brand {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #eeeaff;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 1.5px;
}

.titlebar-brand b {
    color: var(--purple);
}

.titlebar-mark {
    width: 23px;
    height: 23px;
    display: grid;
    place-items: center;
    border-radius: 7px;
    background: linear-gradient(140deg,#c2a7ff,#7045d7);
    box-shadow: 0 0 16px #9c72ff55;
}

.window-actions {
    height: 100%;
    display: flex;
    -webkit-app-region: no-drag;
}

.window-btn {
    width: 43px;
    height: 100%;
    border: 0;
    background: transparent;
    color: #abb3c7;
    font-size: 18px;
    cursor: pointer;
}

.window-btn:hover {
    background: #ffffff12;
    color: white;
}

.close-btn:hover {
    background: #e54860;
}

/* SINGLE PAGE */

.app-shell {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 760px;
    height: calc(100% - 40px);
    margin: 0 auto;
    padding: 10px 16px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    scrollbar-width: thin;
    scrollbar-color: rgba(169,138,255,.35) transparent;
}

/* HEADER */

.topbar {
    height: 47px;
    flex: 0 0 47px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 9px;
    border-bottom: 1px solid var(--line);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-mark {
    width: 35px;
    height: 35px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: linear-gradient(140deg,#b18cff,#6540c5);
    font-size: 19px;
    font-weight: 900;
    box-shadow: 0 5px 20px #8553e244;
}

.brand-name {
    font-size: 12px;
    font-weight: 950;
    letter-spacing: 1.5px;
}

.brand-name span {
    color: var(--purple);
}

.brand-caption {
    margin-top: 3px;
    color: #778198;
    font-size: 7px;
    letter-spacing: 1.5px;
}

.rig-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #141a28bb;
    max-width: 140px;
    min-width: 0;
    overflow: hidden;
}

.chip-icon {
    color: #c0a5ff;
    font-size: 19px;
    flex: 0 0 auto;
}

.rig-chip > div {
    min-width: 0;
    overflow: hidden;
}

.rig-chip small, .rig-chip strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.rig-chip small {
    color: #8791a8;
    font-size: 7px;
}

.rig-chip strong {
    margin-top: 2px;
    font-size: 10px;
    max-width: 10ch;
}

/* WELCOME */

.welcome {
    flex: 0 0 62px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.eyebrow {
    color: #ac8aff;
    font-size: 7px;
    font-weight: 900;
    letter-spacing: 1.5px;
}

h1 {
    margin: 4px 0;
    font-size: 23px;
    font-weight: 900;
    letter-spacing: -.8px;
}

.title-dot {
    color: var(--purple);
}

.welcome p {
    margin: 0;
    color: var(--muted);
    font-size: 9px;
}

.gpu-name {
    max-width: 150px;
    padding: 8px 10px;
    border: 1px solid #a98aff35;
    border-radius: 10px;
    background: #a98aff0c;
    color: #c9b8ff;
    font-size: 9px;
    font-weight: 900;
    text-align: center;
}

/* CONTROL */

.control-panel {
    min-height: 90px;
    flex: 0 0 90px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid rgba(169,138,255,.28);
    border-radius: 20px;
    background:
        radial-gradient(ellipse at 0% 50%, rgba(169,138,255,.2), transparent 60%),
        linear-gradient(120deg, rgba(40,30,70,.9), rgba(16,20,36,.95));
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 12px 40px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.05);
    overflow: hidden;
    position: relative;
}

.control-panel::before {
    content: "";
    position: absolute;
    width: 140px;
    height: 140px;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    background: rgba(169,138,255,.08);
    right: -30px;
    top: -40px;
    animation: morph 10s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes morph {
    0%   { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; transform: rotate(0deg); }
    100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; transform: rotate(12deg); }
}

.control-info {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.control-symbol {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: grid;
    place-items: center;
    border: 1px solid #b49aff36;
    border-radius: 12px;
    background: #a98aff1b;
    color: #d1bdff;
    font-weight: 900;
    font-size: 18px;
}

.control-info h2 {
    margin: 4px 0;
    font-size: 13px;
}

.control-info p {
    margin: 0;
    color: var(--muted);
    font-size: 8px;
}

.control-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 7px;
    flex: 0 0 auto;
}

.miner-state {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #a3adc2;
    font-size: 8px;
    font-weight: 900;
    letter-spacing: 1px;
}

#stateDot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #69748b;
}

.miner-state.running {
    color: var(--green);
}

.miner-state.running #stateDot {
    background: var(--green);
    box-shadow: 0 0 10px var(--green);
    animation: pulse 1.3s infinite;
}

.toggle-button {
    min-width: 150px;
    height: 40px;
    padding: 0 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 12px;
    background: linear-gradient(120deg, #b794ff, #6b45e0);
    color: white;
    font-size: 10px;
    font-weight: 950;
    letter-spacing: .8px;
    cursor: pointer;
    box-shadow: 0 6px 22px rgba(120,80,220,.4), inset 0 1px 0 rgba(255,255,255,.2);
    transition: transform .3s cubic-bezier(.22,1,.36,1), box-shadow .3s, filter .25s;
    position: relative;
    overflow: hidden;
}

.toggle-button::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.18), transparent);
    transform: translateX(-120%);
    transition: transform .6s;
}

.toggle-button:hover {
    filter: brightness(1.12);
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(120,80,220,.5), inset 0 1px 0 rgba(255,255,255,.25);
}

.toggle-button:hover::after {
    transform: translateX(120%);
}

.toggle-button:active {
    transform: scale(.97);
}

.toggle-button:disabled {
    opacity: .55;
    cursor: wait;
}

.toggle-button.running {
    background: linear-gradient(120deg, #ff7a90, #c43a5c);
    box-shadow: 0 6px 22px rgba(200,60,90,.4), inset 0 1px 0 rgba(255,255,255,.15);
}

/* HASHRATE */

.hash-grid {
    flex: 0 0 118px;
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 12px;
}

.hash-card {
    min-width: 0;
    position: relative;
    padding: 14px;
    border: 1px solid rgba(169,138,255,.18);
    border-radius: var(--radius);
    background: linear-gradient(145deg, rgba(28,34,55,.85), rgba(14,18,32,.9));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--card-glow), inset 0 1px 0 rgba(255,255,255,.04);
    overflow: hidden;
    transition: transform .35s cubic-bezier(.22,1,.36,1), border-color .3s, box-shadow .3s;
}

.hash-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 40%, rgba(169,138,255,.07) 50%, transparent 60%);
    background-size: 200% 100%;
    animation: sheen 6s ease-in-out infinite;
    pointer-events: none;
}

@keyframes sheen {
    0%, 100% { background-position: 100% 0; }
    50% { background-position: -100% 0; }
}

.hash-card:hover {
    border-color: rgba(169,138,255,.45);
    box-shadow: 0 10px 28px rgba(100,70,200,.18), inset 0 1px 0 rgba(255,255,255,.06);
}

.primary-hash {
    border-color: rgba(169,138,255,.35);
    background: linear-gradient(135deg, rgba(55,40,95,.9), rgba(18,22,40,.92));
}

.card-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
}

.card-label {
    color: #b4bdd1;
    font-size: 8px;
    font-weight: 900;
    letter-spacing: .8px;
}

.live-tag {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #8ce8b7;
    font-size: 7px;
    font-weight: 900;
}

.live-tag i, .live-indicator i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 8px var(--green);
    animation: pulse 1.4s infinite;
}

.gpu-tag {
    color: #c1aaff;
    font-size: 7px;
    font-weight: 900;
}

.hash-value {
    display: flex;
    align-items: baseline;
    gap: 7px;
    margin-top: 13px;
}

.hash-value strong {
    font-size: 30px;
    font-weight: 950;
    letter-spacing: -1px;
    font-variant-numeric: tabular-nums;
}

.hash-value span {
    color: #c2a9ff;
    font-size: 10px;
    font-weight: 800;
}

.card-foot {
    margin-top: 7px;
    color: #929db5;
    font-size: 8px;
}

.hash-decoration, .gpu-decoration {
    position: absolute;
    right: 7px;
    bottom: -18px;
    color: #ffffff09;
    font-size: 75px;
    pointer-events: none;
}

/* HARDWARE */

.section-block {
    min-height: 160px;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.section-heading {
    height: 35px;
    flex: 0 0 35px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section-heading h2 {
    margin: 3px 0 0;
    font-size: 13px;
    font-weight: 900;
}

.live-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #8ce8b7;
    font-size: 7px;
    font-weight: 900;
}

/* 2 TOP + 3 BOTTOM */

.stats-grid {
    flex: 1 1 auto;
    min-height: 200px;
    display: grid;
    grid-template-columns: repeat(6,minmax(0,1fr));
    grid-template-rows: minmax(72px, auto) minmax(120px, 1fr);
    gap: 9px;
    align-content: stretch;
}

.stats-grid > .stat-card:nth-child(1),
.stats-grid > .stat-card:nth-child(2) {
    grid-column: span 3;
}

.stats-grid > .stat-card:nth-child(n+3) {
    grid-column: span 2;
}

.stat-card {
    position: relative;
    min-width: 0;
    min-height: 64px;
    padding: 10px;
    border: 1px solid rgba(176,190,230,.12);
    border-radius: 16px;
    background: linear-gradient(160deg, rgba(22,28,46,.88), rgba(12,16,28,.92));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--card-glow), inset 0 1px 0 rgba(255,255,255,.03);
    overflow: hidden;
    transition: transform .35s cubic-bezier(.22,1,.36,1), border-color .3s, box-shadow .3s;
}

.stat-card.temp-gauge-card {
    overflow: visible;
    min-height: 130px;
}

.stat-card::after {
    content: "";
    position: absolute;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    top: -30px;
    right: -25px;
    background: radial-gradient(circle, rgba(169,138,255,.12), transparent 70%);
    pointer-events: none;
    transition: opacity .3s;
}

.stat-card:hover {
    border-color: rgba(169,138,255,.4);
    box-shadow: 0 10px 28px rgba(80,60,160,.16), inset 0 1px 0 rgba(255,255,255,.05);
}

.stat-card:hover::after {
    opacity: 1.4;
}

.stat-heading {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #a6b0c5;
    font-size: 8px;
    font-weight: 900;
    letter-spacing: .5px;
}

.stat-icon {
    width: 23px;
    height: 23px;
    display: grid;
    place-items: center;
    border-radius: 7px;
    font-size: 12px;
}

.accepted-icon {
    color: #67e7a9;
    background: #56e6a218;
}

.rejected-icon {
    color: #ff8295;
    background: #ff627c18;
}

.temp-icon {
    color: #ffbd73;
    background: #ffbd7318;
}

.power-icon {
    color: #72d9ff;
    background: #72d9ff18;
}

.fan-icon {
    color: #c1a1ff;
    background: #b18aff18;
}

.stat-card > strong {
    display: block;
    margin-top: 11px;
    font-size: 21px;
    font-weight: 950;
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
}

.stat-card > small {
    display: block;
    margin-top: 5px;
    color: #7e8aa3;
    font-size: 8px;
}

/* TEMPERATURE GAUGE GENERATED BY RENDERER */

.temp-gauge-card {
    border-color: #ffbd7330;
    background: linear-gradient(120deg,#211e27,#131824);
}

.temp-gauge-readout {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 4px;
    margin: 5px 0;
}

.temp-gauge-readout strong {
    font-size: 18px;
    font-weight: 950;
    color: #ffd08c;
}

.temp-gauge-readout span {
    color: #a7b4cb;
    font-size: 7px;
}

.temp-gauge {
    display: grid;
    grid-template-columns: repeat(18,minmax(0,1fr));
    gap: 2px;
    height: 13px;
    padding: 1px;
    border-radius: 4px;
    background: #080d16;
    overflow: hidden;
}

.temp-segment {
    min-width: 0;
    height: 100%;
    border-radius: 2px;
    background: #273142;
    opacity: .48;
    transition: .2s;
}

.temp-segment.filled {
    background: hsl(var(--segment-hue) 88% 53%);
    opacity: 1;
    box-shadow: 0 0 7px hsl(var(--segment-hue) 88% 53% / .32);
}

.temp-gauge-scale {
    display: flex;
    justify-content: space-between;
    margin-top: 4px;
    color: #7f8ba2;
    font-size: 6px;
}

.stat-card.temp-warning {
    border-color: #ffb34788;
}

.stat-card.temp-danger {
    border-color: #ff526d;
    animation: dangerGlow .8s infinite alternate;
}

/* REVENUE EXTRAS */

.lifetime-grid {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 8px;
}

.lifetime-card {
    min-width: 0;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #141b29;
}

.lifetime-card > strong {
    display: block;
    margin-top: 7px;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
}

.revenue-card {
    border-color: #56e6a233;
    background: linear-gradient(120deg,#14251f,#111a25);
}

.revenue-live {
    color: #83e7ad;
    font-size: 8px;
}

.revenue-live i {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--green);
    animation: pulse 1.2s infinite;
}

.revenue-values {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.revenue-value strong {
    display: block;
    margin-top: 4px;
    color: #7de5a7;
    font-size: 16px;
    font-variant-numeric: tabular-nums;
}

/* FOOTER */

footer {
    height: 24px;
    flex: 0 0 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-top: 1px solid #ffffff0b;
    color: #68738b;
    font-size: 7px;
    font-weight: 850;
    letter-spacing: 1px;
}

footer i {
    color: var(--purple);
    font-style: normal;
}

.footer-mark {
    width: 17px;
    height: 17px;
    display: grid;
    place-items: center;
    border-radius: 5px;
    background: #a98aff22;
    color: #c3aaff;
}

/* TOAST */

.toast {
    position: fixed;
    z-index: 999;
    left: 50%;
    bottom: 18px;
    max-width: calc(100% - 30px);
    padding: 11px 17px;
    border: 1px solid #a98aff55;
    border-radius: 12px;
    background: #19172aee;
    color: white;
    font-size: 11px;
    box-shadow: 0 10px 35px #0008;
    opacity: 0;
    transform: translate(-50%,15px);
    pointer-events: none;
    transition: .3s;
}

.toast.show {
    opacity: 1;
    transform: translate(-50%,0);
}

/* DIALOGS */

.kimo-dialog-backdrop {
    position: fixed;
    z-index: 500;
    inset: 40px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    background: #05060bd9;
    backdrop-filter: blur(12px);
}

.kimo-dialog {
    width: 100%;
    max-width: 430px;
    max-height: calc(100% - 20px);
    overflow-y: auto;
    padding: 20px;
    border: 1px solid #a98aff44;
    border-radius: 18px;
    background: linear-gradient(145deg,#1c2032,#101522);
    box-shadow: 0 25px 80px #0009;
}

.kimo-dialog input,
.kimo-dialog textarea,
.kimo-dialog select {
    -webkit-user-select: text !important;
    user-select: text !important;
}

/* ANIMATIONS */

@keyframes pulse {
    50% {
        opacity: .4;
        transform: scale(.8);
    }
}

@keyframes dangerGlow {
    from { box-shadow: 0 0 5px #ff526d20; }
    to { box-shadow: 0 0 20px #ff526d55; }
}

/* SMALL HEIGHT SAFETY */

@media (max-height: 820px) {
    .app-shell {
        padding-top: 8px;
        padding-bottom: 5px;
        gap: 7px;
    }

    .welcome {
        flex-basis: 55px;
    }

    h1 {
        font-size: 20px;
    }

    .control-panel {
        flex-basis: 76px;
        min-height: 76px;
        padding: 8px 12px;
    }

    .hash-grid {
        flex-basis: 95px;
    }

    .stat-card {
        padding: 8px;
    }

    .stat-card > strong {
        margin-top: 6px;
        font-size: 17px;
    }

    .section-block {
        gap: 5px;
    }
}

@media (max-width: 480px) {
    .app-shell {
        padding-left: 12px;
        padding-right: 12px;
    }

    .toggle-button {
        min-width: 125px;
        font-size: 8px;
    }

    .stat-heading {
        font-size: 7px;
    }

    .stat-card {
        padding: 7px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}


/* ===== MODERN EXTRAS ===== */

.stat-card > strong,
.hash-value strong {
    transition: color .3s, text-shadow .3s;
}

.stat-card:hover > strong {
    text-shadow: 0 0 20px rgba(169,138,255,.35);
}

/* subtle entrance */
.hash-card,
.stat-card,
.control-panel {
    animation: cardIn .45s cubic-bezier(.22,1,.36,1) both;
    animation-fill-mode: backwards;
}

.hash-card:nth-child(1) { animation-delay: .05s; }
.hash-card:nth-child(2) { animation-delay: .12s; }
.stat-card:nth-child(1) { animation-delay: .15s; }
.stat-card:nth-child(2) { animation-delay: .2s; }
.stat-card:nth-child(3) { animation-delay: .25s; }
.stat-card:nth-child(4) { animation-delay: .3s; }
.stat-card:nth-child(5) { animation-delay: .35s; }

@keyframes cardIn {
    from {
        opacity: 0;
        transform: translateY(14px) scale(.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* better pulse */
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: .55; transform: scale(1.25); }
}

/* titlebar glass */
.titlebar {
    background: rgba(9, 11, 20, 0.85) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* footer soft */
footer {
    opacity: 0.75;
}

/* Responsive refinements */
@media (max-width: 640px) {
    .app-shell {
        padding: 10px 14px 8px;
        gap: 10px;
    }

    .hash-value strong {
        font-size: 24px !important;
    }

    .welcome {
        flex-wrap: wrap;
    }

    .gpu-name {
        max-width: 100%;
    }
}

@media (max-width: 420px) {
    html, body {
        min-width: 360px;
    }

    .hash-grid {
        grid-template-columns: 1fr;
        flex-basis: auto;
        height: auto;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        grid-template-rows: auto !important;
    }

    .stats-grid > .stat-card:nth-child(1),
    .stats-grid > .stat-card:nth-child(2),
    .stats-grid > .stat-card:nth-child(n+3) {
        grid-column: span 1 !important;
    }

    .control-panel {
        flex-direction: column;
        align-items: stretch;
        height: auto;
        min-height: auto;
        flex-basis: auto;
        gap: 12px;
    }

    .control-right {
        align-items: stretch;
        width: 100%;
    }

    .toggle-button {
        width: 100%;
        min-width: 0;
    }
}


/* ===== FERRARI-STYLE TACHO ===== */
.temp-gauge-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    overflow: visible !important;
    min-height: 130px !important;
}

.tacho-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 2px;
    flex: 1 1 auto;
    min-height: 96px;
    overflow: visible;
}

.tacho {
    position: relative;
    width: 100px;
    height: 100px;
    flex: 0 0 auto;
    overflow: visible;
}

.tacho-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
    display: block;
    filter: drop-shadow(0 0 8px rgba(255, 180, 80, 0.25));
}

.tacho-track {
    stroke: rgba(255,255,255,0.08);
}

.tacho-fill {
    transition: stroke-dashoffset 0.35s cubic-bezier(.22,1,.36,1), stroke 0.35s ease;
}

.tacho-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.tacho-center strong {
    font-size: 16px;
    font-weight: 950;
    letter-spacing: -0.5px;
    color: #ffe0a8;
    line-height: 1;
    margin: 0;
}

.tacho-center span {
    margin-top: 3px;
    font-size: 8px;
    font-weight: 800;
    color: #9aa3bb;
    letter-spacing: 0.5px;
}

.stat-card.temp-warning .tacho-center strong {
    color: #ffb86b;
    text-shadow: 0 0 12px rgba(255,150,50,.4);
}

.stat-card.temp-danger .tacho-center strong {
    color: #ff5d7a;
    text-shadow: 0 0 14px rgba(255,60,90,.5);
    animation: pulse 1.2s infinite;
}

/* ===== RESET CHIPS ===== */
.lifetime-label {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.reset-chip {
    margin-left: auto;
    padding: 3px 8px;
    border: 1px solid rgba(169,138,255,.3);
    border-radius: 999px;
    background: rgba(169,138,255,.1);
    color: #c9b8ff;
    font-size: 8px;
    font-weight: 900;
    letter-spacing: 0.6px;
    cursor: pointer;
    transition: .25s;
}

.reset-chip:hover {
    background: rgba(169,138,255,.25);
    border-color: rgba(169,138,255,.55);
    color: #fff;
    box-shadow: 0 0 12px rgba(140,100,255,.25);
    transform: translateY(-1px);
}

.reset-chip:active {
    transform: scale(.96);
}

/* ===== WINDOW BUTTONS ===== */
.window-btn {
    position: relative;
    overflow: hidden;
    transition: background .25s, color .25s, transform .2s;
}

.window-btn::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(255,255,255,.2), transparent 70%);
    opacity: 0;
    transition: opacity .25s;
}

.window-btn:hover::after {
    opacity: 1;
}

.window-btn:active {
    transform: scale(0.92);
}

.close-btn:hover {
    background: #e54860 !important;
    color: #fff !important;
    box-shadow: 0 0 18px rgba(229,72,96,.45);
}

/* ===== SCHEDULE FIELDS ===== */
.schedule-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 8px 0 4px;
    transition: opacity .25s;
}

.schedule-fields.disabled {
    opacity: .4;
    pointer-events: none;
}

.schedule-field label {
    display: block;
    margin-bottom: 4px;
    font-size: 10px;
    color: #9aa3bb;
}

.schedule-field input {
    width: 100%;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid rgba(176,190,230,.15);
    background: rgba(10,14,24,.8);
    color: #f0f3ff;
    font-size: 13px;
    font-weight: 700;
}

.schedule-field input:focus {
    outline: none;
    border-color: rgba(169,138,255,.5);
    box-shadow: 0 0 0 3px rgba(169,138,255,.15);
}


/* ===== NETWORK PING / ANTENNA ===== */
.net-ping-chip {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 5px 9px;
    border-radius: 10px;
    border: 1px solid rgba(176,190,230,.14);
    background: rgba(16, 22, 36, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: border-color .3s, box-shadow .3s;
}

.net-ping-chip #netPingMs {
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.3px;
    color: #c5cee6;
    min-width: 42px;
    font-variant-numeric: tabular-nums;
}

.ant-bars {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 14px;
}

.ant-bar {
    display: block;
    width: 3px;
    border-radius: 1px;
    background: rgba(255,255,255,.15);
    transition: background .3s, box-shadow .3s;
}

.ant-bar:nth-child(1) { height: 4px; }
.ant-bar:nth-child(2) { height: 7px; }
.ant-bar:nth-child(3) { height: 10px; }
.ant-bar:nth-child(4) { height: 13px; }

.ant-bar.on {
    background: #7ee0b0;
    box-shadow: 0 0 6px rgba(86,230,162,.45);
}

.net-ping-chip.ping-good .ant-bar.on {
    background: #3dffa8;
}

.net-ping-chip.ping-ok .ant-bar.on {
    background: #ffc857;
    box-shadow: 0 0 6px rgba(255,200,87,.4);
}

.net-ping-chip.ping-bad .ant-bar.on {
    background: #ff5d7a;
    box-shadow: 0 0 6px rgba(255,93,122,.4);
}

.net-ping-chip.ping-good #netPingMs { color: #8dffc4; }
.net-ping-chip.ping-ok #netPingMs { color: #ffd98a; }
.net-ping-chip.ping-bad #netPingMs { color: #ff8fa3; }


/* ===== ANALYSIS / SMART HOURS ===== */
.top-icon-btn.smart-active {
    color: #3dffa8;
    box-shadow: 0 0 12px rgba(61,255,168,.35);
}

.toggle-button.locked-by-smart {
    opacity: 0.45;
    cursor: not-allowed;
    filter: grayscale(0.4);
}

.analysis-dialog {
    max-width: 520px;
    width: min(520px, 94vw);
}

.analysis-intro {
    margin: 0 0 12px;
    color: #9aa3bb;
    font-size: 11px;
    line-height: 1.5;
}

.analysis-chart {
    display: grid;
    grid-template-columns: repeat(24, minmax(0, 1fr));
    gap: 3px;
    align-items: end;
    height: 140px;
    padding: 12px 8px 4px;
    border-radius: 14px;
    border: 1px solid rgba(169,138,255,.18);
    background: linear-gradient(180deg, rgba(20,26,42,.9), rgba(10,14,24,.95));
    margin-bottom: 12px;
}

.ah-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    min-width: 0;
}

.ah-bar-wrap {
    flex: 1;
    width: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.ah-bar {
    width: 70%;
    min-height: 3px;
    border-radius: 3px 3px 1px 1px;
    background: linear-gradient(180deg, #7b8db5, #4a5675);
    transition: height .4s cubic-bezier(.22,1,.36,1), background .3s;
}

.ah-col.best .ah-bar {
    background: linear-gradient(180deg, #6dffa8, #2bcf7a);
    box-shadow: 0 0 8px rgba(61,255,168,.35);
}

.ah-col.now .ah-bar {
    outline: 1px solid rgba(255,255,255,.5);
}

.ah-col.empty .ah-bar {
    background: rgba(255,255,255,.06);
}

.ah-label {
    margin-top: 4px;
    font-size: 7px;
    font-weight: 800;
    color: #6f7a94;
}

.ah-col.best .ah-label {
    color: #8dffc4;
}

.ah-col.now .ah-label {
    color: #fff;
}

.analysis-meta {
    display: grid;
    gap: 4px;
    margin-bottom: 12px;
    font-size: 11px;
    color: #b0bad4;
}

.analysis-meta b {
    color: #e8eeff;
    font-weight: 800;
}

.smart-hours-box {
    padding: 12px;
    border-radius: 12px;
    border: 1px solid rgba(61,255,168,.2);
    background: rgba(61,255,168,.05);
    margin-bottom: 10px;
}


/* AI Analysis button */
.ai-analysis-btn {
    min-width: 34px;
    font-size: 9px !important;
    font-weight: 950 !important;
    letter-spacing: 0.5px;
}

.ai-analysis-btn .ai-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 5px;
    border-radius: 6px;
    background: linear-gradient(135deg, #7c5cff, #3dffa8);
    color: #0a0e18;
    font-size: 9px;
    font-weight: 950;
    box-shadow: 0 0 10px rgba(124,92,255,.35);
}

.ai-analysis-btn.smart-active .ai-icon {
    background: linear-gradient(135deg, #3dffa8, #5ce1ff);
    box-shadow: 0 0 12px rgba(61,255,168,.45);
}

.schedule-fields {
    grid-template-columns: 1fr 1fr 1fr !important;
}

.schedule-field select {
    width: 100%;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid rgba(176,190,230,.15);
    background: rgba(10,14,24,.8);
    color: #f0f3ff;
    font-size: 12px;
    font-weight: 700;
}


/* ===== TEMP ALERT BANNER ===== */
.temp-alert-banner {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 72px;
    background: rgba(0,0,0,.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s;
}

.temp-alert-banner.open {
    opacity: 1;
    pointer-events: auto;
}

.temp-alert-card {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: min(420px, 92vw);
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid rgba(255,93,122,.45);
    background: linear-gradient(135deg, rgba(60,18,28,.96), rgba(20,12,24,.98));
    box-shadow: 0 16px 50px rgba(255,60,90,.25), 0 0 0 1px rgba(255,255,255,.04);
    animation: alertIn .4s cubic-bezier(.22,1,.36,1);
}

@keyframes alertIn {
    from { transform: translateY(-18px) scale(.96); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

.temp-alert-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: rgba(255,93,122,.18);
    color: #ff7a90;
    font-size: 22px;
    animation: pulse 1s infinite;
}

.temp-alert-text {
    flex: 1;
    min-width: 0;
}

.temp-alert-text strong {
    display: block;
    font-size: 12px;
    font-weight: 950;
    letter-spacing: 1px;
    color: #ffb3c0;
}

.temp-alert-text span {
    display: block;
    margin-top: 4px;
    font-size: 13px;
    font-weight: 700;
    color: #ffe8ec;
}

.temp-alert-stop {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 10px 14px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(120deg, #ff5d7a, #c43a5c);
    color: #fff;
    font-size: 11px;
    font-weight: 950;
    letter-spacing: 0.5px;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(255,60,90,.35);
    transition: transform .2s, filter .2s;
}

.temp-alert-stop small {
    font-size: 14px;
    font-weight: 950;
    color: #ffe0e6;
}

.temp-alert-stop:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.temp-alert-stop:active {
    transform: scale(.97);
}


/* ===== GPU HEALTH CHIP ===== */
.gpu-health-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 9px;
    border-radius: 10px;
    border: 1px solid rgba(176,190,230,.14);
    background: rgba(16, 22, 36, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: border-color .3s, box-shadow .3s;
}

.gpu-health-chip .health-icon {
    font-size: 12px;
    line-height: 1;
    color: #8b95b0;
    transition: color .3s, text-shadow .3s;
}

.gpu-health-chip strong {
    font-size: 11px;
    font-weight: 950;
    letter-spacing: 0.2px;
    color: #c5cee6;
    font-variant-numeric: tabular-nums;
    min-width: 32px;
}

.gpu-health-chip.h-good {
    border-color: rgba(61,255,168,.3);
}
.gpu-health-chip.h-good .health-icon {
    color: #3dffa8;
    text-shadow: 0 0 8px rgba(61,255,168,.55);
}
.gpu-health-chip.h-good strong { color: #8dffc4; }

.gpu-health-chip.h-ok {
    border-color: rgba(120,220,160,.25);
}
.gpu-health-chip.h-ok .health-icon {
    color: #6ddea0;
    text-shadow: 0 0 8px rgba(109,222,160,.4);
}
.gpu-health-chip.h-ok strong { color: #a8efc8; }

.gpu-health-chip.h-warm {
    border-color: rgba(255,200,87,.3);
}
.gpu-health-chip.h-warm .health-icon {
    color: #ffc857;
    text-shadow: 0 0 8px rgba(255,200,87,.45);
}
.gpu-health-chip.h-warm strong { color: #ffd98a; }

.gpu-health-chip.h-hot {
    border-color: rgba(255,122,69,.35);
}
.gpu-health-chip.h-hot .health-icon {
    color: #ff7a45;
    text-shadow: 0 0 8px rgba(255,122,69,.45);
}
.gpu-health-chip.h-hot strong { color: #ffb08a; }

.gpu-health-chip.h-crit {
    border-color: rgba(255,93,122,.4);
}
.gpu-health-chip.h-crit .health-icon {
    color: #ff5d7a;
    text-shadow: 0 0 10px rgba(255,93,122,.55);
    animation: pulse 1s infinite;
}
.gpu-health-chip.h-crit strong { color: #ff8fa3; }


.gpu-health-chip.h-analyzing .health-icon {
    color: #9ec5ff;
    text-shadow: 0 0 8px rgba(110,168,255,.4);
    animation: pulse 1.4s infinite;
}

.gpu-health-chip.h-analyzing strong {
    color: #9ec5ff;
    font-size: 9px;
    letter-spacing: 0.5px;
}


/* ===== THEMES ===== */
body[data-theme="purple"] {
    --purple: #a98aff;
    --purple-2: #7c5cff;
    --accent-soft: rgba(169,138,255,.18);
}
body[data-theme="cyan"] {
    --purple: #5ce1ff;
    --purple-2: #2bb8e8;
    --accent-soft: rgba(92,225,255,.16);
    --bg: #061016;
}
body[data-theme="gold"] {
    --purple: #ffc857;
    --purple-2: #e0a020;
    --accent-soft: rgba(255,200,87,.16);
    --bg: #120e06;
}

body[data-theme="cyan"] .brand-mark,
body[data-theme="cyan"] .titlebar-mark,
body[data-theme="gold"] .brand-mark,
body[data-theme="gold"] .titlebar-mark {
    background: linear-gradient(140deg, var(--purple), var(--purple-2));
}

body[data-theme="cyan"] .toggle-button:not(.running),
body[data-theme="gold"] .toggle-button:not(.running) {
    background: linear-gradient(120deg, var(--purple), var(--purple-2));
    box-shadow: 0 6px 22px color-mix(in srgb, var(--purple) 40%, transparent);
}

body[data-theme="cyan"] .control-panel,
body[data-theme="gold"] .control-panel {
    border-color: color-mix(in srgb, var(--purple) 35%, transparent);
    background:
        radial-gradient(ellipse at 0% 50%, var(--accent-soft), transparent 60%),
        linear-gradient(120deg, rgba(20,24,40,.92), rgba(12,16,28,.96));
}

body[data-theme="cyan"] .primary-hash,
body[data-theme="gold"] .primary-hash {
    border-color: color-mix(in srgb, var(--purple) 40%, transparent);
}

body[data-theme="cyan"] .hash-value span,
body[data-theme="gold"] .hash-value span,
body[data-theme="cyan"] .eyebrow,
body[data-theme="gold"] .eyebrow {
    color: var(--purple);
}

/* ===== INSIGHT PANEL ===== */
.insight-panel {
    flex: 0 0 auto;
    order: 0;
}

.insight-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
}

.insight-card {
    padding: 8px 10px;
    border-radius: 12px;
    border: 1px solid rgba(176,190,230,.12);
    background: linear-gradient(160deg, rgba(22,28,46,.88), rgba(12,16,28,.92));
    backdrop-filter: blur(10px);
    min-width: 0;
}

.insight-head {
    font-size: 9px;
    font-weight: 950;
    letter-spacing: 1px;
    color: #9aa3bb;
    margin-bottom: 8px;
}

.spark-row {
    display: flex;
    gap: 10px;
}

.spark-block {
    flex: 1;
    min-width: 0;
}

.spark-block span {
    display: block;
    font-size: 8px;
    font-weight: 800;
    color: #7e8aa3;
    margin-bottom: 4px;
}

.spark-block canvas {
    width: 100% !important;
    height: 42px !important;
    display: block;
    border-radius: 8px;
    background: rgba(0,0,0,.2);
}

.fan-suggest {
    margin-top: 8px;
    font-size: 10px;
    color: #b8c2dc;
}

.today-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.today-grid small {
    display: block;
    font-size: 8px;
    color: #7e8aa3;
}

.today-grid strong {
    font-size: 13px;
    font-weight: 950;
}

.net-profit-line {
    margin-top: 10px;
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.net-profit-line span {
    font-size: 9px;
    color: #8b95b0;
}

.net-profit-line strong {
    font-size: 16px;
    color: #8dffc4;
}

.net-profit-line small {
    font-size: 9px;
    color: #7e8aa3;
}

.event-log-list {
    max-height: 92px;
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.event-row {
    display: grid;
    grid-template-columns: 54px 62px 1fr;
    gap: 6px;
    font-size: 9px;
    color: #c5cee6;
}

.event-time { color: #7e8aa3; }
.event-type {
    color: var(--purple);
    font-weight: 800;
    text-transform: uppercase;
}
.event-msg { color: #b0bad4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.event-empty { font-size: 10px; color: #7e8aa3; }

.primary-hash.share-pulse {
    animation: sharePulse .65s ease;
}

@keyframes sharePulse {
    0% { box-shadow: 0 0 0 0 rgba(61,255,168,.0); }
    35% { box-shadow: 0 0 0 6px rgba(61,255,168,.25); border-color: rgba(61,255,168,.55); }
    100% { box-shadow: var(--card-glow); }
}

@media (max-width: 720px) {
    .insight-grid {
        grid-template-columns: 1fr;
    }
}


/* ===== ANIMATED HOVER BORDER (spin line) ===== */
@property --border-angle {
    syntax: "<angle>";
    initial-value: 0deg;
    inherits: false;
}

@keyframes borderSpin {
    to { --border-angle: 360deg; }
}

/* Dedicated overlay element via extra pseudo where free.
   Use box-shadow fallback ring + spinning conic on ::after when possible. */

.lifetime-card,
.rig-chip,
.gpu-name,
.net-ping-chip,
.gpu-health-chip {
    position: relative;
    isolation: isolate;
}

.lifetime-card::after,
.rig-chip::after,
.gpu-name::after,
.net-ping-chip::after,
.gpu-health-chip::after {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1.5px;
    background: conic-gradient(
        from var(--border-angle, 0deg),
        transparent 0 35%,
        var(--purple) 48%,
        #ffffff 52%,
        var(--purple-2, var(--purple)) 56%,
        transparent 65% 100%
    );
    -webkit-mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    mask-composite: exclude;
    opacity: 0;
    transition: opacity .25s ease;
    pointer-events: none;
    z-index: 5;
}

.lifetime-card:hover::after,
.rig-chip:hover::after,
.gpu-name:hover::after,
.net-ping-chip:hover::after,
.gpu-health-chip:hover::after {
    opacity: 1;
    animation: borderSpin 2s linear infinite;
}

/* cardRing removed — was causing flicker on mouse leave */


/* Spin border overlay element */
.hash-card,
.stat-card,
.lifetime-card,
.control-panel,
.rig-chip,
.gpu-name {
    position: relative;
    overflow: hidden;
}

.spin-border {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1.5px;
    pointer-events: none !important;
    z-index: 6;
    opacity: 0;
    transition: opacity .2s ease;
    will-change: opacity, transform;
    background: conic-gradient(
        from var(--border-angle, 0deg),
        transparent 0 38%,
        var(--purple) 48%,
        #ffffff 52%,
        var(--purple-2, var(--purple)) 56%,
        transparent 66% 100%
    );
    -webkit-mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    mask-composite: exclude;
}

.hash-card:hover > .spin-border,
.stat-card:hover > .spin-border,
.lifetime-card:hover > .spin-border,
.control-panel:hover > .spin-border,
.rig-chip:hover > .spin-border,
.gpu-name:hover > .spin-border {
    opacity: 1;
    animation: borderSpin 1.8s linear infinite;
}

/* ===== PERFORMANCE MODE — kill GPU-heavy UI while mining ===== */
body.performance-mode *,
body.performance-mode *::before,
body.performance-mode *::after {
    animation: none !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition: none !important;
    transition-duration: 0.001ms !important;
}

/* Background motion layers */
body.performance-mode::after,
body.performance-mode .app-shell::before,
body.performance-mode .app-shell::after {
    display: none !important;
    animation: none !important;
    opacity: 0 !important;
}

/* Particles + spinning borders */
body.performance-mode .hash-particle,
body.performance-mode .hash-flow-track,
body.performance-mode .spin-border {
    display: none !important;
    animation: none !important;
    opacity: 0 !important;
}

/* Expensive blur filters */
body.performance-mode .control-panel,
body.performance-mode .hash-card,
body.performance-mode .stat-card,
body.performance-mode .lifetime-card,
body.performance-mode .kimo-dialog,
body.performance-mode .topbar,
body.performance-mode .rig-chip {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    filter: none !important;
}

/* Sparkline canvases stay in layout but are not redrawn by JS */
body.performance-mode .spark-block canvas {
    opacity: 0.35;
}

/* Soften share pulse / glow so they don't composite every frame */
body.performance-mode .primary-hash.share-pulse,
body.performance-mode .revenue-live i {
    animation: none !important;
    box-shadow: none !important;
}

/* ===== Pool picker ===== */
.net-ping-chip {
    cursor: pointer;
    border: 1px solid #ffffff18;
    background: #151c2c;
}
.net-ping-chip:hover {
    border-color: #718aff88;
}

.pool-picker-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 420px;
    overflow: auto;
    margin: 10px 0 12px;
}

.pool-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    text-align: left;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid #ffffff14;
    background: #121826;
    color: #dbe4ff;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}
.pool-row:hover {
    border-color: #718aff66;
    background: #182033;
}
.pool-row.active {
    border-color: #36e58a88;
    box-shadow: inset 0 0 0 1px #36e58a33;
}
.pool-row.loading {
    justify-content: center;
    opacity: .7;
    cursor: default;
}
.pool-row-main {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.pool-row-main strong {
    font-size: 13px;
}
.pool-endpoint {
    font-size: 10px;
    opacity: .55;
    word-break: break-all;
}
.pool-row-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
}
.pool-fee {
    font-size: 10px;
    opacity: .55;
}
.pool-ping {
    font-size: 12px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    background: #ffffff10;
}
.pool-ping.ping-good { color: #3dff9a; background: #1a3d2c; }
.pool-ping.ping-ok { color: #ffd56a; background: #3d3420; }
.pool-ping.ping-bad { color: #ff9a5c; background: #3d2418; }
.pool-ping.ping-dead { color: #ff6b7a; background: #3a1520; }
.pool-row.ping-good { border-color: #36e58a33; }
.pool-row.ping-ok { border-color: #e0a02033; }
.pool-row.ping-bad { border-color: #ff9a5c33; }
.pool-row.ping-dead { border-color: #ff6b7a33; }

.pool-row {
    position: relative;
    padding-left: 36px;
}
.pool-selected-badge {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    color: #0b1a12;
    background: #36e58a;
    box-shadow: 0 0 0 3px #36e58a33;
}
.pool-row.active {
    border-color: #36e58a !important;
    background: #12261c !important;
    box-shadow: inset 0 0 0 1px #36e58a55, 0 0 18px #36e58a22;
}

body.rtl { direction: rtl; }
.pool-add-box {
  display: grid;
  grid-template-columns: 1fr 1.2fr 0.6fr auto;
  gap: 8px;
  margin: 10px 0 8px;
}
@media (max-width: 700px) {
  .pool-add-box { grid-template-columns: 1fr; }
}
.pool-add-box input {
  background: #0a101c;
  border: 1px solid #ffffff14;
  border-radius: 10px;
  color: #e8eefc;
  padding: 10px;
}
.pool-row-wrap {
  display: flex;
  gap: 6px;
  align-items: stretch;
}
.pool-row-wrap .pool-row { flex: 1; }
.pool-delete-btn {
  width: 40px;
  border-radius: 12px;
  border: 1px solid #ff6b7a44;
  background: #2a1218;
  color: #ffb0b8;
  cursor: pointer;
}
.pool-delete-btn:hover { background: #3a1520; }
.kimo-select {
  background: #0a101c;
  border: 1px solid #ffffff14;
  border-radius: 10px;
  color: #e8eefc;
  padding: 10px;
}


.balance-strip {
  position: relative;
  margin: 0 0 18px;
  padding: 18px 22px;
  border-radius: 18px;
  border: 1px solid #36e58a33;
  background:
    linear-gradient(135deg, #0d1f18 0%, #101826 55%, #0a1220 100%);
  overflow: hidden;
}
.balance-strip .balance-main { position: relative; z-index: 1; }
.balance-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px 18px;
  margin-top: 6px;
}
.balance-row strong {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #e8fff4;
}
.balance-usd {
  font-size: 18px;
  font-weight: 700;
  color: #36e58a;
}
.balance-strip small {
  display: block;
  margin-top: 6px;
  opacity: 0.55;
  font-size: 11px;
}
.balance-glow {
  position: absolute;
  right: -40px;
  top: -40px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, #36e58a44, transparent 70%);
  pointer-events: none;
}

.pool-toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
  flex-wrap: wrap;
}
.pool-fab-add {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #5a7cff, #36c9a0);
  color: #061018;
  font-size: 24px;
  font-weight: 800;
  cursor: pointer;
  line-height: 1;
}
.pool-add-panel {
  margin-top: 12px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid #ffffff18;
  background: #0a101c;
}
.pool-add-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.pool-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
  font-size: 12px;
  color: #8b9bb8;
}
.pool-field input {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #ffffff18;
  background: #070b14;
  color: #e8eefc;
}
.pool-row-wrap { position: relative; }
.pool-delete-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid #ff6b7a44;
  background: #2a1218cc;
  cursor: pointer;
  z-index: 2;
}
body.rtl .pool-delete-btn { right: auto; left: 8px; }

/* ===== Web / mobile portrait shell ===== */
html, body {
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
body {
  max-width: 480px;
  margin: 0 auto;
  box-shadow: 0 0 0 1px #ffffff08, 0 0 80px #00000088;
}
.titlebar { position: sticky; top: 0; z-index: 40; }
.app-shell {
  padding-bottom: 48px !important;
  gap: 16px;
  display: flex;
  flex-direction: column;
}
.welcome, .balance-strip, .control-panel, .hash-panel, .stats-grid, .control-panel + .control-panel {
  margin-bottom: 0;
}
.section-gap { margin-top: 4px; }
.web-settings {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}
.web-settings .settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.web-check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #e8eefc;
}
.web-check input { width: 18px; height: 18px; accent-color: #36e58a; }
.field input {
  width: 100%;
  margin-top: 6px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #ffffff14;
  background: #0a101c;
  color: #fff;
}
.pool-toolbar { display: flex; gap: 8px; margin-top: 8px; }
.hidden { display: none !important; }
#loginView { padding: 24px 16px 40px; }
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr 1fr !important; }
  .control-panel { flex-direction: column !important; align-items: stretch !important; gap: 16px !important; }
  .control-right { width: 100%; }
  .toggle-button { width: 100%; }
  .web-settings .settings-grid { grid-template-columns: 1fr; }
}

.kimo-dialog-backdrop:not(.hidden) {
  display: flex !important;
  align-items: flex-end;
  justify-content: center;
  padding: 12px;
}
@media (min-width: 520px) {
  .kimo-dialog-backdrop:not(.hidden) { align-items: center; }
}
.kimo-dialog {
  width: min(100%, 440px);
  max-height: 88vh;
  overflow-y: auto;
}
.kimo-dialog input[type="text"],
.kimo-dialog input[type="number"],
.kimo-dialog select {
  width: 100%;
  margin: 6px 0 12px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #ffffff18;
  background: #0a101c;
  color: #e8eefc;
}

/* landscape tablet */
@media (orientation: landscape) and (min-width: 700px) {
  body {
    max-width: 960px !important;
    margin: 0 auto;
  }
  .stats-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }
  .control-panel {
    flex-direction: row !important;
    align-items: center !important;
  }
  .toggle-button { width: auto !important; min-width: 220px; }
}
@media (orientation: landscape) and (min-width: 1000px) {
  body { max-width: 1100px !important; }
  .app-shell { max-width: 980px; }
  .stats-grid { grid-template-columns: repeat(6, 1fr) !important; }
}
@media (orientation: portrait) and (max-width: 600px) {
  body { max-width: 480px !important; }
}


/* ===== FIX: REAL DASHBOARD LAYOUT SPACING =====
   The remote dashboard is a normal block container, not #dashView children
   as assumed by the previous cosmetic pass. Explicitly space its sections. */
#dashView:not(.hidden) {
  display: flex !important;
  flex-direction: column !important;
  gap: 22px !important;
  width: 100%;
  min-width: 0;
}
#dashView > header,
#dashView > section,
#dashView > footer {
  width: 100%;
  min-width: 0;
  margin: 0 !important;
}
#dashView > .welcome { margin-top: 2px !important; margin-bottom: 2px !important; }
#dashView > .balance-strip,
#dashView > .control-panel,
#dashView > .hash-panel,
#dashView > .stats-grid {
  flex: 0 0 auto !important;
}
#dashView > .balance-strip { margin-top: 2px !important; }
#dashView > .control-panel { margin-top: 0 !important; }
#dashView > .hash-panel { margin-top: 0 !important; }
#dashView > .stats-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 16px !important;
  margin-top: 0 !important;
}
#dashView > .stats-grid > .stat-card {
  min-width: 0;
  min-height: 132px;
  margin: 0 !important;
  padding: 20px !important;
  border-radius: 20px !important;
}
#dashView > .stats-grid > .stat-card:nth-child(1),
#dashView > .stats-grid > .stat-card:nth-child(2),
#dashView > .stats-grid > .stat-card:nth-child(n+3) {
  grid-column: auto !important;
}
#dashView > .hash-panel .hash-card {
  min-height: 126px;
  padding: 22px 24px !important;
  border-radius: 21px !important;
}
#dashView > footer {
  margin-top: 2px !important;
  padding-top: 18px !important;
}
.app-shell {
  max-width: 920px !important;
  padding: 22px clamp(18px, 3vw, 34px) 28px !important;
  gap: 0 !important;
}
#dashView > .topbar {
  min-height: 62px;
  height: auto;
  flex: 0 0 auto;
  padding-bottom: 14px;
  margin-bottom: 0 !important;
}
#dashView > .welcome {
  min-height: 100px;
  flex: 0 0 auto;
  gap: 18px;
}
#dashView .balance-strip {
  min-height: 132px;
  padding: 23px 26px !important;
  border-radius: 22px !important;
}
#dashView .control-panel {
  min-height: 116px;
  padding: 22px 24px !important;
  border-radius: 22px !important;
}
#dashView .control-info { gap: 15px; }
#dashView .control-symbol { width: 48px; height: 48px; flex-basis: 48px; }
#dashView .toggle-button { min-width: 180px; height: 46px; }
#dashView .section-gap { margin-top: 0 !important; }
@media (min-width: 900px) {
  #dashView > .stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 18px !important; }
  #dashView > .stats-grid > .stat-card { min-height: 142px; }
}
@media (max-width: 560px) {
  #dashView:not(.hidden) { gap: 16px !important; }
  .app-shell { padding: 15px 14px 24px !important; }
  #dashView > .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 11px !important; }
  #dashView > .stats-grid > .stat-card { min-height: 112px; padding: 15px 13px !important; }
  #dashView > .welcome { min-height: 84px; }
  #dashView .balance-strip { padding: 18px !important; }
  #dashView .control-panel { padding: 16px !important; gap: 9px; }
  #dashView .control-info { gap: 9px; }
  #dashView .control-symbol { width: 38px; height: 38px; flex-basis: 38px; }
  #dashView .toggle-button { min-width: 132px; height: 40px; padding: 0 10px; }
}
