/*
 * REKAZ identity for the whole application.
 *
 * Every identity rule starts with html.rk-brand-on. The class is set only while the identity is on
 * in the settings, so turning it off brings the original look back without removing this file.
 * Nothing here hides an element or changes a layout that a script depends on: only colours, fonts,
 * corners, shadows and spacing inside elements.
 */

html.rk-brand-on {
    --rk-navy: #0b1736;
    --rk-navy-2: #13254a;
    --rk-indigo: #1e3a8a;
    --rk-blue: #2563eb;
    --rk-blue-dark: #1d4ed8;
    --rk-orange: #f7931e;
    --rk-amber: #fdba2d;
    --rk-ink: #0f172a;
    --rk-text: #334155;
    --rk-muted: #64748b;
    --rk-line: #e3e8f0;
    --rk-page: #f4f6fb;
    --rk-field: #f8fafc;
    --rk-radius: 12px;
    --rk-font: "Rekaz Riyal", "IBM Plex Sans Arabic", "Segoe UI", Tahoma, Arial, sans-serif;
    --rk-font-display: "Rekaz Riyal", "Readex Pro", "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
}

/* ---------- type ---------- */

/* the Arabic stylesheet of the application forces its own font with !important,
   this selector is more specific so the REKAZ font wins in both languages */
html.rk-brand-on body,
html.rk-brand-on body .btn,
html.rk-brand-on body .form-control,
html.rk-brand-on body .form-select,
html.rk-brand-on body input,
html.rk-brand-on body select,
html.rk-brand-on body textarea,
html.rk-brand-on body button,
html.rk-brand-on body .tooltip,
html.rk-brand-on body .popover,
html.rk-brand-on body .select2-container,
html.rk-brand-on body .note-editor {
    font-family: var(--rk-font) !important;
}

html.rk-brand-on body h1,
html.rk-brand-on body h2,
html.rk-brand-on body h3,
html.rk-brand-on body h4 {
    font-family: var(--rk-font-display) !important;
    letter-spacing: 0;
}

/* the sign in page sets its own heading colours on a dark panel */
html.rk-brand-on body:not(.rk-auth) h1,
html.rk-brand-on body:not(.rk-auth) h2,
html.rk-brand-on body:not(.rk-auth) h3,
html.rk-brand-on body:not(.rk-auth) h4 {
    font-weight: 600;
    color: var(--rk-ink);
}

/* code and numbers in monospace keep their own font */
html.rk-brand-on body code,
html.rk-brand-on body pre,
html.rk-brand-on body kbd {
    font-family: Consolas, "Courier New", monospace !important;
}

html.rk-brand-on body {
    background-color: var(--rk-page);
    color: var(--rk-text);
}

html.rk-brand-on a {
    color: var(--rk-blue);
}

html.rk-brand-on a:hover,
html.rk-brand-on a:focus {
    color: var(--rk-blue-dark);
}

/* a visible focus for people who use the keyboard */
html.rk-brand-on :focus-visible {
    outline: 3px solid rgba(247, 147, 30, 0.55);
    outline-offset: 2px;
}

/* ---------- sidebar ---------- */

html.rk-brand-on .sidebar,
html.rk-brand-on .sidebar-scroll {
    background: linear-gradient(180deg, var(--rk-navy) 0%, var(--rk-navy-2) 100%) !important;
}

/* the logo in white and orange sits on the navy of the menu itself */
html.rk-brand-on .sidebar .sidebar-brand {
    background: transparent !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

html.rk-brand-on .sidebar {
    background: var(--rk-navy) !important;
}

html.rk-brand-on .sidebar-menu li a,
html.rk-brand-on .sidebar-menu li ul li a {
    color: rgba(255, 255, 255, 0.78) !important;
    border-radius: 10px;
    transition: background-color 0.18s ease, color 0.18s ease;
}

html.rk-brand-on .sidebar-menu li a svg,
html.rk-brand-on .sidebar-menu li a .icon {
    color: rgba(255, 255, 255, 0.6) !important;
    stroke: currentColor;
    transition: color 0.18s ease;
}

html.rk-brand-on .sidebar-menu li a:hover,
html.rk-brand-on .sidebar-menu li a:focus,
html.rk-brand-on .sidebar-menu li ul li a:hover {
    color: #fff !important;
    background-color: rgba(255, 255, 255, 0.08) !important;
}

html.rk-brand-on .sidebar-menu li a:hover svg,
html.rk-brand-on .sidebar-menu li a:focus svg {
    color: #fff !important;
}

/* the open page: indigo, with an orange mark on the reading side */
html.rk-brand-on .sidebar-menu li.active > a {
    color: #fff !important;
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.9), rgba(30, 58, 138, 0.9)) !important;
    border-inline-start: 3px solid var(--rk-orange);
    box-shadow: 0 8px 18px -10px rgba(37, 99, 235, 0.8);
}

