* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

:root {
    --font:
        "Segoe UI",
        Arial,
        sans-serif;

    --bg: #fff9fb;
    --sidebar: #fff1f6;

    --panel: #ffffff;
    --panel-soft: #fff5f8;
    --panel-deeper: #fdebf2;

    --text: #593946;
    --muted: #92717f;

    --border: #f0cedb;

    --pink: #b8537d;
    --pink-2: #ef9cbe;
    --pink-3: #ffc5db;
    --pink-fill: #f4b2ce;
    --pink-fill-2: #fbd3e3;

    --green: #129a53;
    --red: #e32e5c;
    --blue: #3e7cd8;
    --orange: #e99b28;

    --shadow:
        0 18px 55px
        rgba(126, 41, 78, .08);
}


/* =========================================================
   DARK SAKURA THEME
   BLACK + LIGHT PINK
========================================================= */

body.dark {
    --bg: #0c0a0b;
    --sidebar: #110e10;

    --panel: #171315;
    --panel-soft: #1d181b;
    --panel-deeper: #251e21;

    --text: #fff8fb;
    --muted: #d8bdc8;

    --border: #5a414b;

    --pink: #f5a6c5;
    --pink-2: #ef7fac;
    --pink-3: #ffd1e2;

    --green: #78dca8;
    --red: #ef8da8;
    --blue: #9bbcf0;
    --orange: #e7bd7d;

    --shadow:
        0 20px 65px
        rgba(0, 0, 0, .34);
}


/* =========================================================
   BODY
========================================================= */

body {
    font-family: var(--font);

    background:
        radial-gradient(
            circle at 75% 6%,
            rgba(255, 116, 162, .14),
            transparent 30%
        ),
        var(--bg);

    color: var(--text);

    transition:
        background .25s ease,
        color .25s ease;
}

body.dark {
    background:
        radial-gradient(
            circle at 78% 4%,
            rgba(245, 166, 197, .10),
            transparent 31%
        ),
        radial-gradient(
            circle at 12% 90%,
            rgba(255, 209, 226, .045),
            transparent 30%
        ),
        #0c0a0b;
}


/* =========================================================
   GLOBAL FONT
========================================================= */

button,
input,
select,
textarea {
    font-family: var(--font);
}

h1,
h2,
h3,
.brand-name,
.account-name,
.summary-number,
.metric-value,
.logs-head strong {
    font-family: var(--font);
    font-weight: 700;
}

.nav-item,
.filter,
.status-chip,
.status-pill,
.summary-label,
.summary-note,
.account-meta,
.metric-label,
.progress-labels,
.detail-label,
.detail-value,
.footer,
.top-tagline,
.modal-sub,
.connect-title p {
    font-weight: 400;
}

svg {
    width: 20px;
    height: 20px;

    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;

    stroke-linecap: round;
    stroke-linejoin: round;
}


/* =========================================================
   LAYOUT
========================================================= */

.app-shell {
    min-height: 100vh;

    display: grid;

    grid-template-columns:
        210px 1fr;

    transition:
        grid-template-columns .22s ease;
}


/* =========================================================
   SIDEBAR
========================================================= */

.sidebar {
    position: sticky;
    top: 0;

    height: 100vh;

    padding:
        24px 16px;

    background:
        linear-gradient(
            180deg,
            var(--sidebar),
            var(--bg)
        );

    border-right:
        1px solid var(--border);

    transition:
        width .22s ease,
        padding .22s ease,
        background .25s ease,
        border-color .25s ease;
}

body.dark .sidebar {
    background:
        linear-gradient(
            180deg,
            #121011,
            #0c0a0b
        );

    box-shadow:
        inset -1px 0
        rgba(245, 166, 197, .10);
}

.brand {
    display: flex;

    align-items: center;

    gap: 10px;

    padding:
        3px 8px 26px;
}

.brand-mark {
    font-size: 31px;
}

.brand-name {
    font-size: 31px;
    line-height: .92;
}

.brand-sub {
    margin-top: 4px;

    color: var(--muted);

    font-size: 10px;

    letter-spacing: 1px;
}

.nav {
    display: flex;

    flex-direction: column;

    gap: 7px;
}

.nav-item {
    width: 100%;

    display: flex;

    align-items: center;

    gap: 12px;

    padding:
        12px 13px;

    border: 0;

    border-radius: 13px;

    background: transparent;

    color: var(--muted);

    font-size: 14px;

    cursor: pointer;

    text-align: left;

    transition:
        background .18s ease,
        color .18s ease,
        transform .18s ease;
}

.nav-item:hover {
    color: var(--text);

    background:
        rgba(255, 72, 137, .08);
}

body.dark .nav-item:hover {
    color: #ffeaf2;

    background:
        rgba(245, 166, 197, .07);
}

.nav-item.active {
    color: white;

    background:
        linear-gradient(
            135deg,
            var(--pink),
            var(--pink-2)
        );

    box-shadow:
        0 12px 35px
        rgba(227, 47, 113, .22);
}

body.dark .nav-item.active {
    color: #1b1116;

    background:
        linear-gradient(
            135deg,
            #f5a6c5,
            #ef7fac
        );

    box-shadow:
        0 10px 28px
        rgba(239, 127, 172, .17);
}

.sidebar-art {
    position: absolute;

    left: 24px;

    bottom: 30px;

    color: var(--pink);

    font-style: italic;

    line-height: 1.55;
}

.sidebar-blossoms {
    font-style: normal;
    font-size: 28px;
}


/* =========================================================
   SIDEBAR TOGGLE
========================================================= */

.sidebar-toggle {
    position: absolute;

    top: 14px;
    right: 12px;

    width: 34px;
    height: 34px;

    display: grid;

    place-content: center;

    gap: 4px;

    padding: 0;

    border:
        1px solid var(--border);

    border-radius: 10px;

    background: var(--panel);

    color: var(--text);

    cursor: pointer;

    box-shadow:
        0 8px 22px
        rgba(126, 41, 78, .08);

    z-index: 5;
}

.sidebar-toggle span {
    width: 15px;
    height: 1.8px;

    display: block;

    border-radius: 999px;

    background: currentColor;

    transition:
        transform .2s ease,
        opacity .2s ease;
}

.sidebar-toggle:hover {
    color: var(--pink);

    border-color: var(--pink);
}

body.dark .sidebar-toggle {
    background: #191517;

    border-color:
        rgba(245, 166, 197, .20);

    color: #f8c3d7;

    box-shadow:
        0 8px 24px
        rgba(0, 0, 0, .24);
}


/* =========================================================
   COLLAPSED SIDEBAR
========================================================= */

body.sidebar-collapsed .app-shell {
    grid-template-columns:
        74px 1fr;
}

body.sidebar-collapsed .sidebar {
    padding:
        65px 10px 20px;
}

body.sidebar-collapsed .sidebar-toggle {
    right: 19px;
}

body.sidebar-collapsed .brand {
    display: none;
}

body.sidebar-collapsed .nav-item {
    justify-content: center;

    padding:
        12px 10px;
}

body.sidebar-collapsed .nav-item span {
    display: none;
}

body.sidebar-collapsed .nav-item svg {
    width: 22px;
    height: 22px;
}

body.sidebar-collapsed .sidebar-art {
    display: none;
}

body.sidebar-collapsed .nav {
    gap: 9px;
}


/* =========================================================
   MAIN
========================================================= */

.main {
    min-width: 0;

    padding:
        0 24px 45px;
}


/* =========================================================
   TOP BAR
========================================================= */

