:root {
    --ferno: #e31b23;
    --ferno-dark: #c4161d;
    --ink: #1a1a1a;
    --muted: #6b6b6b;
    --line: #ececec;
    --bg: #f6f6f6;
}

body {
    font-family: IRANSans, system-ui, sans-serif;
    background: var(--bg);
    color: var(--ink);
    letter-spacing: 0 !important;
}

html:not([lang='en']) [lang='en'] {
    font-family: Arista, IRANSans, system-ui, sans-serif;
    font-synthesis: none;
}

a {
    color: var(--ferno);
}

.btn-ferno {
    background: var(--ferno);
    border-color: var(--ferno);
    color: #fff;
    border-radius: .85rem;
    font-weight: 700;
}

.btn-ferno:hover,
.btn-ferno:focus {
    background: var(--ferno-dark);
    border-color: var(--ferno-dark);
    color: #fff;
}

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

.panel-sidebar {
    width: 268px;
    background: #fff;
    border-left: 1px solid var(--line);
    flex-shrink: 0;
}

.sidebar-hero {
    position: relative;
    background-color: #b42b26;
    background-image: radial-gradient(rgba(255, 255, 255, 0.2) 1.15px, transparent 1.2px);
    background-size: 16px 16px;
    border-bottom-left-radius: 134px 110px;
    border-bottom-right-radius: 134px 110px;
    padding: 2.1rem 1.4rem 5.6rem;
    text-align: center;
}

.sidebar-wordmark {
    display: block;
    width: 178px;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
}

.sidebar-mascot {
    position: absolute;
    left: 50%;
    bottom: -18px;
    z-index: 2;
    width: 108px;
    height: auto;
    transform: translateX(-50%);
    pointer-events: none;
}

.sidebar-nav {
    padding: 1.85rem 0.9rem 1.1rem;
}

.panel-sidebar .nav-link {
    color: var(--ink);
    border-radius: 999px;
    padding: .65rem .95rem;
    display: flex;
    align-items: center;
    gap: .55rem;
}

.panel-sidebar .nav-link.active {
    background: #b42b26;
    color: #fff;
}

.panel-sidebar .nav-link:hover:not(.active) {
    background: #fdecec;
    color: var(--ferno);
}

.panel-main {
    min-width: 0;
}

.panel-top {
    background: #fff;
    border-bottom: 1px solid var(--line);
}

.panel-switch {
    display: inline-flex;
    align-items: center;
    padding: .35rem .75rem;
    border-radius: 999px;
    font-size: .8rem;
    color: var(--ink);
    text-decoration: none;
    border: 1px solid transparent;
}

.panel-switch:hover:not(.active) {
    background: #fdecec;
    color: var(--ferno);
}

.panel-switch.active {
    background: #b42b26;
    color: #fff;
}

.card {
    border: 0;
    border-radius: 1.25rem;
    box-shadow: none;
    background: #fff;
}

.welcome-banner {
    position: relative;
    overflow: hidden;
    background-color: #b42b26;
    background-image: radial-gradient(rgba(255, 255, 255, 0.18) 1.15px, transparent 1.2px);
    background-size: 16px 16px;
    border-radius: 1.25rem;
    color: #fff;
    padding: 1.5rem 1.75rem;
}

.welcome-banner-compact {
    border-radius: 1rem;
    padding: .85rem 1.15rem;
}

.welcome-banner-compact .referral-chip {
    margin-top: 0;
}

.welcome-banner .period-filter .btn {
    --bs-btn-padding-y: .25rem;
    --bs-btn-padding-x: .7rem;
    font-weight: 600;
}

.welcome-banner .period-filter .btn-light {
    color: #b42b26;
}

.welcome-mascot {
    width: 84px;
    height: auto;
    filter: drop-shadow(0 10px 12px rgba(0, 0, 0, 0.25));
}

.referral-chip {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 999px;
    padding: .3rem .85rem;
    font-size: .82rem;
}

.stat-card {
    border-radius: 1.25rem;
    transition: transform .15s ease, box-shadow .15s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(26, 26, 26, 0.06);
}

.stat-card .value {
    font-size: 1.35rem;
    font-weight: 700;
}

.stat-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border-radius: 1rem;
    background: #fdecec;
    color: var(--ferno);
    font-size: 1.3rem;
}

.sales-chart-wrap {
    position: relative;
    height: 280px;
}

