:root {
    --theme-bg: #eef3f8;
    --theme-panel: #ffffff;
    --theme-panel-soft: #f8fafc;
    --theme-border: #d9e0e7;
    --theme-text: #202631;
    --theme-muted: #7c8794;
    --theme-primary: #ff7800;
    --theme-primary-dark: #e86700;
    --theme-blue: #176ff2;
    --theme-green: #61dba8;
    --theme-yellow: #f7dc8a;
    --theme-purple: #3f45a9;
    --theme-shadow: 0 12px 35px rgba(24, 39, 75, 0.08);
    --sidebar-width: 260px;
    --topbar-height: 76px;
}

* {
    box-sizing: border-box;
}

body.ledger-body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--theme-bg);
    color: var(--theme-text);
}

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

button,
input {
    font: inherit;
}

.hidden {
    display:none!important;
}

/*
|--------------------------------------------------------------------------
| Auth
|--------------------------------------------------------------------------
*/

.auth-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(circle at top left, rgba(255, 120, 0, 0.18), transparent 32%),
        linear-gradient(135deg, #eef3f8, #ffffff);
}

.auth-card {
    width: min(440px, 100%);
    background: var(--theme-panel);
    border: 1px solid var(--theme-border);
    border-radius: 22px;
    box-shadow: var(--theme-shadow);
    padding: 32px;
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
}

.auth-brand-mark {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: var(--theme-primary);
    color: white;
    font-weight: 800;
}

.auth-brand-title {
    font-weight: 800;
    font-size: 20px;
}

.auth-brand-subtitle {
    color: var(--theme-muted);
    font-size: 13px;
}

.auth-title {
    margin: 0 0 8px;
    font-size: 26px;
}

.auth-description {
    margin: 0 0 22px;
    color: var(--theme-muted);
}

.auth-errors {
    margin-bottom: 16px;
    border: 1px solid #ffd0d0;
    background: #fff5f5;
    color: #ad1f1f;
    border-radius: 12px;
    padding: 12px;
    font-size: 14px;
}

.auth-form {
    display: grid;
    gap: 16px;
}

.form-field {
    display: grid;
    gap: 7px;
}

.form-label {
    font-size: 13px;
    color: var(--theme-muted);
}

.form-input {
    width: 100%;
    border: 1px solid var(--theme-border);
    border-radius: 12px;
    padding: 13px 14px;
    outline: none;
}

.form-input:focus {
    border-color: var(--theme-primary);
}

.form-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--theme-muted);
    font-size: 14px;
}

.auth-submit {
    border: 0;
    border-radius: 12px;
    background: var(--theme-primary);
    color: white;
    padding: 13px 16px;
    cursor: pointer;
    font-weight: 700;
}

/*
|--------------------------------------------------------------------------
| App Shell
|--------------------------------------------------------------------------
*/

.app-shell {
    min-height: 100vh;
    display: flex;
}

.app-main {
    flex: 1;
    min-width: 0;
    margin-left: var(--sidebar-width);
}

.app-content {
    padding: 24px;
}

/*
|--------------------------------------------------------------------------
| Sidebar
|--------------------------------------------------------------------------
*/

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar-width);
    background: var(--theme-panel);
    border-right: 1px solid var(--theme-border);
    box-shadow: 8px 0 25px rgba(24, 39, 75, 0.04);
    z-index: 30;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 18px;
    border-bottom: 1px solid var(--theme-border);
}

.sidebar-toggle-button {
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 0;
    background: var(--theme-primary);
    display: grid;
    gap: 4px;
    place-content: center;
    cursor: pointer;
}