.topbar {
    position: sticky;
    top: 0;
    z-index: 80;

    min-height: 76px;

    display: grid;

    grid-template-columns:
        1fr 390px auto;

    align-items: center;

    gap: 17px;

    border-bottom:
        1px solid var(--border);

    background: rgba(255, 249, 251, .90);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

body.dark .topbar {
    background: rgba(12, 10, 11, .90);
}

.mobile-site-header {
    display: none;
}

.top-tagline {
    color: var(--muted);

    font-style: italic;

    font-size: 12px;
}

.global-search {
    height: 42px;

    display: flex;

    align-items: center;

    gap: 9px;

    padding:
        0 13px;

    background: var(--panel);

    border:
        1px solid var(--border);

    border-radius: 12px;
}

body.dark .global-search {
    background: #171315;

    border-color:
        rgba(245, 166, 197, .20);

    box-shadow: none;
}

.global-search input {
    width: 100%;

    border: 0;
    outline: 0;

    background: transparent;

    color: var(--text);
}

.global-search input::placeholder {
    color: var(--muted);
}

.top-actions {
    display: flex;

    align-items: center;

    gap: 10px;
}

.theme-toggle {
    display: flex;

    padding: 4px;

    gap: 3px;

    background: var(--panel);

    border:
        1px solid var(--border);

    border-radius: 999px;
}

.theme-toggle button {
    width: 39px;
    height: 32px;

    border: 0;

    border-radius: 999px;

    background: transparent;

    color: var(--muted);

    cursor: pointer;
}

.theme-toggle button.active {
    color: white;

    background:
        linear-gradient(
            135deg,
            var(--pink),
            var(--pink-2)
        );

    box-shadow:
        0 5px 20px
        rgba(255, 36, 121, .28);
}

body.dark .theme-toggle button.active {
    color: #1b1116;

    background:
        linear-gradient(
            135deg,
            #f5a6c5,
            #ef7fac
        );

    box-shadow:
        0 8px 22px
        rgba(239, 127, 172, .16);
}

.logout-button {
    padding:
        9px 12px;

    border:
        1px solid var(--border);

    border-radius: 10px;

    color: var(--text);

    text-decoration: none;
}

body.dark .logout-button {
    background: #151214;

    border-color:
        rgba(245, 166, 197, .18);
}


/* =========================================================
   HERO
========================================================= */

.hero {
    min-height: 135px;

    position: relative;

    overflow: hidden;

    display: flex;

    justify-content:
        space-between;

    align-items: center;

    padding:
        22px 13px;
}

.hero h1 {
    margin: 0;

    font-size: 39px;
}

.hero p {
    margin:
        6px 0 0;

    color: var(--muted);

    font-size: 18px;
}

.hero-scene {
    position: relative;

    width: 350px;
    height: 105px;

    display: flex;

    align-items: center;

    justify-content: flex-end;
}

.hero-moon {
    width: 85px;
    height: 85px;

    border-radius: 50%;

    background:
        radial-gradient(
            circle at 35% 35%,
            #ffd3e3,
            #f56c9e 65%,
            #d63c73
        );

    opacity: .65;

    box-shadow:
        0 0 40px
        rgba(240, 83, 144, .2);
}

body.dark .hero-moon {
    opacity: .92;

    background:
        radial-gradient(
            circle at 35% 35%,
            #ffe4ee,
            #f5a6c5 58%,
            #e378a4
        );

    box-shadow:
        0 0 50px
        rgba(245, 166, 197, .30);
}

.hero-petals {
    position: absolute;

    right: 95px;
    top: 15px;

    color: var(--pink);

    font-size: 25px;
}


/* =========================================================
   TOP STATS
========================================================= */

.stats-grid {
    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 13px;
}

.summary-card {
    min-height: 110px;

    display: flex;

    align-items: center;

    gap: 14px;

    padding: 17px;

    background:
        linear-gradient(
            145deg,
            var(--panel),
            var(--panel-soft)
        );

    border:
        1px solid var(--border);

    border-radius: 17px;

    box-shadow:
        var(--shadow);
}

body.dark .summary-card {
    background:
        linear-gradient(
            145deg,
            #191517,
            #141113
        );

    border-color:
        rgba(245, 166, 197, .21);

    box-shadow:
        0 18px 50px
        rgba(0, 0, 0, .28);
}

.summary-icon {
    width: 53px;
    height: 53px;

    flex-shrink: 0;

    display: grid;

    place-items: center;

    border-radius: 50%;
}

.summary-icon.pink {
    color: var(--pink);

    background:
        rgba(220, 68, 121, .12);
}

.summary-icon.purple {
    color: #ad65ca;

    background:
        rgba(173, 101, 202, .12);
}

body.dark .summary-icon.purple {
    color: #f1afca;

    background:
        rgba(245, 166, 197, .10);
}

.summary-icon.green {
    color: var(--green);

    background:
        rgba(18, 154, 83, .12);
}

.summary-icon.red {
    color: var(--red);

    background:
        rgba(227, 46, 92, .12);
}

body.dark .summary-icon.pink {
    color: #f5a6c5;

    background:
        rgba(245, 166, 197, .10);
}

body.dark .summary-icon.green {
    background:
        rgba(120, 220, 168, .09);

    box-shadow: none;
}

body.dark .summary-icon.red {
    background:
        rgba(239, 141, 168, .09);
}

.summary-label {
    color: var(--muted);

    font-size: 11px;
}

.summary-number {
    margin-top: 3px;

    font-size: 31px;
}

.success-summary .summary-number {
    color: var(--green);
}

.summary-note {
    margin-top: 2px;

    color: var(--muted);

    font-size: 10px;
}


/* =========================================================
   FILTER BAR
========================================================= */

.filterbar {
    margin:
        16px 0 13px;

    display: flex;

    align-items: center;

    justify-content:
        space-between;

    gap: 12px;
}

.filters,
.status-chips {
    display: flex;

    flex-wrap: wrap;

    gap: 7px;
}

.filter {
    padding:
        9px 14px;

    border:
        1px solid var(--border);

    border-radius: 999px;

    background: var(--panel);

    color: var(--muted);

    cursor: pointer;
}

body.dark .filter {
    background: #171315;

    border-color:
        rgba(245, 166, 197, .18);
}

.filter.active {
    color: white;

    background:
        linear-gradient(
            135deg,
            var(--pink),
            var(--pink-2)
        );
}

body.dark .filter.active {
    color: #1b1116;

    border-color: transparent;

    background:
        linear-gradient(
            135deg,
            #f5a6c5,
            #ef7fac
        );
}

.status-chip {
    display: inline-flex;

    align-items: center;

    gap: 7px;

    padding:
        8px 12px;

    border:
        1px solid var(--border);

    border-radius: 999px;

    background: var(--panel);

    color: var(--muted);

    font-size: 11px;
}

body.dark .status-chip {
    background: #171315;

    border-color:
        rgba(245, 166, 197, .18);
}

.dot {
    width: 8px;
    height: 8px;

    border-radius: 50%;
}

.green-dot {
    background: var(--green);
}

.orange-dot {
    background: var(--orange);
}


/* =========================================================
   MAIN CONTENT
========================================================= */

.content-layout {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr) 340px;

    gap: 15px;

    align-items: start;
}

.account-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 14px;
}


/* =========================================================
   ACCOUNT CARD
========================================================= */

.account-card {
    position: relative;

    overflow: hidden;

    background:
        linear-gradient(
            155deg,
            var(--panel),
            var(--panel-soft)
        );

    border:
        1px solid var(--border);

    border-radius: 18px;

    box-shadow:
        var(--shadow);
}

body.dark .account-card {
    background:
        linear-gradient(
            155deg,
            #191517,
            #141113
        );

    border-color:
        rgba(245, 166, 197, .22);

    box-shadow:
        0 20px 55px
        rgba(0, 0, 0, .27);
}

.account-card::after {
    content: "🌸";

    position: absolute;

    right: 14px;
    top: 7px;

    font-size: 53px;

    opacity: .055;

    pointer-events: none;
}

body.dark .account-card::after {
    opacity: .075;
}

.account-head {
    padding:
        17px 17px 0;
}

.account-header {
    display: flex;

    justify-content:
        space-between;

    align-items: flex-start;

    gap: 10px;
}

.account-identity {
    display: flex;

    align-items: center;

    gap: 11px;

    min-width: 0;
}

.account-avatar {
    width: 50px;
    height: 50px;

    flex-shrink: 0;

    display: grid;

    place-items: center;

    border-radius: 50%;

    background:
        linear-gradient(
            145deg,
            rgba(255, 88, 149, .18),
            rgba(255, 204, 223, .25)
        );

    color: var(--pink);

    font-size: 25px;

    border:
        1px solid
        rgba(255, 106, 159, .18);
}

