body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: #f7f8fa;
    color: #111827;
}

body.dashboard-body {
    height: 100vh;
    overflow: hidden;
    overscroll-behavior: none;
}

.container {
    max-width: 1120px;
    margin: 24px auto;
    padding: 0 16px;
}

.dashboard-shell {
    height: 100vh;
    display: flex;
    background: #f4f6fb;
    overflow: hidden;
}

.dashboard-body .dashboard-shell {
    position: fixed;
    inset: 0;
}

.sidebar {
    width: 240px;
    min-width: 240px;
    max-width: 240px;
    flex: 0 0 240px;
    background: linear-gradient(180deg, #0f172a, #111827);
    color: #cbd5e1;
    padding: 24px 16px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 18px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.sidebar-brand {
    font-size: 18px;
    font-weight: 700;
    color: #f8fafc;
    line-height: 1.4;
}

.sidebar-user {
    font-size: 13px;
    color: #94a3b8;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}

.sidebar-menu {
    display: grid;
    gap: 8px;
}

.sidebar-link {
    display: block;
    text-decoration: none;
    color: #cbd5e1;
    font-size: 14px;
    border-radius: 10px;
    padding: 10px 12px;
    transition: 0.2s ease;
}

.sidebar-link:hover {
    background: rgba(148, 163, 184, 0.14);
}

.sidebar-link.is-active {
    background: rgba(37, 99, 235, 0.28);
    color: #eff6ff;
}

.sidebar-actions {
    margin-top: auto;
    display: grid;
    gap: 8px;
}

.main-content {
    flex: 1;
    min-width: 0;
    height: 100vh;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-sizing: border-box;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
}

.page-header {
    height: 92px;
    overflow: hidden;
}

.page-header .card-header {
    border-bottom: 0;
    height: 100%;
    box-sizing: border-box;
}

.page-header-meta {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}

.page-header-meta .title,
.page-header-meta .sub {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.page-header-meta .sub:empty,
.card-header .sub:empty {
    display: none;
}

.page-header-actions {
    min-height: 40px;
    min-width: 220px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.panel-card {
    scroll-margin-top: 24px;
}

.panel-title {
    font-size: 18px;
}

.card {
    background: #fff;
    border-radius: 14px;
    border: 1px solid #eceff3;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.card-header {
    padding: 18px 20px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.card-header > div:first-child {
    min-width: 0;
}

.card-body {
    padding: 18px 20px;
}

.empty-feature-page {
    min-height: 420px;
}

.promo-share-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 390px);
    gap: 18px;
    align-items: start;
}

.promo-share-main {
    min-width: 0;
    display: grid;
    gap: 16px;
}

.promo-field-group {
    display: grid;
    gap: 8px;
}

.promo-copy-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 96px;
    gap: 8px;
    align-items: center;
}

.promo-note-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.promo-note {
    min-height: 106px;
    box-sizing: border-box;
    border: 1px solid #e5edf7;
    border-radius: 8px;
    padding: 14px;
    background: #f8fbff;
    display: grid;
    align-content: start;
    gap: 8px;
}

.promo-note strong {
    color: #0f172a;
    font-size: 15px;
}

.promo-note span {
    color: #64748b;
    font-size: 13px;
    line-height: 1.6;
}

.promo-copy-status {
    min-height: 20px;
    color: #64748b;
    font-size: 13px;
}

.promo-copy-status.is-ok {
    color: #16a34a;
}

.promo-copy-status.is-error {
    color: #dc2626;
}

.promo-preview {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    overflow: hidden;
}

.promo-preview-head {
    height: 42px;
    padding: 0 12px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #0f172a;
    font-size: 13px;
}

.promo-preview-head a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
}

.promo-preview-frame {
    width: 100%;
    height: min(720px, calc(100vh - 260px));
    min-height: 560px;
    border: 0;
    display: block;
    background: #fff;
}

.title {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
}

.sub {
    color: #64748b;
    font-size: 13px;
}

.grid {
    display: grid;
    gap: 12px;
}

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

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

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

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

.stat {
    background: #fff;
    border: 1px solid #eef2f7;
    border-radius: 12px;
    padding: 14px;
}

.stat .k {
    color: #64748b;
    font-size: 13px;
}

.stat .v {
    margin-top: 8px;
    font-size: 22px;
    font-weight: 700;
}

.stat-soft {
    background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.trend {
    margin-top: 8px;
    font-size: 12px;
    font-weight: 600;
}

.trend.up {
    color: #16a34a;
}

.trend.down {
    color: #dc2626;
}

label {
    font-size: 13px;
    color: #475569;
    display: block;
    margin-bottom: 6px;
}

input, select {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #dbe3ed;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 14px;
    background: #fff;
}

input[type="checkbox"] {
    width: auto;
    min-width: 16px;
    height: 16px;
    padding: 0;
    margin: 0;
}

.confirm-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 2px 0 0;
    line-height: 1.5;
}

.confirm-check span {
    min-width: 0;
}

textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #dbe3ed;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 14px;
    background: #fff;
}

input:disabled,
select:disabled,
textarea:disabled,
input[readonly] {
    background: #f8fafc;
    color: #64748b;
    cursor: not-allowed;
}

input:focus, select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.role-lookup-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: end;
}