.sidebar-toggle-line {
    width: 18px;
    height: 2px;
    background: white;
    display: block;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-brand-logo {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: #fff4e8;
    color: var(--theme-primary);
    font-weight: 800;
}

.sidebar-brand-title {
    display: block;
    font-size: 18px;
    font-weight: 800;
    line-height: 1;
}

.sidebar-brand-subtitle {
    display: block;
    font-size: 11px;
    color: var(--theme-muted);
    margin-top: 3px;
}

.sidebar-menu {
    padding: 14px 12px 24px;
    overflow-y: auto;
}

.sidebar-menu-group {
    margin-bottom: 4px;
}

.sidebar-menu-item {
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 11px;
    border-radius: 12px;
    padding: 10px 12px;
    color: #334155;
    transition: 0.18s ease;
}

.sidebar-menu-item:hover {
    background: #fff3e8;
    color: var(--theme-primary);
}

.sidebar-menu-icon {
    width: 28px;
    height: 28px;
    border-radius: 9px;
    background: #f1f5f9;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
}

.sidebar-menu-icon-placeholder {
    width: 12px;
    height: 12px;
    border-radius: 4px;
    background: currentColor;
    opacity: 0.55;
}

.sidebar-menu-label {
    flex: 1;
    font-size: 14px;
    font-weight: 650;
}

.sidebar-menu-caret {
    color: var(--theme-muted);
}

.sidebar-sub-menu {
    margin: 2px 0 8px 48px;
    display: grid;
    gap: 2px;
}

.sidebar-sub-menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 8px;
    border-radius: 9px;
    color: var(--theme-muted);
    font-size: 13px;
}

.sidebar-sub-menu-item:hover {
    color: var(--theme-primary);
    background: #fff8f1;
}

.sidebar-sub-menu-dot {
    width: 5px;
    height: 5px;
    border-radius: 999px;
    background: currentColor;
}

/*
|--------------------------------------------------------------------------
| Topbar
|--------------------------------------------------------------------------
*/

.topbar {
    height: var(--topbar-height);
    background: var(--theme-panel);
    border-bottom: 1px solid var(--theme-border);
    box-shadow: 0 8px 20px rgba(24, 39, 75, 0.05);
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(280px, 460px) minmax(260px, 1fr);
    align-items: center;
    gap: 20px;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 20;
}

.topbar-left,
.topbar-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.topbar-right {
    justify-content: flex-end;
}

.topbar-mobile-menu-button {
    display: none;
}

.topbar-title {
    margin: 0;
    font-size: 20px;
}

.topbar-breadcrumbs {
    color: var(--theme-muted);
    font-size: 13px;
    margin-top: 4px;
}

.topbar-search-form {
    display: flex;
    align-items: center;
    border: 1px solid var(--theme-border);
    border-radius: 9px;
    background: var(--theme-panel-soft);
    overflow: hidden;
}

.topbar-search-input {
    width: 100%;
    border: 0;
    outline: none;
    padding: 10px 12px;
    background: transparent;
}

.topbar-search-button,
.topbar-icon-button {
    border: 0;
    background: transparent;
    cursor: pointer;
}

.topbar-search-button {
    padding: 0 12px;
    color: var(--theme-muted);
}

.topbar-icon-button {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    color: var(--theme-muted);
}

.topbar-icon-button:hover {
    background: var(--theme-panel-soft);
    color: var(--theme-primary);
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    border-left: 1px solid var(--theme-border);
    padding-left: 14px;
}

.topbar-user-info {
    display: grid;
    text-align: right;
}

.topbar-user-name {
    font-size: 13px;
    font-weight: 700;
}

.topbar-user-role {
    font-size: 11px;
    color: var(--theme-muted);
}

.topbar-user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: #ffe8d1;
    color: var(--theme-primary);
    font-weight: 800;
}

.topbar-logout-button {
    border: 0;
    background: #f1f5f9;
    color: #475569;
    padding: 8px 10px;
    border-radius: 9px;
    cursor: pointer;
}

/*
|--------------------------------------------------------------------------
| Dashboard
|--------------------------------------------------------------------------
*/

.dashboard-page {
    display: grid;
    gap: 22px;
}

.page-tabs {
    display: flex;
    align-items: center;
    gap: 18px;
    border-bottom: 1px solid var(--theme-border);
    padding: 0 2px;
}

.page-tab {
    padding: 13px 16px;
    color: #475569;
    font-size: 14px;
    border-bottom: 3px solid transparent;
}

.page-tab.is-active {
    background: #fff8f1;
    border-color: var(--theme-primary);
    color: var(--theme-primary);
    font-weight: 700;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 0.8fr);
    gap: 22px;
}

