* {
            box-sizing: border-box;
        }

        html.light {
            background: #eef2f7;
        }

        html.dark {
            background: #0f172a;
        }

        body {
            font-family: "Segoe UI", Arial, sans-serif;
            margin: 0;
            padding: 0;
            transition: background 0.3s, color 0.3s;
        }

        body.light {
            background: #eef2f7;
            color: #111827;
        }

        body.dark {
            background: #0f172a;
            color: #e5e7eb;
        }

        .modern-main-container {
            width: 100%;
            max-width: none;
            margin: 0;
            padding: 0;
            background: transparent;
            box-shadow: none;
            border-radius: 0;
        }

        label {
            display: block;
            margin-bottom: 6px;
            font-size: 13px;
            font-weight: 600;
        }

        body.light label {
            color: #374151;
        }

        body.dark label {
            color: #9ca3af;
        }

        input,
        textarea,
        select {
            width: 100%;
            padding: 10px 12px;
            border-radius: 6px;
            font-size: 14px;
        }

        body.light input,
        body.light textarea,
        body.light select {
            background: #ffffff;
            border: 1px solid #d1d5db;
            color: #111827;
        }

        body.dark input,
        body.dark textarea,
        body.dark select {
            background: #020617;
            border: 1px solid #1f2933;
            color: #f9fafb;
        }

        input:focus,
        textarea:focus,
        select:focus {
            outline: none;
            border-color: #2563eb;
        }

        .entry-filter {
            width: 100%;
            padding: 10px 12px;
            border-radius: 6px;
            border: 1px solid #d1d5db;
            font-size: 14px;
        }

        body.dark .entry-filter {
            background: #020617;
            border: 1px solid #1f2933;
            color: #f9fafb;
        }

        .form-group {
            margin-bottom: 18px;
        }

        .table-wrapper {
            overflow-x: auto;
            width: 100%;
        }

        .project-table {
            border-collapse: collapse;
            width: 100%;
        }

        body.light .project-table th,
        body.light .project-table td {
            border: 1px solid #e5e7eb;
        }

        body.dark .project-table th,
        body.dark .project-table td {
            border: 1px solid #374151;
        }

        .project-table th,
        .project-table td {
            padding: 14px 16px;
            font-size: 15px;
            line-height: 1.5;
        }

        .action-btn {
            padding: 12px 28px;
            background: #2563eb;
            color: #ffffff;
            border: none;
            font-size: 15px;
            font-weight: 600;
            border-radius: 6px;
            cursor: pointer;
            transition: background 0.2s, transform 0.2s;
            text-decoration: none;
        }

        .action-btn:hover {
            background: #1d4ed8;
            color: #ffffff;
            transform: translateY(-1px);
        }

        .action-btn.secondary {
            background: transparent;
            color: #2563eb;
            border: 2px solid #2563eb;
        }

        .action-btn.secondary:hover {
            background: #2563eb;
            color: #ffffff;
        }

        body.dark .action-btn.secondary {
            color: #93c5fd;
            border-color: #93c5fd;
        }

        body.dark .action-btn.secondary:hover {
            background: #2563eb;
            color: #ffffff;
        }

        .reset-btn {
            background: transparent;
            border: 1px solid #d1d5db;
            color: inherit;
        }

        .reset-btn:hover {
            background: rgba(37, 99, 235, 0.08);
            color: inherit;
        }

        body.dark .reset-btn {
            border-color: #374151;
            color: #e5e7eb;
        }

        body.dark .reset-btn:hover {
            background: #1f2937;
            color: #ffffff;
        }

        .sidenav {
            height: 100%;
            width: 0;
            position: fixed;
            top: 0;
            left: 0;
            z-index: 10000;
            overflow-x: hidden;
            padding-top: 60px;
            transition: 0.4s;
        }

        body.light .sidenav {
            background-color: #ffffff;
            box-shadow: 4px 0 15px rgba(0, 0, 0, 0.1);
        }

        body.dark .sidenav {
            background-color: #020617;
            box-shadow: 4px 0 20px rgba(0, 0, 0, 0.6);
        }

        .sidenav a {
            padding: 12px 24px;
            text-decoration: none;
            font-size: 16px;
            display: block;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            transition: background 0.2s, color 0.2s;
        }

        body.light .sidenav a {
            color: #374151;
        }

        body.dark .sidenav a {
            color: #e5e7eb;
        }

        .sidenav a:hover {
            background: rgba(37, 99, 235, 0.1);
        }

        .sidenav .closebtn {
            position: absolute;
            top: 12px;
            right: 16px;
            font-size: 28px;
            cursor: pointer;
        }

        .sidebar-open-btn {
            position: fixed;
            font-size: 26px;
            cursor: pointer;
            z-index: 10001;
        }

        .floating-toggle {
            position: fixed;
            z-index: 9999;
            padding: 10px 14px;
            border-radius: 50px;
            font-size: 13px;
            font-weight: 500;
            background: transparent;
            color: inherit;
            border: 1px solid #9ca3af;
            cursor: pointer;
            box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
            transition: background 0.3s, transform 0.2s;
        }

        .floating-toggle:hover {
            transform: translateY(-2px);
        }

        body.light .floating-toggle {
            background: #ffffff;
        }

        body.dark .floating-toggle {
            background: #020617;
        }

        .modern-message-wrap {
            max-width: 1320px;
            margin: 76px auto 0;
            padding: 0 28px;
        }

        .sidebar-open-btn {
            top: 28px;
            left: 24px;
        }

        .floating-toggle {
            top: 24px;
            right: 28px;
        }

        .app-footer {
            margin-top: 8px;
            padding-top: 12px;
        }

        .footer-inner {
            max-width: 1200px;
            margin: 0 auto;
        }

        .app-footer {
            width: 100%;
            padding: 12px 10px 18px;
            text-align: center;
            font-size: 13px;
            letter-spacing: 0.3px;
        }

        body.light .app-footer {
            color: #6b7280;
        }

        body.dark .app-footer {
            color: #9ca3af;
            border-top: 1px solid #374151;
        }

        .footer-link {
            font-weight: 500;
            color: #2563eb;
            text-decoration: none;
        }

        body.dark .footer-link {
            color: #93c5fd;
        }

        .footer-link:hover {
            text-decoration: underline;
        }

        .flash-message {
            padding: 10px 14px;
            border-radius: 6px;
            font-size: 14px;
            font-weight: 500;
            margin-bottom: 12px;
            text-align: center;
        }

        .flash-message.success {
            background: rgba(22, 163, 74, 0.1);
            color: #16a34a;
            border: 1px solid #16a34a;
        }

        .flash-message.error {
            background: rgba(220, 38, 38, 0.1);
            color: #dc2626;
            border: 1px solid #dc2626;
        }

        .flash-message.info {
            background: rgba(37, 99, 235, 0.1);
            color: #2563eb;
            border: 1px solid #2563eb;
        }

        body.dark .flash-message.success {
            background: rgba(34, 197, 94, 0.15);
            color: #22c55e;
            border-color: #22c55e;
        }

        body.dark .flash-message.error {
            background: rgba(248, 113, 113, 0.15);
            color: #f87171;
            border-color: #f87171;
        }

        body.dark .flash-message.info {
            background: rgba(147, 197, 253, 0.15);
            color: #93c5fd;
            border-color: #93c5fd;
        }

        .page-loader {
            position: fixed;
            inset: 0;
            z-index: 99999;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: opacity 0.4s ease, visibility 0.4s ease;
        }

        html.light .page-loader {
            background: #eef2f7;
        }

        html.dark .page-loader {
            background: #0f172a;
        }

        .loader-box {
            text-align: center;
        }

        .spinner {
            width: 40px;
            height: 40px;
            border: 4px solid rgba(37, 99, 235, 0.2);
            border-top-color: #2563eb;
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
            margin: 0 auto 10px;
        }

        .loader-text {
            font-size: 14px;
            color: #64748b;
        }

        body.dark .loader-text {
            color: #9ca3af;
        }

        @keyframes spin {
            to {
                transform: rotate(360deg);
            }
        }

        .page-loader.hidden {
            opacity: 0;
            visibility: hidden;
        }

        .theme-fade {
            position: fixed;
            inset: 0;
            opacity: 0;
            pointer-events: none;
            z-index: 99998;
            transition: opacity 0.22s ease-in-out;
        }

        html.light .theme-fade {
            background: #ffffff;
        }

        html.dark .theme-fade {
            background: #0f172a;
        }

        .theme-fade.active {
            opacity: 0.18;
        }

        .pagination-wrapper {
            text-align: center;
            font-size: 14px;
            user-select: none;
        }

        .page-link {
            margin: 0 6px;
            color: #2563eb;
            font-weight: 500;
            text-decoration: none;
        }

        .page-link:hover {
            text-decoration: underline;
        }

        .current-page {
            margin: 0 6px;
            font-weight: 700;
            color: #2563eb;
        }

        .page-disabled,
        .page-dots {
            margin: 0 6px;
            color: #94a3b8;
        }

        body.dark .page-link,
        body.dark .current-page {
            color: #93c5fd;
        }

        .export-modal {
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.55);
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 9999;
            padding: 16px;
        }

        .export-box {
            width: 420px;
            max-width: 100%;
            border-radius: 10px;
            overflow: hidden;
            border: 1px solid;
        }

        body.light .export-box {
            background: #ffffff;
            border-color: #e5e7eb;
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
        }

        body.dark .export-box {
            background: #111827;
            border-color: #374151;
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
        }

        .export-header {
            padding: 14px 18px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-bottom: 1px solid;
        }

        body.light .export-header {
            border-color: #e5e7eb;
        }

        body.dark .export-header {
            border-color: #374151;
        }

        .export-header h2 {
            margin: 0;
            font-size: 18px;
            font-weight: 600;
        }

        .export-close {
            cursor: pointer;
            font-size: 20px;
        }

        .export-body {
            padding: 16px 18px;
        }

        .export-section h4 {
            margin: 0 0 10px;
            font-size: 13px;
            font-weight: 600;
        }

        .export-section hr {
            border: none;
            border-top: 1px solid;
            margin: 12px 0;
        }

        body.light .export-section hr {
            border-color: #e5e7eb;
        }

        body.dark .export-section hr {
            border-color: #374151;
        }

        .export-section label {
            display: flex;
            align-items: center;
            justify-content: space-between;
            font-size: 14px;
            margin-bottom: 8px;
            cursor: pointer;
        }

        .export-section input[type="radio"] {
            width: 30px;
            margin: 0;
        }

        .export-footer {
            padding: 12px 16px;
            border-top: 1px solid;
            display: flex;
            justify-content: flex-end;
            gap: 10px;
        }

        body.light .export-footer {
            border-color: #e5e7eb;
        }

        body.dark .export-footer {
            border-color: #374151;
        }

        @media (max-width: 700px) {
            .modern-message-wrap {
                padding: 0 12px;
            }

            .sidebar-open-btn {
                top: 22px;
                left: 16px;
            }

            .floating-toggle {
                top: 18px;
                right: 12px;
            }
        }

        /* -------------------------------
        Common css START for entries_new, 
        singleproject_new, singleledger_new, 
        singleinventory_new 
        ---------------------------------*/
        .entries-dashboard-page {
            max-width: 100%;
            margin: 0 auto;
            padding: 76px 28px 16px;
        }

        .modern-message-wrap + .entries-dashboard-page {
            padding-top: 25px;
        }

        .entries-topbar {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 16px;
            margin-bottom: 18px;
        }

        .entries-topbar h2 {
            margin: 0 0 4px;
            text-align: left;
            font-size: 25px;
            font-weight: 700;
        }

        .entries-topbar p {
            margin: 0;
            color: #64748b;
            font-size: 14px;
        }

        body.dark .entries-topbar p {
            color: #9ca3af;
        }

        .entries-top-actions {
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
            justify-content: flex-end;
        }

        .entries-top-actions .action-btn,
        .entries-filter-actions .action-btn,
        .entries-action-link {
            width: auto;
            min-height: 40px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            text-decoration: none;
        }

        .entries-action-link,
        .entries-action-link:hover,
        .entries-action-link:focus,
        .entries-action-link:active {
            color: #ffffff;
        }

        .entries-hero-band {
            display: grid;
            grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
            gap: 18px;
            margin-bottom: 18px;
        }

        .entries-summary-card {
            position: relative;
            overflow: hidden;
            border-radius: 12px;
            padding: 22px;
            background: linear-gradient(135deg, #111827, #1e3a8a);
            color: #ffffff;
            min-height: 180px;
        }

        .entries-summary-card::after {
            content: "";
            position: absolute;
            right: -70px;
            top: -100px;
            width: 260px;
            height: 260px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.09);
        }

        .entries-summary-card span,
        .entries-mini-card span {
            display: block;
            font-size: 12px;
            font-weight: 700;
            text-transform: uppercase;
        }

        .entries-summary-card span {
            color: #bfdbfe;
        }

        .entries-summary-card strong {
            display: block;
            margin-top: 12px;
            font-size: 34px;
            line-height: 1.15;
        }

        .entries-summary-card p {
            max-width: 580px;
            margin: 12px 0 0;
            color: #dbeafe;
            font-size: 14px;
            line-height: 1.55;
        }

        .entries-mini-grid {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 12px;
        }

        .entries-mini-card {
            border: 1px solid #dbe3ef;
            border-radius: 12px;
            padding: 15px;
            background: #ffffff;
        }

        body.dark .entries-mini-card {
            background: #020617;
            border-color: #374151;
        }

        .entries-mini-card span {
            color: #64748b;
        }

        body.dark .entries-mini-card span {
            color: #9ca3af;
        }

        .entries-mini-card strong {
            display: block;
            margin-top: 7px;
            font-size: 22px;
            font-weight: 750;
        }

        .entries-positive {
            color: #16a34a;
        }

        .entries-negative {
            color: #dc2626;
        }

        .entries-filter-panel {
            border: 1px solid #dbe3ef;
            border-radius: 12px 12px 0 0;
            background: #ffffff;
            overflow: hidden;
            padding: 16px;
            margin-bottom: 0;
        }

        body.dark .entries-filter-panel {
            background: #111827;
            border-color: #374151;
        }

        .entries-filter-grid {
            display: grid;
            grid-template-columns: 220px minmax(240px, 1fr) minmax(260px, 0.9fr) auto;
            gap: 12px;
            align-items: end;
        }

        .entries-filter-grid .form-group {
            margin-bottom: 0;
            min-width: 0;
        }

        .entries-date-row {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 8px;
        }

        .entries-filter-actions {
            display: flex;
            gap: 8px;
            flex-wrap: nowrap;
            align-items: end;
            justify-content: flex-end;
        }

        .entries-filter-actions .action-btn {
            height: 48px;
            min-height: 48px;
            padding: 0 18px;
            line-height: 1;
        }

        .entries-info-icon {
            color: #93c5fd;
            font-weight: bold;
            cursor: pointer;
        }

        .entries-workbench {
            border: 1px solid #dbe3ef;
            border-top: none;
            border-radius: 0 0 12px 12px;
            background: #ffffff;
            overflow: hidden;
        }

        body.dark .entries-workbench {
            background: #111827;
            border-color: #374151;
        }

        .entries-table-headline {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 14px;
            padding: 14px 16px;
            border-bottom: 1px solid #e5e7eb;
        }

        body.dark .entries-table-headline {
            border-color: #374151;
        }

        .entries-table-headline strong {
            font-size: 15px;
        }

        .entries-table-wrapper {
            overflow-x: auto;
            width: 100%;
            text-align: center;
        }

        .entries-modern-table {
            min-width: 1180px;
            border: none;
            border-radius: 0;
        }

        .entries-modern-table th {
            background: #f8fafc;
            color: #475569;
            font-size: 12px;
            font-weight: 800;
            text-transform: uppercase;
            white-space: nowrap;
        }

        body.dark .entries-modern-table th {
            background: #1f2937;
            color: #e5e7eb;
        }

        .entries-modern-table th,
        .entries-modern-table td {
            padding: 13px 16px;
            vertical-align: middle;
        }

        .entries-modern-table tbody tr:hover {
            background: #f8fbff;
        }

        body.dark .entries-modern-table tbody tr:hover {
            background: #1f2937;
        }

        .entries-modern-table a,
        .entries-modern-table a:hover,
        .entries-modern-table a:focus,
        .entries-modern-table a:active {
            color: inherit;
            font-weight: inherit;
            text-decoration: none;
        }

        .entries-modern-table .action-cell a {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 30px;
            height: 30px;
            padding: 0 9px;
            border-radius: 999px;
            color: #020617;
            font-weight: 700;
            text-decoration: none;
            transition: background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
        }

        .entries-modern-table .action-cell a:hover,
        .entries-modern-table .action-cell a:focus,
        .entries-modern-table .action-cell a:active {
            background: #dbeafe;
            color: #1d4ed8;
            box-shadow: inset 0 0 0 1px #bfdbfe;
            text-decoration: none;
        }

        body.dark .entries-modern-table .action-cell a {
            color: #f8fafc;
        }

        body.dark .entries-modern-table .action-cell a:hover,
        body.dark .entries-modern-table .action-cell a:focus,
        body.dark .entries-modern-table .action-cell a:active {
            background: #172554;
            color: #93c5fd;
            box-shadow: inset 0 0 0 1px #1d4ed8;
        }


        .entries-modern-table .money-received {
            color: #16a34a;
            font-weight: 700;
        }

        .entries-modern-table .money-spent {
            color: #dc2626;
            font-weight: 700;
        }

        .entries-modern-table .credit-amount {
            color: #c2410c;
            font-weight: 700;
        }

        body.dark .entries-modern-table .money-received {
            color: #22c55e;
        }

        body.dark .entries-modern-table .money-spent {
            color: #f87171;
        }

        body.dark .entries-modern-table .credit-amount {
            color: #fb923c;
        }

        .entries-amount-cell {
            text-align: center;
            white-space: nowrap;
        }

        .entries-empty-row {
            text-align: center;
            padding: 22px;
        }

        .entries-workbench .pagination-wrapper {
            margin: 0;
            padding: 16px;
            border-top: 1px solid #e5e7eb;
            background: #ffffff;
        }

        body.dark .entries-workbench .pagination-wrapper {
            border-color: #374151;
            background: #111827;
        }

        .entries-export-box {
            border-radius: 12px;
        }

        body.dark select.entry-filter,
        body.dark select.entry-filter option {
            background-color: #020617;
            color: #ffffff;
        }

        body.dark select.entry-filter option:checked {
            background-color: #2563eb;
            color: #ffffff;
        }

        body.dark select.entry-filter option:hover {
            background-color: #1f2937;
            color: #ffffff;
        }

        .sort-link {
            display: inline-flex;
            align-items: center;
            gap: 6px;
        }

        .sort-arrow {
            font-size: 11px;
            color: #94a3b8;
        }

        body.dark .sort-arrow {
            color: #9ca3af;
        }

        .sort-link.active-sort .sort-arrow {
            color: #2563eb;
        }

        body.dark .sort-link.active-sort .sort-arrow {
            color: #93c5fd;
        }

        select.entry-filter optgroup {
            padding: 8px 0 6px;
            font-size: 13px;
            font-weight: 700;
        }

        body.light select.entry-filter optgroup {
            background: #f1f5f9;
            color: #334155;
        }

        body.dark select.entry-filter optgroup {
            background: #111827;
            color: #93c5fd;
        }

        select.entry-filter option {
            padding: 7px 10px;
        }

        body.light select.entry-filter option {
            background: #ffffff;
            color: #111827;
        }

        body.dark select.entry-filter option {
            background: #020617;
            color: #ffffff;
        }

        body.light select.entry-filter option:checked {
            background: #dbeafe;
            color: #1e3a8a;
        }

        body.dark select.entry-filter option:checked {
            background: #1f2937;
            color: #ffffff;
        }

        select.entry-filter option {
            cursor: pointer;
        }

        body.light select.entry-filter option:hover {
            background: #eff6ff;
            color: #1e3a8a;
        }

        body.dark select.entry-filter option:hover {
            background: #1f2937;
            color: #ffffff;
        }

        /* -----------------------------------------
        new search with multiple keywords filter css
        starts
        -----------------------------------------------*/

        .entries-keyword-filter-panel {
            overflow: visible;
            position: relative;
            z-index: 20;
        }

        .entries-keyword-filter-grid {
            overflow: visible;
        }

        .entries-keyword-search-field {
            min-width: 0;
        }

        .keyword-search-label {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
        }

        .keyword-search-all-toggle {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            font-size: 14px;
            font-weight: 600;
            color: #374151;
            cursor: pointer;
        }

        body.dark .keyword-search-all-toggle {
            color: #e5e7eb;
        }

        .keyword-search-all-toggle input {
            margin: 0;
        }

        .keyword-search-wrap {
            position: relative;
        }

        .keyword-search-panel {
            display: none;
            position: absolute;
            z-index: 2000;
            top: calc(100% + 6px);
            left: 0;
            width: 100%;
            min-width: 260px;
            padding: 8px;
            border: 1px solid #d1d5db;
            border-radius: 6px;
            background: #ffffff;
            box-shadow: 0 12px 30px rgba(15, 23, 42, 0.16);
        }

        .keyword-search-panel.open {
            display: block;
        }

        body.dark .keyword-search-panel {
            background: #020617;
            border-color: #1f2933;
            color: #f9fafb;
        }

        .keyword-list {
            max-height: 180px;
            overflow-y: auto;
        }

        .keyword-empty {
            padding: 9px 10px;
            color: #6b7280;
            font-size: 14px;
        }

        body.dark .keyword-empty {
            color: #9ca3af;
        }

        .keyword-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
            padding: 8px 9px;
            border-radius: 6px;
            font-size: 14px;
        }

        .keyword-item:hover {
            background: #f3f4f6;
        }

        body.dark .keyword-item:hover {
            background: #1f2937;
        }

        .keyword-remove {
            width: 22px;
            height: 22px;
            border: 0;
            border-radius: 999px;
            background: transparent;
            color: inherit;
            cursor: pointer;
            font-size: 16px;
            line-height: 1;
        }

        .keyword-remove:hover {
            background: rgba(37, 99, 235, 0.16);
        }

        /* -----------------------------------------
        new search with multiple keywords filter css
        ENDS
        -----------------------------------------------*/

        @media (max-width: 1100px) {
            .entries-hero-band {
                grid-template-columns: 1fr;
            }

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

            .entries-filter-actions {
                justify-content: flex-start;
            }
        }

        @media (max-width: 700px) {
            .entries-dashboard-page {
                padding: 76px 12px 12px;
            }

            .entries-topbar,
            .entries-table-headline {
                flex-direction: column;
                align-items: stretch;
            }

            .entries-top-actions {
                justify-content: flex-start;
            }

            .entries-filter-grid,
            .entries-mini-grid,
            .entries-date-row {
                grid-template-columns: 1fr;
            }

            .entries-filter-actions {
                flex-wrap: wrap;
            }
        }

        /* Shared summary layout for entries, single project, single ledger, single inventory */
        .summary-row-layout {
            display: grid;
            grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.95fr);
            gap: 18px;
            margin-bottom: 18px;
        }

        .summary-side-panel {
            display: grid;
            border: 1px solid #dbe3ef;
            border-radius: 12px;
            background: #ffffff;
            overflow: hidden;
        }

        body.dark .summary-side-panel {
            background: #020617;
            border-color: #374151;
        }

        .summary-side-row {
            min-height: 74px;
            padding: 15px 18px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 18px;
            border-bottom: 1px solid #e5e7eb;
        }

        .summary-side-row:last-child {
            border-bottom: none;
        }

        body.dark .summary-side-row {
            border-color: #374151;
        }

        .summary-side-row span {
            color: #64748b;
            font-size: 12px;
            font-weight: 700;
            text-transform: uppercase;
        }

        body.dark .summary-side-row span {
            color: #9ca3af;
        }

        .summary-side-row strong {
            color: #020617;
            font-size: 22px;
            font-weight: 750;
            line-height: 1.2;
            text-align: right;
        }

        body.dark .summary-side-row strong {
            color: #f8fafc;
        }

        .summary-side-row .entries-positive {
            color: #00a651;
        }

        .summary-side-row .entries-negative {
            color: #dc1f26;
        }

        .summary-side-row strong.credit-amount {
            color: #c2410c;
        }

        @media (max-width: 1100px) {
            .summary-row-layout {
                grid-template-columns: 1fr;
            }
        }

        @media (max-width: 700px) {
            .summary-side-row {
                min-height: auto;
                align-items: flex-start;
                gap: 8px;
            }
        }

        @media (max-width: 325px) {
            .summary-side-row {
                flex-direction: column;
            }

            .summary-side-row strong {
                text-align: left;
            }
        }

        /* ---------------------------
        Common css END for entries_new, 
        singleproject_new, singleledger_new, 
        singleinventory_new  
        ------------------------------*/

        /* ----------------------------
        Common css START for addentry_new,
        addproject, addledger_new, 
        addinvnetory_new  
        -------------------------------*/

        .modern-entity-form {
            border: 1px solid #dbe3ef;
            border-radius: 12px;
            background: #ffffff;
            overflow: hidden;
        }

        body.dark .modern-entity-form {
            background: #111827;
            border-color: #374151;
        }

        .form-section {
            padding: 18px;
            border-bottom: 1px solid #e5e7eb;
        }

        body.dark .form-section {
            border-color: #374151;
        }

        .form-section-head {
            display: flex;
            justify-content: space-between;
            gap: 16px;
            align-items: flex-start;
            margin-bottom: 16px;
        }

        .form-section-head strong {
            font-size: 15px;
            font-weight: 800;
        }

        .form-section-head span {
            color: #64748b;
            font-size: 13px;
            text-align: right;
        }

        body.dark .form-section-head span {
            color: #9ca3af;
        }

        .modern-form-grid {
            display: grid;
            gap: 14px;
            margin-bottom: 14px;
        }

        .modern-form-grid:last-child {
            margin-bottom: 0;
        }

        .modern-form-grid.one-col {
            grid-template-columns: 1fr;
        }

        .modern-form-grid.two-col {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }

        .modern-form-grid.three-col {
            grid-template-columns: repeat(3, minmax(0, 1fr));
        }

        .modern-entity-form .form-group {
            margin-bottom: 0;
            min-width: 0;
        }

        .modern-entity-form ul.errorlist {
            margin: 6px 0 0;
            padding: 0;
            list-style: none;
            color: #dc2626;
            font-size: 13px;
            font-weight: 600;
        }

        body.dark .modern-entity-form ul.errorlist {
            color: #f87171;
        }

        .form-error-panel {
            margin: 18px 18px 0;
            padding: 12px 14px;
            border: 1px solid #dc2626;
            border-radius: 8px;
            background: rgba(220, 38, 38, 0.08);
            color: #dc2626;
            font-size: 14px;
            font-weight: 600;
        }

        .form-submit-row {
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
            padding: 18px;
        }

        .danger-btn {
            background: #dc2626;
        }

        .danger-btn:hover {
            background: #b91c1c;
        }

        .danger-btn:disabled {
            opacity: 0.55;
            cursor: not-allowed;
            transform: none;
        }

        @media (max-width: 900px) {
            .modern-form-grid.two-col,
            .modern-form-grid.three-col {
                grid-template-columns: 1fr;
            }

            .form-section-head {
                flex-direction: column;
            }

            .form-section-head span {
                text-align: left;
            }
        }

        /* ----------------------------
        Common css END for addentry_new,
        addproject, addledger_new, 
        addinvnetory_new  
        -------------------------------*/

        /* ---------------------------
        Common css START for home_new, 
        profile_new, subscription page
        and login_new page 
        -------------------------------*/

        /* Shared new-page surface cards */
        .new-surface-card,
        .brand-gradient-card {
            border: 1px solid #dbe3ef;
            border-radius: 12px;
            background: #ffffff;
        }

        body.dark .new-surface-card,
        body.dark .brand-gradient-card {
            background: #111827;
            border-color: #374151;
        }

        /* Shared branded gradient card with logo watermark */
        .brand-gradient-card {
            position: relative;
            overflow: hidden;
            background:
                linear-gradient(90deg, rgba(37, 99, 235, 0.08), rgba(185, 28, 186, 0.06)),
                #ffffff;
            border-color: #d1d5db;
        }

        body.dark .brand-gradient-card {
            background:
                linear-gradient(90deg, rgba(37, 99, 235, 0.16), rgba(185, 28, 186, 0.12)),
                #111827;
            border-color: #374151;
        }

        .brand-logo-watermark::after {
            content: "";
            position: absolute;
            right: 34px;
            top: 34px;
            width: 210px;
            height: 150px;
            background: url("../images/logo-mark.png") center / contain no-repeat;
            opacity: 0.075;
            pointer-events: none;
        }

        body.dark .brand-logo-watermark::after {
            opacity: 0.13;
        }

        .brand-gradient-card > * {
            position: relative;
            z-index: 1;
        }

        /* ---------------------------
        Common css END for home_new, 
        profile_new, subscription page
        and login_new page 
        -------------------------------*/

        /* ---------------------------
        Common css START for projects_new,
        ledger_new, inventory_new
        -------------------------------*/

        /* Shared compact summary */
        .projects-compact-summary,
        .ledger-compact-summary,
        .inventory-compact-summary {
            display: grid;
            grid-template-columns: minmax(280px, 1.25fr) repeat(4, minmax(140px, 1fr));
            gap: 12px;
            margin-bottom: 18px;
        }

        .projects-compact-main,
        .projects-compact-stat,
        .ledger-compact-main,
        .ledger-compact-stat,
        .inventory-compact-main,
        .inventory-compact-stat {
            border: 1px solid #dbe3ef;
            border-radius: 10px;
            background: #ffffff;
            min-height: 104px;
        }

        .projects-compact-main,
        .ledger-compact-main,
        .inventory-compact-main {
            padding: 18px 20px;
            background:
                linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(15, 23, 42, 0)),
                #ffffff;
        }

        .projects-compact-stat,
        .ledger-compact-stat,
        .inventory-compact-stat {
            padding: 16px;
        }

        body.dark .projects-compact-main,
        body.dark .projects-compact-stat,
        body.dark .ledger-compact-main,
        body.dark .ledger-compact-stat,
        body.dark .inventory-compact-main,
        body.dark .inventory-compact-stat {
            background: #020617;
            border-color: #374151;
        }

        body.dark .projects-compact-main,
        body.dark .ledger-compact-main,
        body.dark .inventory-compact-main {
            background:
                linear-gradient(135deg, rgba(37, 99, 235, 0.18), rgba(15, 23, 42, 0)),
                #020617;
        }

        .projects-compact-main span,
        .projects-compact-stat span,
        .ledger-compact-main span,
        .ledger-compact-stat span,
        .inventory-compact-main span,
        .inventory-compact-stat span {
            display: block;
            color: #64748b;
            font-size: 12px;
            font-weight: 800;
            text-transform: uppercase;
        }

        body.dark .projects-compact-main span,
        body.dark .projects-compact-stat span,
        body.dark .ledger-compact-main span,
        body.dark .ledger-compact-stat span,
        body.dark .inventory-compact-main span,
        body.dark .inventory-compact-stat span {
            color: #9ca3af;
        }

        .projects-compact-main strong,
        .ledger-compact-main strong,
        .inventory-compact-main strong {
            display: block;
            margin-top: 8px;
            font-size: 28px;
            line-height: 1.15;
        }

        .projects-compact-stat strong,
        .ledger-compact-stat strong,
        .inventory-compact-stat strong {
            display: block;
            margin-top: 10px;
            font-size: 20px;
            line-height: 1.2;
        }

        .projects-compact-main p,
        .ledger-compact-main p,
        .inventory-compact-main p {
            margin: 8px 0 0;
            color: #64748b;
            font-size: 13px;
            line-height: 1.45;
        }

        body.dark .projects-compact-main p,
        body.dark .ledger-compact-main p,
        body.dark .inventory-compact-main p {
            color: #9ca3af;
        }

        /* Shared filter grid */
        .projects-filter-grid,
        .ledger-filter-grid,
        .inventory-filter-grid {
            display: grid;
            grid-template-columns: minmax(240px, 1fr) auto;
            gap: 12px;
            align-items: end;
        }

        .projects-filter-grid {
            grid-template-columns: minmax(240px, 1fr) minmax(260px, 0.8fr) auto;
        }

        .projects-filter-grid .form-group,
        .ledger-filter-grid .form-group,
        .inventory-filter-grid .form-group {
            margin-bottom: 0;
            min-width: 0;
        }

        /* Shared modern directory table */
        .projects-modern-table tbody tr,
        .ledger-modern-table tbody tr,
        .inventory-modern-table tbody tr {
            cursor: pointer;
        }

        .projects-modern-table th,
        .projects-modern-table td,
        .ledger-modern-table th,
        .ledger-modern-table td,
        .inventory-modern-table th,
        .inventory-modern-table td {
            border-left: none !important;
            border-right: none !important;
        }

        body.light .projects-modern-table th,
        body.light .projects-modern-table td,
        body.light .ledger-modern-table th,
        body.light .ledger-modern-table td,
        body.light .inventory-modern-table th,
        body.light .inventory-modern-table td {
            border-top: none !important;
            border-bottom: 1px solid #e5e7eb !important;
        }

        body.dark .projects-modern-table th,
        body.dark .projects-modern-table td,
        body.dark .ledger-modern-table th,
        body.dark .ledger-modern-table td,
        body.dark .inventory-modern-table th,
        body.dark .inventory-modern-table td {
            border-top: none !important;
            border-bottom: 1px solid #374151 !important;
        }

        /* Shared stable related-object tags */
        .projects-ledger-cell,
        .ledger-project-cell,
        .inventory-tag-cell,
        .related-tag-cell {
            max-width: none;
            white-space: normal;
        }

        .projects-ledger-cell {
            min-width: 300px;
        }

        .ledger-project-cell {
            min-width: 280px;
        }

        .inventory-tag-cell {
            min-width: 260px;
        }

        .projects-ledger-cell a,
        .ledger-project-cell a,
        .inventory-tag-cell a,
        .related-tag-cell a {
            display: inline-flex;
            align-items: center;
            width: auto;
            max-width: none;
            margin: 3px 4px;
            padding: 5px 10px;
            border-radius: 999px;
            background: #f1f5f9;
            color: #0f172a;
            border: 1px solid transparent;
            box-sizing: border-box;
            font-size: 12px;
            font-weight: 700;
            line-height: 1.2;
            text-decoration: none;
            white-space: nowrap;
            vertical-align: middle;
            transform: none;
            transition: background 0.18s, color 0.18s, border-color 0.18s;
        }

        .projects-ledger-cell a:hover,
        .projects-ledger-cell a:focus,
        .projects-ledger-cell a:active,
        .ledger-project-cell a:hover,
        .ledger-project-cell a:focus,
        .ledger-project-cell a:active,
        .inventory-tag-cell a:hover,
        .inventory-tag-cell a:focus,
        .inventory-tag-cell a:active,
        .related-tag-cell a:hover,
        .related-tag-cell a:focus,
        .related-tag-cell a:active {
            background: #dbeafe;
            color: #1d4ed8;
            border-color: transparent;
            padding: 5px 10px;
            font-size: 12px;
            font-weight: 700;
            line-height: 1.2;
            transform: none;
            text-decoration: none;
        }

        body.dark .projects-ledger-cell a,
        body.dark .ledger-project-cell a,
        body.dark .inventory-tag-cell a,
        body.dark .related-tag-cell a {
            background: #111827;
            color: #e5e7eb;
            border-color: #374151;
        }

        body.dark .projects-ledger-cell a:hover,
        body.dark .projects-ledger-cell a:focus,
        body.dark .projects-ledger-cell a:active,
        body.dark .ledger-project-cell a:hover,
        body.dark .ledger-project-cell a:focus,
        body.dark .ledger-project-cell a:active,
        body.dark .inventory-tag-cell a:hover,
        body.dark .inventory-tag-cell a:focus,
        body.dark .inventory-tag-cell a:active,
        body.dark .related-tag-cell a:hover,
        body.dark .related-tag-cell a:focus,
        body.dark .related-tag-cell a:active {
            background: #172554;
            color: #93c5fd;
            border-color: #374151;
        }

        @media (max-width: 1100px) {
            .projects-compact-summary,
            .ledger-compact-summary,
            .inventory-compact-summary {
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }

            .projects-compact-main,
            .ledger-compact-main,
            .inventory-compact-main {
                grid-column: 1 / -1;
            }

            .projects-filter-grid,
            .inventory-filter-grid {
                grid-template-columns: 1fr;
            }

            .projects-filter-grid .entries-filter-actions,
            .inventory-filter-grid .entries-filter-actions {
                justify-content: flex-start;
                flex-wrap: wrap;
            }
        }

        @media (max-width: 700px) {
            .projects-compact-summary,
            .projects-filter-grid,
            .ledger-compact-summary,
            .ledger-filter-grid,
            .inventory-compact-summary,
            .inventory-filter-grid {
                grid-template-columns: 1fr;
            }
        }

        /* ---------------------------
        Common css END for projects_new,
        ledger_new, inventory_new
        -------------------------------*/

