@font-face {
    font-family: 'Rabar021';
    src: url('../fonts/rabar_021.ttf') format('truetype');
    font-display: swap;
}

@font-face {
    font-family: 'QuicksandRunaki';
    src: url('../fonts/Quicksand-Medium.ttf') format('truetype');
    font-display: swap;
}

:root {
    color-scheme: light;
    --dashboard-shell-offset: max(0.75rem, calc((100vw - 1720px) / 2 + 1rem));
    --runaki-bg: #f6f7f4;
    --runaki-bg-alt: #eff3ee;
    --runaki-card: rgba(255, 255, 255, 0.94);
    --runaki-card-strong: #ffffff;
    --runaki-popover: rgba(255, 255, 255, 0.98);
    --runaki-sidebar: rgba(255, 255, 255, 0.97);
    --runaki-muted: #f1f4f0;
    --runaki-muted-strong: #e8ede8;
    --runaki-border: rgba(20, 32, 28, 0.1);
    --runaki-border-strong: rgba(20, 32, 28, 0.16);
    --runaki-text: #13201c;
    --runaki-text-soft: #65736d;
    --runaki-primary: #0f6b53;
    --runaki-primary-strong: #0c5c47;
    --runaki-primary-soft: rgba(15, 107, 83, 0.12);
    --runaki-sand: #e2c98e;
    --runaki-danger: #b93147;
    --runaki-danger-soft: rgba(185, 49, 71, 0.08);
    --runaki-success-soft: rgba(16, 185, 129, 0.08);
    --runaki-warning-soft: rgba(245, 158, 11, 0.1);
    --runaki-info-soft: rgba(14, 165, 233, 0.08);
    --runaki-focus: rgba(15, 107, 83, 0.22);
}

html.dark,
.dark {
    color-scheme: dark;
    --runaki-bg: #0f1412;
    --runaki-bg-alt: #121917;
    --runaki-card: rgba(20, 27, 24, 0.94);
    --runaki-card-strong: #161e1b;
    --runaki-popover: rgba(18, 25, 22, 0.98);
    --runaki-sidebar: rgba(16, 22, 19, 0.97);
    --runaki-muted: #111a17;
    --runaki-muted-strong: #15201c;
    --runaki-border: rgba(255, 255, 255, 0.1);
    --runaki-border-strong: rgba(255, 255, 255, 0.16);
    --runaki-text: #eef3f1;
    --runaki-text-soft: #9ba8a2;
    --runaki-primary: #4fb293;
    --runaki-primary-strong: #68c0a2;
    --runaki-primary-soft: rgba(79, 178, 147, 0.16);
    --runaki-sand: #ecd7a2;
    --runaki-danger: #f87171;
    --runaki-danger-soft: rgba(248, 113, 113, 0.1);
    --runaki-success-soft: rgba(52, 211, 153, 0.1);
    --runaki-warning-soft: rgba(251, 191, 36, 0.12);
    --runaki-info-soft: rgba(56, 189, 248, 0.1);
    --runaki-focus: rgba(79, 178, 147, 0.3);
}

html {
    min-height: 100%;
    scroll-behavior: smooth;
    background: var(--runaki-bg);
    overflow-x: hidden;
}

body {
    min-height: 100%;
    margin: 0;
    overflow-x: hidden;
    font-family: 'Rabar021', sans-serif;
    background: var(--runaki-bg);
    color: var(--runaki-text);
    text-rendering: optimizeLegibility;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

* {
    scrollbar-width: thin;
    scrollbar-color: rgba(102, 122, 114, 0.45) transparent;
}

img,
svg,
canvas,
video,
audio,
iframe {
    display: block;
    max-width: 100%;
}

audio {
    width: 100%;
}

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

button,
input,
select,
textarea {
    font: inherit;
}

::selection {
    background: var(--runaki-primary-soft);
    color: var(--runaki-text);
}

[hidden] {
    display: none !important;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[role='menuitem']:focus-visible {
    outline: 2px solid var(--runaki-focus);
    outline-offset: 2px;
    box-shadow: none !important;
}

.dashboard-bg,
.auth-body {
    position: relative;
    min-height: 100vh;
    background:
        radial-gradient(circle at top right, rgba(15, 107, 83, 0.08), transparent 26%),
        radial-gradient(circle at bottom left, rgba(226, 201, 142, 0.12), transparent 24%),
        linear-gradient(180deg, #f7f8f5 0%, #f0f3ee 100%);
}

html.dark .dashboard-bg,
html.dark .auth-body {
    background:
        radial-gradient(circle at top right, rgba(79, 178, 147, 0.12), transparent 26%),
        radial-gradient(circle at bottom left, rgba(226, 201, 142, 0.08), transparent 24%),
        linear-gradient(180deg, #101412 0%, #0b0f0d 100%);
}

.dashboard-bg::before,
.auth-body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image: url('../images/background.png');
    background-size: cover;
    background-position: center;
    opacity: 0.035;
}

.panel {
    min-width: 0;
    border: 1px solid var(--runaki-border);
    background: var(--runaki-card);
    backdrop-filter: blur(14px);
}

.glass-card {
    backdrop-filter: blur(16px);
}

.dashboard-shell {
    display: block;
    min-width: 0;
}

.dashboard-main {
    display: flex;
    min-width: 0;
    min-height: 100vh;
    flex-direction: column;
    gap: 1rem;
    direction: rtl;
}

.dashboard-main main {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 1rem;
}

.dashboard-main main > *,
.dashboard-main > *,
.dashboard-main :where(.grid > *, .flex > *) {
    min-width: 0;
}

.shell-header {
    border: 1px solid var(--runaki-border);
    background: var(--runaki-card);
    backdrop-filter: blur(18px);
}

.header-eyebrow {
    font-size: 0.79rem;
    font-weight: 800;
    color: var(--runaki-text-soft);
}

.header-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 0.75rem;
}

.topbar-search {
    display: flex;
    flex: 1 1 22rem;
    align-items: center;
    gap: 0.65rem;
    min-width: min(100%, 22rem);
    max-width: 24rem;
    min-height: 3rem;
    border: 1px solid var(--runaki-border-strong);
    border-radius: 1.15rem;
    background: var(--runaki-card-strong);
    padding-inline: 0.9rem;
    color: var(--runaki-text);
}

.topbar-search input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--runaki-text);
}