.dashboard-card {
    background: var(--theme-panel);
    border: 1px solid var(--theme-border);
    border-radius: 10px;
    box-shadow: 0 8px 18px rgba(24, 39, 75, 0.03);
    padding: 18px;
    min-height: 280px;
}

.dashboard-card-large {
    min-height: 320px;
}

.dashboard-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 18px;
}

.dashboard-card-title {
    margin: 0;
    font-size: 16px;
}

.dashboard-card-subtitle {
    margin: 6px 0 0;
    color: var(--theme-muted);
    font-size: 13px;
}

.dashboard-card-menu-button {
    border: 1px solid #dbeafe;
    background: #f8fbff;
    color: var(--theme-blue);
    border-radius: 8px;
    padding: 4px 8px;
    cursor: pointer;
}

.chart-placeholder {
    position: relative;
    height: 230px;
    border-bottom: 1px solid var(--theme-border);
    border-left: 1px solid var(--theme-border);
    background:
        repeating-linear-gradient(
            to top,
            transparent 0,
            transparent 38px,
            rgba(148, 163, 184, 0.14) 39px
        );
}

.chart-bars {
    position: absolute;
    inset: 20px 24px 0;
    display: flex;
    align-items: flex-end;
    gap: 18px;
}

.chart-bars span {
    flex: 1;
    min-width: 18px;
    border-radius: 5px 5px 0 0;
    background: linear-gradient(to top, var(--theme-blue), var(--theme-green));
}

.chart-placeholder-line {
    overflow: hidden;
}

.chart-placeholder-line::before {
    content: "";
    position: absolute;
    left: 10%;
    right: 10%;
    bottom: 40%;
    height: 2px;
    background: var(--theme-blue);
    transform: skewY(-8deg);
}

.line-dot {
    position: absolute;
    width: 11px;
    height: 11px;
    border-radius: 999px;
    background: var(--theme-blue);
    transform: translate(-50%, 50%);
}

.line-dot.is-highlight {
    width: 15px;
    height: 15px;
    background: var(--theme-green);
    box-shadow: 0 0 0 8px rgba(97, 219, 168, 0.18);
}

.donut-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    min-height: 210px;
}

.donut-placeholder-ring {
    width: 180px;
    height: 180px;
    border-radius: 999px;
    background:
        conic-gradient(
            var(--theme-blue) 0 40%,
            var(--theme-yellow) 40% 72%,
            var(--theme-green) 72% 100%
        );
    display: grid;
    place-items: center;
}

.donut-placeholder-center {
    width: 112px;
    height: 112px;
    border-radius: 999px;
    background: white;
    display: grid;
    place-items: center;
    text-align: center;
}

.donut-placeholder-center strong {
    display: block;
    font-size: 30px;
}

.donut-placeholder-center span {
    color: var(--theme-muted);
    font-size: 13px;
    margin-top: -24px;
}

.dashboard-legend,
.stat-list {
    display: grid;
    gap: 14px;
}

.dashboard-legend-item,
.stat-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.legend-color {
    width: 11px;
    height: 11px;
    border-radius: 3px;
    display: inline-block;
    margin-right: 8px;
}

.legend-color-primary {
    background: var(--theme-blue);
}

.legend-color-warning {
    background: var(--theme-yellow);
}

.legend-color-success {
    background: var(--theme-green);
}

.stat-label {
    color: var(--theme-muted);
}

.stat-value {
    font-size: 22px;
}

/*
|--------------------------------------------------------------------------
| Mobile
|--------------------------------------------------------------------------
*/

.mobile-nav {
    display: none;
}

