:root {
    --dash-font: font, "Vazirmatn", "Noto Sans Arabic", sans-serif;
    --dash-bg: #f4f5f7;
    --dash-surface: #ffffff;
    --dash-hover: #f8f9fa;
    --dash-press: #eef0f3;
    --dash-border: #e1e4e8;
    --dash-border-strong: #c4c9d0;
    --dash-text: #1f2328;
    --dash-muted: #636c76;
    --dash-icon-bg: #f1f3f5;
    --dash-accent: #1f6feb;
    --dash-accent-hover: #1a5fcf;
    --dash-accent-text: #ffffff;
    --dash-danger: #cf222e;
    --dash-radius-control: 6px;
    --dash-radius-card: 8px;
    --dash-text-title: 20px;
    --dash-text-subtitle: 15px;
    --dash-text-body: 14px;
    --dash-text-small: 12px;
    --dash-icon-size: 16px;
}

body.dark-mode {
    --dash-bg: #101924;
    --dash-surface: #151d28;
    --dash-hover: #1a2431;
    --dash-press: #1f2a38;
    --dash-border: #29333f;
    --dash-border-strong: #3e4a58;
    --dash-text: #e3e8ee;
    --dash-muted: #97a3b1;
    --dash-icon-bg: #1e2834;
    --dash-accent: #2f74e0;
    --dash-accent-hover: #3d82ee;
}

body:not(.dark-mode):has(.dash-grid) {
    background: #eceef2;
}

.dash_container {
    max-width: 980px !important;
    padding-top: 16px;
    padding-bottom: 32px !important;
    font-family: var(--dash-font);
    color: var(--dash-text);
}

.dash-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 8px 24px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--dash-border);
}

.dash-head-text {
    min-width: 0;
}

.dash-head-hello {
    margin: 0 0 4px;
    font-size: var(--dash-text-small);
    color: var(--dash-muted);
}

.dash-head-name {
    margin: 0;
    font-size: var(--dash-text-title);
    font-weight: 700;
    line-height: 1.3;
    color: var(--dash-text) !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dash-head-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: var(--dash-text-small);
    color: var(--dash-muted);
}

.dash-head-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.dash-head-item i {
    font-size: var(--dash-icon-size);
}

.dash_container .expire-warning-banner,
.dash_container .backup-warning-banner,
.dash_container .forced-update-banner {
    margin-bottom: 16px;
    background: var(--dash-surface);
    border: 1px solid var(--dash-border) !important;
    border-radius: var(--dash-radius-card);
    box-shadow: none;
}

.dash_container .expire-warning-banner::before,
.dash_container .backup-warning-banner::before,
.dash_container .forced-update-banner::before {
    top: 12px;
    bottom: 12px;
    right: auto;
    left: auto;
    inset-inline-start: 0;
    width: 4px;
    background: var(--dash-danger);
    border-start-end-radius: 4px;
    border-end-end-radius: 4px;
}

.dash-grid {
    margin-inline: -8px;
}

.dash-grid > .dash-col {
    padding-inline: 8px;
    margin-bottom: 16px;
}

@media (min-width: 992px) {
    .dash_container {
        max-width: 1140px !important;
    }

    .dash-grid > .dash-col {
        flex: 0 0 20%;
        max-width: 20%;
    }

    .dash-grid-4 > .dash-col {
        flex: 0 0 25%;
        max-width: 25%;
    }
}

.dash-tile {
    --tile: #5d5c76;
    display: flex;
    align-items: center;
    gap: 12px;
    height: 72px;
    padding-inline: 12px;
    border: 1px solid var(--dash-border);
    border-radius: 10px;
    background: var(--dash-surface);
    color: var(--dash-text) !important;
    font-family: var(--dash-font);
    text-decoration: none !important;
    transition: border-color .15s ease, transform .15s ease;
}

.dash-tile-icon {
    display: grid;
    flex: none;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--tile);
    color: #fff;
    font-size: 18px;
}

.dash-tile-icon i {
    --fa-primary-color: #fff;
    --fa-secondary-color: #fff;
    --fa-secondary-opacity: .55;
}