.topbar-search input::placeholder {
    color: var(--runaki-text-soft);
}

.toolbar-icon {
    display: inline-flex;
    min-width: 2.95rem;
    min-height: 2.95rem;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--runaki-border-strong);
    border-radius: 1rem;
    background: var(--runaki-card-strong);
    color: var(--runaki-text);
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.toolbar-icon:hover,
.toolbar-icon:focus-visible {
    background: var(--runaki-muted);
    border-color: var(--runaki-border-strong);
    transform: translateY(-1px);
}

.profile-dropdown {
    position: relative;
}

.topbar-profile {
    display: inline-flex;
    min-width: 3rem;
    min-height: 3rem;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--runaki-border-strong);
    border-radius: 1.15rem;
    background: var(--runaki-card-strong);
    padding: 0.25rem;
    color: var(--runaki-text);
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.topbar-profile:hover,
.topbar-profile:focus-visible {
    background: var(--runaki-muted);
    transform: translateY(-1px);
}

.topbar-avatar,
.sidebar-avatar {
    display: inline-flex;
    height: 2.45rem;
    width: 2.45rem;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(226, 201, 142, 0.5);
    border-radius: 999px;
    background: linear-gradient(135deg, #f6db88, #f1c95e);
    color: #473207;
    font-size: 0.94rem;
    font-weight: 900;
    line-height: 1;
}

.profile-menu {
    position: absolute;
    top: calc(100% + 0.75rem);
    right: 0;
    z-index: 40;
    width: min(19rem, calc(100vw - 1.5rem));
    border: 1px solid var(--runaki-border);
    border-radius: 1.5rem;
    background: var(--runaki-popover);
    padding: 0.65rem;
    backdrop-filter: blur(18px);
}

.profile-menu-header {
    padding: 0.75rem 0.95rem;
}

.profile-menu-item {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 0.7rem;
    border: 1px solid transparent;
    border-radius: 1rem;
    background: transparent;
    padding: 0.78rem 0.95rem;
    color: var(--runaki-text);
    text-align: right;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.profile-menu-item:hover,
.profile-menu-item:focus-visible {
    background: var(--runaki-muted);
    border-color: var(--runaki-border);
}

.profile-menu-item-danger {
    color: var(--runaki-danger);
}

.profile-menu-item-danger:hover,
.profile-menu-item-danger:focus-visible {
    background: var(--runaki-danger-soft);
    border-color: rgba(185, 49, 71, 0.2);
}

.profile-menu-icon {
    display: inline-flex;
    height: 2rem;
    width: 2rem;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--runaki-border);
    border-radius: 999px;
    color: var(--runaki-text-soft);
    flex-shrink: 0;
}

.profile-menu-divider {
    height: 1px;
    margin: 0.3rem 0;
    background: var(--runaki-border);
}

.page-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
}

#dashboardSidebar {
    z-index: 40;
}

.sidebar-shell {
    border: 1px solid var(--runaki-border);
    border-radius: 1.9rem;
    background: var(--runaki-sidebar);
    backdrop-filter: blur(18px);
}

.sidebar-inner {
    position: relative;
    display: flex;
    height: 100%;
    min-height: 100%;
    flex-direction: column;
    gap: 0.85rem;
    padding: 1rem;
}

.sidebar-mobile-close {
    align-self: flex-start;
}

