:root {
    --bg: #f3f6fb;
    --panel: #ffffff;
    --panel-alt: #eef6ff;
    --text: #0f172a;
    --muted: #5b6b82;
    --line: #dbe4ef;
    --brand: #0d9488;
    --brand-dark: #0f766e;
    --accent: #f59e0b;
    --danger: #dc2626;
    --success: #059669;
    --warning: #d97706;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
    --radius: 1.25rem;
}

html, body {
    margin: 0;
    min-height: 100%;
    background:
        radial-gradient(circle at top right, rgba(13, 148, 136, 0.12), transparent 28%),
        linear-gradient(180deg, #f8fbff 0%, var(--bg) 100%);
    color: var(--text);
    font-family: "Cairo", "Noto Sans Arabic", "Segoe UI", Tahoma, sans-serif;
}

a {
    color: inherit;
}

code {
    direction: ltr;
    unicode-bidi: bidi-override;
    font-size: 0.92rem;
}

h1, h2, h3, p {
    margin: 0;
}

* {
    box-sizing: border-box;
}

.login-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1.5rem;
}

.login-card {
    width: min(68rem, 100%);
    display: grid;
    grid-template-columns: 1.3fr 0.9fr;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(219, 228, 239, 0.9);
    border-radius: 2rem;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.login-hero {
    padding: 2.5rem;
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.22), transparent 32%),
        linear-gradient(135deg, #0f766e, #0d3b66 68%, #082f49);
    color: #fff;
}

.login-chip {
    display: inline-flex;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    margin-bottom: 1rem;
}

.login-hero h1 {
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1.2;
    margin-bottom: 1rem;
}

.login-hero p {
    max-width: 36rem;
    color: rgba(255, 255, 255, 0.88);
}

.login-notes {
    margin: 1.4rem 0 0;
    padding-right: 1.2rem;
    display: grid;
    gap: 0.6rem;
}

.login-form {
    padding: 2.2rem;
    display: grid;
    gap: 1rem;
    align-content: center;
}

