:root {
    --page-background: #0b1119;
    --card-background: #0d141e;
    --item-background: #111a25;

    --border-color: #253140;
    --border-hover: #3a4a5d;

    --text-color: #f2f5f8;
    --muted-text: #b7c2d0;

    --accent-color: #ff6b0b;
    --accent-light: #ff8128;

    --radius: 7px;
    --transition: 180ms ease;
}

* {
    box-sizing: border-box;
}

html {
    color-scheme: dark;
}

body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;

    color: var(--text-color);
    background:
        radial-gradient(
            circle at 85% 55%,
            rgba(28, 40, 56, 0.13),
            transparent 35%
        ),
        var(--page-background);

    font-family: vazir;
    font-size: 14px;
    line-height: 1.6;
}

button,
input,
textarea,
select {
    font-family: vazir;
}

button {
    color: inherit;
}

/* Main layout */

.dashboard {
    width: min(calc(100% - 48px), 1450px);
    margin: 0 auto;
    padding: 28px 0 40px;
}

/* Header */

.dashboard-header {
    min-height: 74px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    padding: 14px 22px;

    border: 1px solid var(--border-color);
    border-radius: var(--radius);

    background: rgba(12, 18, 27, 0.7);
}

.dashboard-title {
    position: relative;

    margin: 0;
    padding-right: 14px;

    font-size: 22px;
    font-weight: 700;
    line-height: 1.5;
}

.dashboard-title::before {
    position: absolute;
    top: 4px;
    right: 0;
    bottom: 4px;

    width: 3px;

    border-radius: var(--radius);
    background: var(--accent-color);
    box-shadow: 0 0 10px rgba(255, 107, 11, 0.25);

    content: "";
}

.add-menu-button {
    min-width: 132px;
    min-height: 42px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;

    padding: 8px 17px;

    border: 0;
    border-radius: var(--radius);

    background: linear-gradient(
        135deg,
        var(--accent-light),
        var(--accent-color)
    );

    color: #ffffff;

    font-size: 14px;
    font-weight: 600;

    cursor: pointer;

    box-shadow: 0 7px 17px rgba(255, 107, 11, 0.12);

    transition:
        transform var(--transition),
        filter var(--transition),
        box-shadow var(--transition);
}

.add-menu-button svg {
    width: 19px;
    height: 19px;

    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
}

.add-menu-button:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(255, 107, 11, 0.2);
}

.add-menu-button:active {
    transform: translateY(0);
}

/* Menu grid */

.menu-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
    gap: 18px;
    grid-auto-flow: column;
    margin-top: 20px;
}

/* Menu card */

.menu-card {
    min-width: 0;
    width: 350px;
    padding: 20px;

    border: 1px solid var(--border-color);
    border-radius: var(--radius);

    background:
        linear-gradient(
            145deg,
            rgba(15, 23, 34, 0.94),
            rgba(11, 17, 25, 0.96)
        );

    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.01),
        0 12px 25px rgba(0, 0, 0, 0.08);
}

/* Card title */

.menu-card-header {
    min-height: 54px;

    display: flex;
    align-items: center;

    padding: 11px 17px;

    border: 1px solid var(--border-color);
    border-radius: var(--radius);

    background: linear-gradient(
        110deg,
        rgba(18, 27, 39, 0.95),
        rgba(14, 21, 31, 0.82)
    );
}

.menu-card-header h2 {
    position: relative;

    width: 100%;
    margin: 0;
    padding-right: 13px;

    font-size: 17px;
    font-weight: 600;
    line-height: 1.5;
    text-align: right;
}

.menu-card-header h2::before {
    position: absolute;
    top: 3px;
    right: 0;
    bottom: 3px;

    width: 3px;

    border-radius: var(--radius);
    background: var(--accent-color);
    box-shadow: 0 0 9px rgba(255, 107, 11, 0.22);

    content: "";
}

/* Circular progress */