html.rk-brand-on .sidebar-menu li.active > a svg {
    color: var(--rk-amber) !important;
}

html.rk-brand-on .sidebar-menu li ul {
    background: transparent !important;
}

html.rk-brand-on .sidebar-menu li ul li a {
    font-size: 14px;
}

html.rk-brand-on .sidebar-menu li ul li.active > a,
html.rk-brand-on .sidebar-menu li ul li a.active {
    background: rgba(255, 255, 255, 0.1) !important;
    box-shadow: none;
}

/* the folded sidebar shows the names in a flyout on hover */
html.rk-brand-on .sidebar-toggled .sidebar-menu li:hover,
html.rk-brand-on .sidebar-toggled .sidebar-menu li:hover > a,
html.rk-brand-on .sidebar-toggled .sidebar-menu li:hover > ul {
    background-color: var(--rk-navy-2) !important;
}

html.rk-brand-on .sidebar .badge {
    background: var(--rk-orange) !important;
    color: #1b1203 !important;
}

/* ---------- top bar ---------- */

html.rk-brand-on .navbar-custom {
    background: rgba(255, 255, 255, 0.96) !important;
    box-shadow: 0 1px 0 var(--rk-line), 0 6px 18px -14px rgba(15, 23, 42, 0.35);
}

html.rk-brand-on .navbar-custom .nav-link svg,
html.rk-brand-on .navbar-custom .nav-link .icon {
    color: var(--rk-muted);
    transition: color 0.18s ease;
}

html.rk-brand-on .navbar-custom .nav-link:hover svg {
    color: var(--rk-blue);
}

html.rk-brand-on .navbar-custom .badge,
html.rk-brand-on .navbar-custom .notification-badge {
    background: var(--rk-orange) !important;
    color: #1b1203 !important;
}

/* ---------- buttons ---------- */

html.rk-brand-on .btn {
    border-radius: 10px;
    font-weight: 500;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.12s ease;
}

html.rk-brand-on .btn:active {
    transform: translateY(1px);
}

html.rk-brand-on .btn-primary {
    background: linear-gradient(135deg, var(--rk-blue) 0%, var(--rk-indigo) 100%) !important;
    border-color: transparent !important;
    color: #fff !important;
    box-shadow: 0 8px 18px -10px rgba(37, 99, 235, 0.9);
}