.page-header-card,
.toolbar-card,
.card-panel,
.table-card,
.form-card {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(219, 228, 239, 0.88);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.page-header-card {
    padding: 1.4rem 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.page-header-card h1 {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    margin-bottom: 0.35rem;
}

.page-header-card p {
    color: var(--muted);
}

.page-header-actions,
.inline-actions {
    display: flex;
    gap: 0.7rem;
    flex-wrap: wrap;
}

.toolbar-card,
.table-card,
.card-panel,
.form-card {
    padding: 1.2rem;
}

.toolbar-grid,
.toolbar-grid-wide,
.form-two-columns,
.content-grid,
.summary-grid,
.details-grid {
    display: grid;
    gap: 1rem;
}

.toolbar-grid {
    grid-template-columns: minmax(0, 1fr) auto auto;
}

.toolbar-grid-wide {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.content-grid {
    grid-template-columns: 1.5fr 1fr;
}

.summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.form-two-columns,
.details-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.detail-wide {
    grid-column: 1 / -1;
}

.summary-card {
    padding: 1.2rem;
    border-radius: 1.1rem;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border: 1px solid var(--line);
}

.summary-card-label,
.detail-card span,
.definition-list span {
    color: var(--muted);
    font-size: 0.92rem;
}

.summary-card-value {
    font-size: 2rem;
    font-weight: 800;
    margin: 0.35rem 0;
}

.summary-card-foot {
    color: var(--muted);
}

.quick-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
    margin-top: 1rem;
}

.quick-link-card {
    display: block;
    padding: 1rem;
    border-radius: 1rem;
    text-decoration: none;
    border: 1px solid var(--line);
    background: #fbfdff;
}

.accent-panel {
    background: linear-gradient(180deg, #fdf7eb 0%, #fff 100%);
}

.stacked-list {
    margin: 1rem 0 0;
    padding-right: 1.1rem;
    display: grid;
    gap: 0.7rem;
}

.form-section {
    display: grid;
    gap: 0.4rem;
}

.field-label {
    font-weight: 700;
    color: var(--text);
}

.text-input,
.text-area-input {
    width: 100%;
    border-radius: 0.95rem;
    border: 1px solid var(--line);
    background: #fff;
    padding: 0.85rem 1rem;
    color: var(--text);
}

.text-area-input {
    min-height: 7rem;
}

.text-input:focus,
.text-area-input:focus {
    outline: 0;
    border-color: rgba(13, 148, 136, 0.7);
    box-shadow: 0 0 0 0.25rem rgba(13, 148, 136, 0.14);
}

.primary-button,
.ghost-button,
.inline-link-button {
    cursor: pointer;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.primary-button:hover,
.ghost-button:hover,
.inline-link-button:hover {
    transform: translateY(-1px);
}

.primary-button:disabled,
.ghost-button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
    transform: none;
}

.primary-button {
    border: 0;
    border-radius: 999px;
    padding: 0.82rem 1.1rem;
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    color: #fff;
    font-weight: 700;
}

/* Improved ghost button: used across the app for secondary actions */
.ghost-button {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.55rem 0.9rem;
    min-height: 2.4rem;
    border-radius: 0.9rem;
    background: transparent;
    border: 1px solid rgba(13, 59, 102, 0.06);
    color: var(--brand-dark);
    font-weight: 700;
    text-decoration: none;
}

.ghost-button:hover:not(:disabled) {
    transform: translateY(-1px);
    background: linear-gradient(90deg, rgba(13,148,136,0.04), rgba(15,118,110,0.01));
    border-color: rgba(13,148,136,0.12);
}

.ghost-button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
    transform: none;
}

.ghost-button:focus {
    outline: 0;
    box-shadow: 0 0 0 0.18rem rgba(13,148,136,0.08);
}

.ghost-button .label {
    line-height: 1;
}

.toggle-tree-button {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.85rem;
    border-radius: 0.9rem;
    background: transparent;
    border: 1px solid transparent;
    color: var(--brand-dark);
    font-weight: 700;
}

.toggle-tree-button .icon {
    display: inline-flex;
    width: 1.1rem;
    height: 1.1rem;
    align-items: center;
    justify-content: center;
}

.toggle-tree-button .chev {
    width: 1.1rem;
    height: 1.1rem;
    color: var(--brand-dark);
    transition: transform 0.22s cubic-bezier(.2,.9,.2,1), color 0.15s ease;
}

.toggle-tree-button .chev.rotated {
    transform: rotate(180deg);
}

.toggle-tree-button:hover {
    background: linear-gradient(90deg, rgba(13,148,136,0.06), rgba(15,118,110,0.02));
    border-color: rgba(13,148,136,0.12);
    transform: translateY(-1px) scale(1.01);
}

.full-width {
    width: 100%;
}

.inline-link,
.inline-link-button {
    color: var(--brand-dark);
    font-weight: 700;
    text-decoration: none;
    background: none;
    border: 0;
    padding: 0;
}

.table-wrapper {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 0.95rem 0.8rem;
    border-bottom: 1px solid #edf2f7;
    text-align: right;
    white-space: nowrap;
}

.data-table th {
    color: var(--muted);
    font-weight: 700;
    font-size: 0.92rem;
}

.badge-soft {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    font-size: 0.84rem;
    font-weight: 700;
}

.badge-soft.success {
    color: var(--success);
    background: rgba(5, 150, 105, 0.12);
}

.badge-soft.warning {
    color: var(--warning);
    background: rgba(217, 119, 6, 0.12);
}

.badge-soft.danger {
    color: var(--danger);
    background: rgba(220, 38, 38, 0.12);
}

.state-card {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding: 1.2rem;
    margin-top: 1rem;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.state-title {
    font-weight: 800;
    margin-bottom: 0.15rem;
}

.state-message {
    color: var(--muted);
}

.state-spinner {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    border: 3px solid rgba(13, 148, 136, 0.18);
    border-top-color: var(--brand);
    animation: spin 0.9s linear infinite;
}

.pager-bar {
    margin-top: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.pager-summary {
    color: var(--muted);
}

.pager-actions {
    display: flex;
    gap: 0.7rem;
}

.pager-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.85rem;
    border: 1px solid transparent;
    background: transparent;
    color: var(--brand-dark);
    font-weight: 700;
    transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

.pager-button .chev {
    width: 1rem;
    height: 1rem;
    color: var(--brand-dark);
}

.pager-button .label {
    display: inline-block;
}

.pager-button:hover:not(:disabled) {
    transform: translateY(-1px);
    background: linear-gradient(90deg, rgba(13,148,136,0.06), rgba(15,118,110,0.02));
    border-color: rgba(13,148,136,0.12);
}

.pager-button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

.pager-button:focus {
    outline: 0;
    box-shadow: 0 0 0 0.18rem rgba(13,148,136,0.12);
}

.pager-divider {
    margin: 0 0.45rem;
}

.tree-list {
    list-style: none;
    padding-right: 1rem;
    margin: 0;
    display: grid;
    gap: 0.8rem;
}

.tree-node {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
    padding: 0.9rem 1rem;
    border-radius: 1rem;
    background: #f8fbff;
    border: 1px solid var(--line);
}

.tree-main {
    font-weight: 700;
}

.tree-meta {
    color: var(--muted);
    font-size: 0.9rem;
}

.tree-toggle-button {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.85rem;
    min-height: 3.3rem;
    padding: 0.7rem 1rem;
    border-radius: 1rem;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
    color: var(--text);
    text-align: right;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.tree-toggle-button:hover {
    transform: translateY(-1px);
    border-color: rgba(13, 148, 136, 0.35);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.1);
}

.tree-toggle-button.is-active {
    border-color: rgba(13, 148, 136, 0.48);
    background: linear-gradient(180deg, rgba(13, 148, 136, 0.12) 0%, rgba(238, 246, 255, 0.96) 100%);
    box-shadow: 0 16px 32px rgba(13, 148, 136, 0.14);
}

.tree-toggle-icon {
    width: 2.35rem;
    height: 2.35rem;
    display: inline-grid;
    place-items: center;
    border-radius: 0.85rem;
    background: rgba(13, 59, 102, 0.08);
    color: #0d3b66;
    font-size: 1rem;
    flex: 0 0 2.35rem;
}

.tree-toggle-button.is-active .tree-toggle-icon {
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    color: #fff;
}

.tree-toggle-copy {
    display: grid;
    gap: 0.15rem;
}

.tree-toggle-title {
    font-weight: 800;
    line-height: 1.15;
}

.tree-toggle-hint {
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.25;
}

.detail-card {
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 1rem;
    background: #fff;
    display: grid;
    gap: 0.3rem;
}

.definition-list {
    display: grid;
    gap: 0.9rem;
    margin-top: 1rem;
}

.definition-list div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.alert-box {
    padding: 0.9rem 1rem;
    border-radius: 1rem;
    margin-bottom: 1rem;
}

.alert-success-box {
    color: var(--success);
    background: rgba(5, 150, 105, 0.1);
}

.alert-danger-box {
    color: var(--danger);
    background: rgba(220, 38, 38, 0.1);
}

.toggle-row {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    margin: 0.5rem 0 1rem;
}

.mb-3 {
    margin-bottom: 1rem;
}

.mb-4 {
    margin-bottom: 1.4rem;
}

.mt-4 {
    margin-top: 1.4rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 1100px) {
    .summary-grid,
    .content-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .login-card,
    .content-grid,
    .summary-grid,
    .form-two-columns,
    .details-grid,
    .quick-links,
    .toolbar-grid,
    .toolbar-grid-wide {
        grid-template-columns: 1fr;
    }

    .login-hero,
    .login-form {
        padding: 1.5rem;
    }

    .page-header-card,
    .pager-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .definition-list div {
        flex-direction: column;
    }

    .tree-toggle-button {
        width: 100%;
    }
}
.page-header-card {
    background: #ffffff;
    border: 1px solid #d9e5f0;
    border-radius: 18px;
    padding: 1.5rem 1.75rem;
    margin-bottom: 1rem;
    box-shadow: 0 12px 32px rgba(15, 35, 60, 0.05);
}

.breadcrumb-line {
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 0.45rem;
}

.page-title {
    color: #08213f;
    font-weight: 800;
    margin: 0;
}

.page-description {
    color: #64748b;
    margin: 0.35rem 0 0;
}

.toolbar-card,
.table-card {
    background: #ffffff;
    border: 1px solid #d9e5f0;
    border-radius: 18px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 12px 32px rgba(15, 35, 60, 0.05);
}

.toolbar-grid {
    display: grid;
    grid-template-columns: auto auto auto;
    gap: 0.75rem;
    align-items: end;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

    .form-field .form-label-custom {
        color: #08213f;
        font-weight: 800;
        font-size: 0.9rem;
        margin-bottom: 0.15rem;
    }

    .form-field label {
        font-weight: 700;
        color: #123b63;
        font-size: 0.9rem;
    }

.form-select-custom,
.text-input {
    min-height: 48px;
    border: 1px solid #cbd8e6;
    border-radius: 14px;
    padding: 0 1rem;
    background-color: #ffffff;
    color: #0f172a;
}

    .form-select-custom:focus,
    .text-input:focus {
        outline: none;
        border-color: #1b5b8f;
        box-shadow: 0 0 0 3px rgba(27, 91, 143, 0.12);
    }

.toolbar-actions {
    display: flex;
    gap: 0.5rem;
    align-items: end;
}

.primary-button,
.secondary-button,
.success-button {
    height: 48px;
    border-radius: 14px;
    padding: 0 1.4rem;
    font-weight: 800;
    border: none;
    cursor: pointer;
    white-space: nowrap;
}

.primary-button {
    background: #1b5b8f;
    color: #ffffff;
}

    .primary-button:hover {
        background: #123b63;
    }

.secondary-button {
    background: #ffffff;
    color: #123b63;
    border: 1px solid #cbd8e6;
}

    .secondary-button:hover {
        background: #f1f6fb;
    }

.success-button {
    background: #15937f;
    color: #ffffff;
}

    .success-button:hover {
        background: #0f7d6c;
    }

.table-wrapper {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

    .data-table thead th {
        background: #f1f6fb;
        color: #08213f;
        font-weight: 800;
        padding: 0.9rem;
        border-bottom: 1px solid #d9e5f0;
    }

    .data-table tbody td {
        padding: 0.85rem 0.9rem;
        border-bottom: 1px solid #e6edf5;
        color: #0f172a;
    }

    .data-table tbody tr:hover {
        background: #f8fbff;
    }

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0.25rem 0.65rem;
    font-size: 0.8rem;
    font-weight: 800;
}

.badge-primary {
    background: #dbeafe;
    color: #1e40af;
}

.badge-success {
    background: #dcfce7;
    color: #166534;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}
.badge-warning {
    background: #fef3c7;
    color: #92400e;
}
.badge-muted {
    background: #e5e7eb;
    color: #374151;
}

.row-actions {
    display: flex;
    gap: 0.45rem;
    justify-content: center;
    align-items: center;
}

.small-action-button {
    border: none;
    border-radius: 8px;
    padding: 0.35rem 0.7rem;
    font-size: 0.85rem;
    font-weight: 800;
    cursor: pointer;
}

.edit-action {
    background: #f4b400;
    color: #111827;
}

.delete-action {
    background: #dc3545;
    color: #ffffff;
}

    .delete-action:disabled {
        opacity: 0.65;
        cursor: not-allowed;
    }

.table-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #64748b;
    padding-top: 1rem;
    margin-top: 1rem;
}

.pager-actions {
    display: flex;
    gap: 0.5rem;
}

.pager-button {
    border: 1px solid #cbd8e6;
    background: #ffffff;
    color: #123b63;
    border-radius: 10px;
    padding: 0.45rem 0.9rem;
    font-weight: 700;
}

    .pager-button:disabled {
        opacity: 0.45;
        cursor: not-allowed;
    }

.state-message {
    padding: 1rem;
    border-radius: 14px;
    font-weight: 700;
}

.info-state {
    background: #e0f2fe;
    color: #075985;
}

.error-state {
    background: #fee2e2;
    color: #991b1b;
}

.success-state {
    background: #dcfce7;
    color: #166534;
    margin-bottom: 1rem;
}

.empty-state {
    background: #f8fafc;
    color: #64748b;
    text-align: center;
}
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.form-floating > label {
    color: #64748b;
}

.form-floating > .form-control, .form-floating > .form-select {
    border: 1px solid #cbd8e6;
    border-radius: 14px;
    min-height: 56px;
}

.form-floating > .form-control:focus {
    border-color: #1b5b8f;
    box-shadow: 0 0 0 3px rgba(27, 91, 143, 0.12);
}

.validation-message {
    color: #dc3545;
    font-size: 0.85rem;
    margin-top: 0.35rem;
}

.switches-card {
    display: flex;
    gap: 2rem;
    align-items: center;
    background: #f8fbff;
    border: 1px solid #d9e5f0;
    border-radius: 16px;
    padding: 1rem;
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-start;
}

@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .switches-card {
        flex-direction: column;
        align-items: flex-start;
    }
}
.form-floating > label {
    right: 0;
    left: auto;
    padding-right: 0.75rem;
}

.form-card {
    background: #ffffff;
    border: 1px solid #d9e5f0;
    border-radius: 18px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    box-shadow: 0 12px 32px rgba(15, 35, 60, 0.05);
}

.form-card-header {
    border-bottom: 1px solid #e6edf5;
    padding-bottom: 1rem;
    margin-bottom: 1.25rem;
}

.form-card-title {
    color: #08213f;
    font-weight: 800;
    margin: 0;
}

.form-card-description {
    color: #64748b;
    margin: 0.35rem 0 0;
    font-size: 0.95rem;
}

.page-header-card {
    background: #ffffff;
    border: 1px solid #d9e5f0;
    border-radius: 18px;
    padding: 1.5rem 1.75rem;
    margin-bottom: 1rem;
    box-shadow: 0 12px 32px rgba(15, 35, 60, 0.05);
}

.breadcrumb-line {
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 0.45rem;
}

.page-title {
    color: #08213f;
    font-weight: 800;
    margin: 0;
}

.page-description {
    color: #64748b;
    margin: 0.35rem 0 0;
}
.app-breadcrumb {
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 0.45rem;
}

.breadcrumb-link {
    color: #1b5b8f;
    text-decoration: none;
    font-weight: 700;
}

    .breadcrumb-link:hover {
        color: #123b63;
        text-decoration: underline;
    }

.breadcrumb-current {
    color: #64748b;
    font-weight: 600;
}

.breadcrumb-separator {
    margin: 0 0.5rem;
    color: #94a3b8;
}
.journal-line-description-row td {
    background: #f8fbff;
    border-bottom: 1px solid #d9e5f0;
    padding-top: 0.35rem;
    padding-bottom: 0.85rem;
}

.journal-line-main-row td {
    border-bottom: none;
    vertical-align: top;
}

.journal-lines-table th:nth-child(2),
.journal-lines-table td:nth-child(2) {
    min-width: 260px;
}

.journal-lines-table th:nth-child(3),
.journal-lines-table td:nth-child(3) {
    min-width: 220px;
}

.journal-lines-table th:nth-child(4),
.journal-lines-table td:nth-child(4) {
    min-width: 150px;
}

.journal-lines-footer {
    display: flex;
    justify-content: flex-start;
    padding: 1rem 0 0;
}

.line-description-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.line-description-label {
    color: #123b63;
    font-size: 0.85rem;
    font-weight: 800;
}

.line-description-input {
    min-height: 72px;
    resize: vertical;
}

.amount-input {
    min-width: 120px;
}

.amount-input:disabled {
    background: #f1f5f9;
    color: #64748b;
    cursor: not-allowed;
}

.journal-book-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.journal-book-entry {
    border: 1px solid #d9e5f0;
    border-radius: 14px;
    overflow: hidden;
    background: #ffffff;
}

.journal-book-entry-header {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
    padding: 1rem;
    background: #f8fbff;
    border-bottom: 1px solid #d9e5f0;
}

.journal-book-entry-header span {
    display: block;
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.journal-book-entry-header strong {
    color: #08213f;
    font-size: 0.92rem;
    font-weight: 800;
}

.journal-book-entry-header a {
    color: #1b5b8f;
    text-decoration: none;
}

.journal-book-entry-header a:hover {
    text-decoration: underline;
}
.searchable-select {
    position: relative;
    width: 100%;
}

.searchable-select-input {
    width: 100%;
    padding-inline-end: 2.25rem;
}

.searchable-select-clear {
    position: absolute;
    inset-inline-end: 0.65rem;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: #64748b;
    font-size: 1.2rem;
    font-weight: 800;
    cursor: pointer;
    line-height: 1;
}

.searchable-select-menu {
    position: absolute;
    z-index: 2000;
    top: calc(100% + 6px);
    inset-inline-start: 0;
    inset-inline-end: 0;
    max-height: 260px;
    overflow-y: auto;
    background: #ffffff;
    border: 1px solid #cbd8e6;
    border-radius: 14px;
    box-shadow: 0 16px 36px rgba(15, 35, 60, 0.14);
    padding: 0.35rem;
}

.searchable-select-option {
    width: 100%;
    border: none;
    background: transparent;
    text-align: start;
    border-radius: 10px;
    padding: 0.65rem 0.75rem;
    color: #08213f;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

    .searchable-select-option:hover,
    .searchable-select-option.is-highlighted {
        background: #f1f6fb;
    }

    .searchable-select-option.is-disabled {
        opacity: 0.55;
        cursor: not-allowed;
    }

.option-text {
    font-weight: 800;
}

.option-subtext {
    color: #64748b;
    font-size: 0.85rem;
}

.searchable-select-empty {
    padding: 0.85rem;
    color: #64748b;
    text-align: center;
}

.validation-summary-card {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 14px;
    color: #7c2d12;
    padding: 1rem 1.1rem;
}

.validation-summary-card strong {
    display: block;
    margin-bottom: 0.5rem;
}

.validation-summary-card ul {
    margin: 0;
    padding-inline-start: 1.25rem;
}

.validation-summary-card li + li {
    margin-top: 0.3rem;
}

.journal-lines-table .sbselect-wrapper-div,
.journal-lines-table .sbselect-wrapper-div[sb-select-scope-identifier] {
    direction: rtl !important;
    width: 100% !important;
    text-align: right !important;
    font-family: inherit !important;
    z-index: unset !important;
}

.journal-lines-table .sbselect-main-area,
.journal-lines-table .sbselect-main-area[sb-select-scope-identifier] {
    border: 1px solid #cbd8e6 !important;
    border-radius: 14px !important;
    background: #ffffff !important;
    min-height: 48px !important;
    height: 48px !important;
}

.journal-lines-table .sbselect-placeholder,
.journal-lines-table .sbselect-placeholder[sb-select-scope-identifier] {
    padding: 0 1rem !important;
    color: #0f172a !important;
    text-align: right !important;
}

.journal-lines-table .sbselect-search-input-field,
.journal-lines-table .sbselect-search-input-field[sb-select-scope-identifier] {
    text-align: right !important;
    border: 1px solid #cbd8e6 !important;
    border-radius: 10px !important;
    padding: 0 0.75rem !important;
    height: 42px !important;
}
.journal-lines-table .sbselect-popup,
.journal-lines-table .sbselect-popup[sb-select-scope-identifier] {
    border: 1px solid #cbd8e6 !important;
    border-radius: 14px !important;
    box-shadow: 0 16px 36px rgba(15, 35, 60, 0.14) !important;
    margin-top: 0 !important;
    overflow: hidden !important;
    z-index: 3001 !important;
}

.journal-lines-table .sb-select-mouseover,
.journal-lines-table .sb-select-mouseover[sb-select-scope-identifier] {
    pointer-events: none !important;
    z-index: 1 !important;
}

.sb-account-option {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    text-align: right;
}

.sb-account-option span {
    color: #64748b;
    font-size: 0.85rem;
}
.form-floating > .form-select {
    padding-left: 2.25rem;
    padding-right: 0.75rem;
    background-position: left center; /* Moves arrow to the left */
}

/* Adjusts the floating label positioning to align nicely on the right */
.form-floating > label {
    right: 0;
    left: auto;
    transform-origin: 100% 0; /* Ensures the scale-down animation shrinks to the right */
}
/* Forces the date text and native picker icon to align to the right */
.form-floating > .form-control[type="date"], .text-input {
    text-align: right;
}

    /* Webkit specific fix (Chrome, Safari, Edge) to flip internal layout */
    .form-floating > .form-control[type="date"]::-webkit-date-and-time-value {
        text-align: right;
        direction: rtl;
    }

    /* Optional: Pushes the native calendar icon to the left side if preferred in RTL */
    .form-floating > .form-control[type="date"]::-webkit-calendar-picker-indicator {
        margin-inline-start: 0;
        margin-inline-end: auto;
    }
.sbselect-options-block.sbselect-show-scrollbar {
    text-align: right !important;
}
.sbselect-main-area{
    padding-right:1rem;
}
body .select-box-shadow-effect[sb-select-scope-identifier] {
    box-shadow: none !important;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem 1rem;
}

.checkbox-row {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #08213f;
}

.checkbox-row input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
}
