:root {
    --sidebar-width: 276px;
    --sidebar-collapsed: 88px;
    --topbar-height: 84px;
    --footer-height: 50px;

    --bg: #f8f5fa;
    --surface: #ffffff;
    --surface-soft: #fcf9fd;
    --surface-pink: #fff4fb;
    --border: #eadfed;
    --border-strong: #ddcfe1;

    --text: #231429;
    --muted: #8e7c94;
    --muted-2: #aa9bae;

    --primary: #8e2a86;
    --primary-2: #c634a2;
    --primary-3: #e74db2;
    --primary-soft: #f8e9f5;

    --success: #28a169;
    --success-soft: #e8f7ef;
    --warning: #ce8d22;
    --warning-soft: #fff3de;
    --danger: #d94f72;
    --danger-soft: #fdeaf0;
    --blue: #2d8be5;
    --blue-soft: #eaf4ff;

    --shadow-sm: 0 5px 16px rgba(67, 32, 72, .055);
    --shadow-md: 0 13px 34px rgba(67, 32, 72, .075);
    --shadow-lg: 0 22px 60px rgba(77, 38, 83, .12);

    --radius-sm: 12px;
    --radius-md: 18px;
    --radius-lg: 25px;

    font-family: "Tajawal", "Segoe UI", Tahoma, Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-width: 320px;
    color: var(--text);
    background:
        radial-gradient(circle at 12% 0%, rgba(226, 179, 235, .16), transparent 27%),
        radial-gradient(circle at 100% 9%, rgba(211, 100, 185, .08), transparent 25%),
        var(--bg);
    font-family: inherit;
    -webkit-font-smoothing: antialiased;
}