.sidebar-collapse-button {
    position: absolute;
    top: 1.65rem;
    left: -0.95rem;
    display: inline-flex;
    height: 2.15rem;
    width: 2.15rem;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--runaki-border);
    border-radius: 999px;
    background: var(--runaki-card-strong);
    color: var(--runaki-text);
    transition: background 0.2s ease, transform 0.2s ease;
}

.sidebar-collapse-button:hover,
.sidebar-collapse-button:focus-visible {
    background: var(--runaki-muted);
}

.sidebar-collapse-icon {
    display: inline-flex;
    transition: transform 0.22s ease;
}

html[data-sidebar-state='collapsed'] .sidebar-collapse-icon {
    transform: rotate(90deg);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.15rem 0.15rem 0.55rem;
}

.brand-logo {
    display: inline-flex;
    height: 3.2rem;
    width: 3.2rem;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--runaki-border);
    border-radius: 1.15rem;
    background: #18211d;
    color: #ffffff;
    flex-shrink: 0;
}

.brand-logo img {
    height: 2.15rem;
    width: 2.15rem;
    object-fit: cover;
}

.sidebar-brand-copy {
    min-width: 0;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.sidebar-nav {
    display: flex;
    flex: 1;
    min-height: 0;
    flex-direction: column;
    overflow: visible;
}

.sidebar-nav-list {
    display: flex;
    flex: 1;
    min-height: 0;
    flex-direction: column;
    gap: 0.38rem;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-left: 0.1rem;
}

.sidebar-item-group {
    position: relative;
}

.sidebar-nav-item {
    position: relative;
    display: flex;
    width: 100%;
    align-items: center;
    gap: 0.72rem;
    min-height: 2.85rem;
    border: 1px solid transparent;
    border-radius: 1rem;
    background: transparent;
    padding: 0.5rem 0.75rem;
    color: var(--runaki-text-soft);
    text-align: right;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.sidebar-nav-item:hover,
.sidebar-nav-item:focus-visible {
    background: var(--runaki-muted);
    border-color: var(--runaki-border);
    color: var(--runaki-text);
}

.sidebar-nav-item.is-active {
    border-color: var(--runaki-border-strong);
    background: var(--runaki-muted);
    color: var(--runaki-text);
}

.sidebar-nav-icon {
    display: inline-flex;
    height: 2rem;
    width: 2rem;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--runaki-border);
    border-radius: 999px;
    flex-shrink: 0;
}

.sidebar-nav-copy {
    display: flex;
    min-width: 0;
    flex: 1;
    align-items: center;
}

.sidebar-nav-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.96rem;
    font-weight: 800;
}