.dash-tile-label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    font-size: var(--dash-text-subtitle);
    font-weight: 700;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.dash-tile-go {
    flex: none;
    color: var(--tile);
    font-size: var(--dash-text-small);
    opacity: 0;
    transition: opacity .15s ease;
}

.dash-tile:hover {
    border-color: var(--tile);
    transform: translateY(-2px);
}

.dash-tile:hover .dash-tile-go,
.dash-tile:focus-visible .dash-tile-go {
    opacity: 1;
}

.dash-tile:active {
    transform: none;
    background: var(--dash-hover);
}

.dash-tile:focus {
    outline: none;
}

.dash-tile:focus-visible {
    outline: 2px solid var(--tile);
    outline-offset: 2px;
}

@keyframes dash-spin {
    to {
        transform: rotate(360deg);
    }
}

.tile-sale { --tile: #d2733c; }
.tile-product { --tile: #6250b5; }
.tile-inventory { --tile: #b04a47; }
.tile-accounting { --tile: #4b5563; }
.tile-report { --tile: #2b78b5; }
.tile-system { --tile: #5b5a8c; }
.tile-ai { --tile: #3d6fd6; }

body:not(.dark-mode) .dash-tile {
    border-color: #dcdfe5;
    background: #fff;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 2px 8px rgba(16, 24, 40, .06);
}

body:not(.dark-mode) .dash-tile:hover {
    border-color: var(--tile);
    box-shadow: 0 2px 4px rgba(16, 24, 40, .06), 0 8px 18px rgba(16, 24, 40, .1);
}

body:not(.dark-mode) .dash-tile:active {
    background: var(--dash-hover);
}

@media (max-width: 991px) {
    .dash_container {
        padding-inline: 16px !important;
    }
}

@media (max-width: 575px) {
    .dash_container {
        padding-top: 12px;
    }

    .dash-grid {
        margin-inline: -4px;
    }

    .dash-grid > .dash-col {
        padding-inline: 4px;
        margin-bottom: 8px;
    }

    .dash-tile {
        height: 56px;
        gap: 8px;
        padding-inline: 8px;
    }

    .dash-tile-icon {
        width: 32px;
        height: 32px;
        font-size: var(--dash-icon-size);
    }

    .dash-tile-label {
        font-size: var(--dash-text-body);
    }

    .dash-tile-go {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .dash-tile,
    .dash-tile-go {
        transition: none;
    }

    .dash-tile:hover {
        transform: none;
    }
}

.dashboard-footer-info {
    position: sticky;
    bottom: 0;
    flex-shrink: 0;
    width: 100%;
    color: #fff;
    padding: 6px 0;
    z-index: 1050;
    font-size: 1.05rem;
    font-weight: bold;
    overflow: hidden;
    white-space: nowrap;
    border-top: 1px solid rgba(0, 0, 0, .12);
    user-select: none;
}
.dashboard-footer-info span {
    margin: 0 50px;
}
.dashboard-footer-info img {
    height: 22px;
    vertical-align: middle;
    filter: brightness(0) invert(1);
}
.reklam-ticker {
    overflow: hidden;
    width: 100%;
}
.reklam-ticker-track {
    display: flex;
    width: max-content;
    animation: reklam-ticker-scroll 60s linear infinite;
    will-change: transform;
}
.reklam-ticker:hover .reklam-ticker-track {
    animation-play-state: paused;
}
.reklam-ticker-group {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
@keyframes reklam-ticker-scroll {
    from {
        transform: translateX(-50%);
    }
    to {
        transform: translateX(0);
    }
}

body:has(#sortable-dashboard)::before {
    content: "";
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 0;
    width: min(560px, 70vw);
    aspect-ratio: 1;
    background: url('/images/logo/super-cashier.png') center / contain no-repeat;
    filter: brightness(0);
    opacity: .09;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

body.dark-mode:has(#sortable-dashboard)::before {
    filter: none;
    opacity: .08;
}

body:has(#sortable-dashboard) .dash_container {
    position: relative;
    z-index: 1;
}

body.dark-mode:has(#sortable-dashboard) .dash-tile {
    background: color-mix(in srgb, var(--dash-surface) 80%, transparent);
}