html.rk-brand-on .btn-primary:hover,
html.rk-brand-on .btn-primary:focus {
    background: linear-gradient(135deg, var(--rk-blue-dark) 0%, #1e3080 100%) !important;
    box-shadow: 0 10px 22px -10px rgba(37, 99, 235, 1);
    color: #fff !important;
}

html.rk-brand-on .btn-primary:disabled,
html.rk-brand-on .btn-primary.disabled {
    box-shadow: none;
    opacity: 0.6;
}

html.rk-brand-on .btn-default,
html.rk-brand-on .btn-outline-light {
    background: #fff;
    border: 1px solid var(--rk-line) !important;
    color: var(--rk-text);
}

html.rk-brand-on .btn-default:hover,
html.rk-brand-on .btn-default:focus {
    border-color: var(--rk-blue) !important;
    color: var(--rk-blue);
    background: #fff;
}

html.rk-brand-on .btn-default:hover svg {
    color: var(--rk-blue);
}

html.rk-brand-on .btn-info {
    background: #e8f0ff !important;
    border-color: transparent !important;
    color: var(--rk-blue-dark) !important;
}

html.rk-brand-on .btn-info:hover {
    background: var(--rk-blue) !important;
    color: #fff !important;
}

html.rk-brand-on .btn-success {
    background: #0f9d6e !important;
    border-color: #0f9d6e !important;
}

html.rk-brand-on .btn-danger {
    background: #d63b3b !important;
    border-color: #d63b3b !important;
}

html.rk-brand-on .btn-warning {
    background: var(--rk-orange) !important;
    border-color: var(--rk-orange) !important;
    color: #1b1203 !important;
}

/* ---------- cards, pages and tabs ---------- */

html.rk-brand-on .card {
    border: 1px solid var(--rk-line) !important;
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 10px 26px -20px rgba(15, 23, 42, 0.35);
}

html.rk-brand-on .card > .card-header:first-child {
    border-radius: 14px 14px 0 0;
}

html.rk-brand-on .card > .card-footer:last-child {
    border-radius: 0 0 14px 14px;
}

html.rk-brand-on .card-header {
    background: transparent;
    border-bottom-color: var(--rk-line);
}

html.rk-brand-on .page-title {
    border-bottom-color: var(--rk-line);
}

/* tabs: soft pills that wrap onto more lines when they don't fit, so every tab is in view,
   the open tab tinted blue. the side tabs of settings and the chat keep their own look. */
html.rk-brand-on .nav-tabs:not(.vertical):not(.settings) {
    --rk-tab-h: 40px;
    display: flex;
    flex-wrap: wrap !important;
    align-items: center;
    gap: 6px 4px;
    padding: 6px;
    border-color: var(--rk-line);
}

html.rk-brand-on .nav-tabs.scrollable-tabs {
    width: 100%;
    overflow: visible !important;
    white-space: normal;
}

html.rk-brand-on .nav-tabs.scrollable-tabs::-webkit-scrollbar {
    display: none;
}

html.rk-brand-on .nav-tabs:not(.vertical):not(.settings) li {
    float: none;
    margin-bottom: 0;
    flex: 0 0 auto;
}

html.rk-brand-on .nav-tabs:not(.vertical):not(.settings) li:not(.title-tab) > a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: var(--rk-tab-h);
    padding: 8px 16px;
    border: 0 !important;
    border-radius: 10px;
    color: var(--rk-muted) !important;
    font-weight: 500;
    transition: background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

html.rk-brand-on .nav-tabs:not(.vertical):not(.settings) li:not(.title-tab) > a:not(.active):hover {
    background-color: rgba(37, 99, 235, 0.06) !important;
    color: var(--rk-ink) !important;
}

html.rk-brand-on .nav-tabs:not(.vertical):not(.settings) li:not(.title-tab) > a:active {
    transform: scale(0.97);
}

html.rk-brand-on .nav-tabs:not(.vertical):not(.settings) li:not(.title-tab) > a.active,
html.rk-brand-on .nav-tabs:not(.vertical):not(.settings) li.active:not(.title-tab) > a {
    background-color: rgba(37, 99, 235, 0.1) !important;
    color: var(--rk-blue) !important;
    font-weight: 600;
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.16);
    border-bottom: 0 !important;
}

html.rk-brand-on .nav-tabs:not(.vertical):not(.settings) li:not(.title-tab) > a:focus-visible {
    outline: 2px solid var(--rk-blue);
    outline-offset: 1px;
}

/* the pill replaces the underline of the original tabs */
html.rk-brand-on .nav-tabs:not(.vertical):not(.settings) li:not(.title-tab) a::after {
    display: none !important;
}

/* the side tabs and the chat keep the underline, in REKAZ blue */
html.rk-brand-on .nav-tabs li:not(.title-tab) a::after {
    background-color: var(--rk-blue) !important;
    height: 3px;
    border-radius: 3px 3px 0 0;
}

html.rk-brand-on .nav-tabs li a:hover,
html.rk-brand-on .nav-tabs li a:focus,
html.rk-brand-on .nav-tabs li .active,
html.rk-brand-on .nav-tabs li.active {
    color: var(--rk-blue) !important;
}