.sidebar-nav-chevron {
    display: inline-flex;
    color: var(--runaki-text-soft);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.sidebar-item-group[data-state='open'] > .sidebar-nav-item .sidebar-nav-chevron {
    transform: rotate(180deg);
}

.nav-badge {
    margin-inline-start: auto;
    display: inline-flex;
    min-width: 1.65rem;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 0.2rem 0.45rem;
    font-size: 0.72rem;
    font-weight: 900;
    line-height: 1;
    flex-shrink: 0;
}

.nav-badge-neutral {
    border-color: var(--runaki-border);
    background: var(--runaki-muted);
    color: var(--runaki-text-soft);
}

.nav-badge-success {
    border-color: rgba(16, 185, 129, 0.22);
    background: var(--runaki-success-soft);
    color: #0f6a50;
}

html.dark .nav-badge-success {
    color: #d1fae5;
}

.nav-badge-warning {
    border-color: rgba(245, 158, 11, 0.24);
    background: var(--runaki-warning-soft);
    color: #9a6700;
}

html.dark .nav-badge-warning {
    color: #fef3c7;
}

.nav-badge-danger {
    border-color: rgba(225, 29, 72, 0.24);
    background: var(--runaki-danger-soft);
    color: var(--runaki-danger);
}

.sidebar-submenu {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.22s ease, opacity 0.18s ease, transform 0.18s ease;
}

.sidebar-item-group[data-state='open'] > .sidebar-submenu {
    max-height: 22rem;
    opacity: 1;
}

.sidebar-submenu-body {
    position: relative;
    margin-top: 0.15rem;
    padding: 0.2rem 0 0 0.1rem;
}

.sidebar-submenu-body::before {
    content: '';
    position: absolute;
    top: 0.6rem;
    bottom: 0.45rem;
    right: 0.95rem;
    width: 1px;
    background: var(--runaki-border);
}

.sidebar-submenu-title {
    display: none;
}

.sidebar-submenu-item {
    position: relative;
    display: flex;
    width: 100%;
    align-items: center;
    gap: 0.6rem;
    min-height: 2.4rem;
    border: 1px solid transparent;
    border-radius: 0.9rem;
    background: transparent;
    padding: 0.45rem 2rem 0.45rem 0.8rem;
    color: var(--runaki-text-soft);
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.sidebar-submenu-item:hover,
.sidebar-submenu-item:focus-visible {
    background: var(--runaki-muted);
    border-color: var(--runaki-border);
    color: var(--runaki-text);
}

.sidebar-submenu-item.is-active {
    background: var(--runaki-muted);
    border-color: var(--runaki-border-strong);
    color: var(--runaki-text);
}

.sidebar-submenu-dot {
    position: absolute;
    right: 0.82rem;
    top: 50%;
    height: 0.42rem;
    width: 0.42rem;
    border-radius: 999px;
    background: var(--runaki-border-strong);
    transform: translateY(-50%);
}

.sidebar-submenu-item.is-active .sidebar-submenu-dot {
    background: var(--runaki-primary);
}

.sidebar-footer {
    margin-top: auto;
    flex-shrink: 0;
    border-top: 1px solid var(--runaki-border);
    padding-top: 0.75rem;
}

.theme-switch {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.35rem;
    border: 1px solid var(--runaki-border-strong);
    border-radius: 999px;
    background: var(--runaki-muted);
    padding: 0.35rem;
}

.theme-option {
    display: inline-flex;
    min-height: 2.7rem;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
    color: var(--runaki-text-soft);
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.theme-option:hover,
.theme-option:focus-visible {
    color: var(--runaki-text);
}

.theme-option-active {
    border-color: var(--runaki-border-strong);
    background: var(--runaki-card-strong);
    color: var(--runaki-text);
}

.theme-option-label {
    font-size: 0.85rem;
    font-weight: 800;
}

html[data-sidebar-state='collapsed'] .sidebar-brand-copy,
html[data-sidebar-state='collapsed'] .sidebar-nav-copy,
html[data-sidebar-state='collapsed'] .theme-option-label {
    display: none;
}

html[data-sidebar-state='collapsed'] .sidebar-shell {
    border-radius: 1.7rem;
}

html[data-sidebar-state='collapsed'] .sidebar-inner {
    align-items: center;
    padding-inline: 0.7rem;
}

html[data-sidebar-state='collapsed'] .sidebar-brand {
    justify-content: center;
    width: 100%;
}

html[data-sidebar-state='collapsed'] .sidebar-nav {
    width: 100%;
}

html[data-sidebar-state='collapsed'] .sidebar-nav-item {
    justify-content: center;
    padding-inline: 0.45rem;
}

html[data-sidebar-state='collapsed'] .sidebar-nav-chevron {
    display: none;
}

html[data-sidebar-state='collapsed'] .sidebar-nav-item > .nav-badge {
    position: absolute;
    top: 0.2rem;
    left: 0.2rem;
    margin: 0;
    min-width: 1.25rem;
    padding: 0.12rem 0.28rem;
    font-size: 0.66rem;
}

html[data-sidebar-state='collapsed'] .theme-switch {
    width: 100%;
    grid-template-columns: 1fr;
}

html[data-sidebar-state='collapsed'] .theme-option {
    min-height: 2.55rem;
}

html[data-sidebar-state='collapsed'] .sidebar-submenu {
    position: absolute;
    top: 0;
    right: calc(100% + 0.75rem);
    z-index: 70;
    width: 14rem;
    max-height: none;
    overflow: visible;
    opacity: 0;
    transform: translateY(0.2rem);
    pointer-events: none;
    visibility: hidden;
}

html[data-sidebar-state='collapsed'] .sidebar-item-group[data-state='open'] > .sidebar-submenu {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    visibility: visible;
}

html[data-sidebar-state='collapsed'] .sidebar-submenu-body {
    margin-top: 0;
    border: 1px solid var(--runaki-border);
    border-radius: 1.2rem;
    background: var(--runaki-popover);
    padding: 0.7rem;
}

html[data-sidebar-state='collapsed'] .sidebar-submenu-body::before {
    display: none;
}

html[data-sidebar-state='collapsed'] .sidebar-submenu-title {
    display: block;
    margin-bottom: 0.45rem;
    padding: 0.15rem 0.25rem 0.35rem;
    font-size: 0.78rem;
    font-weight: 900;
    color: var(--runaki-text-soft);
}

html[data-sidebar-state='collapsed'] .sidebar-submenu-item {
    padding-inline: 0.85rem;
}

html[data-sidebar-state='collapsed'] .sidebar-submenu-dot {
    display: none;
}

.status-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 1px solid rgba(15, 107, 83, 0.18);
    border-radius: 999px;
    background: var(--runaki-primary-soft);
    padding: 0.42rem 0.8rem;
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--runaki-primary);
}

.alert-card {
    border: 1px solid var(--runaki-border);
    border-radius: 1.2rem;
    padding: 0.95rem 1rem;
    font-size: 0.92rem;
    font-weight: 800;
}

.alert-success {
    border-color: rgba(16, 185, 129, 0.22);
    background: var(--runaki-success-soft);
    color: #0f6a50;
}

.alert-error {
    border-color: rgba(225, 29, 72, 0.22);
    background: var(--runaki-danger-soft);
    color: #9f1239;
}

.alert-warning {
    border-color: rgba(245, 158, 11, 0.24);
    background: var(--runaki-warning-soft);
    color: #9a6700;
}

.alert-info {
    border-color: rgba(14, 165, 233, 0.22);
    background: var(--runaki-info-soft);
    color: #0c6f9c;
}

html.dark .alert-success {
    color: #d1fae5;
}

html.dark .alert-error {
    color: #ffe4e6;
}

html.dark .alert-warning {
    color: #fef3c7;
}

html.dark .alert-info {
    color: #e0f2fe;
}

.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-shell {
    width: 100%;
}

.table-shell table {
    width: 100%;
    min-width: 42rem;
    border-collapse: separate;
    border-spacing: 0;
}

.table-shell thead th {
    background: var(--runaki-muted);
    color: var(--runaki-text-soft);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.01em;
}

.table-shell th,
.table-shell td {
    padding: 0.95rem 1rem;
    text-align: right;
    vertical-align: middle;
}

.table-shell tbody tr {
    transition: background 0.18s ease;
}

.table-shell tbody tr + tr td {
    border-top: 1px solid var(--runaki-border);
}

.table-shell tbody tr:hover {
    background: var(--runaki-muted);
}

.form-input,
.form-select,
.form-textarea,
.panel input:not([type='hidden']):not([type='checkbox']):not([type='radio']):not([type='file']),
.panel select,
.panel textarea {
    width: 100%;
    border: 1px solid var(--runaki-border-strong);
    border-radius: 1rem;
    background: var(--runaki-card-strong);
    padding: 0.82rem 0.95rem;
    min-height: 3rem;
    color: var(--runaki-text);
    transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.form-input::placeholder,
.form-textarea::placeholder,
.panel input::placeholder,
.panel textarea::placeholder {
    color: var(--runaki-text-soft);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus,
.panel input:not([type='hidden']):not([type='checkbox']):not([type='radio']):not([type='file']):focus,
.panel select:focus,
.panel textarea:focus {
    border-color: var(--runaki-primary);
    outline: none;
}

.form-textarea {
    min-height: 7rem;
    resize: vertical;
}

.form-select,
.panel select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%2365736d' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 7 5 6 5-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 0.9rem center;
    background-size: 1rem;
    padding-left: 2.6rem;
}

html.dark .form-select,
html.dark .panel select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%239ba8a2' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 7 5 6 5-6'/%3E%3C/svg%3E");
}

.panel select option,
.panel input,
.panel textarea {
    color-scheme: light dark;
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
select:-webkit-autofill {
    -webkit-text-fill-color: var(--runaki-text);
    -webkit-box-shadow: 0 0 0 1000px var(--runaki-card-strong) inset;
    transition: background-color 9999s ease-in-out 0s;
}

.form-input:disabled,
.form-select:disabled,
.form-textarea:disabled,
.panel input:disabled,
.panel select:disabled,
.panel textarea:disabled {
    cursor: not-allowed;
    background: var(--runaki-muted);
    color: var(--runaki-text-soft);
    opacity: 0.85;
}

.form-label {
    display: block;
    font-size: 0.86rem;
    font-weight: 800;
    color: var(--runaki-text);
}

.form-hint {
    font-size: 0.76rem;
    line-height: 1.8;
    color: var(--runaki-text-soft);
}

.filters-panel {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.filters-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.filters-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filters-grid {
    display: grid;
    gap: 1rem;
}

.filter-field {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.75rem;
}

.filter-actions > * {
    flex: 0 0 auto;
}

.inline-stat-card {
    display: grid;
    min-width: 6.25rem;
    gap: 0.2rem;
    border: 1px solid var(--runaki-border);
    border-radius: 1.15rem;
    background: var(--runaki-muted);
    padding: 0.75rem 0.95rem;
    text-align: center;
}

.inline-stat-card strong {
    font-size: 1.1rem;
    font-weight: 900;
    color: var(--runaki-text);
}

.status-select {
    min-width: 8.25rem;
}

.panel input[type='file'] {
    width: 100%;
    min-height: auto;
    border: 1px dashed var(--runaki-border-strong);
    border-radius: 1rem;
    background: var(--runaki-muted);
    padding: 0.5rem;
    color: var(--runaki-text-soft);
}

.panel input[type='file']:hover,
.panel input[type='file']:focus-visible {
    border-color: var(--runaki-primary);
    background: var(--runaki-card-strong);
}

.panel input[type='file']::file-selector-button {
    margin-inline-end: 0.75rem;
    border: 1px solid var(--runaki-border-strong);
    border-radius: 0.85rem;
    background: var(--runaki-card-strong);
    padding: 0.72rem 0.95rem;
    color: var(--runaki-primary);
    font-weight: 800;
    cursor: pointer;
}

.panel input[type='file']::-webkit-file-upload-button {
    margin-inline-end: 0.75rem;
    border: 1px solid var(--runaki-border-strong);
    border-radius: 0.85rem;
    background: var(--runaki-card-strong);
    padding: 0.72rem 0.95rem;
    color: var(--runaki-primary);
    font-weight: 800;
    cursor: pointer;
}

input[type='checkbox'],
input[type='radio'] {
    accent-color: var(--runaki-primary);
    inline-size: 1.05rem;
    block-size: 1.05rem;
    border-color: var(--runaki-border-strong);
    background: var(--runaki-card-strong);
}

.btn-primary,
.btn-secondary,
.btn-danger,
.btn-light,
.btn-light-danger {
    display: inline-flex;
    min-height: 2.8rem;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    border: 1px solid transparent;
    border-radius: 0.95rem;
    padding: 0.72rem 1rem;
    font-size: 0.93rem;
    font-weight: 800;
    line-height: 1;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-danger:hover,
.btn-light:hover,
.btn-light-danger:hover {
    transform: translateY(-1px);
}

.btn-primary {
    border-color: var(--runaki-primary);
    background: var(--runaki-primary);
    color: #ffffff;
}

.btn-primary:hover {
    background: var(--runaki-primary-strong);
    border-color: var(--runaki-primary-strong);
}

.btn-secondary {
    border-color: rgba(226, 201, 142, 0.42);
    background: rgba(226, 201, 142, 0.18);
    color: #73571e;
}

html.dark .btn-secondary {
    color: #ecd7a2;
}

.btn-danger {
    border-color: var(--runaki-danger);
    background: var(--runaki-danger);
    color: #ffffff;
}

.btn-danger:hover {
    background: #a42a40;
    border-color: #a42a40;
}

.btn-light {
    border-color: var(--runaki-border-strong);
    background: var(--runaki-card-strong);
    color: var(--runaki-text);
}

.btn-light:hover {
    background: var(--runaki-muted);
}

.btn-light-danger {
    border-color: rgba(185, 49, 71, 0.2);
    background: var(--runaki-danger-soft);
    color: var(--runaki-danger);
}

.btn-light-danger:hover {
    background: rgba(185, 49, 71, 0.14);
}

html.dark .btn-light-danger {
    color: #fecdd3;
}

.template-preview {
    background-image:
        linear-gradient(160deg, rgba(15, 107, 83, 0.84), rgba(7, 44, 36, 0.82)),
        url('../images/bg-pattern2.png');
    background-size: cover;
    background-position: center;
}

.auth-panel {
    position: relative;
}

.auth-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: url('../images/bg-pattern2.png');
    background-size: cover;
    opacity: 0.03;
}

.file-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: 1px solid var(--runaki-border);
    border-radius: 999px;
    background: var(--runaki-muted);
    padding: 0.38rem 0.72rem;
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--runaki-text-soft);
}

.chart-panel {
    display: flex;
    flex-direction: column;
}

.chart-frame {
    position: relative;
    width: 100%;
    height: 19rem;
    min-height: 19rem;
    margin-top: 1rem;
}

.chart-frame.chart-frame-compact {
    height: 17rem;
    min-height: 17rem;
}

.chart-frame > canvas {
    width: 100% !important;
    height: 100% !important;
}

.empty-state {
    border: 1px dashed var(--runaki-border-strong);
    border-radius: 1.35rem;
    background: rgba(255, 255, 255, 0.58);
    padding: 2rem 1.5rem;
    text-align: center;
}

html.dark .empty-state {
    background: rgba(255, 255, 255, 0.03);
}

.module-hero {
    position: relative;
    overflow: hidden;
}

.module-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at top left, var(--runaki-primary-soft), transparent 34%),
        radial-gradient(circle at bottom right, rgba(226, 201, 142, 0.12), transparent 28%);
    opacity: 0.9;
}