body.dark .account-avatar {
    background:
        radial-gradient(
            circle,
            rgba(245, 166, 197, .18),
            rgba(239, 127, 172, .04)
        );

    border-color:
        rgba(245, 166, 197, .19);

    box-shadow:
        0 0 20px
        rgba(245, 166, 197, .08);
}

.account-name {
    font-size: 23px;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
}

.account-meta {
    margin-top: 2px;

    color: var(--muted);

    font-size: 10px;
}

.status-pill {
    flex-shrink: 0;

    padding:
        7px 11px;

    border-radius: 999px;

    font-size: 11px;
}

.status-running {
    color: var(--green);

    background:
        rgba(18, 154, 83, .10);

    border:
        1px solid
        rgba(18, 154, 83, .16);
}

body.dark .status-running {
    background:
        rgba(120, 220, 168, .09);

    border-color:
        rgba(120, 220, 168, .22);

    box-shadow: none;
}

.status-waiting {
    color: var(--orange);

    background:
        rgba(233, 155, 40, .11);

    border:
        1px solid
        rgba(233, 155, 40, .18);
}

.status-flood {
    color: var(--orange);

    background:
        rgba(233, 155, 40, .11);

    border:
        1px solid
        rgba(233, 155, 40, .18);
}

.status-stopped,
.status-error {
    color: var(--red);

    background:
        rgba(227, 46, 92, .10);

    border:
        1px solid
        rgba(227, 46, 92, .16);
}


/* =========================================================
   METRICS
========================================================= */

.metrics {
    margin-top: 15px;

    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    overflow: hidden;

    border:
        1px solid var(--border);

    border-radius: 12px;
}

body.dark .metrics {
    border-color:
        rgba(245, 166, 197, .17);
}

.metric {
    padding:
        12px 5px;

    text-align: center;
}

.metric + .metric {
    border-left:
        1px solid var(--border);
}

body.dark .metric + .metric {
    border-left-color:
        rgba(245, 166, 197, .14);
}

.metric-label {
    color: var(--muted);

    font-size: 10px;
}

.metric-value {
    margin-top: 4px;

    font-size: 22px;
}

.metric-value.success {
    color: var(--green);
}

.metric-value.failed {
    color: var(--red);
}

.metric-value.cycles {
    color: var(--blue);
}


/* =========================================================
   PROGRESS
========================================================= */

.progress-section {
    margin-top: 13px;
}

.progress-labels {
    display: flex;

    justify-content:
        space-between;

    color: var(--muted);

    font-size: 10px;
}

.progress-track {
    height: 7px;

    margin-top: 6px;

    overflow: hidden;

    border-radius: 999px;

    background: var(--panel-deeper);
}

.progress-bar {
    height: 100%;

    border-radius: inherit;

    background:
        linear-gradient(
            90deg,
            var(--pink),
            var(--pink-2)
        );

    box-shadow:
        0 0 15px
        rgba(240, 93, 148, .18);
}

body.dark .progress-bar {
    background:
        linear-gradient(
            90deg,
            #f5a6c5,
            #ef7fac
        );

    box-shadow:
        0 0 16px
        rgba(245, 166, 197, .22);
}


/* =========================================================
   DETAILS
========================================================= */

.detail-row {
    margin:
        15px 0 0;

    padding:
        13px 0;

    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    border-top:
        1px solid var(--border);

    border-bottom:
        1px solid var(--border);
}

body.dark .detail-row {
    border-color:
        rgba(245, 166, 197, .15);
}

.detail-item {
    display: flex;

    align-items: center;

    gap: 8px;

    min-width: 0;

    padding:
        0 8px;
}

.detail-item > div:last-child {
    min-width: 0;
    flex: 1 1 auto;
}

.detail-item + .detail-item {
    border-left:
        1px solid var(--border);
}

.detail-item:nth-child(n + 4) {
    margin-top: 10px;

    padding-top: 10px;

    border-top:
        1px solid var(--border);
}

.detail-item:nth-child(4) {
    border-left: 0;
}

body.dark .detail-item + .detail-item {
    border-left-color:
        rgba(245, 166, 197, .15);
}

body.dark .detail-item:nth-child(n + 4) {
    border-top-color:
        rgba(245, 166, 197, .15);
}

.detail-icon {
    width: 29px;
    height: 29px;

    flex-shrink: 0;

    display: grid;

    place-items: center;

    color: var(--pink);
}

.detail-label {
    color: var(--muted);

    font-size: 9px;
}

.detail-value {
    margin-top: 1px;

    font-size: 11px;

    line-height: 1.3;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;

    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}


/* =========================================================
   LOGS
========================================================= */

.logs-panel {
    margin:
        13px 17px 0;

    padding: 12px;

    background:
        var(--panel-soft);

    border:
        1px solid var(--border);

    border-radius: 12px;
}

body.dark .logs-panel {
    background:
        linear-gradient(
            180deg,
            #181416,
            #100d0f
        );

    border-color:
        rgba(245, 166, 197, .18);
}

.logs-head {
    display: flex;

    justify-content:
        space-between;

    align-items: center;

    margin-bottom: 8px;
}

.logs-head strong {
    font-size: 15px;
}

.logs-head span {
    color: var(--pink);

    font-size: 10px;
}

.console {
    height: 128px;

    overflow-y: auto;

    color: var(--text);

    font-size: 10px;

    line-height: 1.6;

    scrollbar-width: thin;

    scrollbar-color:
        var(--pink)
        transparent;
}

body.dark .console {
    color: #fceaf1;
}

.console-line {
    display: flex;

    gap: 7px;

    padding:
        2px 0;
}

.log-dot {
    width: 7px;
    height: 7px;

    flex-shrink: 0;

    margin-top: 5px;

    border-radius: 50%;

    background: var(--green);
}

body.dark .log-dot {
    box-shadow:
        0 0 8px
        rgba(120, 220, 168, .20);
}


/* =========================================================
   ACTIONS
========================================================= */

.actions {
    padding:
        13px 17px 17px;

    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 8px;
}

.actions button {
    min-height: 41px;

    display: flex;

    justify-content: center;

    align-items: center;

    gap: 7px;

    border:
        1px solid var(--border);

    border-radius: 10px;

    background: var(--panel);

    color: var(--text);

    cursor: pointer;

    transition:
        border-color .18s ease,
        transform .18s ease,
        background .18s ease;
}

.actions button:hover {
    border-color: var(--pink);

    transform:
        translateY(-1px);
}

body.dark .actions button {
    background: #171315;

    border-color:
        rgba(245, 166, 197, .18);
}

.actions button svg {
    width: 17px;
    height: 17px;
}

.actions .primary-action {
    color: white;

    border: 0;

    background:
        linear-gradient(
            135deg,
            var(--pink),
            var(--pink-2)
        );

    box-shadow:
        0 8px 22px
        rgba(225, 67, 123, .18);
}

body.dark .actions .primary-action {
    color: #1b1116;

    background:
        linear-gradient(
            135deg,
            #f5a6c5,
            #ef7fac
        );

    box-shadow:
        0 8px 24px
        rgba(239, 127, 172, .16);
}

.actions .remove-action {
    color: var(--red);
}

.actions button:disabled {
    opacity: .58;

    cursor: wait;

    transform: none;
}


/* =========================================================
   IN-SITE POPUPS
========================================================= */

.site-dialog-overlay {
    position: fixed;

    inset: 0;

    z-index: 9999;

    display: none;

    align-items: center;

    justify-content: center;

    padding: 22px;

    background:
        rgba(49, 24, 35, .42);

    backdrop-filter:
        blur(5px);
}

.site-dialog-overlay.show {
    display: flex;
}

.site-dialog-card {
    width: min(100%, 420px);

    padding: 27px;

    text-align: center;

    border:
        1px solid var(--border);

    border-radius: 22px;

    background:
        linear-gradient(
            155deg,
            var(--panel),
            var(--panel-soft)
        );

    color: var(--text);

    box-shadow:
        0 24px 70px
        rgba(92, 35, 58, .28);

    animation:
        site-dialog-in .18s ease-out;
}

body.dark .site-dialog-card {
    border-color:
        rgba(245, 166, 197, .25);

    background:
        linear-gradient(
            155deg,
            #21181d,
            #171215
        );

    box-shadow:
        0 26px 75px
        rgba(0, 0, 0, .48);
}