.role-lookup-results {
    display: grid;
    gap: 8px;
    margin-top: 8px;
}

.role-lookup-choice {
    width: 100%;
    border: 1px solid #dbe3ed;
    border-radius: 10px;
    background: #fff;
    padding: 10px 12px;
    text-align: left;
    cursor: pointer;
    color: #1f2937;
}

.role-lookup-choice:hover {
    border-color: #3b82f6;
    box-shadow: 0 8px 18px rgba(59, 130, 246, 0.12);
}

.role-lookup-choice strong {
    display: block;
    margin-bottom: 3px;
}

.role-lookup-choice span {
    display: block;
    color: #64748b;
    font-size: 12px;
    line-height: 1.5;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    vertical-align: middle;
    box-sizing: border-box;
    cursor: pointer;
}

.btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.btn-primary {
    background: #2563eb;
    color: #fff;
}

.btn-danger {
    background: #ef4444;
    color: #fff;
}

.btn-ghost {
    background: #eef2ff;
    color: #1d4ed8;
    text-align: center;
}

.actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.actions form {
    margin: 0;
}

.sidebar-actions .btn {
    width: 100%;
}

.is-hidden {
    display: none !important;
}

.config-switch-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 4px;
    margin-bottom: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #f8fafc;
}

.config-switch-tab {
    min-height: 42px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #64748b;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.config-switch-tab.is-active {
    background: #fff;
    color: #111827;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .08);
}

.config-tab-panel {
    display: none;
}

.config-tab-panel.is-active {
    display: block;
}

.config-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.config-panel-head .actions {
    flex: 0 0 auto;
}

.gmpay-actions .btn {
    min-width: 108px;
}

.gm-item-builder {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 120px 88px;
    gap: 8px;
    align-items: center;
}

.gm-list {
    display: grid;
    gap: 8px;
}

.gm-list-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
}

.players-search-form {
    align-items: center;
    flex-wrap: nowrap;
}

.players-search-type {
    width: 92px;
    flex: 0 0 92px;
}

.players-search-input {
    width: 220px;
}

.notice-editor {
    min-height: 520px;
    resize: vertical;
    font-family: Consolas, "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

.welfare-item-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 120px 88px;
    gap: 8px;
    margin-top: 8px;
    align-items: center;
}

.welfare-item-pick {
    display: grid;
    gap: 6px;
}

.welfare-item-id,
.welfare-item-search,
.welfare-item-qty {
    margin: 0;
}

.msg {
    padding: 10px 12px;
    border-radius: 10px;
    margin-bottom: 12px;
    font-size: 13px;
}

.msg-ok {
    background: #ecfdf5;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.msg-err {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.floating-msgs {
    position: fixed;
    right: 20px;
    top: 20px;
    z-index: 1200;
    width: min(460px, calc(100vw - 24px));
}

