.ps-dashboard {
    --ps-ink: #12343b;
    --ps-muted: #5d7174;
    --ps-line: #d7e0df;
    --ps-panel: #ffffff;
    --ps-soft: #f3f8f7;
    --ps-brand: #087f83;
    --ps-brand-dark: #075e63;
    --ps-warm: #f28c00;
    color: var(--ps-ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    margin: 0 auto;
    max-width: 1180px;
}

.ps-dashboard *,
.ps-dashboard *::before,
.ps-dashboard *::after {
    box-sizing: border-box;
}

.ps-dashboard a { color: var(--ps-brand-dark); }
.ps-dashboard h2,
.ps-dashboard h3,
.ps-dashboard h4,
.ps-dashboard h5,
.ps-dashboard p { margin-top: 0; }

.ps-dashboard__header {
    align-items: center;
    background: linear-gradient(135deg, #123f46, #086f73);
    border-radius: 22px;
    color: #fff;
    display: flex;
    gap: 24px;
    justify-content: space-between;
    margin-bottom: 18px;
    overflow: hidden;
    padding: 28px;
    position: relative;
}

.ps-dashboard__header::after {
    background: radial-gradient(circle, rgba(255,255,255,.18), transparent 68%);
    content: "";
    height: 260px;
    pointer-events: none;
    position: absolute;
    right: -80px;
    top: -130px;
    width: 260px;
}

.ps-dashboard__header-banner {
    height: 100%;
    inset: 0;
    object-fit: cover;
    opacity: .13;
    pointer-events: none;
    position: absolute;
    width: 100%;
}

.ps-dashboard__identity,
.ps-dashboard__header-actions,
.ps-dashboard__section-heading,
.ps-settings-actions {
    align-items: center;
    display: flex;
}

.ps-dashboard__identity { gap: 18px; min-width: 0; position: relative; z-index: 1; }
.ps-dashboard__identity h2 { color: #fff; font-size: clamp(1.45rem, 3vw, 2rem); line-height: 1.15; margin: 2px 0 6px; }
.ps-dashboard__identity p { color: rgba(255,255,255,.82); margin-bottom: 0; }
.ps-dashboard__eyebrow { color: var(--ps-brand); font-size: .72rem; font-weight: 800; letter-spacing: .12em; margin-bottom: 6px; text-transform: uppercase; }
.ps-dashboard__header .ps-dashboard__eyebrow { color: #a8ecdf; }

.ps-dashboard__avatar {
    align-items: center;
    background: rgba(255,255,255,.14);
    border: 1px solid rgba(255,255,255,.38);
    border-radius: 18px;
    display: inline-flex;
    flex: 0 0 72px;
    font-size: 1.65rem;
    font-weight: 800;
    height: 72px;
    justify-content: center;
    overflow: hidden;
    position: relative;
    width: 72px;
}

.ps-dashboard__avatar img { height: 100%; inset: 0; object-fit: cover; position: absolute; width: 100%; }
.ps-dashboard__header-actions { flex-wrap: wrap; gap: 10px; justify-content: flex-end; position: relative; z-index: 1; }
.ps-dashboard__button,
.ps-file-control span {
    background: var(--ps-warm);
    border: 0;
    border-radius: 999px;
    color: #172f34 !important;
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-size: .88rem;
    font-weight: 800;
    justify-content: center;
    line-height: 1.2;
    padding: 12px 18px;
    text-decoration: none !important;
}

.ps-dashboard__button--secondary { background: #fff; color: var(--ps-brand-dark) !important; }
.ps-dashboard__button:hover,
.ps-dashboard__button:focus-visible,
.ps-file-control:hover span { filter: brightness(.95); transform: translateY(-1px); }
.ps-status-badge { background: rgba(168,236,223,.16); border-radius: 999px; color: #c9f8ef; font-weight: 700; padding: 4px 9px; }

.ps-dashboard__metrics {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    margin-bottom: 18px;
}

.ps-card,
.ps-analytics-card {
    background: var(--ps-panel);
    border: 1px solid var(--ps-line);
    border-radius: 16px;
    box-shadow: 0 12px 30px rgba(18,52,59,.05);
    min-width: 0;
    padding: 16px;
}

.ps-card__label,
.ps-analytics-card p { color: var(--ps-muted); font-size: .76rem; margin-bottom: 6px; }
.ps-card__value,
.ps-analytics-card strong { color: var(--ps-ink); display: block; font-size: clamp(1.05rem, 2vw, 1.45rem); line-height: 1.15; overflow-wrap: anywhere; }
.ps-card--sales { border-top: 3px solid var(--ps-brand); }
.ps-card--attention { border-top: 3px solid var(--ps-warm); }
.ps-card--complete { border-top: 3px solid #3d9b67; }

.ps-dashboard__nav {
    background: #edf3f2;
    border: 1px solid var(--ps-line);
    border-radius: 14px;
    display: flex;
    gap: 6px;
    margin-bottom: 18px;
    overflow-x: auto;
    padding: 6px;
    scrollbar-width: thin;
}

.ps-dashboard__tab { border-radius: 10px; color: var(--ps-ink) !important; flex: 0 0 auto; font-size: .84rem; font-weight: 700; padding: 9px 12px; text-decoration: none !important; }
.ps-dashboard__tab:hover { background: rgba(255,255,255,.75); }
.ps-dashboard__tab.is-active { background: var(--ps-warm); box-shadow: 0 5px 12px rgba(242,140,0,.2); }
.ps-dashboard__tab--external { margin-left: auto; }

.ps-dashboard__panel {
    background: var(--ps-panel);
    border: 1px solid var(--ps-line);
    border-radius: 20px;
    box-shadow: 0 18px 45px rgba(18,52,59,.07);
    min-height: 300px;
    padding: clamp(18px, 3vw, 28px);
}

.ps-dashboard__notice { background: #e9f8ef; border-left: 4px solid #39875a; border-radius: 8px; color: #215c3b; margin-bottom: 18px; padding: 12px 15px; }
.ps-dashboard__notice--error { background: #fff0ed; border-left-color: #b94335; color: #7b2c25; }
.ps-dashboard__two-column { display: grid; gap: 18px; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .85fr); }
.ps-dashboard__section { background: #fbfdfc; border: 1px solid var(--ps-line); border-radius: 16px; margin-bottom: 18px; padding: 20px; }
.ps-dashboard__section--wide { margin-top: 18px; }
.ps-dashboard__section-heading { align-items: flex-start; gap: 18px; justify-content: space-between; }
.ps-dashboard__section-heading h3 { font-size: 1.15rem; margin-bottom: 5px; }
.ps-dashboard__section-heading p:not(.ps-dashboard__eyebrow) { color: var(--ps-muted); font-size: .86rem; margin-bottom: 10px; }
.ps-dashboard__section-heading > a { flex: 0 0 auto; font-size: .82rem; font-weight: 800; }

.ps-dashboard__mini-metrics { border-top: 1px solid var(--ps-line); display: grid; gap: 10px; grid-template-columns: repeat(3, 1fr); margin-top: 16px; padding-top: 15px; }
.ps-dashboard__mini-metrics span { color: var(--ps-muted); font-size: .72rem; }
.ps-dashboard__mini-metrics strong { color: var(--ps-ink); display: block; font-size: 1rem; margin-bottom: 2px; }
.ps-dashboard__success { color: #237047; font-weight: 700; }
.ps-dashboard__checklist { color: var(--ps-muted); margin: 10px 0 0; padding-left: 20px; }
.ps-dashboard__checklist li { margin-bottom: 7px; }

.ps-progress { background: #e5eceb; border-radius: 999px; height: 10px; margin: 12px 0 18px; overflow: hidden; }
.ps-progress span { background: linear-gradient(90deg, var(--ps-brand), #46a87b); border-radius: inherit; display: block; height: 100%; }
.ps-dashboard__action-grid { display: grid; gap: 12px; grid-template-columns: repeat(3, 1fr); }
.ps-quick-action { background: #fff; border: 1px solid var(--ps-line); border-radius: 14px; display: grid; grid-template-columns: 1fr auto; padding: 16px; text-decoration: none !important; transition: border-color .15s, box-shadow .15s, transform .15s; }
.ps-quick-action strong { color: var(--ps-ink); }
.ps-quick-action span { color: var(--ps-muted); font-size: .77rem; grid-column: 1; margin-top: 4px; }
.ps-quick-action b { align-self: center; grid-column: 2; grid-row: 1 / span 2; }
.ps-quick-action:hover { border-color: var(--ps-brand); box-shadow: 0 12px 25px rgba(18,52,59,.08); transform: translateY(-2px); }

.ps-dashboard__analytics-cards { display: grid; gap: 12px; grid-template-columns: repeat(3, 1fr); margin: 18px 0; }
.ps-range-switcher { background: #edf3f2; border-radius: 999px; display: flex; padding: 4px; }
.ps-range-switcher a { border-radius: 999px; color: var(--ps-muted); font-size: .78rem; font-weight: 800; padding: 7px 10px; text-decoration: none; }
.ps-range-switcher a.is-active { background: #fff; box-shadow: 0 3px 10px rgba(18,52,59,.1); color: var(--ps-brand-dark); }

.ps-sales-chart { align-items: end; border-bottom: 1px solid var(--ps-line); display: flex; gap: clamp(2px, .5vw, 7px); height: 230px; padding: 14px 2px 0; }
.ps-sales-chart--compact { height: 145px; }
.ps-sales-chart__column { align-items: center; display: flex; flex: 1 1 0; height: 100%; justify-content: flex-end; min-width: 2px; position: relative; }
.ps-sales-chart__bar { background: linear-gradient(180deg, #18a8a6, var(--ps-brand-dark)); border-radius: 5px 5px 1px 1px; display: block; min-height: 4px; width: min(100%, 24px); }
.ps-sales-chart__column small { bottom: -24px; color: var(--ps-muted); font-size: .62rem; left: 50%; position: absolute; transform: translateX(-50%); white-space: nowrap; }
.ps-sales-chart + .ps-chart-note { margin-top: 30px; }
.ps-chart-empty,
.ps-chart-note { color: var(--ps-muted); font-size: .84rem; padding: 18px 0; text-align: center; }

.ps-status-chart__row { margin: 15px 0; }
.ps-status-chart__row > div:first-child { display: flex; font-size: .82rem; justify-content: space-between; margin-bottom: 6px; }
.ps-status-chart__track { background: #e4eceb; border-radius: 999px; height: 8px; overflow: hidden; }
.ps-status-chart__track span { background: var(--ps-brand); border-radius: inherit; display: block; height: 100%; }

.ps-table-wrap,
.ps-dashboard__panel { overflow-x: auto; }
.ps-table { border-collapse: collapse; font-size: .82rem; margin: 18px 0; min-width: 680px; width: 100%; }
.ps-table--compact { min-width: 420px; }
.ps-table th { background: var(--ps-soft); color: var(--ps-muted); font-size: .7rem; letter-spacing: .04em; padding: 10px; text-align: left; text-transform: uppercase; }
.ps-table td { border-bottom: 1px solid var(--ps-line); padding: 11px 10px; vertical-align: top; }
.ps-table tr:last-child td { border-bottom: 0; }

.ps-dashboard__form { background: #f8fbfa; border: 1px solid var(--ps-line); border-radius: 15px; margin: 18px 0; padding: 18px; }
.ps-dashboard__form label { color: var(--ps-ink); display: block; font-size: .78rem; font-weight: 750; }
.ps-dashboard__form input:not([type="checkbox"]):not([type="file"]),
.ps-dashboard__form select,
.ps-dashboard__form textarea {
    background: #fff;
    border: 1px solid #bccac8;
    border-radius: 9px;
    color: #173a40;
    display: block;
    font: inherit;
    margin-top: 6px;
    min-height: 42px;
    padding: 9px 11px;
    width: 100%;
}
.ps-dashboard__form input:focus,
.ps-dashboard__form select:focus,
.ps-dashboard__form textarea:focus { border-color: var(--ps-brand); box-shadow: 0 0 0 3px rgba(8,127,131,.12); outline: none; }
.ps-grid { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ps-store-settings { background: transparent; border: 0; margin-bottom: 0; padding: 0; }
.ps-settings-section { border-top: 1px solid var(--ps-line); margin-top: 22px; padding-top: 22px; }
.ps-settings-section__heading { display: grid; gap: 6px; grid-template-columns: minmax(150px, .35fr) 1fr; margin-bottom: 16px; }
.ps-settings-section__heading h4 { font-size: 1rem; margin: 0; }
.ps-settings-section__heading p { color: var(--ps-muted); font-size: .8rem; margin: 0; }
.ps-toggle { align-items: center; display: flex !important; gap: 9px; margin-top: 16px; }
.ps-toggle input { height: 18px; width: 18px; }

.ps-media-grid { display: grid; gap: 15px; grid-template-columns: minmax(230px, .72fr) minmax(300px, 1.28fr); }
.ps-media-card { background: #fff; border: 1px solid var(--ps-line); border-radius: 15px; overflow: hidden; }
.ps-media-card__preview { align-items: center; background: linear-gradient(135deg, #e7f0ee, #f8f1e5); color: var(--ps-muted); display: flex; font-size: .72rem; font-weight: 800; justify-content: center; min-height: 190px; overflow: hidden; }
.ps-media-card__preview--logo { margin: 20px auto 0; min-height: 150px; width: 150px; border-radius: 28px; }
.ps-media-card__preview--banner { aspect-ratio: 8 / 3; min-height: 150px; }
.ps-media-card__preview img { height: 100%; object-fit: cover; width: 100%; }
.ps-media-card__body { padding: 17px; }
.ps-media-card__body h5 { font-size: .95rem; margin-bottom: 6px; }
.ps-media-card__body p { color: var(--ps-muted); font-size: .75rem; line-height: 1.5; }
.ps-file-control { align-items: center; display: flex !important; flex-wrap: wrap; gap: 10px; }
.ps-file-control input { color: var(--ps-muted); font-size: .75rem; max-width: 100%; }
.ps-file-control span { background: var(--ps-brand); color: #fff !important; font-size: .76rem; padding: 9px 14px; }
.ps-media-card__remove { color: var(--ps-muted) !important; font-weight: 500 !important; margin-top: 12px; }
.ps-settings-actions { border-top: 1px solid var(--ps-line); gap: 20px; justify-content: space-between; margin-top: 24px; padding-top: 20px; }
.ps-settings-actions p { color: var(--ps-muted); font-size: .8rem; margin-bottom: 0; }

@media (max-width: 960px) {
    .ps-dashboard__metrics { grid-template-columns: repeat(3, 1fr); }
    .ps-dashboard__action-grid { grid-template-columns: repeat(2, 1fr); }
    .ps-dashboard__analytics-cards { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
    .ps-dashboard__header { align-items: flex-start; flex-direction: column; padding: 22px; }
    .ps-dashboard__header-actions { justify-content: flex-start; width: 100%; }
    .ps-dashboard__two-column,
    .ps-media-grid,
    .ps-settings-section__heading { grid-template-columns: 1fr; }
    .ps-dashboard__metrics { grid-template-columns: repeat(2, 1fr); }
    .ps-dashboard__section-heading { flex-direction: column; }
    .ps-dashboard__mini-metrics { grid-template-columns: 1fr; }
    .ps-media-card__preview--logo { margin-left: 17px; }
}

@media (max-width: 480px) {
    .ps-dashboard__avatar { flex-basis: 56px; height: 56px; width: 56px; }
    .ps-dashboard__metrics,
    .ps-dashboard__analytics-cards,
    .ps-dashboard__action-grid,
    .ps-grid { grid-template-columns: 1fr; }
    .ps-dashboard__button { flex: 1 1 auto; }
    .ps-settings-actions { align-items: stretch; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
    .ps-dashboard *, .ps-dashboard *::before, .ps-dashboard *::after { scroll-behavior: auto !important; transition: none !important; }
}