.site-dialog-flower {
    width: 50px;
    height: 50px;

    display: grid;

    place-items: center;

    margin: 0 auto 12px;

    border-radius: 50%;

    background:
        rgba(245, 166, 197, .20);

    font-size: 25px;
}

.site-dialog-card h2 {
    margin: 0;

    font-size: 20px;

    text-transform: lowercase;
}

.site-dialog-card p {
    margin: 11px 0 0;

    color: var(--muted);

    font-size: 14px;

    line-height: 1.55;

    white-space: pre-line;
}

.site-dialog-actions {
    display: flex;

    justify-content: center;

    gap: 9px;

    margin-top: 23px;
}

.site-dialog-actions button {
    min-width: 116px;

    min-height: 43px;

    padding: 0 18px;

    border-radius: 12px;

    font: inherit;

    font-weight: 700;

    cursor: pointer;

    transition:
        transform .18s ease,
        border-color .18s ease,
        background .18s ease;
}

.site-dialog-actions button:hover {
    transform:
        translateY(-1px);
}

.site-dialog-cancel {
    border:
        1px solid var(--border);

    background: var(--panel);

    color: var(--text);
}

.site-dialog-confirm {
    border: 0;

    background:
        linear-gradient(
            135deg,
            var(--pink),
            var(--pink-2)
        );

    color: white;
}

.site-dialog-confirm.danger {
    background:
        linear-gradient(
            135deg,
            #e45382,
            #b92e5c
        );
}

body.dark .site-dialog-cancel {
    border-color:
        rgba(245, 166, 197, .22);

    background: #171315;
}

body.dark .site-dialog-confirm {
    color: #26121b;
}

@keyframes site-dialog-in {
    from {
        opacity: 0;

        transform:
            translateY(8px)
            scale(.98);
    }

    to {
        opacity: 1;

        transform:
            translateY(0)
            scale(1);
    }
}

@media (max-width: 480px) {
    .site-dialog-card {
        padding: 23px 18px;
    }

    .site-dialog-actions {
        flex-direction: column-reverse;
    }

    .site-dialog-actions button {
        width: 100%;
    }
}

.actions .reset-action {
    color: var(--pink);
}


/* =========================================================
   RIGHT RAIL
========================================================= */

.right-rail {
    display: flex;

    flex-direction: column;

    gap: 14px;
}

.connect-card,
.mini-info-card {
    padding: 17px;

    background:
        linear-gradient(
            150deg,
            var(--panel),
            var(--panel-soft)
        );

    border:
        1px solid var(--border);

    border-radius: 18px;

    box-shadow:
        var(--shadow);
}

body.dark .connect-card,
body.dark .mini-info-card {
    background:
        linear-gradient(
            150deg,
            #191517,
            #141113
        );

    border-color:
        rgba(245, 166, 197, .22);

    box-shadow:
        0 18px 50px
        rgba(0, 0, 0, .27);
}

.connect-title {
    display: flex;

    gap: 11px;

    align-items: flex-start;
}

.connect-icon {
    width: 42px;
    height: 42px;

    flex-shrink: 0;

    display: grid;

    place-items: center;

    border-radius: 50%;

    color: var(--pink);

    background:
        rgba(220, 68, 121, .12);
}

body.dark .connect-icon {
    color: #f5a6c5;

    background:
        rgba(245, 166, 197, .10);
}

.connect-title h2 {
    margin: 0;

    font-size: 19px;
}

.connect-title p {
    margin:
        4px 0 0;

    color: var(--muted);

    font-size: 10px;
}

.connect-preview {
    margin-top: 15px;

    display: grid;

    grid-template-columns:
        70px 1fr;

    overflow: hidden;

    border:
        1px solid var(--border);

    border-radius: 10px;
}

.country-code,
.phone-placeholder {
    padding:
        11px;

    background: var(--panel);

    font-size: 12px;
}

body.dark .country-code,
body.dark .phone-placeholder {
    background: #151214;
}

.country-code {
    border-right:
        1px solid var(--border);
}

.phone-placeholder {
    color: var(--muted);
}

.request-button {
    width: 100%;

    margin-top: 10px;

    padding:
        11px;

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 8px;

    border: 0;

    border-radius: 10px;

    color: white;

    background:
        linear-gradient(
            135deg,
            var(--pink),
            var(--pink-2)
        );

    cursor: pointer;
}

body.dark .request-button {
    color: #1b1116;

    background:
        linear-gradient(
            135deg,
            #f5a6c5,
            #ef7fac
        );

    box-shadow:
        0 8px 24px
        rgba(239, 127, 172, .16);
}

.connect-divider {
    display: grid;

    grid-template-columns:
        1fr auto 1fr;

    align-items: center;

    gap: 8px;

    margin:
        13px 0;

    color: var(--muted);

    font-size: 9px;
}

.connect-divider span {
    height: 1px;

    background: var(--border);
}

.connect-actions {
    display: grid;

    grid-template-columns:
        1fr 1fr;

    gap: 8px;
}

.connect-actions button {
    min-height: 38px;

    border:
        1px solid var(--border);

    border-radius: 9px;

    background: var(--panel);

    color: var(--text);

    cursor: pointer;
}

.connect-actions .danger-text {
    color: var(--red);
}

.mini-info-card {
    text-align: center;
}

.mini-flower {
    font-size: 38px;
}

.mini-info-card h3 {
    margin:
        5px 0 0;
}

.mini-info-card p {
    color: var(--muted);

    font-style: italic;

    line-height: 1.45;
}


/* =========================================================
   FOOTER
========================================================= */

.footer {
    margin-top: 25px;

    padding-top: 14px;

    display: flex;

    justify-content:
        space-between;

    color: var(--muted);

    border-top:
        1px solid var(--border);

    font-size: 10px;
}


/* =========================================================
   MODALS
========================================================= */

.modal {
    position: fixed;

    inset: 0;

    z-index: 9999;

    display: none;

    align-items: center;

    justify-content: center;

    padding: 20px;

    background:
        rgba(0, 0, 0, .65);

    backdrop-filter:
        blur(7px);
}

.modal.show {
    display: flex;
}