.floating-msgs .msg {
    margin-bottom: 8px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

th, td {
    border-bottom: 1px solid #eff3f8;
    padding: 10px 8px;
    text-align: left;
    white-space: nowrap;
}

th {
    color: #475569;
    font-weight: 700;
    background: #f8fafc;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 56px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    background: #f1f5f9;
    color: #475569;
}

.status-pill.is-ok {
    background: #dcfce7;
    color: #166534;
}

.status-pill.is-wait {
    background: #fff7ed;
    color: #9a3412;
}

.table-wrap {
    overflow: auto;
}

.auth-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-card {
    width: 100%;
    max-width: 420px;
}

.muted {
    color: #64748b;
    font-size: 12px;
}

.modal-mask {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.42);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 999;
}

.modal-mask.is-open {
    display: flex;
}

.modal-card {
    width: 100%;
    max-width: 620px;
    background: #fff;
    border-radius: 14px;
    border: 1px solid #eceff3;
    box-shadow: 0 20px 36px rgba(15, 23, 42, 0.22);
    overflow: hidden;
    max-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
}

.modal-card-wide {
    max-width: 980px;
}

.modal-card .card-body {
    overflow-y: auto;
}

@media (max-width: 900px) {
    body.dashboard-body {
        overflow: auto;
    }

    .dashboard-shell {
        display: block;
        height: auto;
        overflow: visible;
    }

    .dashboard-body .dashboard-shell {
        position: static;
    }

    .sidebar {
        position: static;
        height: auto;
        width: 100%;
        overflow: visible;
        min-width: 0;
        max-width: none;
        padding: 14px 12px;
        gap: 12px;
    }

    .sidebar-brand {
        font-size: 16px;
    }

    .sidebar-user {
        padding-bottom: 0;
        border-bottom: 0;
    }

    .sidebar-menu {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        overflow-y: hidden;
        padding-bottom: 4px;
        scrollbar-width: thin;
    }

    .sidebar-link {
        white-space: nowrap;
        flex: 0 0 auto;
    }

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

    .main-content {
        height: auto;
        padding: 12px;
        overflow: visible;
        gap: 12px;
    }

    .page-header {
        height: auto;
        overflow: visible;
    }

    .page-header .card-header,
    .card-header {
        height: auto;
        align-items: flex-start;
        flex-direction: column;
    }

    .page-header-meta {
        width: 100%;
        gap: 2px;
    }

    .page-header-meta .title,
    .page-header-meta .sub {
        white-space: normal;
    }

    .page-header-actions {
        min-width: 0;
        width: 100%;
        justify-content: flex-start;
    }

    .floating-msgs {
        right: 12px;
        top: 12px;
        width: calc(100vw - 24px);
    }

    .players-search-form {
        width: 100%;
        flex-wrap: wrap;
        align-items: stretch;
    }

    .players-search-input {
        width: 100%;
    }

    .players-search-type {
        width: 100%;
        flex-basis: 100%;
    }

    .players-search-form .btn,
    .actions .btn {
        width: 100%;
    }

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

    .gm-item-builder {
        grid-template-columns: 1fr;
    }

    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }

    .promo-share-layout,
    .promo-note-grid {
        grid-template-columns: 1fr;
    }

    .promo-preview-frame {
        min-height: 520px;
        height: 68vh;
    }

    .table-wrap table {
        min-width: 720px;
    }

    th, td {
        padding: 9px 8px;
    }

    .modal-mask {
        padding: 12px;
    }

    .modal-card,
    .modal-card-wide {
        max-width: none;
        max-height: calc(100vh - 24px);
    }
}

@media (max-width: 640px) {
    .main-content {
        padding: 10px;
    }

    .card-header,
    .card-body {
        padding: 14px;
    }

    .title {
        font-size: 18px;
    }

    .panel-title {
        font-size: 16px;
    }

    .stat {
        padding: 12px;
    }

    .stat .v {
        font-size: 20px;
    }

    input,
    select,
    textarea,
    .btn {
        font-size: 14px;
    }

    .sidebar-actions {
        grid-template-columns: 1fr;
    }
}

/* Light dashboard skin matched to the Chrome reference page. */
:root {
    --skin-bg: #f5f5f5;
    --skin-surface: #ffffff;
    --skin-border: #e6e8ec;
    --skin-muted: #7c8594;
    --skin-text: #2b313b;
    --skin-teal: #28d2bb;
    --skin-orange: #ff7a35;
    --skin-blue: #25b8ff;
    --skin-green: #00985c;
}

