@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --bg: #fff7fb;
    --bg-soft: #fffafd;
    --card: #ffffff;
    --card-soft: #fff1f7;

    --pink: #e85d9e;
    --pink-dark: #c83f80;
    --pink-soft: #ffe6f1;
    --pink-light: #fff3f8;

    --purple: #9b7cf4;
    --purple-soft: #f0ebff;

    --peach: #ffd7c9;
    --cream: #fff8ef;

    --text: #302233;
    --text-soft: #6f5d72;
    --muted: #a792a4;

    --line: #f3d7e4;
    --line-soft: #f8e6ef;

    --shadow: 0 16px 40px rgba(197, 91, 142, 0.10);
    --shadow-soft: 0 10px 26px rgba(197, 91, 142, 0.07);

    --radius-xl: 30px;
    --radius-lg: 24px;
    --radius-md: 18px;
    --radius-sm: 14px;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    direction: rtl;
    font-family: 'Vazirmatn', Tahoma, Arial, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top right, rgba(255, 218, 235, 0.72), transparent 30%),
        radial-gradient(circle at bottom left, rgba(240, 235, 255, 0.9), transparent 32%),
        linear-gradient(135deg, #fff7fb 0%, #ffffff 55%, #fffafc 100%);
}

body {
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font-family: inherit;
}

button {
    cursor: pointer;
}

svg {
    display: block;
}

/* Layout */

.fatros-shell {
    min-height: 100vh;
    display: flex;
    gap: 18px;
    padding: 18px;
}

.fatros-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* Sidebar */

.fatros-sidebar {
    width: 270px;
    min-height: calc(100vh - 36px);
    position: sticky;
    top: 18px;
    padding: 18px;
    border-radius: 34px;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
    overflow: hidden;
}

.sidebar-glow {
    position: absolute;
    width: 190px;
    height: 190px;
    top: -90px;
    right: -70px;
    border-radius: 50%;
    background: rgba(255, 199, 225, 0.55);
    pointer-events: none;
}

.sidebar-brand {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 8px 20px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--line-soft);
}

.brand-mark {
    width: 50px;
    height: 50px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: var(--pink-soft);
    border: 1px solid #ffd4e7;
}

.brand-mark span {
    color: var(--pink-dark);
    font-size: 26px;
    font-weight: 900;
}

.brand-title {
    font-size: 21px;
    font-weight: 900;
    color: var(--text);
}

.brand-subtitle {
    margin-top: 2px;
    font-size: 12px;
    font-weight: 500;
    color: var(--muted);
}

.sidebar-menu {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.menu-item {
    min-height: 47px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 11px;
    border-radius: 17px;
    color: var(--text-soft);
    font-size: 14px;
    font-weight: 700;
    transition: 160ms ease;
}

.menu-item:hover,
.menu-item.active {
    color: var(--pink-dark);
    background: var(--pink-light);
}

.menu-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: var(--pink);
    background: #fff;
    border: 1px solid var(--line-soft);
}

.menu-icon svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.menu-item.active .menu-icon,
.menu-item:hover .menu-icon {
    background: var(--pink-soft);
    border-color: #ffd4e7;
}

.sidebar-footer {
    position: absolute;
    right: 18px;
    left: 18px;
    bottom: 18px;
    padding: 14px;
    border-radius: 20px;
    background: #fff6fa;
    border: 1px solid var(--line-soft);
}

.footer-label {
    font-size: 11px;
    color: var(--muted);
}

.footer-text {
    margin-top: 3px;
    font-size: 13px;
    font-weight: 800;
    color: var(--pink-dark);
}

/* Header */

.fatros-topbar,
.minimal-topbar {
    min-height: 78px;
    display: grid;
    grid-template-columns: minmax(230px, 1fr) minmax(260px, 420px) auto;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border-radius: 30px;
    background: #fff3f8;
    border: 1px solid #ffdce9;
    box-shadow: var(--shadow-soft);
}

.topbar-right {
    min-width: 0;
}

.page-kicker {
    width: max-content;
    padding: 4px 11px;
    margin-bottom: 5px;
    border-radius: 999px;
    background: #ffffff;
    color: var(--pink-dark);
    border: 1px solid #ffd4e7;
    font-size: 11px;
    font-weight: 800;
}