.days-progress {
    --size: 158px;

    position: relative;

    width: var(--size);
    height: var(--size);

    display: grid;
    place-items: center;

    margin: 22px auto;

    border-radius: 50%;

    background: conic-gradient(
        from 110deg,
        var(--accent-color) 0 var(--progress),
        #223040 var(--progress) 100%
    );

    box-shadow:
        0 12px 22px rgba(0, 0, 0, 0.22),
        0 0 20px rgba(255, 107, 11, 0.07);
}

.days-progress::before {
    position: absolute;
    inset: 11px;

    border-radius: 50%;

    background:
        radial-gradient(
            circle at 50% 65%,
            rgba(255, 107, 11, 0.07),
            transparent 50%
        ),
        var(--page-background);

    content: "";
}

.days-progress-inner {
    position: relative;
    z-index: 1;

    display: flex;
    flex-direction: column;
    align-items: center;
}

.days-progress strong {
    font-size: 26px;
    font-weight: 700;
    line-height: 1.3;
}

.days-progress span {
    color: var(--muted-text);

    font-size: 13px;
    font-weight: 500;
}

/* Card actions */

.menu-actions {
    display: grid;
    gap: 11px;
}

.menu-action {
    width: 100%;
    min-height: 49px;

    display: flex;
    align-items: center;
    gap: 11px;

    padding: 10px 14px;

    border: 1px solid var(--border-color);
    border-radius: var(--radius);

    background: linear-gradient(
        105deg,
        rgba(17, 26, 38, 0.96),
        rgba(14, 21, 31, 0.96)
    );

    color: var(--text-color);

    font-size: 14px;
    font-weight: 500;
    text-align: right;
    flex-direction: row-reverse;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.09);
}

button.menu-action {
    cursor: pointer;

    transition:
        border-color var(--transition),
        background var(--transition),
        transform var(--transition);
}

button.menu-action:hover {
    border-color: var(--border-hover);
    transform: translateY(-1px);
}

.menu-action svg {
    width: 21px;
    height: 21px;
    flex: 0 0 21px;

    fill: none;
    stroke: #b5c9df;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.menu-action span {
    flex: 1;
}

.menu-action-accent {
    border-color: var(--accent-color);

    background:
        radial-gradient(
            circle at 15% 25%,
            rgba(255, 107, 11, 0.13),
            transparent 45%
        ),
        linear-gradient(
            105deg,
            rgba(29, 23, 24, 0.96),
            rgba(16, 21, 29, 0.96)
        );

    box-shadow:
        0 0 15px rgba(255, 107, 11, 0.1),
        inset 0 0 12px rgba(255, 107, 11, 0.035);
}

.menu-action-accent svg,
.menu-action .accent-icon {
    stroke: var(--accent-color);
}

.menu-action-static {
    cursor: default;
}

/* Keyboard focus */

button:focus-visible {
    outline: 2px solid rgba(255, 129, 40, 0.7);
    outline-offset: 3px;
}

/* Tablet */

@media (max-width: 1050px) {
    .menu-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Mobile */

@media (max-width: 680px) {
    .dashboard {
        width: min(calc(100% - 24px), 520px);
        padding: 12px 0 28px;
    }

    .dashboard-header {
        min-height: auto;
        padding: 14px;
    }

    .dashboard-title {
        font-size: 17px;
    }

    .add-menu-button {
        min-width: 105px;
        min-height: 39px;
        padding: 7px 13px;
        font-size: 13px;
    }

    .add-menu-button svg {
        width: 17px;
        height: 17px;
    }

    .menu-grid {
        grid-template-columns: 1fr;
        gap: 14px;
        margin-top: 14px;
    }

    .menu-card {
        padding: 15px;
    }

    .menu-card-header {
        min-height: 49px;
    }

    .menu-card-header h2 {
        font-size: 15px;
    }

    .days-progress {
        --size: 145px;
        margin: 18px auto;
    }
}

/* Small mobile */

@media (max-width: 420px) {
    .dashboard-header {
        align-items: stretch;
        flex-direction: column;
    }

    .add-menu-button {
        width: 100%;
    }

    .menu-action {
        font-size: 13px;
    }
}

/* Reduced motion */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}