/* coloured headers (profile of a team member or a client): white text and see-through buttons */
html.rk-brand-on body .bg-primary h1,
html.rk-brand-on body .bg-primary h2,
html.rk-brand-on body .bg-primary h3,
html.rk-brand-on body .bg-primary h4,
html.rk-brand-on body .bg-primary h5,
html.rk-brand-on body .bg-success h1,
html.rk-brand-on body .bg-success h4,
html.rk-brand-on body .bg-danger h1,
html.rk-brand-on body .bg-danger h4,
html.rk-brand-on body .bg-info h1,
html.rk-brand-on body .bg-info h4,
html.rk-brand-on body .bg-dark h1,
html.rk-brand-on body .bg-dark h4 {
    color: #fff;
}

html.rk-brand-on .card.bg-primary {
    background: linear-gradient(135deg, var(--rk-blue) 0%, var(--rk-indigo) 100%) !important;
    border-color: transparent !important;
}

html.rk-brand-on .bg-primary .btn-transparent {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 40px;
    min-height: 0;
    padding: 0 14px;
    white-space: nowrap;
    font-weight: 500;
    color: #fff !important;
    background: rgba(255, 255, 255, 0.14) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 12px;
    transition: background-color 0.18s ease, transform 0.18s ease;
}

html.rk-brand-on .bg-primary .btn-transparent:hover {
    background: rgba(255, 255, 255, 0.26) !important;
    transform: translateY(-1px);
}

html.rk-brand-on .bg-primary .btn-transparent svg {
    width: 18px;
    height: 18px;
}

/* a long email breaks at the @, not in the middle of a word */
html.rk-brand-on .bg-primary a[href^="mailto:"],
html.rk-brand-on .bg-primary .text-wrap {
    overflow-wrap: anywhere;
}

html.rk-brand-on .list-group-item.active,
html.rk-brand-on .list-group-item.active:hover,
html.rk-brand-on .list-group-item.active:focus {
    background: linear-gradient(135deg, var(--rk-blue), var(--rk-indigo)) !important;
    border-color: transparent !important;
    color: #fff !important;
}

/* ---------- fields ---------- */

html.rk-brand-on .form-control,
html.rk-brand-on .form-select,
html.rk-brand-on .select2-container .select2-choice,
html.rk-brand-on .select2-container-multi .select2-choices {
    border-radius: 10px !important;
    border-color: var(--rk-line);
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

html.rk-brand-on .form-control:focus,
html.rk-brand-on .form-select:focus,
html.rk-brand-on .select2-container-active .select2-choice,
html.rk-brand-on .select2-container-active .select2-choices {
    border-color: var(--rk-blue) !important;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.13) !important;
}

/* the application sets the checked colour with !important */
html.rk-brand-on .form-check-input:checked {
    background-color: var(--rk-blue) !important;
    border-color: var(--rk-blue) !important;
}

/* the loading circle of pages and tables */
html.rk-brand-on .app-loader .loading,
html.rk-brand-on .table-loader .loading {
    border-color: var(--rk-blue);
    border-top-color: transparent;
}

/* the AI assistant button and the install message on iPhone */
html.rk-brand-on #rekaz-ai-assist-button {
    background: linear-gradient(135deg, var(--rk-blue), var(--rk-indigo));
    box-shadow: 0 6px 18px rgba(30, 58, 138, 0.35);
}

html.rk-brand-on #pwa-install-message-iphone {
    background-color: var(--rk-navy);
}