.module-hero-grid {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(18rem, 0.9fr);
    gap: 0.9rem;
    align-items: stretch;
}

.module-hero-copy,
.module-hero-side {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-width: 0;
}

.module-hero-text {
    max-width: 58rem;
    font-size: 0.86rem;
    line-height: 1.8;
    color: var(--runaki-text-soft);
}

.module-search-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.75rem;
    align-items: end;
}

.module-stat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
}

.module-stat-tile {
    display: flex;
    min-height: 6.6rem;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid var(--runaki-border);
    border-radius: 1.2rem;
    background: var(--runaki-card-strong);
    padding: 0.85rem;
}

.module-stat-tile span {
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--runaki-text-soft);
}

.module-stat-tile strong {
    font-size: clamp(1.2rem, 1.9vw, 1.65rem);
    font-weight: 900;
    color: var(--runaki-text);
}

.module-stat-tile small {
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.65;
    color: var(--runaki-text-soft);
}

.module-group-panel {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.module-section-heading,
.module-group-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
}

.module-card-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 0.9rem;
}

.module-card {
    display: flex;
    min-height: 100%;
    flex-direction: column;
    gap: 0.55rem;
    border: 1px solid var(--runaki-border);
    border-radius: 1.2rem;
    background: var(--runaki-card-strong);
    padding: 0.9rem;
    transition:
        border-color 160ms ease,
        background-color 160ms ease,
        transform 160ms ease;
}