.modal-card {
    width:
        min(470px, 100%);

    position: relative;

    padding: 25px;

    background: var(--panel);

    color: var(--text);

    border:
        1px solid var(--border);

    border-radius: 19px;

    box-shadow:
        0 30px 100px
        rgba(0,0,0,.25);

    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

body.dark .modal-card {
    background:
        linear-gradient(
            145deg,
            #191517,
            #141113
        );

    border-color:
        rgba(245, 166, 197, .22);

    box-shadow:
        0 30px 100px
        rgba(0,0,0,.50);
}

.modal-card h2 {
    margin: 0;
}

.modal-sub {
    color: var(--muted);

    font-size: 11px;
}

.modal-close {
    position: absolute;

    right: 12px;

    top: 7px;

    border: 0;

    background: transparent;

    color: var(--muted);

    font-size: 28px;

    cursor: pointer;
}

.modal-card label {
    display: block;

    margin:
        12px 0 5px;

    color: var(--muted);

    font-size: 10px;
}

.modal-card input,
.modal-card select,
.modal-card textarea {
    width: 100%;

    padding: 11px;

    outline: 0;

    color: var(--text);

    background: var(--bg);

    border:
        1px solid var(--border);

    border-radius: 9px;

    resize: vertical;
}

body.dark .modal-card input,
body.dark .modal-card select,
body.dark .modal-card textarea {
    background: #100d0f;

    border-color:
        rgba(245, 166, 197, .18);

    color: #fff8fb;
}

.field-hint {
    display: block;

    margin-top: 4px;

    color: var(--muted);

    font-size: 9px;
}

.two-columns {
    display: grid;

    grid-template-columns:
        1fr 1fr;

    gap: 9px;
}

.phone-row {
    display: grid;

    grid-template-columns:
        90px 1fr;

    gap: 8px;
}

.modal-primary,
.modal-danger {
    width: 100%;

    margin-top: 17px;

    padding: 12px;

    border: 0;

    border-radius: 10px;

    color: white;

    cursor: pointer;
}

.modal-primary {
    background:
        linear-gradient(
            135deg,
            var(--pink),
            var(--pink-2)
        );
}

body.dark .modal-primary {
    color: #1b1116;

    background:
        linear-gradient(
            135deg,
            #f5a6c5,
            #ef7fac
        );

    box-shadow:
        0 8px 24px
        rgba(239, 127, 172, .16);
}

.modal-danger {
    background:
        linear-gradient(
            135deg,
            #dc2a58,
            #ff416f
        );
}


/* =========================================================
   SETTINGS
========================================================= */

.modal-kicker {
    margin-bottom: 7px;

    color: var(--pink);

    font-size: 10px;
    font-weight: 700;

    letter-spacing: .7px;

    text-transform: uppercase;
}

.settings-card,
.support-card {
    width:
        min(520px, 100%);
}

.settings-section {
    margin-top: 18px;

    padding-top: 17px;

    border-top:
        1px solid var(--border);
}

.settings-heading {
    margin-bottom: 10px;

    color: var(--muted);

    font-size: 10px;
    font-weight: 700;

    letter-spacing: .8px;

    text-transform: uppercase;
}

.settings-theme-grid {
    display: grid;

    grid-template-columns:
        1fr 1fr;

    gap: 10px;
}

.setting-choice {
    min-height: 72px;

    display: flex;

    align-items: center;

    gap: 11px;

    padding: 12px;

    border:
        1px solid var(--border);

    border-radius: 13px;

    background: var(--panel-soft);

    color: var(--text);

    text-align: left;

    cursor: pointer;

    transition:
        transform .18s ease,
        border-color .18s ease;
}

.setting-choice:hover {
    border-color: var(--pink);

    transform:
        translateY(-1px);
}

body.dark .setting-choice {
    background: #171315;

    border-color:
        rgba(245, 166, 197, .18);
}

.setting-choice-icon {
    width: 38px;
    height: 38px;

    display: grid;

    place-items: center;

    flex-shrink: 0;

    border-radius: 50%;

    background:
        rgba(240, 93, 148, .12);

    color: var(--pink);

    font-size: 18px;
}

body.dark .setting-choice-icon {
    background:
        rgba(245, 166, 197, .10);

    color: #f5a6c5;
}

.setting-choice strong,
.settings-toggle-row strong {
    display: block;

    font-size: 12px;
}

.setting-choice small,
.settings-toggle-row small {
    display: block;

    margin-top: 3px;

    color: var(--muted);

    font-size: 9px;

    line-height: 1.45;
}

.settings-toggle-row {
    position: relative;

    min-height: 64px;

    display: flex !important;

    align-items: center;

    justify-content: space-between;

    gap: 16px;

    margin: 0 !important;

    padding: 12px 13px;

    border:
        1px solid var(--border);

    border-radius: 13px;

    background: var(--panel-soft);

    color: var(--text) !important;

    cursor: pointer;
}

body.dark .settings-toggle-row {
    background: #171315;

    border-color:
        rgba(245, 166, 197, .18);
}

.settings-toggle-row input {
    position: absolute;

    opacity: 0;

    pointer-events: none;
}

.switch-ui {
    width: 44px;
    height: 24px;

    position: relative;

    flex-shrink: 0;

    border-radius: 999px;

    background: var(--panel-deeper);

    border:
        1px solid var(--border);

    transition:
        background .2s ease,
        border-color .2s ease;
}

.switch-ui::after {
    content: "";

    width: 18px;
    height: 18px;

    position: absolute;

    top: 2px;
    left: 2px;

    border-radius: 50%;

    background: white;

    box-shadow:
        0 2px 7px
        rgba(0,0,0,.15);

    transition:
        transform .2s ease;
}

.settings-toggle-row input:checked + .switch-ui {
    background:
        linear-gradient(
            135deg,
            var(--pink),
            var(--pink-2)
        );

    border-color: transparent;
}

body.dark .settings-toggle-row input:checked + .switch-ui {
    background:
        linear-gradient(
            135deg,
            #f5a6c5,
            #ef7fac
        );
}

.settings-toggle-row input:checked + .switch-ui::after {
    transform:
        translateX(20px);
}

.settings-note {
    margin-top: 14px;

    padding: 11px 13px;

    border-radius: 11px;

    background: var(--panel-soft);

    color: var(--muted);

    font-size: 9px;

    line-height: 1.5;
}

body.dark .settings-note {
    background: #171315;
}


/* =========================================================
   SUPPORT
========================================================= */

.support-card {
    text-align: center;
}

.support-flower {
    margin-bottom: 8px;

    font-size: 42px;
}

.support-copy {
    margin:
        13px auto 0;

    max-width: 410px;

    color: var(--text);

    font-size: 12px;

    line-height: 1.75;
}

.support-copy strong {
    color: var(--pink);
}

.support-tip {
    margin:
        12px auto 0;

    max-width: 410px;

    padding: 11px 13px;

    border-radius: 11px;

    background: var(--panel-soft);

    color: var(--muted);

    font-size: 10px;

    line-height: 1.55;
}

body.dark .support-tip {
    background: #171315;
}

.support-actions {
    margin-top: 17px;

    display: grid;

    grid-template-columns:
        1fr 1fr;

    gap: 9px;
}

.support-link {
    min-height: 42px;

    display: flex;

    align-items: center;

    justify-content: center;

    padding: 10px 12px;

    border:
        1px solid var(--border);

    border-radius: 11px;

    background: var(--panel);

    color: var(--text);

    text-decoration: none;

    font-size: 11px;

    transition:
        border-color .18s ease,
        transform .18s ease;
}

.support-link:hover {
    border-color: var(--pink);

    transform:
        translateY(-1px);
}

body.dark .support-link {
    background: #171315;

    border-color:
        rgba(245, 166, 197, .18);
}

.support-link.primary {
    border: 0;

    color: white;

    background:
        linear-gradient(
            135deg,
            var(--pink),
            var(--pink-2)
        );
}

body.dark .support-link.primary {
    color: #1b1116;

    background:
        linear-gradient(
            135deg,
            #f5a6c5,
            #ef7fac
        );

    box-shadow:
        0 8px 24px
        rgba(239, 127, 172, .16);
}


/* =========================================================
   DARK THEME SMALL DETAILS
========================================================= */

body.dark .hero-petals,
body.dark .logs-head span,
body.dark .support-copy strong,
body.dark .sidebar-art,
body.dark .detail-icon {
    color: #f5a6c5;
}

body.dark select option {
    background: #171315;

    color: #fff8fb;
}

body.dark ::selection {
    background: #ef7fac;

    color: #1b1116;
}


/* =========================================================
   RESPONSIVE
========================================================= */

.sidebar-quick-filters {
    display: none;

    margin-top: 12px;
    padding: 12px;

    border: 1px solid var(--border);
    border-radius: 14px;

    background: var(--panel-soft);
}

body.sidebar-filters-open .sidebar-quick-filters {
    display: block;
}

body.sidebar-filters-open .sidebar-art,
body.sidebar-collapsed .sidebar-quick-filters {
    display: none;
}

.sidebar-quick-filters small {
    display: block;

    margin: 8px 0 6px;

    color: var(--muted);

    font-size: 9px;
}

.sidebar-filter-grid {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 6px;
}

.sidebar-filter-grid button {
    min-height: 34px;

    padding: 6px;

    border: 1px solid var(--border);
    border-radius: 9px;

    background: var(--panel);
    color: var(--text);

    font: inherit;
    font-size: 10px;

    cursor: pointer;
}

.sidebar-filter-grid button:hover,
.sidebar-filter-grid button.active {
    border-color: var(--pink);
    background: rgba(239, 139, 184, .16);
}

.mobile-control-button,
.mobile-sidebar-backdrop {
    display: none;
}


@media (max-width: 1250px) {

    .content-layout {
        grid-template-columns:
            1fr;
    }

    .right-rail {
        display: grid;

        grid-template-columns:
            1fr 1fr;
    }
}


@media (max-width: 1000px) {

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

    .account-grid {
        grid-template-columns:
            1fr;
    }
}


@media (max-width: 760px) {

    .mobile-control-button {
        position: fixed;

        top: max(14px, env(safe-area-inset-top));
        left: 14px;

        z-index: 1402;

        width: 46px;
        height: 46px;

        display: grid;

        place-content: center;

        gap: 5px;

        border: 1px solid var(--border);
        border-radius: 13px;

        background: var(--panel);

        box-shadow: 0 10px 28px rgba(0, 0, 0, .25);

        cursor: pointer;
    }

    .mobile-control-button span {
        width: 20px;
        height: 2px;

        display: block;

        border-radius: 99px;

        background: var(--pink);
    }

    .mobile-sidebar-backdrop {
        position: fixed;

        inset: 0;

        z-index: 1398;

        background: rgba(0, 0, 0, .56);
        backdrop-filter: blur(3px);
    }

    body.mobile-sidebar-open .mobile-sidebar-backdrop {
        display: block;
    }

    .app-shell {
        display: block;
    }

    .sidebar,
    body.sidebar-collapsed .sidebar {
        position: fixed;

        top: 0;
        bottom: 0;
        left: 0;

        z-index: 1400;

        width: min(320px, 88vw);
        height: 100dvh;

        padding: 74px 16px 24px;

        overflow-y: auto;

        transform: translateX(-105%);

        transition: transform .22s ease;
    }

    body.mobile-sidebar-open .sidebar,
    body.mobile-sidebar-open.sidebar-collapsed .sidebar {
        transform: translateX(0);
    }

    .sidebar .sidebar-toggle {
        display: none;
    }

    .sidebar-quick-filters,
    body.sidebar-filters-open .sidebar-quick-filters,
    body.sidebar-collapsed .sidebar-quick-filters {
        display: block;
    }

    .sidebar-art {
        display: none;
    }

    .nav,
    body.sidebar-collapsed .nav {
        display: grid;

        grid-template-columns:
            repeat(3, 1fr);
    }

    .main {
        padding:
            0 12px 40px;
    }

    .topbar {
        grid-template-columns:
            1fr;

        padding:
            12px 0;
    }

    .hero h1 {
        font-size: 30px;
    }

    .hero-scene {
        display: none;
    }

    .stats-grid {
        grid-template-columns:
            1fr;
    }

    .filterbar {
        align-items: flex-start;

        flex-direction: column;
    }

    .right-rail {
        grid-template-columns:
            1fr;
    }

    .detail-row {
        grid-template-columns:
            1fr;
    }

    .detail-item {
        padding:
            7px 0;
    }

    .detail-item + .detail-item {
        border-left: 0;

        border-top:
            1px solid var(--border);
    }

    .detail-item:nth-child(n + 4) {
        margin-top: 0;
    }

    body.sidebar-collapsed .app-shell {
        display: block;
    }

    body.sidebar-collapsed .brand {
        display: flex;
    }

    body.sidebar-collapsed .nav-item {
        justify-content: flex-start;

        padding: 12px 13px;
    }

    body.sidebar-collapsed .nav-item span {
        display: inline;
    }

    .settings-theme-grid,
    .support-actions {
        grid-template-columns:
            1fr;
    }
}

/* =========================================================
   MOBILE HEADER + DRAWER V12
   Keeps Sakura, theme, menu and search accessible on scroll.
========================================================= */

.mobile-sidebar-signout {
    display: none;
}

@media (max-width: 760px) {
    :root {
        --mobile-header-height: 142px;
    }

    html.mobile-sidebar-open,
    body.mobile-sidebar-open {
        overflow: hidden;
        overscroll-behavior: none;
    }

    body {
        padding-top: var(--mobile-header-height);
    }

    .mobile-site-header {
        position: fixed;
        inset: 0 0 auto 0;
        z-index: 1500;

        display: grid;
        gap: 10px;

        min-height: var(--mobile-header-height);
        padding: max(10px, env(safe-area-inset-top)) 14px 11px;

        background: rgba(255, 241, 246, .94);
        border-bottom: 1px solid var(--border);
        box-shadow: 0 10px 30px rgba(126, 41, 78, .10);

        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
    }

    body.dark .mobile-site-header {
        background: rgba(17, 14, 16, .94);
        box-shadow: 0 12px 34px rgba(0, 0, 0, .32);
    }

    .mobile-header-row,
    .mobile-header-actions,
    .mobile-brand {
        display: flex;
        align-items: center;
    }

    .mobile-header-row {
        min-width: 0;
        justify-content: space-between;
        gap: 10px;
    }

    .mobile-brand {
        min-width: 0;
        gap: 8px;
    }

    .mobile-brand-mark {
        flex: 0 0 auto;
        font-size: 29px;
        line-height: 1;
    }

    .mobile-brand strong,
    .mobile-brand small {
        display: block;
        white-space: nowrap;
    }

    .mobile-brand strong {
        color: var(--text);
        font-size: 25px;
        line-height: .95;
        letter-spacing: -.4px;
    }

    .mobile-brand small {
        margin-top: 4px;
        color: var(--muted);
        font-size: 9px;
        letter-spacing: 1px;
    }

    .mobile-header-actions {
        flex: 0 0 auto;
        gap: 8px;
    }

    .mobile-theme-toggle {
        padding: 3px;
    }

    .mobile-theme-toggle button {
        width: 34px;
        height: 30px;
        font-size: 13px;
    }

    .mobile-control-button {
        position: static;
        z-index: auto;

        width: 40px;
        height: 40px;

        flex: 0 0 40px;
        display: grid;
        place-content: center;
        gap: 4px;

        padding: 0;
        border: 1px solid var(--border);
        border-radius: 12px;
        background: var(--panel);
        color: var(--pink);
        box-shadow: 0 7px 20px rgba(126, 41, 78, .10);
    }

    body.dark .mobile-control-button {
        background: #191517;
    }

    .mobile-control-button span {
        width: 18px;
        height: 2px;
        background: currentColor;
    }

    body.mobile-sidebar-open .mobile-control-button span:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
    }

    body.mobile-sidebar-open .mobile-control-button span:nth-child(2) {
        opacity: 0;
    }

    body.mobile-sidebar-open .mobile-control-button span:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
    }

    .mobile-global-search {
        min-width: 0;
        height: 44px;

        display: flex;
        align-items: center;
        gap: 9px;

        padding: 0 13px;
        background: var(--panel);
        border: 1px solid var(--border);
        border-radius: 13px;
    }

    body.dark .mobile-global-search {
        background: #171315;
        border-color: rgba(245, 166, 197, .22);
    }

    .mobile-global-search svg {
        flex: 0 0 19px;
    }

    .mobile-global-search input {
        width: 100%;
        min-width: 0;
        border: 0;
        outline: 0;
        background: transparent;
        color: var(--text);
        font-size: 14px;
    }

    .mobile-global-search input::placeholder {
        color: var(--muted);
    }

    .topbar {
        display: none;
    }

    .mobile-sidebar-backdrop {
        inset: var(--mobile-header-height) 0 0;
    }

    .sidebar,
    body.sidebar-collapsed .sidebar {
        top: var(--mobile-header-height);
        bottom: 0;

        width: min(310px, calc(100vw - 24px));
        height: calc(100dvh - var(--mobile-header-height));

        padding: 16px 14px calc(20px + env(safe-area-inset-bottom));
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    .sidebar .brand,
    body.sidebar-collapsed .brand {
        display: none;
    }

    .nav,
    body.sidebar-collapsed .nav {
        display: flex;
        flex-direction: column;
        gap: 7px;
        width: 100%;
    }

    .nav-item,
    body.sidebar-collapsed .nav-item {
        width: 100%;
        min-width: 0;
        justify-content: flex-start;
        padding: 11px 12px;
    }

    .nav-item span,
    body.sidebar-collapsed .nav-item span {
        display: inline;
        min-width: 0;
        overflow-wrap: anywhere;
    }

    .sidebar-quick-filters,
    body.sidebar-filters-open .sidebar-quick-filters,
    body.sidebar-collapsed .sidebar-quick-filters {
        width: 100%;
        margin-top: 10px;
        padding: 10px;
    }

    .sidebar-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sidebar-filter-grid button {
        min-width: 0;
        padding: 7px 4px;
        overflow-wrap: anywhere;
    }

    .mobile-sidebar-signout {
        min-height: 40px;
        margin-top: 10px;

        display: grid;
        place-items: center;

        border: 1px solid var(--border);
        border-radius: 11px;
        background: var(--panel);
        color: var(--text);
        text-decoration: none;
        font-size: 13px;
    }

    .main {
        padding: 0 12px 40px;
    }

    .hero {
        min-height: 120px;
        padding: 18px 4px 16px;
    }

    .hero h1 {
        font-size: clamp(27px, 8vw, 34px);
        line-height: 1.05;
    }

    .hero p {
        font-size: 14px;
        line-height: 1.45;
    }

    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0;
        overflow: hidden;

        background: var(--panel);
        border: 1px solid var(--border);
        border-radius: 17px;
        box-shadow: var(--shadow);
    }

    body.dark .stats-grid {
        background: #171315;
        border-color: rgba(245, 166, 197, .22);
    }

    .summary-card,
    body.dark .summary-card {
        min-width: 0;
        min-height: 112px;
        gap: 9px;
        padding: 13px 10px;

        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .summary-card:nth-child(odd) {
        border-right: 1px solid var(--border);
    }

    .summary-card:nth-child(-n + 2) {
        border-bottom: 1px solid var(--border);
    }

    .summary-icon {
        width: 42px;
        height: 42px;
    }

    .summary-icon svg {
        width: 18px;
        height: 18px;
    }

    .summary-label {
        font-size: 10px;
    }

    .summary-number {
        font-size: clamp(23px, 7vw, 29px);
    }

    .summary-note {
        font-size: 9px;
        line-height: 1.25;
    }

    .filterbar,
    .filters,
    .status-chips {
        max-width: 100%;
    }

    .filterbar {
        overflow-x: auto;
        padding-bottom: 3px;
        scrollbar-width: thin;
    }

    .filters,
    .status-chips {
        flex-wrap: nowrap;
    }

    .filter,
    .status-chip {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .account-card,
    .account-head,
    .detail-item,
    .detail-value,
    .log-line {
        min-width: 0;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .detail-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .detail-item,
    .detail-item + .detail-item {
        align-items: flex-start;
        padding: 8px 6px;
        border-top: 1px solid var(--border);
        border-left: 0;
    }

    .detail-value {
        min-height: 2.6em;
    }

    .detail-item:nth-child(odd) {
        border-right: 1px solid var(--border);
    }

    .detail-item:nth-child(-n + 2) {
        border-top: 0;
    }

    .detail-item:nth-child(n + 4) {
        margin-top: 0;
    }
}

.remove-choices {
    display: grid;

    gap: 10px;

    margin-top: 18px;
}

.remove-choice-button {
    width: 100%;

    padding: 13px 15px;

    display: flex;

    flex-direction: column;

    align-items: flex-start;

    gap: 3px;

    border-radius: 11px;

    font: inherit;

    text-align: left;

    cursor: pointer;
}

.remove-choice-button strong {
    font-size: 14px;
}

.remove-choice-button small {
    opacity: .72;

    font-size: 11px;
}

.remove-dashboard-only {
    border:
        1px solid var(--border);

    background: var(--panel);

    color: var(--text);
}

.remove-everything {
    border: 0;

    background:
        linear-gradient(
            135deg,
            #dc2a58,
            #ff416f
        );

    color: white;
}

.remove-choice-button:disabled {
    opacity: .55;

    cursor: wait;
}

body.dark .remove-dashboard-only {
    border-color:
        rgba(245, 166, 197, .22);

    background: #171315;
}


/* =========================================================
   RESPONSE GENERATOR
========================================================= */

.response-generator-panel {
    width: 100%;
    max-width: 620px;
    margin: 16px 0;
    padding: 12px;

    border:
        1px solid var(--border);

    border-radius: 12px;

    background:
        linear-gradient(
            135deg,
            var(--panel),
            var(--panel-soft)
        );

    box-shadow: var(--shadow);
}

.response-generator-panel[hidden] {
    display: none;
}

.response-generator-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 8px;
}

.response-kicker {
    display: inline-flex;
    margin-bottom: 6px;
    color: var(--pink);
    font-size: 12px;
    font-weight: 700;
}

.response-generator-head h2,
.response-form-card h3 {
    margin: 0;
    font-size: 18px;
}

.response-generator-head p,
.response-form-card p,
.response-muted {
    margin: 6px 0 0;
    color: var(--muted);
    line-height: 1.55;
}

.response-close {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;

    border: 1px solid var(--border);
    border-radius: 12px;

    background: var(--panel);
    color: var(--text);

    font-size: 22px;
    cursor: pointer;
}

.response-generator-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
}