body {
    background: var(--skin-bg);
    color: var(--skin-text);
}

body.dashboard-body {
    min-height: 100vh;
    height: auto;
    overflow: auto;
}

.dashboard-shell {
    display: block;
    min-height: 100vh;
    height: auto;
    background: var(--skin-bg);
    overflow: visible;
}

.dashboard-body .dashboard-shell {
    position: static;
    inset: auto;
}

.sidebar {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    min-width: 0;
    max-width: none;
    height: 56px;
    min-height: 56px;
    padding: 0 24px;
    box-sizing: border-box;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 18px;
    background: rgba(255, 255, 255, 0.96);
    color: #2f343b;
    border-bottom: 1px solid #edf0f2;
    box-shadow: 0 3px 14px rgba(15, 23, 42, 0.06);
    overflow: visible;
}

.sidebar-brand {
    flex: 0 0 auto;
    font-size: 18px;
    font-weight: 500;
    color: #2f343b;
    white-space: nowrap;
    line-height: 56px;
}

.sidebar-user {
    order: 4;
    margin-left: auto;
    padding: 0;
    border: 0;
    color: #7a828e;
    font-size: 13px;
    line-height: 1.45;
    white-space: nowrap;
}

.sidebar-menu {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
}

.sidebar-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    height: 56px;
    padding: 0 10px;
    border-radius: 0;
    color: #6b7280;
    font-size: 14px;
    line-height: 1;
    white-space: nowrap;
    background: transparent;
}

.sidebar-link:hover {
    background: transparent;
    color: #222831;
}

.sidebar-link.is-active {
    background: transparent;
    color: #222831;
}

.sidebar-link.is-active::after {
    content: "";
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 0;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: var(--skin-teal);
}

.sidebar-actions {
    order: 5;
    margin-top: 0;
    display: flex;
    grid-template-columns: none;
    gap: 8px;
}

.sidebar-actions .btn {
    width: auto;
    min-width: 72px;
    height: 34px;
    padding: 8px 12px;
    border-radius: 4px;
}

.main-content {
    width: min(1110px, calc(100vw - 32px));
    height: auto;
    min-height: calc(100vh - 56px);
    margin: 0 auto;
    padding: 18px 0 44px;
    gap: 18px;
    overflow: visible;
}

.card {
    border: 0;
    border-radius: 6px;
    background: var(--skin-surface);
    box-shadow: 0 2px 14px rgba(30, 41, 59, 0.12);
}

.card-header {
    padding: 14px 18px;
    border-bottom: 1px solid #e9edf2;
}

.page-header {
    height: 34px;
    margin-bottom: 0;
    overflow: visible;
    box-shadow: 0 2px 10px rgba(30, 41, 59, 0.12);
}

.page-header .card-header {
    height: 34px;
    min-height: 34px;
    padding: 0 12px;
    align-items: center;
}