.card .card-header {
    border-bottom: 1px solid var(--line);
    border-radius: 1.25rem 1.25rem 0 0 !important;
    background: #fff;
}

.status-badge {
    font-weight: 600;
    padding: .5em 1em;
    border-radius: 999px;
}

.status-paid {
    background: #e7f6ec;
    color: #1a7f42;
}

.status-pending {
    background: #fdf3e0;
    color: #b07a10;
}

.status-progress {
    background: #fdecec;
    color: #b42b26;
}

.panel-page-title {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -.02em;
}

.panel-back-link {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    color: var(--ferno);
    text-decoration: none;
    font-size: .9rem;
    font-weight: 600;
}

.panel-back-link:hover {
    color: var(--ferno-dark);
}

.soft-box {
    background: #fff5f5;
    border-radius: 1rem;
    padding: 1rem 1.15rem;
}

.soft-box-icon {
    display: grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: .75rem;
    background: #fff;
    color: var(--ferno);
    flex-shrink: 0;
}

.order-meta-icon {
    display: grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: .85rem;
    background: #fdecec;
    color: var(--ferno);
    flex-shrink: 0;
    font-size: 1.15rem;
}

.order-items-table {
    --bs-table-bg: transparent;
}

.order-items-table > :not(caption) > * > * {
    background: transparent;
    border-bottom-color: var(--line);
    padding-top: 1rem;
    padding-bottom: 1rem;
    vertical-align: middle;
}

.order-items-table thead th {
    font-size: .8rem;
    font-weight: 600;
    color: var(--muted);
    border-bottom-width: 1px;
}

.order-items-table tbody tr:last-child > * {
    border-bottom: 0;
}

.order-item-thumb {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: .85rem;
    background: #f3f3f3;
}

.order-item-fallback {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: .85rem;
    background: #fdecec;
    color: var(--ferno);
}

.order-total-row {
    background: #fff5f5;
    border-radius: 1rem;
    padding: 1rem 1.15rem;
}

.order-total-amount {
    color: var(--ferno);
    font-size: 1.15rem;
    font-weight: 800;
}

.star-rating {
    display: inline-flex;
    flex-direction: row-reverse;
    gap: .15rem;
}

.star-rating input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.star-rating label {
    cursor: pointer;
    font-size: 1.65rem;
    line-height: 1;
    color: #d9d9d9;
    transition: color .12s ease, transform .12s ease;
}

.star-rating label:hover,
.star-rating label:hover ~ label,
.star-rating input:checked ~ label {
    color: #f5a524;
}

.star-rating label:hover {
    transform: scale(1.08);
}

.review-stars-readonly {
    color: #f5a524;
    letter-spacing: .05em;
}

.empty-state {
    padding: 3rem 1.5rem;
    text-align: center;
    color: var(--muted);
}

.empty-state i {
    font-size: 2rem;
    opacity: .45;
    display: block;
    margin-bottom: .75rem;
}

.form-control,
.form-select {
    border-radius: .85rem;
    border-color: #e6e6e6;
    padding: .7rem .95rem;
}

.form-control:focus,
.form-select:focus {
    border-color: #f0a3a6;
    box-shadow: 0 0 0 .2rem rgba(227, 27, 35, 0.12);
}

.btn-outline-ferno {
    border-radius: .85rem;
    border-color: #f0a3a6;
    color: var(--ferno);
    font-weight: 600;
}

.btn-outline-ferno:hover,
.btn-outline-ferno:focus {
    background: #fdecec;
    border-color: var(--ferno);
    color: var(--ferno);
}

.panel-list-table > :not(caption) > * > * {
    padding-top: .95rem;
    padding-bottom: .95rem;
    vertical-align: middle;
}

.panel-list-table thead th {
    font-size: .8rem;
    color: var(--muted);
    font-weight: 600;
    border-bottom-color: var(--line);
}

.order-status-hero {
    background: #111;
    color: #fff;
}

.order-status-character {
    width: min(180px, 55vw);
    height: auto;
    filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.35));
}

.food-thumb {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: .6rem;
}

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

.qr-box img {
    width: 160px;
    height: 160px;
}

.invite-code {
    font-family: ui-monospace, monospace;
    letter-spacing: .08em;
}

@media (max-width: 991.98px) {
    .panel-sidebar {
        width: 100%;
        border-left: 0;
        border-bottom: 1px solid var(--line);
    }
}