@media (max-width: 1100px) {
    :root {
        --sidebar-width: 230px;
    }

    .topbar {
        grid-template-columns: 1fr;
        height: auto;
        padding: 14px 18px;
    }

    .topbar-center {
        display: none;
    }

    .topbar-right {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 780px) {
    .sidebar {
        display: none;
    }

    .app-main {
        margin-left: 0;
        padding-bottom: 78px;
    }

    .app-content {
        padding: 16px;
    }

    .topbar {
        position: static;
    }

    .topbar-mobile-menu-button {
        display: grid;
        gap: 4px;
        width: 38px;
        height: 38px;
        border: 0;
        border-radius: 11px;
        background: var(--theme-primary);
        place-content: center;
    }

    .topbar-mobile-menu-line {
        width: 17px;
        height: 2px;
        background: white;
        display: block;
    }

    .topbar-user-info,
    .topbar-icon-button {
        display: none;
    }

    .page-tabs {
        overflow-x: auto;
    }

    .dashboard-card {
        min-height: auto;
    }

    .donut-placeholder {
        flex-direction: column;
    }

    .mobile-nav {
        position: fixed;
        inset: auto 0 0 0;
        height: 66px;
        background: var(--theme-panel);
        border-top: 1px solid var(--theme-border);
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        z-index: 40;
    }

    .mobile-nav-item {
        display: grid;
        place-items: center;
        gap: 3px;
        color: var(--theme-muted);
        font-size: 11px;
        padding: 8px 4px;
    }

    .mobile-nav-icon {
        width: 20px;
        height: 20px;
        border-radius: 7px;
        background: currentColor;
        opacity: 0.35;
    }
}

/*
|--------------------------------------------------------------------------
| Language Switcher
|--------------------------------------------------------------------------
*/

.auth-language-switcher {
    position: fixed;
    top: 22px;
    right: 22px;
    display: inline-flex;
    gap: 8px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--theme-border);
    border-radius: 999px;
    padding: 6px;
    box-shadow: var(--theme-shadow);
}

.auth-language-link,
.topbar-language-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 11px;
    border-radius: 999px;
    color: var(--theme-muted);
    font-size: 12px;
    font-weight: 700;
}

.auth-language-link.is-active,
.topbar-language-link.is-active {
    background: var(--theme-primary);
    color: white;
}

.topbar-language-switcher {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 1px solid var(--theme-border);
    border-radius: 999px;
    padding: 4px;
    background: var(--theme-panel-soft);
}

/*
|--------------------------------------------------------------------------
| RTL Support
|--------------------------------------------------------------------------
*/