.page-header-meta {
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

.page-header-meta::before {
    content: "";
    width: 14px;
    height: 14px;
    display: inline-block;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 35%, #111827 0 3px, transparent 4px),
        linear-gradient(#111827, #111827);
    background-size: 14px 14px, 8px 9px;
    background-position: center, center 5px;
    background-repeat: no-repeat;
}

.page-header-meta .title {
    font-size: 13px;
    font-weight: 500;
}

.page-header-actions {
    min-width: 0;
    min-height: 0;
}

.page-header-actions::after {
    content: "i";
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #3f4650;
    border-radius: 50%;
    color: #3f4650;
    font-size: 12px;
    font-style: italic;
}

.page-header-actions .btn,
.page-header-actions .sub {
    margin-right: 10px;
}

.btn {
    border-radius: 4px;
}

.btn-primary {
    background: #31cbb5;
}

.btn-ghost {
    background: #f3f7f8;
    color: #3b5361;
}

.btn-danger {
    background: #f05d5d;
}

.target-home {
    display: grid;
    grid-template-columns: minmax(0, 2fr) 350px;
    gap: 28px;
    align-items: stretch;
}

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

.metric-chart-card {
    position: relative;
    min-height: 196px;
    padding: 16px 18px;
    border-radius: 6px;
    background: linear-gradient(132deg, #fff 0 62%, rgba(255, 232, 225, 0.58) 62% 78%, rgba(255, 211, 188, 0.46) 78% 100%);
    box-shadow: 0 2px 14px rgba(30, 41, 59, 0.12);
    overflow: hidden;
    color: var(--skin-orange);
}

.metric-chart-card::before,
.metric-chart-card::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    opacity: 0.42;
    pointer-events: none;
    display: none;
}

.metric-chart-card::before {
    width: 230px;
    height: 230px;
    right: -74px;
    top: -112px;
    background: #ffd8cf;
}

.metric-chart-card::after {
    width: 190px;
    height: 190px;
    right: -82px;
    bottom: -88px;
    background: #ffd4bf;
}

.metric-blue {
    background: linear-gradient(132deg, #fff 0 62%, rgba(222, 240, 255, 0.7) 62% 78%, rgba(198, 242, 255, 0.58) 78% 100%);
    color: var(--skin-blue);
}

.metric-blue::before {
    background: #dcefff;
}

.metric-blue::after {
    background: #c7f3ff;
}

.metric-green {
    background: linear-gradient(132deg, #fff 0 62%, rgba(220, 250, 247, 0.76) 62% 78%, rgba(203, 244, 223, 0.62) 78% 100%);
    color: var(--skin-green);
}

.metric-green::before {
    background: #dff9f5;
}

.metric-green::after {
    background: #c8f4dd;
}

.metric-label {
    position: relative;
    z-index: 1;
    color: #3b414a;
    font-size: 14px;
    font-weight: 600;
}

.metric-badge {
    display: inline-flex;
    margin-left: 8px;
    padding: 2px 7px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
    vertical-align: middle;
}

.metric-badge.is-up {
    background: #d9f8eb;
    color: #0f9f67;
}

.metric-badge.is-down {
    background: #ffeadf;
    color: #d5642e;
}

.metric-value {
    position: relative;
    z-index: 1;
    margin-top: 16px;
    color: currentColor;
    font-size: 30px;
    font-weight: 300;
    line-height: 1.2;
}

.metric-line {
    position: absolute;
    left: 24px;
    right: 24px;
    bottom: 0;
    z-index: 1;
    height: 104px;
}

.metric-line svg {
    width: 100%;
    height: 100%;
    display: block;
}

.spark-fill {
    fill: currentColor;
    opacity: 0.34;
}

.spark-stroke {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.spark-dots circle {
    fill: #fff;
    stroke: currentColor;
    stroke-width: 2;
}

.profile-card {
    overflow: hidden;
}

.profile-cover {
    height: 136px;
    background: linear-gradient(rgba(39, 48, 77, 0.72), rgba(39, 48, 77, 0.72)),
        linear-gradient(135deg, #566276 0%, #969b9d 52%, #c8b09b 100%);
    filter: saturate(0.86);
}

.profile-avatar {
    width: 94px;
    height: 94px;
    margin: -52px auto 20px;
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 6px solid #fff;
    border-radius: 50%;
    background: linear-gradient(135deg, #d9fbf7, #5ec7d5);
    color: #22313b;
    font-size: 36px;
    font-weight: 800;
    box-shadow: 0 9px 22px rgba(15, 23, 42, 0.24);
}

.profile-rows {
    padding: 0 20px 20px;
}

.profile-row {
    display: grid;
    grid-template-columns: 28px 1fr auto;
    gap: 10px;
    align-items: center;
    min-height: 50px;
    border-bottom: 1px solid #dfe5ec;
    color: #56616f;
    font-size: 14px;
}

.profile-row:last-child {
    border-bottom: 0;
}

.profile-row strong {
    color: #303640;
    font-weight: 500;
}

.profile-icon {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
}

.profile-blue {
    background: #1fb5ff;
}

.profile-red {
    background: #ef4773;
}

.profile-cyan {
    background: #22b9e7;
}

.profile-indigo {
    background: #5477c9;
}

.quick-panel {
    position: relative;
    padding-top: 50px;
}

.quick-tab {
    position: absolute;
    top: 11px;
    left: 12px;
    height: 40px;
    padding: 0 18px;
    display: inline-flex;
    align-items: center;
    border: 1px solid #dbe0e7;
    border-bottom-color: #fff;
    border-radius: 4px 4px 0 0;
    background: #fff;
    color: #303743;
    font-size: 15px;
    font-weight: 500;
}

.quick-panel::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 52px;
    border-top: 1px solid #dfe3e9;
}

.quick-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
    padding: 16px 20px 14px;
}

.quick-tile {
    min-height: 70px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border: 1px solid #cdeee8;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 5px 12px rgba(26, 174, 154, 0.1);
    color: #12313b;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
}

.quick-tile:hover {
    border-color: #69d5c7;
    transform: translateY(-1px);
}

.quick-icon {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #4fcbb5;
    color: #fff;
    font-size: 17px;
    font-weight: 800;
}

.quick-icon-2 {
    background: #36c7be;
}

.quick-icon-3 {
    background: #45d09f;
}

.quick-icon-4 {
    background: #52c9a2;
}

.quick-icon-5 {
    background: #58c9b4;
}

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

.chart-card .card-header {
    min-height: 36px;
    padding: 0 18px;
    align-items: center;
}

.chart-card .panel-title {
    font-size: 15px;
    font-weight: 500;
}

.info-dot {
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #3f4650;
    border-radius: 50%;
    color: #3f4650;
    font-size: 12px;
    font-style: italic;
}

.chart-body {
    min-height: 220px;
    padding: 14px 28px 12px;
}

.donut-body {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
}

.donut-chart {
    width: 172px;
    height: 172px;
    margin: 0 auto;
    position: relative;
    border-radius: 50%;
    background: conic-gradient(#5368c9 0 33%, #8dcf71 33% 58%, #ffc447 58% 74%, #f35d5d 74% 86%, #55b8d6 86% 100%);
}

.donut-chart::after {
    content: "";
    position: absolute;
    inset: 54px;
    border-radius: 50%;
    background: #fff;
}

.chart-legend {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 9px;
    color: #3c4350;
    font-size: 13px;
}

.chart-legend span {
    width: 22px;
    height: 12px;
    margin-right: 8px;
    display: inline-block;
    border-radius: 2px;
    vertical-align: -1px;
}

.bar-chart {
    height: 194px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 18px;
    padding: 0 10px;
}

.bar-track {
    width: 38px;
    height: 100%;
    display: flex;
    align-items: flex-end;
    background: #eeeeee;
    border-radius: 2px 2px 0 0;
    overflow: hidden;
}

.bar-fill {
    width: 100%;
    min-height: 4px;
    background: linear-gradient(180deg, #2adbc7, #27cdb8);
    border-radius: 4px 4px 0 0;
}

@media (max-width: 1180px) {
    .sidebar {
        height: auto;
        min-height: 56px;
        flex-wrap: wrap;
        padding: 0 14px 10px;
        gap: 0 12px;
    }

    .sidebar-brand {
        line-height: 50px;
    }

    .sidebar-user,
    .sidebar-actions {
        margin-left: 0;
    }

    .sidebar-menu {
        order: 3;
        flex-basis: 100%;
        justify-content: flex-start;
    }

    .main-content {
        width: min(1110px, calc(100vw - 24px));
    }

    .target-home {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 820px) {
    .target-metric-grid,
    .analytics-grid,
    .donut-body {
        grid-template-columns: 1fr;
    }

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

    .metric-chart-card {
        min-height: 180px;
    }
}

@media (max-width: 560px) {
    .main-content {
        width: calc(100vw - 20px);
        padding-top: 12px;
    }

    .sidebar-user,
    .sidebar-actions {
        width: 100%;
    }

    .sidebar-actions .btn {
        flex: 1 1 0;
    }

    .quick-grid {
        grid-template-columns: 1fr;
        padding: 14px;
    }

    .config-switch-tabs {
        grid-template-columns: 1fr;
    }

    .config-panel-head {
        display: grid;
    }

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

    .bar-chart {
        gap: 8px;
        padding: 0;
    }

    .bar-track {
        width: 28px;
    }
}