.module-card:hover {
    border-color: var(--runaki-border-strong);
    background: var(--runaki-card);
    transform: translateY(-2px);
}

.module-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.65rem;
}

.module-feature-group {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.7rem;
    border: 1px solid var(--runaki-border);
    border-radius: 999px;
    background: var(--runaki-muted);
    padding-inline: 0.64rem;
    font-size: 0.67rem;
    font-weight: 900;
    color: var(--runaki-text-soft);
}

.module-icon-wrap {
    display: flex;
    min-width: 0;
    align-items: flex-start;
    gap: 0.68rem;
}

.module-icon-badge {
    display: inline-flex;
    width: 2.45rem;
    height: 2.45rem;
    flex: 0 0 2.45rem;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(15, 107, 83, 0.18);
    border-radius: 0.85rem;
    background: var(--runaki-primary-soft);
    color: var(--runaki-primary);
}

.module-card-summary {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: 0.79rem;
    line-height: 1.62;
    color: var(--runaki-text-soft);
}

.module-section-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.85rem;
    border: 1px solid var(--runaki-border);
    border-radius: 999px;
    background: var(--runaki-card);
    padding-inline: 1rem;
    font-size: 0.84rem;
    font-weight: 900;
    color: var(--runaki-text-soft);
}

.module-section-link:hover {
    color: var(--runaki-text);
    border-color: var(--runaki-border-strong);
}