.response-form-card {
    padding: 0;
    min-width: 0;
}

.response-form-card label {
    display: block;
    margin: 8px 0 4px;
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
}

.response-form-card input,
.response-form-card textarea {
    width: 100%;
    min-height: 34px;
    padding: 7px 9px;

    border:
        1px solid var(--border);

    border-radius: 8px;

    background: var(--panel-soft);
    color: var(--text);
    font: inherit;
    font-size: 13px;
}

.response-form-card textarea {
    resize: vertical;
    line-height: 1.55;
    min-height: 82px;
}

.response-form-card pre {
    padding: 14px;
    overflow: auto;

    border-radius: 12px;

    background: var(--panel-soft);
    color: var(--text);

    white-space: pre-wrap;
    line-height: 1.55;
}

.response-presets,
.response-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 9px 0;
}

.response-presets button,
.response-actions button {
    min-height: 32px;
    padding: 0 10px;

    border: 0;
    border-radius: 999px;

    background:
        linear-gradient(
            135deg,
            var(--pink),
            var(--pink-2)
        );

    color: white;
    font: inherit;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
}

.response-presets .soft-response-button,
.response-actions .soft-response-button {
    border:
        1px solid var(--border);

    background: var(--panel-soft);
    color: var(--pink);
}

body.dark .response-form-card,
body.dark .response-close {
    background: #171315;
}