.page-heading-row {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.page-heading-row h1 {
    margin: 0;
    font-size: 23px;
    font-weight: 900;
    letter-spacing: -0.6px;
    color: var(--text);
}

.topbar-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #f5a8cc;
}

.today-label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.search-box {
    height: 44px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0 14px;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid #f6d6e5;
}

.search-box svg {
    width: 18px;
    height: 18px;
    fill: #d584aa;
}

.search-box input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    font-size: 12.5px;
    font-weight: 500;
}

.search-box input::placeholder {
    color: #b998aa;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 9px;
}

.icon-button {
    position: relative;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid #f6d6e5;
    background: #ffffff;
    color: var(--pink-dark);
}

.icon-button svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.notify-badge {
    position: absolute;
    top: 9px;
    left: 10px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--pink);
    border: 2px solid #fff;
}

.add-button {
    height: 44px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0 15px;
    border: 0;
    border-radius: 999px;
    background: var(--pink);
    color: #ffffff;
    font-size: 12.5px;
    font-weight: 800;
    box-shadow: 0 10px 22px rgba(232, 93, 158, 0.20);
}

.add-button span {
    width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
    font-size: 17px;
    line-height: 1;
}

.profile-mini {
    height: 44px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 5px 5px 12px;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid #f6d6e5;
}

.profile-mini-avatar {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--pink-soft);
    color: var(--pink-dark);
    font-size: 13px;
    font-weight: 900;
}

.profile-mini-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.profile-mini-text strong {
    font-size: 11.5px;
    font-weight: 800;
    color: var(--text);
}

.profile-mini-text span {
    font-size: 10px;
    color: var(--muted);
}

/* Content */

.fatros-content {
    min-width: 0;
}

.dashboard-page {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* Hero */

.hero-panel {
    position: relative;
    min-height: 260px;
    display: grid;
    grid-template-columns: 1.25fr 0.75fr;
    gap: 18px;
    padding: 30px;
    border-radius: 34px;
    background: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.hero-panel::before {
    content: "";
    position: absolute;
    width: 360px;
    height: 360px;
    left: -140px;
    top: -160px;
    border-radius: 50%;
    background: rgba(255, 214, 232, 0.68);
}

.hero-panel::after {
    content: "";
    position: absolute;
    width: 260px;
    height: 260px;
    right: 38%;
    bottom: -170px;
    border-radius: 50%;
    background: rgba(240, 235, 255, 0.9);
}

.hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-badge {
    width: max-content;
    display: inline-flex;
    align-items: center;
    padding: 7px 13px;
    border-radius: 999px;
    background: var(--pink-light);
    color: var(--pink-dark);
    border: 1px solid #ffd4e7;
    font-size: 12px;
    font-weight: 800;
}

.hero-content h2 {
    margin: 16px 0 10px;
    font-size: clamp(28px, 3.5vw, 42px);
    line-height: 1.45;
    font-weight: 900;
    letter-spacing: -1px;
}

.hero-content p {
    max-width: 650px;
    margin: 0;
    color: var(--text-soft);
    font-size: 15px;
    line-height: 2;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.primary-action,
.secondary-action {
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
}

.primary-action {
    color: #fff;
    background: var(--pink);
    box-shadow: 0 10px 22px rgba(232, 93, 158, 0.20);
}

.secondary-action {
    color: var(--pink-dark);
    background: var(--pink-light);
    border: 1px solid #ffd4e7;
}

.hero-visual {
    position: relative;
    z-index: 1;
    min-height: 200px;
}

.floating-card {
    position: absolute;
    width: 160px;
    padding: 16px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid var(--line-soft);
    box-shadow: var(--shadow-soft);
}

.floating-card span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.floating-card strong {
    display: block;
    margin-top: 6px;
    color: var(--text);
    font-size: 30px;
    font-weight: 900;
}

.card-one {
    top: 16px;
    right: 16px;
}

.card-two {
    left: 18px;
    bottom: 20px;
}

.orb {
    position: absolute;
    border-radius: 50%;
}

.orb-one {
    width: 82px;
    height: 82px;
    left: 76px;
    top: 34px;
    background: var(--pink-soft);
}

.orb-two {
    width: 112px;
    height: 112px;
    right: 68px;
    bottom: 18px;
    background: var(--purple-soft);
}

/* Stats */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.stat-card {
    min-height: 126px;
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 17px;
    border-radius: 26px;
    background: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow-soft);
}

.stat-icon {
    width: 52px;
    height: 52px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 19px;
}

.stat-card.pink .stat-icon {
    background: var(--pink-soft);
    color: var(--pink-dark);
}

.stat-card.violet .stat-icon {
    background: var(--purple-soft);
    color: var(--purple);
}

.stat-card.rose .stat-icon {
    background: #ffe8ee;
    color: var(--rose);
}

.stat-card.amber .stat-icon {
    background: #fff2d6;
    color: var(--amber);
}

.stat-icon svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.stat-card span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.stat-card strong {
    display: block;
    margin-top: 6px;
    color: var(--text);
    font-size: 27px;
    font-weight: 900;
}

.stat-card small {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 11px;
}

/* Panels */

.dashboard-grid {
    display: grid;
    grid-template-columns: 1.55fr 0.85fr;
    gap: 14px;
}

.panel-card {
    min-height: 245px;
    padding: 22px;
    border-radius: 28px;
    background: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow-soft);
}

.panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 20px;
}