.module-group-panel {
    scroll-margin-top: 6rem;
}

.module-count-pill {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 3.95rem;
    border: 1px solid var(--runaki-border);
    border-radius: 0.82rem;
    background: var(--runaki-muted);
    padding: 0.42rem 0.55rem;
    text-align: center;
}

.module-count-pill span {
    font-size: 0.62rem;
    font-weight: 800;
    color: var(--runaki-text-soft);
}

.module-count-pill strong {
    margin-top: 0.12rem;
    font-size: 0.92rem;
    font-weight: 900;
    color: var(--runaki-primary);
}

.module-card-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 0.05rem;
}

.module-card-actions > * {
    width: 100%;
    justify-content: center;
    min-height: 2.25rem;
    padding-inline: 0.72rem;
    font-size: 0.78rem;
}

.sidebar-shell::-webkit-scrollbar,
.sidebar-nav-list::-webkit-scrollbar,
.table-scroll::-webkit-scrollbar {
    width: 0.55rem;
    height: 0.55rem;
}

.sidebar-shell::-webkit-scrollbar-thumb,
.sidebar-nav-list::-webkit-scrollbar-thumb,
.table-scroll::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(96, 115, 107, 0.35);
}

.table-scroll::-webkit-scrollbar-track,
.sidebar-shell::-webkit-scrollbar-track,
.sidebar-nav-list::-webkit-scrollbar-track {
    background: transparent;
}

.bg-runaki-soft\/70,
.bg-runaki-soft\/80 {
    background: var(--runaki-muted) !important;
}

.bg-white\/70,
.bg-white\/80,
.bg-white\/90,
.bg-white\/95 {
    background: rgba(255, 255, 255, 0.88) !important;
}

html.dark .dark\:bg-slate-900\/70,
html.dark .dark\:bg-slate-900\/80,
html.dark .dark\:bg-slate-900,
html.dark .dark\:bg-slate-950 {
    background: rgba(18, 25, 22, 0.92) !important;
}

.border-slate-200\/70,
.border-slate-200\/80,
.border-slate-200,
.ring-slate-200 {
    border-color: var(--runaki-border) !important;
}

html.dark .dark\:border-slate-800,
html.dark .dark\:border-slate-900,
html.dark .dark\:ring-slate-700 {
    border-color: var(--runaki-border) !important;
}

.shadow,
.shadow-sm,
.shadow-md,
.shadow-lg,
.shadow-xl,
.shadow-2xl,
.shadow-inner,
.shadow-none,
.shadow-soft,
.shadow-panel,
.shadow-glow,
[class*='shadow-emerald-'],
[class*='shadow-slate-'],
[class*='shadow-runaki'] {
    box-shadow: none !important;
}