button,
input {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button {
    color: inherit;
}

a {
    color: inherit;
    text-decoration: none;
}

svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.svg-library {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

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

.sidebar {
    position: fixed;
    inset: 0 0 0 auto;
    z-index: 50;
    width: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, .93);
    border-left: 1px solid var(--border);
    box-shadow: -12px 0 45px rgba(67, 32, 72, .045);
    backdrop-filter: blur(18px);
    transition: width .3s ease, transform .3s ease;
}

.sidebar__head {
    min-height: var(--topbar-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
}

.brand {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand__mark {
    position: relative;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    filter: drop-shadow(0 8px 13px rgba(176, 35, 139, .19));
}

.brand__mark span {
    position: absolute;
    display: block;
    border-radius: 100% 12px 100% 100%;
    transform: rotate(37deg);
    background: linear-gradient(135deg, #e348b3, #7b2183);
}

.brand__mark span:nth-child(1) {
    width: 31px;
    height: 19px;
    top: 1px;
    right: 4px;
}

.brand__mark span:nth-child(2) {
    width: 27px;
    height: 17px;
    top: 16px;
    right: 13px;
    opacity: .9;
}

.brand__mark span:nth-child(3) {
    width: 21px;
    height: 14px;
    top: 28px;
    right: 4px;
    opacity: .76;
}

.brand__text {
    display: grid;
    gap: 1px;
    white-space: nowrap;
}

.brand__text strong {
    color: #72206e;
    font-size: 23px;
    line-height: 1;
    letter-spacing: -.4px;
}

.brand__text small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.sidebar__mobile-close {
    display: none !important;
}

.sidebar__nav {
    display: grid;
    gap: 6px;
    overflow-y: auto;
    padding: 20px 14px 10px;
    scrollbar-width: thin;
}

.nav-item {
    min-height: 50px;
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 0 15px;
    border-radius: 14px;
    color: #49394e;
    font-size: 14px;
    font-weight: 600;
    transition: .2s ease;
}

.nav-item svg {
    flex: 0 0 21px;
    color: #6f5e75;
}

.nav-item:hover {
    color: var(--primary);
    background: #fbf2f9;
    transform: translateX(-2px);
}

.nav-item.is-active {
    color: var(--primary);
    background: linear-gradient(90deg, #fbf1f9, #f7e6f4);
    box-shadow: inset -3px 0 0 var(--primary-2);
}

.nav-item.is-active svg {
    color: var(--primary-2);
}

.nav-badge {
    margin-inline-start: auto;
    min-width: 24px;
    height: 22px;
    padding: 0 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50px;
    color: white;
    background: linear-gradient(135deg, var(--primary-2), var(--primary));
    font-size: 11px;
    font-weight: 800;
}

.sidebar__upgrade {
    margin: auto 16px 18px;
    padding: 20px 17px 16px;
    text-align: center;
    border: 1px solid #efd5e9;
    border-radius: 20px;
    background:
        radial-gradient(circle at 90% 10%, rgba(240, 100, 190, .17), transparent 37%),
        linear-gradient(160deg, #fffafd, #fff1f9);
}

.upgrade-spark {
    display: block;
    margin-bottom: 4px;
    color: var(--primary-2);
    font-size: 30px;
    line-height: 1;
}

.sidebar__upgrade strong {
    color: var(--primary);
    font-size: 15px;
}

.sidebar__upgrade p {
    margin: 7px 0 14px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.75;
}

.sidebar__footer {
    padding: 0 16px 16px;
}

.sidebar-collapse {
    width: 100%;
    min-height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 1px solid var(--border);
    border-radius: 13px;
    color: #68566d;
    background: white;
    cursor: pointer;
    transition: .2s ease;
}

.sidebar-collapse:hover {
    color: var(--primary);
    border-color: #d9bdd5;
    background: #fff9fd;
}

.sidebar-collapse svg {
    width: 18px;
    transform: rotate(180deg);
    transition: transform .3s ease;
}

.sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 45;
    display: none;
    background: rgba(34, 19, 39, .42);
    backdrop-filter: blur(3px);
}

.workspace {
    min-height: 100vh;
    margin-inline-end: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    transition: margin-inline-end .3s ease;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    min-height: var(--topbar-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 12px 28px;
    border-bottom: 1px solid rgba(230, 218, 234, .85);
    background: rgba(255, 255, 255, .87);
    box-shadow: 0 6px 24px rgba(69, 38, 73, .03);
    backdrop-filter: blur(17px);
}

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

.topbar__group--profile {
    overflow: visible;
}

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

.icon-button,
.topbar-pill,
.profile-menu__button,
.select-pill,
.date-card {
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, .92);
    cursor: pointer;
    transition: .2s ease;
}

.icon-button:hover,
.topbar-pill:hover,
.profile-menu__button:hover,
.select-pill:hover,
.date-card:hover {
    border-color: #d8bfd5;
    box-shadow: 0 8px 20px rgba(92, 48, 98, .07);
    transform: translateY(-1px);
}

.icon-button {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
}

.icon-button svg {
    width: 20px;
    height: 20px;
}

.sidebar-toggle {
    color: var(--primary-2);
    border-color: #e8c9e3;
    background: #fff9fd;
}

.notification-button {
    position: relative;
    color: #6e5e73;
}

.notification-dot {
    position: absolute;
    top: 9px;
    right: 10px;
    width: 7px;
    height: 7px;
    border: 2px solid white;
    border-radius: 50%;
    background: #e649a8;
}

.profile-menu__button {
    min-width: 175px;
    height: 52px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px 6px 12px;
    border-color: transparent;
    border-radius: 15px;
    background: transparent;
}

.profile-menu__text {
    min-width: 0;
    display: grid;
    text-align: right;
}

.profile-menu__text strong {
    overflow: hidden;
    color: #2f2034;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-menu__text small {
    color: var(--muted);
    font-size: 11px;
}

.avatar {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.avatar--photo {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    border: 2px solid white;
    background: linear-gradient(155deg, #efe4dc 0 55%, #c5c9cf 55%);
    box-shadow: 0 5px 15px rgba(51, 29, 54, .17);
}

.avatar__face {
    position: absolute;
    top: 9px;
    left: 12px;
    width: 18px;
    height: 21px;
    border-radius: 45% 45% 48% 48%;
    background: #b97c5e;
}

.avatar__hair {
    position: absolute;
    z-index: 2;
    top: 5px;
    left: 10px;
    width: 22px;
    height: 15px;
    border-radius: 55% 55% 35% 35%;
    background: #2e2727;
    transform: rotate(-5deg);
}

.avatar__hair::after {
    content: "";
    position: absolute;
    top: 10px;
    left: 3px;
    width: 17px;
    height: 10px;
    border-radius: 0 0 50% 50%;
    border-bottom: 4px solid #302426;
}

.avatar__shirt {
    position: absolute;
    bottom: -8px;
    left: 5px;
    width: 32px;
    height: 21px;
    border-radius: 50% 50% 0 0;
    background: #29384a;
}

.topbar-pill {
    height: 46px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 14px;
    border-radius: 13px;
    color: #4d3b51;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.topbar-pill > svg:not(.dropdown-caret) {
    width: 19px;
    height: 19px;
}

.season-icon {
    color: #ec8d1a;
}

.dropdown {
    position: relative;
}

.dropdown-caret {
    width: 15px !important;
    height: 15px !important;
    margin-inline-start: 2px;
    transform: rotate(90deg);
    transition: transform .2s ease;
}

.dropdown.is-open .dropdown-caret {
    transform: rotate(-90deg);
}

.dropdown__menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 100;
    min-width: 178px;
    display: none;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: rgba(255, 255, 255, .98);
    box-shadow: var(--shadow-lg);
    animation: menuOpen .18s ease;
}

.dropdown__menu--wide {
    min-width: 230px;
}

.dropdown.is-open > .dropdown__menu {
    display: grid;
}

.dropdown__menu a,
.dropdown__menu button {
    width: 100%;
    min-height: 40px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 10px;
    border: 0;
    border-radius: 10px;
    color: #4f3c55;
    background: transparent;
    text-align: right;
    cursor: pointer;
    transition: .16s ease;
}

.dropdown__menu a:hover,
.dropdown__menu button:hover {
    color: var(--primary);
    background: #fbf2f9;
}

.dropdown__menu svg {
    width: 17px;
    height: 17px;
}

.dropdown__menu small {
    margin-inline-start: auto;
    color: var(--success);
    font-size: 10px;
}

@keyframes menuOpen {
    from { opacity: 0; transform: translateY(-6px) scale(.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.main-content {
    flex: 1;
    width: 100%;
    max-width: 1800px;
    margin: 0 auto;
    padding: 18px 24px 28px;
}

.welcome-card {
    position: relative;
    min-height: 125px;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(300px, 1fr) auto 180px;
    align-items: center;
    gap: 24px;
    padding: 22px 30px;
    border: 1px solid #efd8e9;
    border-radius: 22px;
    background:
        radial-gradient(circle at 82% 20%, rgba(242, 144, 211, .22), transparent 29%),
        radial-gradient(circle at 10% 80%, rgba(203, 146, 221, .17), transparent 27%),
        linear-gradient(110deg, #fffafd, #fff3fa);
    box-shadow: var(--shadow-sm);
}

.welcome-card::before,
.welcome-card::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: rgba(217, 74, 176, .06);
}

.welcome-card::before {
    width: 170px;
    height: 170px;
    top: -100px;
    left: 25%;
}

.welcome-card::after {
    width: 110px;
    height: 110px;
    bottom: -65px;
    left: 42%;
}

.welcome-card__content {
    position: relative;
    z-index: 2;
}

.eyebrow,
.panel__eyebrow {
    display: block;
    color: var(--primary-2);
    font-size: 11px;
    font-weight: 800;
}

.welcome-card h1 {
    margin: 4px 0 5px;
    font-size: clamp(23px, 2vw, 31px);
    letter-spacing: -.6px;
}

.welcome-card h1 span {
    color: var(--primary-2);
}

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

.welcome-card__date {
    z-index: 5;
}

.date-card {
    min-width: 225px;
    min-height: 70px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 17px;
    text-align: right;
}

.date-card__icon {
    flex: 0 0 43px;
    width: 43px;
    height: 43px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: var(--primary-2);
    background: var(--surface-pink);
}

.date-card span:not(.date-card__icon) {
    display: grid;
    gap: 2px;
}

.date-card small {
    color: #755d78;
    font-size: 11px;
}

.date-card strong {
    color: #4e224a;
    font-size: 14px;
}

.welcome-illustration {
    position: relative;
    align-self: stretch;
    min-height: 105px;
}

.mini-calendar {
    position: absolute;
    top: 4px;
    right: 22px;
    width: 103px;
    height: 93px;
    transform: rotate(4deg);
    filter: drop-shadow(0 14px 15px rgba(113, 33, 100, .19));
}

.mini-calendar__head {
    height: 27px;
    border-radius: 15px 15px 3px 3px;
    background: linear-gradient(135deg, #e452b9, #9b298e);
}

.mini-calendar__body {
    height: 67px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 7px;
    padding: 13px 10px;
    border-radius: 0 0 16px 16px;
    background: rgba(255, 255, 255, .96);
}

.mini-calendar__body span {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    color: white;
    background: linear-gradient(135deg, #e774c2, #9a4bce);
    font-size: 10px;
    font-weight: 900;
}

.mini-calendar__rings {
    position: absolute;
    z-index: 3;
    top: -8px;
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: space-between;
}

.mini-calendar__rings i {
    width: 8px;
    height: 21px;
    display: block;
    border-radius: 6px;
    background: #722168;
    box-shadow: inset 0 -6px 0 rgba(255,255,255,.25);
}

.illustration-bell {
    position: absolute;
    right: 4px;
    bottom: 7px;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px 14px 20px 20px;
    color: white;
    background: linear-gradient(135deg, #eb5fbb, #99268c);
    transform: rotate(-8deg);
    box-shadow: 0 12px 20px rgba(144, 35, 130, .21);
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.kpi-card {
    min-height: 111px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 17px;
    border: 1px solid var(--border);
    border-radius: 19px;
    background: rgba(255,255,255,.91);
    box-shadow: var(--shadow-sm);
    transition: .22s ease;
}

.kpi-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.kpi-card__icon {
    flex: 0 0 52px;
    width: 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 17px;
}

.kpi-card__icon svg {
    width: 25px;
    height: 25px;
}

.kpi-card__icon--purple { color: #9951cb; background: #f2eafb; }
.kpi-card__icon--orange { color: #e38b1b; background: #fff0df; }
.kpi-card__icon--green  { color: #22a35f; background: #e8f7ef; }
.kpi-card__icon--red    { color: #e04b78; background: #fdeaf1; }
.kpi-card__icon--blue   { color: #2d8be5; background: #e9f4ff; }

.kpi-card > div {
    min-width: 0;
    display: grid;
}

.kpi-card__label {
    overflow: hidden;
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.kpi-card__value {
    margin: 2px 0 1px;
    font-size: clamp(20px, 1.7vw, 27px);
    letter-spacing: -.4px;
    white-space: nowrap;
}

.kpi-card__value em {
    font-size: 11px;
    font-style: normal;
    font-weight: 700;
}

.trend {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 9.5px;
    white-space: nowrap;
}

.trend svg {
    width: 12px;
    height: 12px;
}

.trend--up { color: var(--success); }
.trend--down { color: var(--danger); }
.trend--neutral { color: #6b9a79; }

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(280px, .95fr) minmax(420px, 1.55fr) minmax(270px, .9fr);
    gap: 14px;
    margin-top: 14px;
}

.panel {
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: rgba(255,255,255,.92);
    box-shadow: var(--shadow-sm);
}

.panel__header {
    min-height: 67px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 15px 17px;
    border-bottom: 1px solid #eee5f0;
}

.panel__header h2 {
    margin: 3px 0 0;
    font-size: 15px;
    letter-spacing: -.2px;
}

.panel__more {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 10px;
    color: var(--muted);
    background: #faf7fb;
    cursor: pointer;
}

.panel__more:hover {
    color: var(--primary);
    background: var(--primary-soft);
}

.select-pill {
    min-height: 35px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0 11px;
    border-radius: 10px;
    color: #6c5971;
    font-size: 11px;
    font-weight: 700;
}

.select-pill svg {
    width: 13px;
    height: 13px;
    transform: rotate(90deg);
}

.services-chart {
    min-height: 280px;
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    align-items: center;
    gap: 12px;
    padding: 20px 16px 18px;
}

.donut-chart {
    position: relative;
    width: min(175px, 100%);
    aspect-ratio: 1;
    margin: auto;
    border-radius: 50%;
    background: conic-gradient(
        #7f79dc 0 43%,
        #79d6c6 43% 68%,
        #ffae70 68% 86%,
        #d6a4e8 86% 97%,
        #f3729a 97% 100%
    );
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.7), 0 12px 30px rgba(83, 55, 96, .08);
    animation: donutReveal 1s ease both;
}

.donut-chart::after {
    content: "";
    position: absolute;
    inset: 28%;
    border-radius: 50%;
    background: white;
    box-shadow: inset 0 0 0 1px #f0e7f2;
}

.donut-chart__center {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-content: center;
    text-align: center;
}

.donut-chart__center small {
    color: var(--muted);
    font-size: 11px;
}

.donut-chart__center strong {
    font-size: 27px;
    line-height: 1;
}

@keyframes donutReveal {
    from { transform: scale(.78) rotate(-40deg); opacity: 0; }
    to { transform: scale(1) rotate(0); opacity: 1; }
}

.chart-legend {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.chart-legend li {
    display: grid;
    grid-template-columns: 9px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    color: #57445c;
    font-size: 10px;
}

.chart-legend li > span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--legend);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--legend) 14%, transparent);
}

.chart-legend strong {
    overflow: hidden;
    font-size: 10.5px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chart-legend small {
    color: var(--muted);
    direction: ltr;
}

.line-chart {
    position: relative;
    min-height: 280px;
    padding: 18px 18px 12px 40px;
    direction: ltr;
}

.line-chart__y {
    position: absolute;
    inset: 19px auto 42px 11px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #a392a8;
    font-size: 9px;
}

.line-chart__svg {
    width: 100%;
    height: 222px;
    overflow: visible;
}

.chart-grid-lines line {
    stroke: #eee6f0;
    stroke-width: 1;
    stroke-dasharray: 4 4;
}

.chart-area {
    fill: url(#chartFill);
}

.chart-line {
    fill: none;
    stroke: #bf34a0;
    stroke-width: 3;
    vector-effect: non-scaling-stroke;
    filter: drop-shadow(0 7px 6px rgba(190, 49, 158, .12));
    stroke-dasharray: 1200;
    stroke-dashoffset: 1200;
    animation: drawLine 1.4s .2s ease forwards;
}

@keyframes drawLine {
    to { stroke-dashoffset: 0; }
}

.chart-points circle {
    fill: white;
    stroke: #c53ba6;
    stroke-width: 3;
    vector-effect: non-scaling-stroke;
}

.chart-points circle.is-highlight {
    fill: #d548b1;
    stroke: #f5bee6;
    stroke-width: 6;
}

.chart-labels text {
    fill: #5f4b65;
    font-size: 11px;
    font-weight: 800;
    text-anchor: middle;
}

.chart-labels text.is-highlight {
    fill: #bc2f9b;
}

.line-chart__x {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    color: #8e7d93;
    font-size: 9px;
    text-align: center;
    direction: rtl;
}

.panel--quick-view {
    display: flex;
    flex-direction: column;
}

.quick-view {
    flex: 1;
    display: grid;
    align-content: start;
    gap: 10px;
    padding: 15px;
}

.quick-view__item {
    width: 100%;
    min-height: 57px;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) 32px;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: 0;
    border-radius: 13px;
    text-align: right;
    cursor: pointer;
    transition: .2s ease;
}

.quick-view__item:hover {
    transform: translateX(-3px);
    filter: saturate(1.1);
}

.quick-view__item--orange { background: linear-gradient(90deg, #fff9f0, #fff1df); }
.quick-view__item--green { background: linear-gradient(90deg, #f5fcf8, #e9f8ef); }
.quick-view__item--purple { background: linear-gradient(90deg, #fcf7ff, #f3eafa); }

.quick-view__number {
    font-size: 21px;
    font-weight: 800;
}

.quick-view__item > span:nth-child(2) {
    min-width: 0;
    display: grid;
    gap: 1px;
}

.quick-view__item strong {
    overflow: hidden;
    font-size: 10.5px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.quick-view__item small {
    color: var(--muted);
    font-size: 8.5px;
}

.quick-view__item > svg {
    justify-self: end;
    width: 20px;
    height: 20px;
}

.quick-view__item--orange > svg { color: #de8f21; }
.quick-view__item--green > svg { color: #2ba76a; }
.quick-view__item--purple > svg { color: #a14dca; }

.button {
    min-height: 39px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 15px;
    border: 0;
    border-radius: 11px;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    transition: .2s ease;
}

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

.button--block {
    width: 100%;
}

.button--primary {
    color: white;
    background: linear-gradient(135deg, var(--primary-3), var(--primary));
    box-shadow: 0 9px 19px rgba(171, 42, 145, .19);
}

.button--ghost {
    color: var(--primary-2);
    border: 1px solid #edd4e8;
    background: white;
}

.button--soft {
    color: var(--primary);
    border: 1px solid #ecd7e7;
    background: #fff8fc;
}

.lower-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 14px;
    margin-top: 14px;
}

.panel__header--table {
    flex-wrap: wrap;
}

.table-tools {
    display: flex;
    align-items: center;
    gap: 8px;
}

.table-search {
    width: 210px;
    height: 39px;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 0 11px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: #fff;
}

.table-search:focus-within {
    border-color: #d7abd0;
    box-shadow: 0 0 0 3px rgba(191, 52, 160, .08);
}

.table-search svg {
    width: 17px;
    height: 17px;
    color: var(--muted);
}

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

.table-search input::placeholder {
    color: #b2a4b5;
}

.table-wrap {
    overflow-x: auto;
}

.appointments-table {
    width: 100%;
    min-width: 930px;
    border-collapse: collapse;
}

.appointments-table th,
.appointments-table td {
    padding: 13px 14px;
    border-bottom: 1px solid #f0e8f2;
    text-align: right;
    white-space: nowrap;
}

.appointments-table th {
    color: #8d7c92;
    background: #fcf9fd;
    font-size: 9px;
    font-weight: 800;
}

.appointments-table td {
    color: #4f3e54;
    font-size: 10px;
}

.appointments-table tbody tr {
    transition: .16s ease;
}

.appointments-table tbody tr:hover {
    background: #fffbfe;
}

.appointments-table tbody tr:last-child td {
    border-bottom: 0;
}

.appointment-id {
    color: var(--primary);
    font-weight: 800;
}

.customer {
    display: flex;
    align-items: center;
    gap: 9px;
}

.customer > span:last-child {
    display: grid;
    gap: 2px;
}

.customer strong {
    color: #2f2034;
    font-size: 10.5px;
}

.customer small {
    color: var(--muted);
    font-size: 9px;
    direction: ltr;
    text-align: right;
}

.avatar--mini {
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    color: white;
    font-size: 12px;
    font-weight: 800;
}

.avatar--one { background: linear-gradient(135deg, #3d5369, #1c2937); }
.avatar--two { background: linear-gradient(135deg, #d96cb0, #8a357c); }
.avatar--three { background: linear-gradient(135deg, #b98755, #6a4731); }

.status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 25px;
    padding: 0 10px;
    border-radius: 50px;
    font-size: 9px;
    font-weight: 800;
}

.status--confirmed {
    color: #218652;
    background: var(--success-soft);
}

.status--waiting {
    color: #b06f16;
    background: var(--warning-soft);
}

.row-actions {
    display: flex;
    gap: 6px;
}

.row-actions button {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 9px;
    color: var(--primary-2);
    background: white;
    cursor: pointer;
    transition: .16s ease;
}

.row-actions button:hover {
    border-color: #e3bfdc;
    background: #fff5fb;
}

.row-actions svg {
    width: 14px;
    height: 14px;
}

.empty-search {
    display: none;
    padding: 30px;
    color: var(--muted);
    text-align: center;
    font-size: 12px;
}

.quick-actions-panel {
    overflow: hidden;
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 14px;
}

.quick-action {
    min-height: 96px;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 4px;
    padding: 10px;
    border: 1px solid transparent;
    border-radius: 14px;
    cursor: pointer;
    transition: .2s ease;
}

.quick-action:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-sm);
}

.quick-action svg {
    width: 23px;
    height: 23px;
}

.quick-action span {
    font-size: 11px;
    font-weight: 800;
}

.quick-action small {
    color: var(--muted);
    font-size: 8px;
}

.quick-action--pink {
    color: var(--primary-2);
    border-color: #efd8e9;
    background: linear-gradient(145deg, #fffafd, #fff1f9);
}

.quick-action--blue {
    color: var(--blue);
    border-color: #dceafb;
    background: linear-gradient(145deg, #fbfdff, #eff7ff);
}

.quick-action--wide {
    grid-column: 1 / -1;
    min-height: 55px;
    grid-template-columns: auto auto;
    color: var(--primary);
    border-color: #e7d3ec;
    background: linear-gradient(90deg, #faf3ff, #f2e7fb);
}

.quick-action--wide small {
    display: none;
}

.copyright-bar {
    min-height: var(--footer-height);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 20px;
    border-top: 1px solid var(--border);
    color: #a392a8;
    background: rgba(255,255,255,.68);
    font-size: 10px;
}

.copyright-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #d0bccc;
}

.toast {
    position: fixed;
    z-index: 200;
    bottom: 22px;
    left: 22px;
    min-width: 250px;
    max-width: calc(100vw - 44px);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid #d7eadf;
    border-radius: 14px;
    color: #2b6446;
    background: rgba(250,255,252,.96);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    pointer-events: none;
    transform: translateY(18px);
    transition: .25s ease;
}

.toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.toast__icon {
    width: 31px;
    height: 31px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    color: white;
    background: var(--success);
}

.toast__icon svg {
    width: 17px;
    height: 17px;
}

/* Collapsed desktop sidebar */
.app-shell.is-collapsed .sidebar {
    width: var(--sidebar-collapsed);
}

.app-shell.is-collapsed .workspace {
    margin-inline-end: var(--sidebar-collapsed);
}

.app-shell.is-collapsed .brand__text,
.app-shell.is-collapsed .nav-item span:not(.nav-badge),
.app-shell.is-collapsed .sidebar__upgrade,
.app-shell.is-collapsed .sidebar-collapse span {
    display: none;
}

.app-shell.is-collapsed .sidebar__head {
    justify-content: center;
    padding-inline: 10px;
}

.app-shell.is-collapsed .nav-item {
    justify-content: center;
    padding-inline: 0;
}

.app-shell.is-collapsed .nav-badge {
    position: absolute;
    margin: -22px -28px 0 0;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    font-size: 9px;
}

.app-shell.is-collapsed .sidebar__footer {
    padding-inline: 10px;
}

.app-shell.is-collapsed .sidebar-collapse svg {
    transform: rotate(0);
}

@media (max-width: 1450px) {
    .topbar-pill {
        padding-inline: 11px;
    }

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

    .kpi-card:nth-child(4),
    .kpi-card:nth-child(5) {
        grid-column: span 1;
    }

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

    .panel--quick-view {
        grid-column: 1 / -1;
    }

    .quick-view {
        grid-template-columns: repeat(4, 1fr);
        align-items: center;
    }

    .quick-view .button {
        height: 57px;
    }
}

@media (max-width: 1180px) {
    .topbar__group--profile {
        gap: 6px;
    }

    .topbar-pill span {
        display: none;
    }

    .topbar-pill {
        width: 44px;
        justify-content: center;
        padding: 0;
    }

    .topbar-pill .dropdown-caret {
        display: none;
    }

    .profile-menu__button {
        min-width: 158px;
    }

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

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

    .quick-action--wide {
        grid-column: auto;
        min-height: 96px;
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    :root {
        --topbar-height: 70px;
    }

    .sidebar {
        width: min(310px, 88vw);
        transform: translateX(110%);
    }

    .sidebar__mobile-close {
        display: inline-flex !important;
    }

    .sidebar-collapse {
        display: none;
    }

    .workspace,
    .app-shell.is-collapsed .workspace {
        margin-inline-end: 0;
    }

    .app-shell.is-collapsed .sidebar {
        width: min(310px, 88vw);
    }

    .app-shell.is-collapsed .brand__text,
    .app-shell.is-collapsed .nav-item span:not(.nav-badge),
    .app-shell.is-collapsed .sidebar__upgrade {
        display: initial;
    }

    .app-shell.is-collapsed .nav-item {
        justify-content: flex-start;
        padding-inline: 15px;
    }

    .app-shell.is-collapsed .nav-badge {
        position: static;
        margin: 0 auto 0 0;
        min-width: 24px;
        height: 22px;
        padding: 0 7px;
        font-size: 11px;
    }

    body.sidebar-open {
        overflow: hidden;
    }

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

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

    .topbar {
        padding: 9px 16px;
    }

    .topbar__group--profile > .dropdown:not(.profile-menu) {
        display: none;
    }

    .main-content {
        padding: 14px;
    }

    .welcome-card {
        grid-template-columns: 1fr auto;
        padding: 20px;
    }

    .welcome-illustration {
        display: none;
    }

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

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

    .panel--quick-view {
        grid-column: auto;
    }

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

    .services-chart {
        grid-template-columns: 190px 1fr;
    }
}

@media (max-width: 620px) {
    .topbar {
        gap: 8px;
        padding-inline: 10px;
    }

    .profile-menu__button {
        min-width: 0;
        width: 48px;
        padding: 3px;
    }

    .profile-menu__text,
    .profile-menu__button .dropdown-caret {
        display: none;
    }

    .topbar__actions {
        gap: 6px;
    }

    .notification-button {
        display: none;
    }

    .main-content {
        padding: 10px;
    }

    .welcome-card {
        min-height: auto;
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 18px;
    }

    .welcome-card__date {
        width: 100%;
    }

    .date-card {
        width: 100%;
    }

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

    .kpi-card {
        min-height: 92px;
    }

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

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

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

    .line-chart {
        overflow-x: auto;
    }

    .line-chart__svg,
    .line-chart__x {
        min-width: 600px;
    }

    .panel__header--table {
        align-items: stretch;
    }

    .table-tools,
    .table-search {
        width: 100%;
    }

    .table-tools {
        display: grid;
        grid-template-columns: 1fr auto;
    }

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

    .copyright-bar {
        flex-wrap: wrap;
        text-align: center;
    }
}

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