html[dir="rtl"] body {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .sidebar {
    left: auto;
    right: 0;
    border-right: 0;
    border-left: 1px solid var(--theme-border);
    box-shadow: -8px 0 25px rgba(24, 39, 75, 0.04);
}

html[dir="rtl"] .app-main {
    margin-left: 0;
    margin-right: var(--sidebar-width);
}

html[dir="rtl"] .sidebar-menu-caret {
    transform: rotate(180deg);
}

html[dir="rtl"] .sidebar-sub-menu {
    margin-left: 0;
    margin-right: 48px;
}

html[dir="rtl"] .topbar-user {
    border-left: 0;
    border-right: 1px solid var(--theme-border);
    padding-left: 0;
    padding-right: 14px;
}

html[dir="rtl"] .topbar-user-info {
    text-align: left;
}

html[dir="rtl"] .auth-language-switcher {
    right: auto;
    left: 22px;
}

html[dir="rtl"] .chart-placeholder {
    border-left: 0;
    border-right: 1px solid var(--theme-border);
}

html[dir="rtl"] .dashboard-legend-item,
html[dir="rtl"] .stat-list-item {
    flex-direction: row-reverse;
}

html[dir="rtl"] .legend-color {
    margin-right: 0;
    margin-left: 8px;
}

@media (max-width: 780px) {
    html[dir="rtl"] .app-main {
        margin-right: 0;
    }
}

/*
|--------------------------------------------------------------------------
| FINAL RTL Layout Fixes
|--------------------------------------------------------------------------
| These are intentionally at the bottom to override earlier layout rules.
|--------------------------------------------------------------------------
*/

html[dir="rtl"] {
    direction: rtl;
}

html[dir="rtl"] body.ledger-body {
    direction: rtl;
    text-align: right;
}

/* Force sidebar to the RIGHT in RTL */
html[dir="rtl"] .sidebar {
    inset: 0 0 0 auto !important;
    left: auto !important;
    right: 0 !important;
    border-right: 0 !important;
    border-left: 1px solid var(--theme-border) !important;
    box-shadow: -8px 0 25px rgba(24, 39, 75, 0.04) !important;
}

/* Push main content away from right sidebar */
html[dir="rtl"] .app-main {
    margin-left: 0 !important;
    margin-right: var(--sidebar-width) !important;
}

/* Sidebar internal direction */
html[dir="rtl"] .sidebar-header,
html[dir="rtl"] .sidebar-brand,
html[dir="rtl"] .sidebar-menu-item,
html[dir="rtl"] .sidebar-sub-menu-item {
    direction: rtl;
    text-align: right;
}

/* Better icon/label alignment in RTL */
html[dir="rtl"] .sidebar-menu-item {
    justify-content: flex-start;
}

html[dir="rtl"] .sidebar-menu-label {
    text-align: right;
}

html[dir="rtl"] .sidebar-menu-caret {
    transform: rotate(180deg);
}

/* Sub menu indent should be from the right */
html[dir="rtl"] .sidebar-sub-menu {
    margin-left: 0 !important;
    margin-right: 48px !important;
}

/* Topbar should visually read RTL */
html[dir="rtl"] .topbar {
    direction: rtl;
}

html[dir="rtl"] .topbar-left {
    order: 3;
    justify-content: flex-start;
}

html[dir="rtl"] .topbar-center {
    order: 2;
}

html[dir="rtl"] .topbar-right {
    order: 1;
    justify-content: flex-start;
}

html[dir="rtl"] .topbar-search-form {
    direction: rtl;
}

html[dir="rtl"] .topbar-search-input {
    text-align: right;
}

html[dir="rtl"] .topbar-user {
    border-left: 0 !important;
    border-right: 1px solid var(--theme-border) !important;
    padding-left: 0 !important;
    padding-right: 14px !important;
}

html[dir="rtl"] .topbar-user-info {
    text-align: right !important;
}

/* Dashboard RTL polish */
html[dir="rtl"] .page-tabs {
    justify-content: flex-start;
    direction: rtl;
}

html[dir="rtl"] .dashboard-card-header {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .dashboard-card-menu-button {
    margin-left: 0;
    margin-right: auto;
}

html[dir="rtl"] .dashboard-legend {
    text-align: right;
}

html[dir="rtl"] .dashboard-legend-item {
    justify-content: flex-start !important;
    flex-direction: row !important;
}

html[dir="rtl"] .legend-color {
    margin-right: 0 !important;
    margin-left: 8px !important;
}

html[dir="rtl"] .stat-list-item {
    flex-direction: row-reverse;
}

/* Auth language switcher RTL position */
html[dir="rtl"] .auth-language-switcher {
    right: auto !important;
    left: 22px !important;
}

/* Mobile RTL */
@media (max-width: 780px) {
    html[dir="rtl"] .app-main {
        margin-right: 0 !important;
    }

    html[dir="rtl"] .topbar-left,
    html[dir="rtl"] .topbar-center,
    html[dir="rtl"] .topbar-right {
        order: initial;
    }
}




/*
|--------------------------------------------------------------------------
| Designed Forms / Card Listings
|--------------------------------------------------------------------------
*/

.designed-form {
    gap: 14px;
}

.button,
.button-primary,
.data-card-main-button,
.office-redirectBtn,
.pocket-redirectBtn,
movement-redirectBtn,
.user-redirectBtn,
.role-redirectBtn,
.permission-redirectBtn {
    width: 100%;
    background: var(--theme-primary, #ff7800);
    color: #ffffff;
    border: 0;
    border-radius: 8px;
    transition-duration: 0.4s;
    cursor: pointer;
    font-weight: 800;
}

.button:hover,
.button-primary:hover,
.data-card-main-button:hover,
.office-redirectBtn:hover,
.pocket-redirectBtn:hover,
movement-redirectBtn:hover,
.user-redirectBtn:hover,
.role-redirectBtn:hover,
.permission-redirectBtn:hover {
    background: #ffe8d1;
    color: var(--theme-primary, #ff7800);
}

.data-items-list {
    display: grid;
    gap: 12px;
}

.data-card-item,
.office-item,
.pocket-item,
.movement-item,
.user-item,
.role-item,
.permission-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-radius: 8px;
    border: 2px solid #cccccc;
    transition-duration: 0.4s;
    background-color: #f1f1f1;
    color: black;
    padding: 12px;
}

.data-card-item:hover,
.data-card-item.active,
.office-item:hover,
.office-item.active,
.pocket-item:hover,
.pocket-item.active,
.movement-item:hover,
.movement-item.active,
.user-item:hover,
.user-item.active,
.role-item:hover,
.role-item.active,
.permission-item:hover,
.permission-item.active {
    background-color: #ffe8d1;
    color: #ff7800;
}

.data-item-groups {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.data-item-group {
    display: flex;
    flex-direction: column;
    gap: 3px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(204, 204, 204, 0.75);
    border-radius: 8px;
    padding: 8px;
}

.data-item-group_label {
    font-size: 11px;
    font-weight: 800;
    opacity: 0.68;
}

.data-item-group_value {
    font-size: 14px;
    font-weight: 800;
    word-break: break-word;
}

.data-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 2px;
}

.data-tab-btn {
    border: 1px solid #cccccc;
    background: #ffffff;
    color: #222222;
    border-radius: 999px;
    padding: 7px 10px;
    cursor: pointer;
    transition-duration: 0.4s;
    font-size: 12px;
    font-weight: 800;
}

.data-tab-btn:hover,
.data-tab-btn.active {
    background: var(--theme-primary, #ff7800);
    color: #ffffff;
    border-color: var(--theme-primary, #ff7800);
}

.data-card-tab-content {
    display: none;
    background: #ffffff;
    border: 1px solid #f1c9a2;
    border-radius: 8px;
    padding: 10px;
}

.data-card-item.active .data-card-tab-content {
    display: block;
}

.data-card-main-button {
    padding: 11px 14px;
}

.mini-list {
    display: grid;
    gap: 7px;
}

.mini-list-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 8px;
    align-items: center;
    color: #222222;
    background: #fafafa;
    border-radius: 7px;
    padding: 8px;
    font-size: 12px;
}

.mini-role-group {
    display: grid;
    gap: 7px;
    margin-bottom: 8px;
}

.mini-list-empty {
    color: #555555;
    background: #fafafa;
    border-radius: 7px;
    padding: 9px;
    font-size: 12px;
}

.mini-list-empty.is-error {
    color: #bd1e1e;
}

.data-list-loading,
.data-list-empty {
    border: 2px dashed #cccccc;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    color: #777777;
}

html[dir="rtl"] .data-item-group {
    text-align: right;
}

html[dir="rtl"] .mini-list-row {
    direction: rtl;
}

@media (max-width: 780px) {
    .data-item-groups {
        grid-template-columns: 1fr;
    }

    .mini-list-row {
        grid-template-columns: 1fr;
    }
}


.data-list-empty.is-error {
    color: #bd1e1e;
    border-color: #bd1e1e;
    background: #fff5f5;
}

cat >> public/assets/theme/ledger-theme.css <<'CSS'

/*
|--------------------------------------------------------------------------
| Detail Pages
|--------------------------------------------------------------------------
*/

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
    gap: 22px;
}

.detail-fields,
.detail-summary {
    display: grid;
    gap: 10px;
}

.detail-field {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 11px 12px;
    border: 1px solid var(--theme-border);
    border-radius: 8px;
    background: #fafafa;
}

.detail-field-label {
    color: var(--theme-muted);
    font-weight: 800;
    font-size: 12px;
}

.detail-field-value {
    color: var(--theme-text);
    font-weight: 850;
    text-align: end;
}

.detail-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.detail-mini-list {
    display: grid;
    gap: 8px;
}

.detail-mini-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--theme-border);
    border-radius: 8px;
    background: #fafafa;
    font-size: 13px;
}

.detail-role-group {
    display: grid;
    gap: 8px;
    margin-bottom: 14px;
}

.detail-role-group h4 {
    margin: 0;
    color: var(--theme-primary);
}

.detail-back-button {
    text-decoration: none;
}

html[dir="rtl"] .detail-field {
    direction: rtl;
}

html[dir="rtl"] .detail-field-value {
    text-align: left;
}

html[dir="rtl"] .detail-mini-row {
    direction: rtl;
}

@media (max-width: 900px) {
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .detail-mini-row {
        grid-template-columns: 1fr;
    }
}

/*
|--------------------------------------------------------------------------
| Detail Add Popup
|--------------------------------------------------------------------------
*/

.detail-add-fab {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 58px;
    height: 58px;
    border: 0;
    border-radius: 999px;
    background: var(--theme-primary, #ff7800);
    color: #ffffff;
    font-size: 36px;
    font-weight: 800;
    line-height: 58px;
    cursor: pointer;
    z-index: 1200;
    box-shadow: 0 14px 30px rgba(255, 120, 0, 0.34);
    transition-duration: 0.4s;
}

.detail-add-fab:hover {
    background: #ffe8d1;
    color: var(--theme-primary, #ff7800);
}

.detail-add-overlay {
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, 0.42);
    z-index: 1190;
    opacity: 0;
    transition-duration: 0.25s;
}

.detail-add-overlay.active {
    opacity: 1;
}

.detail-add-popup {
    position: fixed;
    top: 20%;
    right: 0;
    width: min(520px, 92vw);
    height: 60%;
    background: #ffffff;
    border-radius: 18px 0 0 18px;
    box-shadow: -20px 0 45px rgba(24, 39, 75, 0.18);
    z-index: 1210;
    padding: 18px;
    overflow-y: auto;
    transform: translateX(110%);
    transition-duration: 0.35s;
}

.detail-add-popup.active {
    transform: translateX(0);
}

.detail-add-popup-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.detail-add-popup-title {
    margin: 0;
    font-size: 19px;
}

.detail-add-popup-subtitle {
    margin: 4px 0 0;
    color: var(--theme-muted);
    font-size: 13px;
}

.detail-add-close {
    border: 0;
    background: #f1f1f1;
    color: #111827;
    border-radius: 10px;
    width: 36px;
    height: 36px;
    font-size: 24px;
    cursor: pointer;
    transition-duration: 0.4s;
}

.detail-add-close:hover {
    background: #ffe8d1;
    color: var(--theme-primary, #ff7800);
}

.detail-add-type-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 16px;
}

.detail-add-type {
    border: 1px solid #cccccc;
    background: #f8fafc;
    color: #111827;
    border-radius: 8px;
    padding: 10px;
    font-weight: 800;
    cursor: pointer;
    transition-duration: 0.4s;
}

.detail-add-type:hover,
.detail-add-type.active {
    background: #ffe8d1;
    color: var(--theme-primary, #ff7800);
    border-color: var(--theme-primary, #ff7800);
}

.detail-add-form {
    display: grid;
    gap: 14px;
}

.detail-add-form [data-detail-add-fields] {
    display: grid;
    gap: 14px;
}

.discard-confirm {
    position: fixed;
    inset: 0;
    z-index: 1300;
    background: rgba(17, 24, 39, 0.5);
    display: grid;
    place-items: center;
    padding: 20px;
}

.discard-confirm-card {
    width: min(440px, 92vw);
    background: #ffffff;
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 20px 45px rgba(24, 39, 75, 0.18);
}

.discard-confirm-card h3 {
    margin: 0 0 8px;
}

.discard-confirm-card p {
    margin: 0 0 18px;
    color: var(--theme-muted);
}

.discard-confirm-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

html[dir="rtl"] .detail-add-fab {
    right: auto;
    left: 24px;
}

html[dir="rtl"] .detail-add-popup {
    right: auto;
    left: 0;
    border-radius: 0 18px 18px 0;
    transform: translateX(-110%);
}

html[dir="rtl"] .detail-add-popup.active {
    transform: translateX(0);
}

@media (max-width: 780px) {
    .detail-add-fab {
        right: 18px;
        bottom: 86px;
    }

    html[dir="rtl"] .detail-add-fab {
        left: 18px;
        right: auto;
    }

    .detail-add-popup,
    html[dir="rtl"] .detail-add-popup {
        top: auto;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 80%;
        border-radius: 18px 18px 0 0;
        transform: translateY(110%);
    }

    .detail-add-popup.active,
    html[dir="rtl"] .detail-add-popup.active {
        transform: translateY(0);
    }

    .detail-add-type-grid {
        grid-template-columns: 1fr;
    }

    .discard-confirm-actions {
        grid-template-columns: 1fr;
    }
}


.entity-grid {
    display: flex;
    gap: 20px;
}

article.entity-card.entity-grid-form {
    width: 30%;
}

article.entity-card.entity-card-wide {
    width: 70%;
}