@media (min-width: 1024px) {
    #dashboardSidebar {
        display: block !important;
        position: fixed;
        top: 1rem;
        right: var(--dashboard-shell-offset);
        width: 18.75rem;
        max-width: 18.75rem;
        height: calc(100vh - 2rem);
        padding: 0;
        transform: none !important;
    }

    .dashboard-main {
        margin-right: calc(18.75rem + var(--dashboard-shell-offset) + 1.25rem);
    }

    html[data-sidebar-state='collapsed'] #dashboardSidebar {
        width: 5.5rem;
        max-width: 5.5rem;
    }

    html[data-sidebar-state='collapsed'] .dashboard-main {
        margin-right: calc(5.5rem + var(--dashboard-shell-offset) + 1.25rem);
    }

    .module-card-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1023.98px) {
    #dashboardSidebar {
        position: fixed;
        top: 0.75rem;
        right: 0.75rem;
        bottom: 0.75rem;
        width: min(19rem, calc(100vw - 1.5rem));
        max-width: min(19rem, calc(100vw - 1.5rem));
        height: auto;
        padding: 0;
        z-index: 50;
    }

    .dashboard-main {
        margin-right: 0;
        min-height: auto;
    }

    .shell-header {
        top: 0.75rem;
    }

    .header-toolbar {
        width: 100%;
    }

    .topbar-search {
        order: 10;
        width: 100%;
        max-width: none;
        min-width: 0;
        flex-basis: 100%;
    }

    .page-actions {
        width: 100%;
    }

    .page-actions > * {
        flex: 1 1 auto;
    }

    .sidebar-collapse-button {
        display: none !important;
    }

    html[data-sidebar-state='collapsed'] .sidebar-brand-copy,
    html[data-sidebar-state='collapsed'] .sidebar-nav-copy,
    html[data-sidebar-state='collapsed'] .theme-option-label {
        display: block;
    }

    html[data-sidebar-state='collapsed'] .sidebar-inner {
        align-items: stretch;
        padding-inline: 1rem;
    }

    html[data-sidebar-state='collapsed'] .sidebar-nav-item {
        justify-content: flex-start;
        padding-inline: 0.75rem;
    }

    html[data-sidebar-state='collapsed'] .sidebar-nav-chevron {
        display: inline-flex;
    }

    html[data-sidebar-state='collapsed'] .sidebar-nav-item > .nav-badge {
        position: static;
        min-width: 1.65rem;
        padding: 0.2rem 0.45rem;
        font-size: 0.72rem;
    }

    html[data-sidebar-state='collapsed'] .sidebar-submenu {
        position: static;
        width: 100%;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transform: none;
        visibility: visible;
        pointer-events: auto;
    }

    html[data-sidebar-state='collapsed'] .sidebar-item-group[data-state='open'] > .sidebar-submenu {
        max-height: 22rem;
        opacity: 1;
    }

    html[data-sidebar-state='collapsed'] .sidebar-submenu-body {
        border: 0;
        background: transparent;
        padding: 0.2rem 0 0 0.1rem;
    }

    html[data-sidebar-state='collapsed'] .sidebar-submenu-body::before {
        display: block;
    }

    html[data-sidebar-state='collapsed'] .sidebar-submenu-title {
        display: none;
    }

    .theme-switch {
        width: 100%;
    }

    .module-hero-grid,
    .module-search-form {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }

    .module-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .dashboard-main,
    .dashboard-main main {
        gap: 0.75rem;
    }

    .shell-header {
        border-radius: 1.3rem !important;
        padding: 1rem !important;
    }

    .panel {
        border-radius: 1.25rem !important;
    }

    .toolbar-icon,
    .topbar-profile {
        min-width: 2.85rem;
        min-height: 2.85rem;
    }

    .topbar-avatar,
    .sidebar-avatar {
        height: 2.3rem;
        width: 2.3rem;
    }

    .profile-menu {
        width: min(18rem, calc(100vw - 1.5rem));
    }

    .theme-option {
        min-height: 2.55rem;
    }

    .filters-header,
    .filters-summary,
    .filter-actions {
        width: 100%;
    }

    .filter-actions > * {
        flex: 1 1 calc(50% - 0.375rem);
    }

    .inline-stat-card {
        min-width: 0;
    }

    .chart-frame {
        height: 15rem;
        min-height: 15rem;
    }

    .chart-frame.chart-frame-compact {
        height: 14rem;
        min-height: 14rem;
    }

    .table-shell table {
        min-width: 34rem;
    }

    .table-shell th,
    .table-shell td {
        padding: 0.82rem 0.88rem;
    }

    .dashboard-main main .sticky.bottom-3 {
        position: static !important;
    }

    .module-stat-grid,
    .module-card-grid,
    .module-card-actions {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }

    .module-card-head,
    .module-section-heading,
    .module-group-header {
        flex-direction: column;
        align-items: stretch;
    }

    .module-count-pill {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        text-align: start;
    }
}