.panel-header h3 {
    margin: 0;
    color: var(--text);
    font-size: 18px;
    font-weight: 900;
}

.panel-header p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.panel-chip {
    padding: 7px 11px;
    border-radius: 999px;
    background: var(--pink-light);
    color: var(--pink-dark);
    font-size: 11px;
    font-weight: 800;
}

.progress-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.progress-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 8px;
}

.progress-title strong {
    color: var(--text);
}

.progress-track {
    height: 9px;
    overflow: hidden;
    border-radius: 999px;
    background: #ffe6f1;
}

.progress-fill {
    height: 100%;
    border-radius: inherit;
    background: var(--pink);
}

.violet-fill {
    background: var(--purple);
}

.rose-fill {
    background: var(--rose);
}

.amber-fill {
    background: var(--amber);
}

.quick-actions {
    display: grid;
    gap: 10px;
}

.quick-actions a {
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    border-radius: 18px;
    background: var(--pink-light);
    border: 1px solid #ffd4e7;
    color: var(--text-soft);
    font-size: 13px;
    font-weight: 800;
}

.quick-actions a::after {
    content: "←";
    width: 27px;
    height: 27px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--pink-dark);
    background: #ffffff;
}

/* Blazor error */

#blazor-error-ui {
    direction: ltr;
    background: #fff1f2;
    color: #9f1239;
    bottom: 0;
    display: none;
    left: 0;
    padding: 0.8rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

/* Responsive */

@media (max-width: 1220px) {
    .fatros-shell {
        padding: 12px;
        gap: 12px;
    }

    .fatros-sidebar {
        width: 250px;
    }

    .minimal-topbar {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .topbar-left {
        justify-content: space-between;
    }

    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 920px) {
    .fatros-shell {
        flex-direction: column;
    }

    .fatros-sidebar {
        width: 100%;
        min-height: auto;
        position: relative;
        top: auto;
    }

    .sidebar-menu {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sidebar-footer {
        position: relative;
        right: auto;
        left: auto;
        bottom: auto;
        margin-top: 14px;
    }

    .hero-panel {
        grid-template-columns: 1fr;
    }

    .hero-visual {
        min-height: 185px;
    }
}

@media (max-width: 640px) {
    .fatros-shell {
        padding: 8px;
    }

    .fatros-sidebar,
    .minimal-topbar,
    .hero-panel,
    .panel-card {
        border-radius: 24px;
    }

    .sidebar-menu {
        grid-template-columns: 1fr;
    }

    .topbar-left {
        display: grid;
        grid-template-columns: 44px 1fr;
    }

    .profile-mini {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }

    .today-label,
    .topbar-dot {
        display: none;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .hero-panel {
        padding: 24px;
    }

    .hero-content h2 {
        font-size: 27px;
    }

    .hero-actions {
        flex-direction: column;
    }

    .primary-action,
    .secondary-action {
        width: 100%;
    }
}