html.rk-brand-on .form-check-input:focus {
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

/* ---------- tables ---------- */

html.rk-brand-on table.dataTable thead th,
html.rk-brand-on .table thead th {
    color: var(--rk-muted);
    font-weight: 600;
    font-size: 13px;
}

html.rk-brand-on table.dataTable tbody tr:hover > td,
html.rk-brand-on .table-hover tbody tr:hover > td {
    background-color: #f2f6ff;
}

html.rk-brand-on .pagination .page-item.active .page-link,
html.rk-brand-on .dataTables_paginate .paginate_button.current {
    background: var(--rk-blue) !important;
    border-color: var(--rk-blue) !important;
    color: #fff !important;
    border-radius: 8px;
}

/* ---------- menus, dialogs and alerts ---------- */

html.rk-brand-on .dropdown-menu {
    border: 1px solid var(--rk-line);
    border-radius: 12px;
    box-shadow: 0 18px 40px -18px rgba(15, 23, 42, 0.4);
}

html.rk-brand-on .dropdown-item:active,
html.rk-brand-on .dropdown-item.active {
    background: var(--rk-blue);
}

html.rk-brand-on .modal-content {
    border: 0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 30px 70px -20px rgba(15, 23, 42, 0.45);
}

/* the coloured line of REKAZ on top of every dialog */
html.rk-brand-on .modal-content::before {
    content: "";
    display: block;
    height: 4px;
    background: linear-gradient(90deg, var(--rk-blue), #7c3aed, var(--rk-orange));
}

html.rk-brand-on .modal-header {
    border-bottom-color: var(--rk-line);
}

html.rk-brand-on .modal-footer {
    border-top-color: var(--rk-line);
}

html.rk-brand-on .app-alert.alert-success,
html.rk-brand-on .alert-success {
    border-radius: 12px;
}

html.rk-brand-on .bg-primary {
    background-color: var(--rk-blue) !important;
}

html.rk-brand-on .text-primary {
    color: var(--rk-blue) !important;
}

/* status labels of the application: softer, rounded, easier to read in long lists */
html.rk-brand-on .badge {
    border-radius: 999px;
    font-weight: 600;
    padding: 0.38em 0.75em;
}

/* the circle of a completed item and the progress bars follow the identity */
html.rk-brand-on .circle-done {
    color: var(--rk-blue);
}

html.rk-brand-on .progress-bar {
    background-color: var(--rk-blue);
}

/* ---------- phones ---------- */

html.rk-brand-on .mobile-bottom-menu {
    border-top: 1px solid var(--rk-line) !important;
    box-shadow: 0 -8px 24px -18px rgba(15, 23, 42, 0.45);
}

html.rk-brand-on .mobile-bottom-menu .nav-link svg {
    color: var(--rk-muted);
}

html.rk-brand-on .mobile-bottom-menu .nav-link:hover svg,
html.rk-brand-on .mobile-bottom-menu .nav-link:focus svg {
    color: var(--rk-blue);
}

/* ---------- WhatsApp contact, shown when it is on in the settings ---------- */

.rk-wa-card {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 28px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff !important;
    text-decoration: none !important;
    max-width: 420px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.rk-wa-card:hover,
.rk-wa-card:focus-visible {
    background: rgba(37, 211, 102, 0.18);
    border-color: rgba(37, 211, 102, 0.6);
    transform: translateY(-2px);
    color: #fff !important;
}

.rk-wa-icon {
    flex: none;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: #25d366;
    color: #fff;
    box-shadow: 0 10px 22px -10px #25d366;
}

.rk-wa-text {
    display: grid;
    gap: 1px;
    min-width: 0;
}

.rk-wa-text small {
    color: rgba(255, 255, 255, 0.72);
    font-size: 12.5px;
}

.rk-wa-text b {
    font-size: 15.5px;
}

.rk-wa-number {
    color: rgba(255, 255, 255, 0.7);
    font-size: 12.5px;
    unicode-bidi: isolate;
}

/* the floating button is for phones, where the brand panel is shortened */
.rk-wa-float {
    position: fixed;
    z-index: 1040;
    bottom: calc(18px + env(safe-area-inset-bottom, 0px));
    inset-inline-end: calc(18px + env(safe-area-inset-right, 0px));
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: none;
    place-items: center;
    background: #25d366;
    color: #fff !important;
    box-shadow: 0 14px 28px -10px rgba(37, 211, 102, 0.9);
    transition: transform 0.2s ease;
}

.rk-wa-float svg {
    width: 28px;
    height: 28px;
}

.rk-wa-float:hover,
.rk-wa-float:focus-visible {
    transform: scale(1.06);
    color: #fff !important;
}

@media (max-width: 991px) {
    .rk-wa-card {
        display: none;
    }

    .rk-wa-float {
        display: grid;
    }
}

@media (prefers-reduced-motion: reduce) {
    html.rk-brand-on *,
    .rk-wa-card,
    .rk-wa-float {
        transition: none !important;
    }
}

/* buttons made from links keep their own text colour, not the link blue */
html.rk-brand-on a.btn-primary,
html.rk-brand-on a.btn-success,
html.rk-brand-on a.btn-danger,
html.rk-brand-on a.btn-info,
html.rk-brand-on a.btn-dark,
html.rk-brand-on a.btn-secondary,
html.rk-brand-on a.btn-primary:hover,
html.rk-brand-on a.btn-success:hover,
html.rk-brand-on a.btn-danger:hover,
html.rk-brand-on a.btn-info:hover,
html.rk-brand-on a.btn-dark:hover,
html.rk-brand-on a.btn-secondary:hover {
    color: #fff;
}

html.rk-brand-on a.btn-warning,
html.rk-brand-on a.btn-warning:hover,
html.rk-brand-on a.btn-light,
html.rk-brand-on a.btn-light:hover {
    color: var(--rk-ink);
}

/* ---------- dropdown menus ---------- */

/* items are dark text, not link blue, start on the reading side and get a soft hover */
html.rk-brand-on .dropdown-menu {
    padding: 6px;
    min-width: 200px;
}

html.rk-brand-on .dropdown-menu .dropdown-item,
html.rk-brand-on .dropdown-menu > li > a {
    padding: 9px 12px;
    border-radius: 8px;
    color: var(--rk-text);
    font-weight: 500;
    text-align: start;
    transition: background-color 0.15s ease, color 0.15s ease;
}

html.rk-brand-on.rk-rtl .dropdown-menu,
html.rk-brand-on.rk-rtl .dropdown-menu .dropdown-item,
html.rk-brand-on.rk-rtl .dropdown-menu > li > a {
    text-align: right;
}

html.rk-brand-on .dropdown-menu .dropdown-item:hover,
html.rk-brand-on .dropdown-menu .dropdown-item:focus,
html.rk-brand-on .dropdown-menu > li > a:hover {
    background-color: rgba(37, 99, 235, 0.08);
    color: var(--rk-blue);
}

html.rk-brand-on .dropdown-menu .dropdown-item:active,
html.rk-brand-on .dropdown-menu .dropdown-item.active {
    background: var(--rk-blue);
    color: #fff;
}

html.rk-brand-on .dropdown-menu .dropdown-item svg {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    opacity: 0.75;
}

/* yellow badges get dark text so they can be read */
html.rk-brand-on .badge.bg-warning,
html.rk-brand-on .badge.bg-info {
    color: var(--rk-navy) !important;
}

/* ---------- documents (invoices, estimates, orders) on screen ----------
   the PDF keeps the inline colours of the template; on screen the page gets a REKAZ frame */
html.rk-brand-on .invoice-preview-container {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid var(--rk-line);
    box-shadow: 0 1px 2px rgba(11, 23, 54, 0.04), 0 18px 40px -28px rgba(11, 23, 54, 0.35);
}

html.rk-brand-on .invoice-preview-container::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 6px;
    background: linear-gradient(90deg, var(--rk-navy) 0%, #1d4ed8 55%, #f97316 100%);
}

html.rk-brand-on .invoice-preview-container .max-logo-size {
    max-height: 64px;
    width: auto;
}

/* the number of the document as a pill */
html.rk-brand-on .invoice-preview-container .invoice-info-title {
    display: inline-block;
    padding: 4px 14px !important;
    margin: 4px 0 6px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--rk-navy), #1d4ed8) !important;
    letter-spacing: 0.3px;
}

html.rk-brand-on .invoice-preview-container .rk-fatoora-title {
    color: #f97316;
    letter-spacing: 0.2px;
}

/* the table of items: navy head with rounded corners, soft rows */
html.rk-brand-on .invoice-preview-container table.table-responsive {
    border-collapse: separate !important;
    border-spacing: 0;
    border-radius: 14px;
    overflow: hidden;
}

html.rk-brand-on .invoice-preview-container table.table-responsive tr:first-child th {
    background: var(--rk-navy) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    padding-top: 12px;
    padding-bottom: 12px;
}

html.rk-brand-on .invoice-preview-container table.table-responsive tr:nth-child(even) td {
    background-color: #f6f8fc;
}

html.rk-brand-on .invoice-preview-container table.table-responsive td {
    border-color: #eef1f7 !important;
}

/* the line with the amount to pay stands out */
html.rk-brand-on .invoice-preview-container table.table-responsive tr:last-child td:last-child {
    color: var(--rk-navy);
    font-weight: 700;
}

html.rk-dark .invoice-preview-container table.table-responsive tr:nth-child(even) td {
    background-color: rgba(255, 255, 255, 0.03);
}