body.dark .response-form-card input,
body.dark .response-form-card textarea,
body.dark .response-form-card pre {
    background: #1d181b;
}

@media (max-width: 850px) {
    .response-generator-grid {
        grid-template-columns: 1fr;
    }

    .response-presets button,
    .response-actions button {
        flex: 0 1 auto;
    }
}

body:not(.dark) .nav-item.active,
body:not(.dark) .theme-toggle button.active,
body:not(.dark) .filter.active,
body:not(.dark) .actions .primary-action,
body:not(.dark) .site-dialog-confirm:not(.danger),
body:not(.dark) .request-button,
body:not(.dark) .modal-primary,
body:not(.dark) .support-link.primary,
body:not(.dark) .response-presets button:not(.soft-response-button),
body:not(.dark) .response-actions button:not(.soft-response-button) {
    background: linear-gradient(135deg, var(--pink-fill), var(--pink-fill-2));
    color: var(--text);
}

.response-presets button:disabled {
    opacity: .55;
    cursor: default;
}

@media (max-width: 480px) {
    .response-form-card .two-columns {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Package completion bell, desktop and phone. */
.package-bell { position:relative; display:inline-flex; align-items:center; justify-content:center; width:38px; height:38px; flex-shrink:0; border:1px solid #efd0dd; border-radius:12px; background:#fff7fb; color:#743149; cursor:pointer; }
.package-bell svg { width:21px; height:21px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.package-bell-count { position:absolute; top:-5px; right:-5px; min-width:18px; padding:2px 4px; border-radius:12px; background:#a83f6d; color:white; font-size:10px; font-weight:700; }
.package-bell-count[hidden], .package-notifications[hidden] { display:none !important; }
.package-notifications { position:fixed; top:74px; right:24px; width:min(360px, calc(100vw - 24px)); max-height:70vh; overflow:auto; z-index:3000; padding:16px; border:1px solid #efd0dd; border-radius:18px; background:#fffafd; color:#56283c; box-shadow:0 12px 38px #30122226; }
.package-notification-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.package-notification-heading button { background:none; border:0; color:inherit; font-size:26px; cursor:pointer; }
.package-mark-read { margin:8px 0 12px; background:none; border:0; color:#9b3b64; text-decoration:underline; cursor:pointer; }
.package-notification-item { padding:13px 10px; margin:8px 0; border:1px solid #f0dbe4; border-radius:12px; overflow-wrap:anywhere; }
.package-notification-item.unread { background:#fff0f7; border-color:#e9abc6; }
.package-notification-item p { white-space:pre-line; margin:8px 0 0; font-size:13px; line-height:1.65; }
.package-notification-empty { font-size:14px; padding:12px 0; }
body.dark .package-bell, body.dark .package-notifications { background:#21171c; color:#fff5fa; border-color:#684455; }
body.dark .package-notification-item { border-color:#573444; }
body.dark .package-notification-item.unread { background:#35212d; border-color:#a36583; }
body.dark .package-mark-read { color:#f2b8d1; }
@media(max-width:768px) { .package-notifications { top:65px; right:12px; } .package-bell { width:34px; height:34px; } }

/* Small remaining-time badge in its own lower-right space; logs stay readable. */
.package-time-footer {display:flex;justify-content:flex-end;padding-top:8px;}
.package-time-badge {font-size:11px;line-height:1.5;border:1px solid #f0bad1;border-radius:999px;padding:3px 9px;color:#8a4967;background:#fff4f9;}
body.dark .package-time-badge {color:#f7c4da;background:#24171f;border-color:#654052;}
#soonestEndingFilter[aria-pressed="true"] {font-weight:700;}

.reset-stat-choices {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:16px 0;}
.reset-stat-choices button {min-height:42px;border:1px solid #edafcb;border-radius:12px;background:#fff5fa;color:#75475d;cursor:pointer;}
body.dark .reset-stat-choices button {background:#281a22;color:#fff2f9;border-color:#694354;}

/* Summary and queue reuse the existing dashboard theme. */
.order-detail-popup {width: min(720px, 94vw); max-height: 88vh; overflow-y: auto;}
.order-detail-popup section {padding: 14px 0; border-top: 1px solid var(--border-color, #eadfe6);}
.order-detail-popup textarea {width:100%; box-sizing:border-box; resize:vertical; font:inherit; line-height:1.6;}
.summary-reply-head {display:flex; justify-content:space-between; gap:12px; align-items:center; margin-bottom:8px;}
.order-detail-popup button {cursor:pointer; padding:8px 12px; border-radius:9px; margin:3px;}
.order-detail-popup .queue-links {white-space:pre-wrap; overflow-wrap:anywhere;}

/* Sakura Summary / Queue: theme every native control in both modes. */
.order-detail-popup {
    scrollbar-width: thin;
    scrollbar-color: var(--pink) var(--panel-soft);
    color-scheme: light;
}
body.dark .order-detail-popup { color-scheme: dark; }
.order-detail-popup section { border-color: var(--border); }
.order-detail-popup textarea {
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--panel-soft);
    color: var(--text);
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.65;
    outline: none;
    scrollbar-width: thin;
    scrollbar-color: var(--pink) var(--panel-soft);
}
.order-detail-popup textarea:focus-visible {
    border-color: var(--pink);
    box-shadow: 0 0 0 3px rgba(239,127,172,.15);
}
.order-detail-popup button {
    min-height: 38px;
    padding: 9px 16px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--pink-fill), var(--pink-fill-2));
    color: var(--text);
    font: inherit;
    font-size: 14px;
    box-shadow: 0 8px 22px rgba(225,67,123,.12);
    transition: transform .18s ease, box-shadow .18s ease;
}
body.dark .order-detail-popup button {
    background: linear-gradient(135deg, #f5a6c5, #ef7fac);
    color: #1b1116;
    box-shadow: 0 8px 24px rgba(239,127,172,.16);
}
.order-detail-popup button:hover:not(:disabled) { transform: translateY(-1px); }
.order-detail-popup button:focus-visible {
    outline: 2px solid var(--pink);
    outline-offset: 3px;
}
.order-detail-popup button:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.order-detail-popup .summary-reply-head button { min-height: 34px; padding: 7px 14px; flex-shrink: 0; }
.order-detail-popup [data-close] { width: 38px; min-height: 38px; padding: 0; }
.order-detail-popup [data-body] > button { width: 100%; min-height: 46px; margin: 17px 0 0; }
.order-detail-popup::-webkit-scrollbar,
.order-detail-popup textarea::-webkit-scrollbar { width: 6px; height: 6px; }
.order-detail-popup::-webkit-scrollbar-track,
.order-detail-popup textarea::-webkit-scrollbar-track { background: var(--panel-soft); border-radius: 999px; }
.order-detail-popup::-webkit-scrollbar-thumb,
.order-detail-popup textarea::-webkit-scrollbar-thumb { background: var(--pink); border: 1px solid var(--panel-soft); border-radius: 999px; }

/* SAKURA_FLOATING_TIMER_BEGIN */
/* Floating corner badge: no extra footer row or additional panel height. */
.logs-panel { position: relative; }
.logs-panel .package-time-footer {
    position: absolute;
    right: 14px;
    bottom: 10px;
    z-index: 2;
    display: flex;
    justify-content: flex-end;
    padding: 0;
    margin: 0;
    pointer-events: none;
}
.logs-panel .package-time-badge {
    background: var(--panel-soft);
    color: var(--pink);
    border-color: var(--border);
    box-shadow: 0 3px 12px rgba(126,41,78,.10);
    white-space: nowrap;
}
body.dark .logs-panel .package-time-badge {
    background: #24171f;
    color: #f7c4da;
    border-color: #654052;
    box-shadow: 0 3px 12px rgba(0,0,0,.25);
}
/* Keep the last log scrollable above the overlay, within the existing height. */
.logs-panel .console { box-sizing: border-box; height: auto; max-height: 128px; padding-bottom: 0; }
/* Reserve the badge width on the last log only, without an empty bottom strip. */
.logs-panel .console-line:last-child { padding-right: 158px; min-height: 24px; }
/* SAKURA_FLOATING_TIMER_END */
/* SAKURA_CLOCK_POPUP_BEGIN */
.logs-panel .sakura-clock-button {
    pointer-events: auto; display: inline-flex; align-items: center;
    width: auto; height: auto; min-height: 24px; padding: 3px 9px; border-radius: 999px; font-size: 11px; line-height: 1.5;
    border: 1px solid var(--border); background: var(--panel-soft);
    color: var(--pink); cursor: pointer;
}
.logs-panel .sakura-clock-button:hover { transform: translateY(-1px); }
.logs-panel .sakura-clock-button:focus-visible { outline: 2px solid var(--pink); outline-offset: 3px; }
.sakura-clock-overlay .order-detail-popup {
    width: min(430px, calc(100vw - 32px)); background: var(--panel);
    color: var(--text); border: 1px solid var(--border); border-radius: 24px;
    box-shadow: 0 18px 70px rgba(114,47,76,.22);
}
.sakura-clock-overlay [data-body] { text-align: center; padding: 8px 8px 18px; }
.sakura-clock-overlay h2 { color: var(--pink); }
.sakura-clock-account { color: var(--text); font-size: 17px; }
.sakura-clock-remaining { font-size: clamp(42px, 10vw, 64px); line-height: 1.2; font-weight: 700; color: var(--pink); }
.sakura-clock-note { color: var(--muted); font-size: 13px; }
.sakura-clock-dates { display: grid; grid-template-columns: auto 1fr; gap: 14px 16px; text-align: left; background: var(--panel-soft); border: 1px solid var(--border); border-radius: 16px; padding: 18px; margin: 22px 0 0; }
.sakura-clock-dates dt { color: var(--pink); }
.sakura-clock-dates dd { margin: 0; color: var(--text); overflow-wrap: anywhere; }
.sakura-clock-overlay [data-close] { background: var(--panel-soft); color: var(--pink); border: 1px solid var(--border); border-radius: 50%; }
body.dark .sakura-clock-overlay .order-detail-popup { box-shadow: 0 18px 70px rgba(0,0,0,.5); }
/* Smaller account action buttons; preserve the approved three rows. */
.account-card .actions { padding: 10px 17px 13px; gap: 6px; }
.account-card .actions button { min-height: 32px; padding: 5px 7px; border-radius: 8px; font-size: 12px; gap: 5px; }
.account-card .actions button svg { width: 14px; height: 14px; }
/* SAKURA_CLOCK_POPUP_END */
