:root {
    --rojnu-primary: #16255c;
    --rojnu-primary-dark: #0e1a45;
    --rojnu-accent: #f97316;
    --rojnu-bg: #e9edf5;
    --rojnu-card: #ffffff;
    --rojnu-border: #e2e8f0;
    --rojnu-text: #0f172a;
    --rojnu-muted: #64748b;
    --rojnu-danger: #dc2626;
    --rojnu-danger-bg: #fef2f2;
}

* { box-sizing: border-box; }

/* The browser's own [hidden] rule loses to any class here that sets
   `display` (author styles beat user-agent styles regardless of
   specificity), so a hidden .rojnu-btn-small etc. would still show. Every
   use of `hidden` in this app means "hide", so enforce it globally. */
[hidden] { display: none !important; }

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--rojnu-bg);
    color: var(--rojnu-text);
    font-family: "Segoe UI", Arial, sans-serif;
}

.rojnu-auth-shell {
    width: min(380px, calc(100% - 2rem));
    margin: 2rem 0;
}

.rojnu-auth-brand {
    text-align: center;
    margin-bottom: 1.25rem;
}

.rojnu-auth-logo {
    display: block;
    width: 84px;
    height: 84px;
    margin: 0 auto;
    object-fit: contain;
}

.rojnu-auth-brand strong {
    font-size: 1.4rem;
    letter-spacing: -0.02em;
}

.rojnu-auth-brand span {
    display: block;
    margin-top: .2rem;
    color: var(--rojnu-muted);
    font-size: .85rem;
}

.rojnu-card {
    background: var(--rojnu-card);
    border: 1px solid var(--rojnu-border);
    border-radius: 14px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .08);
    padding: 1.75rem;
}

.rojnu-card h1 {
    margin: 0 0 1.25rem;
    font-size: 1.2rem;
}

.rojnu-field {
    margin-bottom: 1rem;
}

.rojnu-field label {
    display: block;
    margin-bottom: .35rem;
    font-size: .82rem;
    font-weight: 600;
    color: var(--rojnu-text);
}

.rojnu-field input {
    width: 100%;
    padding: .65rem .8rem;
    border: 1px solid var(--rojnu-border);
    border-radius: 8px;
    font-size: .95rem;
    font-family: inherit;
}

.rojnu-field input:focus {
    outline: none;
    border-color: var(--rojnu-primary);
    box-shadow: 0 0 0 3px rgba(22, 37, 92, .15);
}

/* The base .rojnu-field input rule above (width:100%, padding, border)
   is meant for text/date/number fields - without this override it also
   stretches a checkbox into a full-width box, making a "Remove it" style
   inline checkbox look broken and hard to click. */
.rojnu-field input[type="checkbox"],
.rojnu-field input[type="radio"] {
    width: auto;
    padding: 0;
    border: 0;
    vertical-align: middle;
}

.rojnu-field label.rojnu-inline-checkbox {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    margin-bottom: 0;
}

.rojnu-field select {
    width: 100%;
    padding: .65rem .8rem;
    border: 1px solid var(--rojnu-border);
    border-radius: 8px;
    font-size: .95rem;
    font-family: inherit;
    background: #fff;
    color: var(--rojnu-text);
}
.rojnu-field select:focus {
    outline: none;
    border-color: var(--rojnu-primary);
    box-shadow: 0 0 0 3px rgba(22, 37, 92, .15);
}

.rojnu-customer-card {
    background: linear-gradient(135deg, #f7f9fd, #eef2fb);
    border: 1px solid #e2e8f5;
    border-radius: 14px;
    padding: 1.1rem 1.2rem;
}
.rojnu-customer-card > label { font-size: .95rem; margin-bottom: .7rem; }
.rojnu-customer-card .rojnu-form-grid-3 { margin-top: .9rem; }

#rojnu-customer-search,
#customer_id {
    width: 320px;
    max-width: 100%;
    padding: .5rem .7rem;
    font-size: .85rem;
    background: #fff;
    border: 1px solid #dbe2f0;
    border-radius: 8px;
    transition: border-color .15s ease, box-shadow .15s ease;
}
#rojnu-customer-search:focus,
#customer_id:focus {
    outline: none;
    border-color: var(--rojnu-primary);
    box-shadow: 0 0 0 3px rgba(22, 37, 92, .12);
}

#cod_amount[readonly] {
    background: #f1f5f9;
    color: var(--rojnu-muted);
    cursor: not-allowed;
}

.rojnu-required { color: var(--rojnu-danger); }

.rojnu-address-group {
    display: flex;
    gap: .5rem;
}
.rojnu-address-group input,
.rojnu-address-group select {
    flex: 1;
    min-width: 0;
}

.rojnu-suggestions {
    position: absolute;
    z-index: 20;
    top: 100%;
    left: 0;
    width: 320px;
    max-width: 100%;
    max-height: 220px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid var(--rojnu-border);
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .12);
    margin-top: -.3rem;
}
.rojnu-suggestions[hidden] { display: none; }
.rojnu-suggestion {
    display: block;
    width: 100%;
    padding: .5rem .7rem;
    border: 0;
    background: #fff;
    text-align: left;
    font-size: .85rem;
    color: var(--rojnu-text);
    cursor: pointer;
}
.rojnu-suggestion:hover,
.rojnu-suggestion:focus { background: #eff2fa; }
.rojnu-suggestion small { display: block; color: #55607a; font-size: .75rem; }
.rojnu-suggestion-empty { padding: .5rem .7rem; font-size: .82rem; color: #94a3b8; }

.rojnu-section-heading {
    margin: 1.75rem 0 1.1rem;
    padding-bottom: .6rem;
    border-bottom: 1px solid var(--rojnu-border);
    font-size: 1rem;
    font-weight: 700;
    color: var(--rojnu-text);
}
.rojnu-section-heading:first-child { margin-top: 0; }

.rojnu-phone-group {
    display: flex;
    align-items: stretch;
}
.rojnu-phone-prefix {
    display: flex;
    align-items: center;
    padding: 0 .75rem;
    border: 1px solid var(--rojnu-border);
    border-right: none;
    border-radius: 8px 0 0 8px;
    background: #f3f4f6;
    color: #55607a;
    font-size: .9rem;
    white-space: nowrap;
}
.rojnu-phone-group input {
    border-radius: 0 8px 8px 0 !important;
}

.rojnu-field-with-counter { position: relative; }
.rojnu-char-counter {
    display: block;
    margin-top: .3rem;
    text-align: right;
    font-size: .75rem;
    color: #94a3b8;
}

.rojnu-btn {
    width: 100%;
    padding: .7rem;
    border: 0;
    border-radius: 8px;
    background: var(--rojnu-primary);
    color: #fff;
    font-size: .95rem;
    font-weight: 700;
    cursor: pointer;
}

.rojnu-btn:hover { background: var(--rojnu-primary-dark); }

.rojnu-alert {
    margin-bottom: 1rem;
    padding: .65rem .8rem;
    border-radius: 8px;
    font-size: .85rem;
    background: var(--rojnu-danger-bg);
    color: var(--rojnu-danger);
    border: 1px solid #fecaca;
}

.rojnu-page {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

.rojnu-page h1 { font-size: 1.4rem; }
.rojnu-page p { color: var(--rojnu-muted); }

/* App shell - a floating rounded "card" holding a dark sidebar + light
   content area, centered on the page background. */
body.rojnu-app-body {
    display: block;
    align-items: initial;
    justify-content: initial;
    padding: 1.5rem;
}

.rojnu-shell-outer {
    max-width: 1440px;
    margin: 0 auto;
    display: flex;
    align-items: stretch;
    height: calc(100vh - 3rem);
    background: var(--rojnu-card);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 30px 70px rgba(15, 23, 42, .18);
}

/* Supplier portal - a simpler standalone page, not the internal CRM shell */
.rojnu-supplier-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: var(--rojnu-card);
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, .07);
    margin-bottom: 1.5rem;
}

.rojnu-supplier-logo {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    object-fit: contain;
}

.rojnu-sidebar {
    width: 250px;
    flex-shrink: 0;
    background: var(--rojnu-primary);
    color: #fff;
    padding: 1.5rem 1.1rem;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    scrollbar-width: none;
}
.rojnu-sidebar:hover { scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .3) transparent; }
.rojnu-sidebar::-webkit-scrollbar { width: 6px; }
.rojnu-sidebar::-webkit-scrollbar-track { background: transparent; }
.rojnu-sidebar::-webkit-scrollbar-thumb { background: transparent; border-radius: 3px; }
.rojnu-sidebar:hover::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .3); }

.rojnu-sidebar-brand {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: 0 .3rem;
    margin-bottom: 2rem;
}

.rojnu-sidebar-brand img {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    object-fit: contain;
    background: #fff;
    flex-shrink: 0;
}

.rojnu-sidebar-brand strong {
    color: #fff;
    font-size: .86rem;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.rojnu-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: .25rem;
    flex: 1;
}

.rojnu-sidebar-nav a,
.rojnu-sidebar-link {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .65rem .8rem;
    border-radius: 10px;
    color: rgba(255, 255, 255, .72);
    text-decoration: none;
    font-size: .88rem;
    font-weight: 600;
}

.rojnu-sidebar-nav a svg,
.rojnu-sidebar-link svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    stroke: currentColor;
}

.rojnu-sidebar-nav a:hover,
.rojnu-sidebar-link:hover {
    background: rgba(255, 255, 255, .08);
    color: #fff;
}

.rojnu-sidebar-nav a.is-active {
    background: rgba(255, 255, 255, .16);
    color: #fff;
}

.rojnu-sidebar-group { display: flex; flex-direction: column; }

.rojnu-sidebar-group-toggle {
    display: flex;
    align-items: center;
    gap: .7rem;
    width: 100%;
    padding: .65rem .8rem;
    border: none;
    border-radius: 10px;
    background: none;
    color: rgba(255, 255, 255, .72);
    font: inherit;
    font-size: .88rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}

.rojnu-sidebar-group-toggle svg:first-child { width: 18px; height: 18px; flex-shrink: 0; stroke: currentColor; }
.rojnu-sidebar-group-label { flex: 1; }

.rojnu-sidebar-chevron {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    stroke: currentColor;
    transition: transform .15s ease;
}

.rojnu-sidebar-group-toggle.is-open .rojnu-sidebar-chevron { transform: rotate(180deg); }

.rojnu-sidebar-group-toggle:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.rojnu-sidebar-group-toggle.is-active { background: rgba(255, 255, 255, .16); color: #fff; }

.rojnu-sidebar-submenu {
    display: flex;
    flex-direction: column;
    gap: .15rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height .2s ease;
}

.rojnu-sidebar-submenu.is-open { max-height: 220px; margin-top: .15rem; }

.rojnu-sidebar-submenu a {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .5rem .8rem .5rem 2.65rem;
    border-radius: 10px;
    color: rgba(255, 255, 255, .58);
    text-decoration: none;
    font-size: .82rem;
    font-weight: 600;
}

.rojnu-sidebar-submenu a::before {
    content: '';
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}

.rojnu-sidebar-submenu a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.rojnu-sidebar-submenu a.is-active { background: rgba(255, 255, 255, .16); color: #fff; }

.rojnu-sidebar-footer {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, .14);
}

.rojnu-sidebar-user {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .85rem .5rem .2rem;
}

.rojnu-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .18);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .8rem;
    flex-shrink: 0;
}
.rojnu-avatar.has-photo { overflow: hidden; background: #fff; }
.rojnu-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
a.rojnu-sidebar-user { color: inherit; text-decoration: none; border-radius: 10px; }
a.rojnu-sidebar-user:hover { background: rgba(255, 255, 255, .08); }

.rojnu-user-cell { display: inline-flex; align-items: center; gap: .55rem; }
.rojnu-user-thumb {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.rojnu-user-thumb.is-initials {
    background: #eef2fb;
    color: var(--rojnu-primary);
    font-size: .7rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Notifications */
.rojnu-sidebar-badge {
    margin-left: auto;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.rojnu-notice-list { display: flex; flex-direction: column; gap: .8rem; }
.rojnu-notice {
    background: var(--rojnu-card);
    border: 1px solid var(--rojnu-border);
    border-left: 4px solid var(--rojnu-border);
    border-radius: 12px;
    padding: 1rem 1.2rem;
}
.rojnu-notice.is-unread { border-left-color: var(--rojnu-primary); }
.rojnu-notice.is-important { border-left-color: var(--rojnu-danger); background: #fffafa; }
.rojnu-notice-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.rojnu-notice-head h3 { margin: 0; font-size: 1rem; }
.rojnu-notice-tags { display: flex; gap: .35rem; }
.rojnu-notice-body { margin: .55rem 0 .6rem; color: var(--rojnu-text); line-height: 1.55; font-size: .9rem; overflow-wrap: anywhere; }
.rojnu-notice-meta { font-size: .76rem; color: var(--rojnu-muted); }
.rojnu-notice { transition: opacity .25s ease, transform .25s ease; }
.rojnu-notice.is-leaving { opacity: 0; transform: translateX(16px); }
.rojnu-notice-tags { align-items: center; flex-wrap: wrap; }
.rojnu-notice-hide-form { display: inline; margin: 0; }
.rojnu-notice-hide { display: inline-flex; align-items: center; gap: .3rem; font-size: .76rem; padding: .25rem .6rem; }
.rojnu-notice-hide svg { width: 14px; height: 14px; }
.rojnu-notice-tabs { display: flex; gap: .4rem; margin: 0 0 .9rem; flex-wrap: wrap; }
.rojnu-notice-tabs a {
    display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .9rem; border-radius: 999px;
    border: 1px solid var(--rojnu-border); background: var(--rojnu-card); color: var(--rojnu-text);
    font-size: .84rem; font-weight: 500; text-decoration: none;
}
.rojnu-notice-tabs a:hover { border-color: var(--rojnu-primary); }
.rojnu-notice-tabs a.is-active { background: var(--rojnu-primary); border-color: var(--rojnu-primary); color: #fff; }
.rojnu-notice-tabs svg { width: 15px; height: 15px; }
.rojnu-notice-tabs span { font-size: .72rem; padding: .05rem .45rem; border-radius: 999px; background: rgba(15, 23, 42, .08); }
.rojnu-notice-tabs a.is-active span { background: rgba(255, 255, 255, .22); }
.rojnu-notice-files { display: flex; flex-wrap: wrap; gap: .6rem; margin: 0 0 .7rem; }
.rojnu-notice-thumb {
    display: block; width: 116px; height: 88px; border-radius: 10px; overflow: hidden;
    border: 1px solid var(--rojnu-border); background: var(--rojnu-bg, #f4f5f7);
    transition: box-shadow .15s ease, transform .15s ease;
}
.rojnu-notice-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rojnu-notice-file {
    display: flex; align-items: center; gap: .55rem; max-width: 260px; height: 88px; box-sizing: border-box;
    padding: .6rem .85rem; border-radius: 10px; border: 1px solid var(--rojnu-border);
    background: var(--rojnu-card); color: var(--rojnu-text); text-decoration: none;
    transition: box-shadow .15s ease, transform .15s ease;
}
.rojnu-notice-thumb:hover, .rojnu-notice-file:hover { box-shadow: 0 4px 14px rgba(15, 23, 42, .12); transform: translateY(-1px); }
.rojnu-notice-file-icon { flex: none; width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; background: #fdecec; color: var(--rojnu-danger); }
.rojnu-notice-file-icon svg { width: 18px; height: 18px; }
.rojnu-notice-file-text { display: flex; flex-direction: column; min-width: 0; }
.rojnu-notice-file-text strong { font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rojnu-notice-file-text small { font-size: .72rem; color: var(--rojnu-muted); }
.rojnu-notice-filelinks { display: flex; flex-wrap: wrap; gap: .3rem .7rem; margin-top: .3rem; font-size: .76rem; }
.rojnu-notice-filelinks a { display: inline-flex; align-items: center; gap: .2rem; color: var(--rojnu-primary); text-decoration: none; }
.rojnu-notice-filelinks a:hover { text-decoration: underline; }
.rojnu-notice-filelinks svg { width: 13px; height: 13px; }
/* Attachment picker */
.rojnu-upload {
    position: relative;
    display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem;
    padding: .8rem; border: 1.5px dashed var(--rojnu-border); border-radius: 10px;
    transition: border-color .15s ease, background .15s ease;
}
.rojnu-upload.is-dragging { border-color: var(--rojnu-primary); background: rgba(37, 99, 235, .05); }
/* Visually hidden but focusable; pinned inside .rojnu-upload so it can't stretch the page. */
.rojnu-upload-input {
    position: absolute; top: 0; left: 0; width: 1px !important; height: 1px; padding: 0; margin: 0; border: 0;
    opacity: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.rojnu-upload-input:focus-visible + .rojnu-upload-pick { outline: 2px solid var(--rojnu-primary); outline-offset: 2px; }
.rojnu-upload-pick { display: inline-flex; align-items: center; gap: .35rem; cursor: pointer; margin: 0; font-weight: 500; }
.rojnu-upload-pick svg { width: 15px; height: 15px; }
.rojnu-upload-hint { font-size: .8rem; color: var(--rojnu-muted); }
.rojnu-upload > .rojnu-upload-list, .rojnu-upload > .rojnu-upload-error { flex-basis: 100%; }
.rojnu-upload-list { list-style: none; margin: 0 0 .5rem; padding: 0; display: flex; flex-direction: column; gap: .35rem; }
.rojnu-upload > .rojnu-upload-list { margin: 0; }
.rojnu-upload-list li {
    display: flex; align-items: center; gap: .6rem; padding: .4rem .6rem;
    border: 1px solid var(--rojnu-border); border-radius: 8px; background: var(--rojnu-card); font-size: .84rem;
}
.rojnu-upload-name { display: inline-flex; align-items: center; gap: .35rem; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--rojnu-text); text-decoration: none; }
a.rojnu-upload-name:hover { color: var(--rojnu-primary); }
.rojnu-upload-name svg { flex: none; width: 15px; height: 15px; color: var(--rojnu-muted); }
.rojnu-upload-list small { color: var(--rojnu-muted); font-size: .74rem; flex: none; }
.rojnu-upload-remove { display: inline-flex; align-items: center; gap: .3rem; margin: 0; font-weight: 400; font-size: .8rem; color: var(--rojnu-danger); cursor: pointer; flex: none; }
.rojnu-upload-remove input { width: auto; margin: 0; }
.rojnu-upload-x { flex: none; border: 0; background: none; font-size: 1.1rem; line-height: 1; color: var(--rojnu-muted); cursor: pointer; padding: 0 .2rem; }
.rojnu-upload-x:hover { color: var(--rojnu-danger); }
@media (prefers-reduced-motion: reduce) {
    .rojnu-notice-thumb, .rojnu-notice-file, .rojnu-notice { transition: none; }
    .rojnu-notice-thumb:hover, .rojnu-notice-file:hover { transform: none; }
}
.rojnu-summary {
    border: 1px solid var(--rojnu-border);
    border-radius: 12px;
    padding: .85rem 1rem;
    margin-top: .8rem;
}
.rojnu-summary.is-current { background: var(--rojnu-bg); margin-top: 0; }
.rojnu-summary.is-unread { border-left: 4px solid var(--rojnu-primary); }
.rojnu-summary-head { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-bottom: .6rem; }
.rojnu-summary-head a { margin-left: auto; font-size: .82rem; color: var(--rojnu-primary); font-weight: 600; text-decoration: none; }
.rojnu-summary-figures { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
.rojnu-summary-figures > div { display: flex; flex-direction: column; gap: .15rem; }
.rojnu-summary-figures span { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--rojnu-muted); font-weight: 700; }
.rojnu-summary-figures strong { font-size: 1.05rem; }
.rojnu-summary-figures strong.is-profit { color: #047857; }
.rojnu-summary-figures strong.is-loss { color: var(--rojnu-danger); }
.rojnu-summary-figures small { font-size: .74rem; color: var(--rojnu-muted); }
@media (max-width: 640px) {
    .rojnu-summary-figures { grid-template-columns: 1fr; }
}

/* Settings -> My Profile */
.rojnu-profile-card {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 1.75rem;
    align-items: start;
}
.rojnu-profile-photo-col { display: flex; flex-direction: column; align-items: center; gap: .6rem; text-align: center; }
.rojnu-profile-photo {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: var(--rojnu-primary);
    color: #fff;
    font-size: 2.6rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 4px solid #fff;
    box-shadow: 0 6px 18px rgba(15, 23, 42, .15);
}
.rojnu-profile-photo img { width: 100%; height: 100%; object-fit: cover; }
.rojnu-profile-upload { cursor: pointer; }
.rojnu-profile-upload input { display: none; }
.rojnu-profile-remove { display: flex; align-items: center; gap: .35rem; font-size: .83rem; color: var(--rojnu-muted); }
.rojnu-profile-remove input { width: auto; }
@media (max-width: 760px) {
    .rojnu-profile-card { grid-template-columns: 1fr; }
}

.rojnu-user-meta { flex: 1; min-width: 0; }

.rojnu-user-name {
    color: #fff;
    font-size: .84rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rojnu-user-role {
    color: rgba(255, 255, 255, .6);
    font-size: .72rem;
    text-transform: capitalize;
}

.rojnu-logout {
    display: block;
    margin: .35rem .5rem 0;
    color: #f87171;
    font-size: .74rem;
    text-decoration: none;
    font-weight: 700;
}

.rojnu-logout:hover { color: #fca5a5; text-decoration: underline; }

.rojnu-main {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    overflow-y: auto;
    padding: 1.75rem 2.25rem;
    background: var(--rojnu-bg);
}

.rojnu-main-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.rojnu-main-head h1 { margin: 0; font-size: 1.4rem; }

/* Stock Dashboard's 3 header buttons (+Categories / +Add to stock / +Add
   product) - a subtle lift + shadow + border-color sweep on hover, matching
   the same "lift on hover" language already used by .rojnu-metric-card. */
.rojnu-header-actions .rojnu-btn-small {
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, background-color .15s ease;
}
.rojnu-header-actions .rojnu-btn-small:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(15, 23, 42, .12);
    border-color: var(--rojnu-primary);
}
.rojnu-header-actions .rojnu-btn-small.is-primary:hover {
    box-shadow: 0 6px 16px rgba(22, 37, 92, .28);
}

.rojnu-status-tabs {
    display: flex;
    align-items: center;
    gap: .55rem;
    flex-wrap: wrap;
    margin: 0 0 1.25rem;
}

.rojnu-status-tab {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .6rem 1.1rem;
    border: 1px solid transparent;
    border-radius: 999px;
    background: var(--rojnu-card);
    color: var(--rojnu-muted);
    font-size: .85rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .05);
    transition: transform .12s ease, box-shadow .12s ease, background .15s ease, color .15s ease;
}

.rojnu-status-tab:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(15, 23, 42, .1); color: var(--rojnu-text); }

.rojnu-status-tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 .4rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, .08);
    color: inherit;
    font-size: .72rem;
    font-weight: 800;
}

/* Opt-in tone colors for idle (non-selected) tabs, e.g. Delivered/Draft/Cancelled/Pending. */
.rojnu-status-tab.is-tone-success { background: #ecfdf5; color: #047857; }
.rojnu-status-tab.is-tone-success .rojnu-status-tab-badge { background: #047857; color: #fff; }
.rojnu-status-tab.is-tone-info { background: #eff6ff; color: #1e40af; }
.rojnu-status-tab.is-tone-info .rojnu-status-tab-badge { background: #1e40af; color: #fff; }
.rojnu-status-tab.is-tone-muted { background: #f1f5f9; color: #475569; }
.rojnu-status-tab.is-tone-muted .rojnu-status-tab-badge { background: #475569; color: #fff; }
.rojnu-status-tab.is-tone-warning { background: #fffbeb; color: #b45309; }
.rojnu-status-tab.is-tone-warning .rojnu-status-tab-badge { background: #b45309; color: #fff; }

/* The currently-selected tab always wins over its idle tone color. */
.rojnu-status-tab.is-active {
    background: linear-gradient(135deg, var(--rojnu-primary), var(--rojnu-primary-dark));
    color: #fff;
    box-shadow: 0 6px 14px rgba(22, 37, 92, .25);
}
.rojnu-status-tab.is-active .rojnu-status-tab-badge { background: rgba(255, 255, 255, .25); color: #fff; }
.rojnu-status-tab.is-active:hover { color: #fff; }

.rojnu-toolbar {
    display: flex;
    align-items: center;
    gap: .6rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    padding: .85rem 1.1rem;
    background: var(--rojnu-card);
    border: 1px solid var(--rojnu-border);
    border-radius: 18px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .05);
}

/* A little tighter when the toolbar is just pills + a date range, so
   everything has a better chance of fitting on one row. */
.rojnu-toolbar:has(.rojnu-quick-filters.is-inline) {
    gap: .4rem;
    padding: .85rem .9rem;
}

.rojnu-toolbar input[type="text"],
.rojnu-toolbar select,
.rojnu-toolbar input[type="date"] {
    height: 42px;
    box-sizing: border-box;
    padding: 0 .8rem;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: .85rem;
    color: var(--rojnu-text);
    background: var(--rojnu-bg);
}

.rojnu-toolbar select,
.rojnu-toolbar input[type="date"] { border-radius: 10px; }

.rojnu-toolbar input[type="text"] {
    min-width: 220px;
    flex: 1 1 260px;
    padding-left: 2.6rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m21 21-3.5-3.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 16px center;
    background-size: 16px 16px;
}

.rojnu-toolbar input[type="date"] { min-width: 130px; }

.rojnu-toolbar input[type="text"]:focus,
.rojnu-toolbar select:focus,
.rojnu-toolbar input[type="date"]:focus {
    outline: none;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(22, 37, 92, .12);
}

.rojnu-toolbar .rojnu-btn-small { height: 42px; box-sizing: border-box; border-radius: 999px; }

.rojnu-quick-filters {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    width: 100%;
    margin-bottom: .1rem;
    padding-bottom: .9rem;
    border-bottom: 1px solid var(--rojnu-border);
}

/* Used where the toolbar has little else besides the pills (e.g. just a
   date range + Apply) - lets them share one row instead of always
   forcing a second row with a divider line. */
.rojnu-quick-filters.is-inline {
    width: auto;
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: 0;
    gap: .4rem;
}

.rojnu-quick-filters.is-inline .rojnu-quick-filter {
    height: 32px;
    padding: 0 .75rem;
    font-size: .8rem;
}

.rojnu-quick-filter {
    display: inline-flex;
    align-items: center;
    height: 34px;
    padding: 0 .95rem;
    border: 1px solid var(--rojnu-border);
    border-radius: 999px;
    background: var(--rojnu-card);
    color: var(--rojnu-text);
    font-size: .82rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: border-color .15s ease, background .15s ease, color .15s ease;
}

.rojnu-quick-filter:hover { border-color: var(--rojnu-primary); color: var(--rojnu-primary); }
.rojnu-quick-filter.is-active { background: var(--rojnu-primary); border-color: var(--rojnu-primary); color: #fff; }

.rojnu-btn-small {
    display: inline-flex;
    align-items: center;
    padding: .55rem 1rem;
    border: 1px solid var(--rojnu-border);
    border-radius: 10px;
    background: #fff;
    color: var(--rojnu-text);
    font-size: .85rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    width: auto;
}

.rojnu-btn-small.is-primary { background: var(--rojnu-primary); color: #fff; border-color: var(--rojnu-primary); }
.rojnu-btn-small.is-primary:hover { background: var(--rojnu-primary-dark); }
.rojnu-btn-small.is-danger { color: var(--rojnu-danger); }

.rojnu-table-card {
    background: var(--rojnu-card);
    border: 1px solid var(--rojnu-border);
    border-radius: 14px;
    overflow: hidden;
    overflow-x: auto;
    scrollbar-width: none;
}
.rojnu-table-card:hover { scrollbar-width: thin; scrollbar-color: var(--rojnu-border) transparent; }
.rojnu-table-card::-webkit-scrollbar { height: 6px; }
.rojnu-table-card::-webkit-scrollbar-track { background: transparent; }
.rojnu-table-card::-webkit-scrollbar-thumb { background: transparent; border-radius: 3px; }
.rojnu-table-card:hover::-webkit-scrollbar-thumb { background: var(--rojnu-border); }
/* Only the table itself scrolls sideways when it's wider than its card -
   the card's title, pagination, etc. stay put - and its scrollbar sits at
   the bottom of the card, after the pagination (assets/rojnu-tables.js adds
   both). Without JS the whole card still scrolls (rule above) as a fallback. */
.rojnu-table-scroll { overflow-x: auto; scrollbar-width: none; }
.rojnu-table-scroll::-webkit-scrollbar { display: none; }
.rojnu-table-hscroll {
    overflow-x: auto;
    overflow-y: hidden;
    margin: 0 1rem .45rem;
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
}
.rojnu-table-hscroll > div { height: 1px; }
.rojnu-table-hscroll::-webkit-scrollbar { height: 6px; }
.rojnu-table-hscroll::-webkit-scrollbar-track { background: transparent; }
.rojnu-table-hscroll::-webkit-scrollbar-thumb { background: transparent; border-radius: 3px; }
.rojnu-table-card:hover .rojnu-table-hscroll { scrollbar-color: var(--rojnu-border) transparent; }
.rojnu-table-card:hover .rojnu-table-hscroll::-webkit-scrollbar-thumb { background: var(--rojnu-border); }
/* Touch screens have no hover, so keep the bar visible there. */
@media (hover: none) {
    .rojnu-table-hscroll { scrollbar-color: var(--rojnu-border) transparent; }
    .rojnu-table-hscroll::-webkit-scrollbar-thumb { background: var(--rojnu-border); }
}

.rojnu-pagination {
    display: flex;
    align-items: center;
    gap: .6rem;
    row-gap: .75rem;
    flex-wrap: wrap;
    margin-top: .25rem;
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--rojnu-border);
    background: var(--rojnu-bg);
    font-size: .85rem;
    color: var(--rojnu-muted);
}

.rojnu-pagination-total {
    font-weight: 600;
    color: var(--rojnu-text);
    white-space: nowrap;
    margin-right: .25rem;
}

.rojnu-pagination select {
    height: 34px;
    padding: 0 .6rem;
    border: 1px solid var(--rojnu-border);
    border-radius: 8px;
    font-size: .85rem;
    background: var(--rojnu-card);
    color: var(--rojnu-text);
}

.rojnu-pagination-inline-form {
    display: flex;
    align-items: center;
    gap: .4rem;
    padding: .35rem .6rem;
    border-left: 1px solid var(--rojnu-border);
}

.rojnu-pagination-inline-form:first-of-type { padding-left: 0; border-left: 0; }

.rojnu-pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 .65rem;
    border: 1px solid var(--rojnu-border);
    border-radius: 999px;
    background: var(--rojnu-card);
    color: var(--rojnu-text);
    text-decoration: none;
    font-size: .85rem;
    font-weight: 600;
    transition: border-color .15s ease, background .15s ease, color .15s ease, transform .12s ease;
}
.rojnu-pagination-btn:not(.is-disabled):hover { transform: translateY(-1px); }

.rojnu-pagination-btn:hover { border-color: var(--rojnu-primary); color: var(--rojnu-primary); }
.rojnu-pagination-btn.is-active { background: var(--rojnu-primary); border-color: var(--rojnu-primary); color: #fff; }
.rojnu-pagination-btn.is-active:hover { color: #fff; }
.rojnu-pagination-btn.is-disabled { color: var(--rojnu-border); cursor: default; }
.rojnu-pagination-btn.is-disabled:hover { border-color: var(--rojnu-border); color: var(--rojnu-border); }

.rojnu-pagination-ellipsis { padding: 0 .3rem; color: var(--rojnu-muted); }

.rojnu-pagination-fraction {
    padding: .35rem .75rem;
    border-left: 1px solid var(--rojnu-border);
    font-weight: 600;
    color: var(--rojnu-text);
    white-space: nowrap;
}

.rojnu-pagination-label { white-space: nowrap; }

.rojnu-pagination-goto-input {
    width: 56px;
    height: 34px;
    padding: 0 .5rem;
    border: 1px solid var(--rojnu-border);
    border-radius: 999px;
    font-size: .85rem;
    text-align: center;
}

.rojnu-pagination .rojnu-btn-small { height: 34px; box-sizing: border-box; border-radius: 999px; padding: 0 1rem; }
.rojnu-pagination .rojnu-btn-small.is-primary { background: linear-gradient(135deg, var(--rojnu-primary), var(--rojnu-primary-dark)); }

.rojnu-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.rojnu-table th, .rojnu-table td { padding: .65rem .9rem; text-align: left; border-bottom: 1px solid var(--rojnu-border); white-space: nowrap; }
.rojnu-table th { color: var(--rojnu-muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; background: var(--rojnu-bg); }
.rojnu-table tr:last-child td { border-bottom: 0; }
.rojnu-table td.is-empty-state { text-align: center; color: var(--rojnu-muted); padding: 2rem; white-space: normal; }

/* ============================================================
   Card-style page hero + list rows (Sales and friends)
   ============================================================ */

.rojnu-page-hero {
    position: relative;
    overflow: hidden;
    padding: 1.5rem 1.9rem;
    border-radius: 20px;
    background: linear-gradient(135deg, #eef1fb 0%, #e7ecfb 55%, #eef4fb 100%);
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

.rojnu-page-hero::before {
    content: "";
    position: absolute;
    top: -70px;
    right: -70px;
    width: 230px;
    height: 230px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(22, 37, 92, .12), transparent 70%);
    pointer-events: none;
}

.rojnu-page-hero .rojnu-main-head { margin-bottom: 0; position: relative; z-index: 1; }
.rojnu-page-hero-sub { margin: .3rem 0 0; color: var(--rojnu-muted); font-size: .88rem; }

.rojnu-btn-pill {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    border-radius: 999px;
    padding: .75rem 1.35rem;
}

.rojnu-btn-pill svg { width: 16px; height: 16px; flex-shrink: 0; }

.rojnu-btn-pill.is-primary {
    background: linear-gradient(135deg, var(--rojnu-primary), var(--rojnu-primary-dark));
    border: none;
    box-shadow: 0 6px 16px rgba(22, 37, 92, .28);
    transition: transform .12s ease, box-shadow .12s ease;
}

.rojnu-btn-pill.is-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(22, 37, 92, .34); }

.rojnu-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    background: #f1f5f9;
    color: #64748b;
    text-decoration: none;
    transition: transform .12s ease, box-shadow .12s ease, background .15s ease, color .15s ease;
}

.rojnu-icon-btn svg { width: 16px; height: 16px; }
.rojnu-icon-btn:hover { transform: translateY(-1px); }

.rojnu-icon-btn.is-view { background: #eff6ff; color: #1d4ed8; }
.rojnu-icon-btn.is-view:hover { background: #1d4ed8; color: #fff; box-shadow: 0 4px 10px rgba(29, 78, 216, .3); }
.rojnu-icon-btn.is-edit { background: #fffbeb; color: #b45309; }
.rojnu-icon-btn.is-edit:hover { background: #b45309; color: #fff; box-shadow: 0 4px 10px rgba(180, 83, 9, .3); }
.rojnu-icon-btn.is-delete { background: #fef2f2; color: #dc2626; }
.rojnu-icon-btn.is-delete:hover { background: #dc2626; color: #fff; box-shadow: 0 4px 10px rgba(220, 38, 38, .3); }

.rojnu-list-actions { display: flex; align-items: center; justify-content: flex-end; gap: .4rem; }

.rojnu-list-card { display: flex; flex-direction: column; gap: .6rem; }

.rojnu-list-row {
    display: grid;
    /* The trailing column is a fixed px width (not auto) deliberately: each
       .rojnu-list-row is its own independent grid (the card around them is
       just a flex column), so an auto-sized column would size to that row's
       own content - the header's "Actions" text vs a data row's 3 icon
       buttons are different widths, which would silently shift every other
       fr column's pixel width between the header and the rows. */
    grid-template-columns: 20px .7fr .8fr 1.3fr .85fr .75fr .7fr .85fr 120px;
    align-items: center;
    gap: 1rem;
    padding: .75rem 1.1rem;
    background: var(--rojnu-card);
    border: 1px solid var(--rojnu-border);
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
    transition: box-shadow .15s ease, transform .15s ease;
}

.rojnu-list-row.rojnu-list-header {
    background: linear-gradient(135deg, var(--rojnu-primary), var(--rojnu-primary-dark));
    border-color: transparent;
    box-shadow: none;
    padding-top: .65rem;
    padding-bottom: .65rem;
}
.rojnu-list-row.rojnu-list-header:hover { transform: none; box-shadow: none; }
.rojnu-list-col-label { color: #fff; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.rojnu-list-col-label.is-end { text-align: right; }

.rojnu-list-select-all {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    margin-left: .2rem;
    font-size: .82rem;
    font-weight: 600;
    color: var(--rojnu-muted);
    cursor: pointer;
}
.rojnu-list-select-all input {
    width: 16px;
    height: 16px;
    accent-color: var(--rojnu-primary);
    cursor: pointer;
}

.rojnu-list-saleno { font-weight: 700; color: var(--rojnu-primary); text-decoration: none; }
.rojnu-list-saleno:hover { text-decoration: underline; }
.rojnu-list-saleno.is-static:hover { text-decoration: none; }

.rojnu-list-checkbox { display: flex; align-items: center; justify-content: center; }
.rojnu-list-checkbox input {
    width: 17px;
    height: 17px;
    accent-color: var(--rojnu-primary);
    cursor: pointer;
}

.rojnu-bulk-actions {
    display: flex;
    align-items: center;
    gap: .6rem;
    flex-wrap: wrap;
    margin-bottom: .75rem;
    padding: .4rem .5rem .4rem .9rem;
    background: var(--rojnu-card);
    border: 1px solid var(--rojnu-border);
    border-radius: 999px;
    width: fit-content;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .05);
}

.rojnu-bulk-actions[hidden] { display: none; }
/* Stays reachable while scrolling a long list; slides up out of view while
   scrolling down and back on scrolling up (toggled in list_ui.php). Only a
   transform + fade, so the bar keeps its space and no content shifts. */
.rojnu-bulk-actions {
    position: sticky;
    top: .75rem;
    z-index: 20;
    transition: transform .28s cubic-bezier(.4, 0, .2, 1), opacity .22s ease;
    will-change: transform;
}
.rojnu-bulk-actions.is-scroll-hidden {
    transform: translateY(calc(-100% - 1.25rem));
    opacity: 0;
    pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
    .rojnu-bulk-actions { transition: none; }
}
.rojnu-bulk-count { font-size: .82rem; font-weight: 700; color: var(--rojnu-text); white-space: nowrap; }
.rojnu-bulk-actions .rojnu-btn-small { border-radius: 999px; height: 30px; padding: 0 .8rem; font-size: .78rem; gap: .3rem; display: inline-flex; align-items: center; }
.rojnu-bulk-actions .rojnu-btn-small svg { width: 13px; height: 13px; }
.rojnu-bulk-actions .rojnu-btn-small.is-danger { background: #dc2626; color: #fff; border-color: #dc2626; }
.rojnu-bulk-actions .rojnu-btn-small.is-danger:hover { background: #b91c1c; }

.rojnu-bulk-status-btn.is-tone-info { background: #eff6ff; color: #1e40af; border-color: #bfdbfe; }
.rojnu-bulk-status-btn.is-tone-info:hover { background: #1e40af; color: #fff; }
.rojnu-bulk-status-btn.is-tone-accent { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.rojnu-bulk-status-btn.is-tone-accent:hover { background: #b45309; color: #fff; }
.rojnu-bulk-status-btn.is-tone-success { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.rojnu-bulk-status-btn.is-tone-success:hover { background: #047857; color: #fff; }
.rojnu-bulk-status-btn.is-tone-danger { background: #fef2f2; color: #dc2626; border-color: #fecaca; }
.rojnu-bulk-status-btn.is-tone-danger:hover { background: #dc2626; color: #fff; }

.rojnu-list-row:hover { box-shadow: 0 6px 16px rgba(15, 23, 42, .09); transform: translateY(-1px); }

.rojnu-row-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .95rem;
    color: #fff;
    flex-shrink: 0;
}

.rojnu-row-avatar.is-sm { width: 24px; height: 24px; font-size: .66rem; }

.rojnu-row-avatar.is-violet { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.rojnu-row-avatar.is-blue { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.rojnu-row-avatar.is-pink { background: linear-gradient(135deg, #ec4899, #db2777); }
.rojnu-row-avatar.is-coral { background: linear-gradient(135deg, #f97066, #ef4444); }
.rojnu-row-avatar.is-amber { background: linear-gradient(135deg, #f59e0b, #d97706); }
.rojnu-row-avatar.is-teal { background: linear-gradient(135deg, #14b8a6, #0d9488); }
.rojnu-row-avatar.is-indigo { background: linear-gradient(135deg, #6366f1, #4f46e5); }
.rojnu-row-avatar.is-green { background: linear-gradient(135deg, #22c55e, #16a34a); }

.rojnu-list-date { font-size: .82rem; color: var(--rojnu-muted); }

.rojnu-list-customer { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.rojnu-list-customer-name { display: flex; align-items: center; gap: .5rem; min-width: 0; }
.rojnu-list-customer-name a { font-weight: 600; color: var(--rojnu-text); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rojnu-list-customer-name a:hover { color: var(--rojnu-primary); }
.rojnu-list-phone { font-size: .76rem; color: var(--rojnu-muted); display: inline-flex; align-items: center; gap: .3rem; padding-left: 2.05rem; }
.rojnu-list-phone svg { width: 12px; height: 12px; flex-shrink: 0; }

.rojnu-list-product,
.rojnu-list-district {
    font-size: .84rem;
    color: var(--rojnu-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rojnu-list-amount { font-weight: 700; color: var(--rojnu-text); text-align: right; white-space: nowrap; }

.rojnu-list-metric { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.rojnu-list-metric-label { font-size: .68rem; text-transform: uppercase; letter-spacing: .04em; color: var(--rojnu-muted); font-weight: 700; }
.rojnu-list-metric-value { font-weight: 700; color: var(--rojnu-text); white-space: nowrap; }

/* Delivery Charge page: Date, Sale#, Customer, District, Delivery Charge, Total, Action. */
.rojnu-list-card.is-delivery-charge .rojnu-list-row {
    /* Same shape as the base .rojnu-list-row (checkbox, date, sale#, customer
       with inline avatar, product, ...) plus two delivery-charge-specific
       metric columns. Fixed trailing width for the same reason as the base
       rule - 3 action icons here, same as Sales, not the header's plain text. */
    grid-template-columns: 20px .65fr .75fr 1.2fr .8fr .65fr .75fr .8fr 120px;
}

/* Simple list cards (Goods Received, Supplier Payments) - no checkbox/avatar/
   actions column, just plain-weight left-aligned values, unlike the
   bold-right-aligned .rojnu-list-amount used on Sales/Delivery Charge. */
.rojnu-list-card.is-simple .rojnu-list-row {
    grid-template-columns: repeat(5, 1fr);
}
.rojnu-list-card.is-simple.is-goods-received .rojnu-list-row {
    grid-template-columns: .9fr .9fr 1.6fr .8fr .8fr 1fr;
}
.rojnu-list-card.is-simple.is-payments .rojnu-list-row {
    grid-template-columns: .8fr .8fr 1fr 1.3fr .75fr .65fr .85fr 100px;
}

/* Hover preview for an image payment-proof - pure CSS, no JS. PDFs keep
   the plain icon-link behaviour (nothing sensible to preview inline). */
.rojnu-proof-preview { position: relative; display: inline-block; }
.rojnu-proof-preview-pop {
    display: none;
    position: absolute;
    bottom: 100%;
    right: 0;
    margin-bottom: 8px;
    padding: 6px;
    background: var(--rojnu-card);
    border: 1px solid var(--rojnu-border);
    border-radius: 10px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .18);
    z-index: 50;
}
.rojnu-proof-preview-pop img {
    display: block;
    max-width: 420px;
    max-height: 420px;
    border-radius: 6px;
}
.rojnu-proof-preview:hover .rojnu-proof-preview-pop,
.rojnu-proof-preview:focus-within .rojnu-proof-preview-pop {
    display: block;
}
.rojnu-list-plain-value { color: var(--rojnu-text); font-size: .88rem; }

.rojnu-metric-grid {
    display: grid;
    /* minmax floor kept low enough that 5 cards (the Sales page's All/Draft/
       Pending/Delivered/Cancelled) still fit on one row at normal desktop
       widths instead of the 5th wrapping to its own line. */
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: .75rem;
    margin-bottom: 1.5rem;
}

.rojnu-metric-card {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .9rem 1rem;
    min-width: 0;
    background: var(--rojnu-card);
    border: 1px solid var(--rojnu-border);
    border-radius: 16px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .05);
    transition: transform .12s ease, box-shadow .12s ease, border-color .15s ease;
}

a.rojnu-metric-card { cursor: pointer; }
.rojnu-metric-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(15, 23, 42, .1); }

.rojnu-metric-card.is-tone-navy { --rojnu-metric-ring: rgba(22, 37, 92, .18); --rojnu-metric-border: var(--rojnu-primary); }
.rojnu-metric-card.is-tone-success { --rojnu-metric-ring: rgba(22, 163, 74, .18); --rojnu-metric-border: #16a34a; }
.rojnu-metric-card.is-tone-danger { --rojnu-metric-ring: rgba(220, 38, 38, .18); --rojnu-metric-border: #dc2626; }
.rojnu-metric-card.is-tone-accent { --rojnu-metric-ring: rgba(249, 115, 22, .18); --rojnu-metric-border: var(--rojnu-accent); }
.rojnu-metric-card.is-tone-info { --rojnu-metric-ring: rgba(37, 99, 235, .18); --rojnu-metric-border: #2563eb; }

.rojnu-metric-card.is-active {
    border-color: var(--rojnu-metric-border, var(--rojnu-primary));
    box-shadow: 0 0 0 3px var(--rojnu-metric-ring, rgba(22, 37, 92, .15));
}

.rojnu-metric-icon {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
}

.rojnu-metric-icon svg { width: 21px; height: 21px; }
.rojnu-metric-icon.is-navy { background: linear-gradient(135deg, var(--rojnu-primary), var(--rojnu-primary-dark)); }
.rojnu-metric-icon.is-success { background: linear-gradient(135deg, #22c55e, #16a34a); }
.rojnu-metric-icon.is-danger { background: linear-gradient(135deg, #f87171, #dc2626); }
.rojnu-metric-icon.is-accent { background: linear-gradient(135deg, #fb923c, var(--rojnu-accent)); }
.rojnu-metric-icon.is-info { background: linear-gradient(135deg, #60a5fa, #2563eb); }

.rojnu-metric-card > div { min-width: 0; }
.rojnu-metric-label { font-size: .8rem; color: var(--rojnu-muted); font-weight: 600; margin-bottom: .2rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rojnu-metric-value { font-size: 1.3rem; font-weight: 800; color: var(--rojnu-text); white-space: nowrap; }

.rojnu-table-card > .rojnu-pagination:only-child { border-top: 0; }

.rojnu-list-empty {
    padding: 3rem 1rem;
    text-align: center;
    color: var(--rojnu-muted);
    background: var(--rojnu-card);
    border: 1px solid var(--rojnu-border);
    border-radius: 14px;
}

@media (max-width: 900px) {
    .rojnu-list-row {
        grid-template-columns: 20px 42px 1fr auto;
        row-gap: .5rem;
    }
    .rojnu-list-date, .rojnu-list-saleno { grid-column: 3; }
    .rojnu-list-customer { grid-column: 3; }
    .rojnu-list-product, .rojnu-list-district, .rojnu-list-status, .rojnu-list-amount, .rojnu-list-metric { grid-column: 3; text-align: left; }
    .rojnu-list-actions { grid-column: 1 / -1; justify-content: flex-end; }
    .rojnu-list-row.rojnu-list-header { display: none; }
}

/* Rvs S (Rojnu vs Suppliers) monthly balance sheet - two side-by-side
   panels styled as a classic two-column ledger, navy for the R (Rojnu
   payments) side and amber for the S (Suppliers goods received) side. */
.rojnu-rvs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; align-items: start; }

.rojnu-rvs-panel {
    background: var(--rojnu-card);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .06);
}

.rojnu-rvs-panel-head {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: 1rem 1.25rem;
    color: #fff;
    font-weight: 700;
    font-size: .95rem;
}
.rojnu-rvs-panel-head.is-r { background: linear-gradient(135deg, var(--rojnu-primary), var(--rojnu-primary-dark)); }
.rojnu-rvs-panel-head.is-s { background: linear-gradient(135deg, #fb923c, var(--rojnu-accent)); }

.rojnu-rvs-panel-badge {
    width: 32px;
    height: 32px;
    flex: none;
    border-radius: 9px;
    background: rgba(255, 255, 255, .22);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.05rem;
}

.rojnu-rvs-panel-sub { font-weight: 400; font-size: .75rem; opacity: .85; margin-left: .35rem; }

.rojnu-rvs-panel-body { padding: .85rem; display: flex; flex-direction: column; gap: .5rem; max-height: 480px; overflow-y: auto; }

.rojnu-rvs-row {
    display: grid;
    gap: .75rem;
    align-items: center;
    padding: .65rem .85rem;
    background: var(--rojnu-bg);
    border-radius: 10px;
    font-size: .85rem;
}
.rojnu-rvs-row.is-r-row { grid-template-columns: .85fr 1.6fr .9fr; }
.rojnu-rvs-row.is-s-row { grid-template-columns: .8fr 1.5fr .5fr .65fr .9fr; }

.rojnu-rvs-row-head {
    background: transparent;
    color: var(--rojnu-muted);
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: 0 .85rem;
}

.rojnu-rvs-amount { font-weight: 700; color: var(--rojnu-text); text-align: right; white-space: nowrap; }

.rojnu-rvs-empty { text-align: center; color: var(--rojnu-muted); padding: 1.5rem; font-size: .85rem; }

.rojnu-rvs-panel-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .9rem 1.25rem;
    border-top: 1px solid var(--rojnu-border);
    background: var(--rojnu-bg);
    font-weight: 700;
    font-size: .9rem;
}
.rojnu-rvs-panel-foot.is-r { color: var(--rojnu-primary); }
.rojnu-rvs-panel-foot.is-s { color: #b45309; }

.rojnu-rvs-foot-sign {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-weight: 800;
    font-size: .85rem;
    line-height: 1;
    margin-right: .45rem;
    color: #fff;
    vertical-align: middle;
}
.rojnu-rvs-foot-sign.is-plus { background: #16a34a; }
.rojnu-rvs-foot-sign.is-minus { background: #dc2626; }

/* Balance direction banner - shows the Payments - Goods = Balance maths
   plus a plain-language "who owes whom" statement, color-coded by sign. */
.rojnu-rvs-balance-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: 1rem 1.25rem;
    border-radius: 14px;
    margin: 1rem 0 1.25rem;
    border: 1px solid transparent;
}
.rojnu-rvs-balance-bar.is-credit { background: #ecfdf5; border-color: #a7f3d0; color: #047857; }
.rojnu-rvs-balance-bar.is-debit { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }
.rojnu-rvs-balance-bar.is-settled { background: var(--rojnu-bg); border-color: var(--rojnu-border); color: var(--rojnu-muted); }

.rojnu-rvs-balance-formula {
    font-size: .95rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}
.rojnu-rvs-balance-formula strong { font-size: 1.05rem; }
.rojnu-rvs-balance-op { margin: 0 .5rem; opacity: .7; font-weight: 700; }

.rojnu-rvs-balance-direction { font-weight: 700; font-size: .95rem; }

@media (max-width: 600px) {
    .rojnu-rvs-balance-bar { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 900px) {
    .rojnu-rvs-grid { grid-template-columns: 1fr; }
    .rojnu-rvs-row.is-r-row, .rojnu-rvs-row.is-s-row { grid-template-columns: 1fr; row-gap: .3rem; }
    .rojnu-rvs-row-head { display: none; }
    .rojnu-rvs-amount { text-align: left; }
}

/* Item Details card (New Sale, Sale view, Sale edit) - scoped so it doesn't
   affect other .rojnu-table-card list pages. Adds real inset padding so
   the table's content never sits flush against the card edge (the plain
   .rojnu-table-card has no padding of its own - it relies entirely on each
   cell's own padding, which looked fine on the left but left the right
   edge of the last column looking cramped). */
.rojnu-item-details-card {
    border-radius: 16px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .06);
    padding: 1.5rem;
}

.rojnu-item-details-card .rojnu-table { width: 100%; }

.rojnu-history-list { display: flex; flex-direction: column; gap: .75rem; }

.rojnu-history-row {
    padding: .75rem .9rem;
    background: var(--rojnu-bg);
    border: 1px solid var(--rojnu-border);
    border-radius: 10px;
}

.rojnu-history-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .55rem;
    margin-bottom: .35rem;
    font-size: .85rem;
}

.rojnu-history-meta strong { color: var(--rojnu-text); }
.rojnu-history-date { color: var(--rojnu-muted); font-size: .78rem; }
.rojnu-history-desc { color: var(--rojnu-text); font-size: .85rem; line-height: 1.5; }

.rojnu-item-details-card .rojnu-table { width: 100%; }

#rojnu-sale-items thead th {
    background: linear-gradient(135deg, #eef2fb, #e3e9f8);
    color: var(--rojnu-primary);
    font-weight: 700;
    border-bottom: 2px solid #d7deef;
}

#rojnu-sale-items tbody tr { transition: background .12s ease; }
#rojnu-sale-items tbody tr:nth-child(even) { background: #fafbfe; }
#rojnu-sale-items tbody tr:hover { background: #f2f5fb; }
#rojnu-sale-items td { border-bottom: 1px solid #eef1f7; }

#rojnu-sale-items tbody input,
#rojnu-sale-items tbody select {
    border: 1px solid transparent;
    background: #f4f6fb;
    border-radius: 8px;
    padding: .5rem .65rem;
    font-size: .88rem;
    font-family: inherit;
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
#rojnu-sale-items tbody select { width: 100%; }
#rojnu-sale-items tbody input:focus,
#rojnu-sale-items tbody select:focus {
    outline: none;
    background: #fff;
    border-color: var(--rojnu-primary);
    box-shadow: 0 0 0 3px rgba(22, 37, 92, .12);
}

.rojnu-item-line-total { font-weight: 700; color: var(--rojnu-primary); }

.rojnu-item-grandtotal-row td {
    background: #eef2fb;
    color: var(--rojnu-primary);
    font-weight: 800;
    font-size: .95rem;
    padding-top: .85rem;
    padding-bottom: .85rem;
    border-bottom: none;
}
.rojnu-item-grandtotal-row td:first-child { text-align: right; }

.rojnu-item-details-actions {
    display: flex;
    gap: .65rem;
    padding: .9rem 1rem;
    background: #fafbfd;
    border-top: 1px solid var(--rojnu-border);
}

.rojnu-item-add-btn,
.rojnu-item-create-btn {
    gap: .3rem;
    border-radius: 999px;
    transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.rojnu-item-add-btn span, .rojnu-item-create-btn span { font-size: 1rem; line-height: 1; }

.rojnu-item-add-btn { background: var(--rojnu-primary); color: #fff; border-color: var(--rojnu-primary); }
.rojnu-item-add-btn:hover { background: var(--rojnu-primary-dark); transform: translateY(-1px); box-shadow: 0 6px 14px rgba(22, 37, 92, .25); }

.rojnu-item-create-btn { background: #fff; color: var(--rojnu-primary); border: 1px solid var(--rojnu-primary); }
.rojnu-item-create-btn:hover { background: #eef2fb; transform: translateY(-1px); }

.rojnu-badge { display: inline-block; padding: .15rem .55rem; border-radius: 999px; font-size: .72rem; font-weight: 700; }
.rojnu-badge.is-active { background: #ecfdf5; color: #047857; }
.rojnu-badge.is-inactive { background: var(--rojnu-danger-bg); color: var(--rojnu-danger); }
.rojnu-badge.is-unpaid { background: var(--rojnu-danger-bg); color: var(--rojnu-danger); }
.rojnu-badge.is-pending { background: #fffbeb; color: #b45309; }
.rojnu-badge.is-draft { background: #eff6ff; color: #1e40af; }

.rojnu-entity-avatar-wrap {
    position: relative;
    display: inline-block;
    vertical-align: middle;
    margin-right: .5rem;
}
.rojnu-entity-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover;
    background: var(--rojnu-primary);
    color: #fff;
    font-weight: 700;
    font-size: .7rem;
}
.rojnu-entity-avatar.is-large { width: 44px; height: 44px; font-size: .85rem; }
.rojnu-entity-status-dot {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid var(--rojnu-card, #fff);
}
.rojnu-entity-status-dot.is-active { background: #10b981; }
.rojnu-entity-status-dot.is-inactive { background: var(--rojnu-danger); }
.rojnu-entity-avatar.is-large + .rojnu-entity-status-dot { width: 13px; height: 13px; }

/* Small round photo thumbnail (e.g. the Products list). Hovering it shows a
   full-size slider through every photo on that row - via JS/fixed
   positioning (#rojnu-photo-slider, built once at the bottom of the page),
   not a CSS-only absolute popup, since a popup positioned relative to the
   thumbnail would get clipped by .rojnu-table-card's overflow:hidden. */
.rojnu-photo-thumb-wrap {
    position: relative;
    display: inline-block;
    vertical-align: middle;
    margin-right: .5rem;
}
.rojnu-photo-thumb {
    display: block;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--rojnu-border);
    cursor: zoom-in;
}

#rojnu-photo-slider {
    display: none;
    position: fixed;
    z-index: 500;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, .35);
    padding: .75rem;
    max-width: min(90vw, 420px);
}
#rojnu-photo-slider.is-open { display: block; }
#rojnu-photo-slider img {
    display: block;
    width: min(90vw - 1.5rem, 420px);
    height: min(70vh, 420px);
    object-fit: contain;
    border-radius: 8px;
    margin: 0 auto;
}
.rojnu-photo-slider-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: .5rem;
    gap: .5rem;
}
.rojnu-photo-slider-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid var(--rojnu-border);
    background: #fff;
    cursor: pointer;
    font-weight: 700;
    color: var(--rojnu-text);
    flex-shrink: 0;
}
.rojnu-photo-slider-btn:hover { background: var(--rojnu-primary); color: #fff; border-color: var(--rojnu-primary); }
.rojnu-photo-slider-count { font-size: .78rem; color: var(--rojnu-muted); white-space: nowrap; }

.rojnu-form-card {
    background: var(--rojnu-card);
    border: 1px solid var(--rojnu-border);
    border-radius: 14px;
    padding: 1.5rem;
    max-width: 640px;
}

.rojnu-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 1rem;
}

.rojnu-form-grid .rojnu-field-full { grid-column: 1 / -1; }
.rojnu-form-grid-3 { grid-template-columns: repeat(3, 1fr); gap: 0 .75rem; margin-top: .25rem; }

.rojnu-segmented {
    display: inline-flex;
    background: #f1f5f9;
    border-radius: 999px;
    padding: 3px;
    margin-bottom: .85rem;
}
.rojnu-segmented-option {
    display: flex;
    align-items: center;
    gap: .4rem;
    padding: .45rem 1.1rem;
    border-radius: 999px;
    font-size: .85rem;
    font-weight: 600;
    color: #55607a;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}
.rojnu-segmented-option input { display: none; }
.rojnu-segmented-option.is-active {
    background: #fff;
    color: var(--rojnu-primary);
    box-shadow: 0 1px 3px rgba(15, 23, 42, .15);
}

.rojnu-field textarea {
    width: 100%;
    padding: .65rem .8rem;
    border: 1px solid var(--rojnu-border);
    border-radius: 8px;
    font-size: .9rem;
    font-family: inherit;
    resize: vertical;
}

.rojnu-form-actions {
    display: flex;
    gap: .6rem;
    margin-top: .5rem;
}

.rojnu-success {
    margin-bottom: 1rem;
    padding: .65rem .8rem;
    border-radius: 8px;
    font-size: .85rem;
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

/* Dashboard AI Assistant - a floating chat launcher fixed to the corner
   of the screen (same pattern as calculushub.com's own chat bubble),
   styled with that site's AI Math Solver palette/shapes rather than
   Rojnu's own navy branding used everywhere else in this app. */
.rojnu-assistant-fab {
    position: fixed;
    right: 1.75rem;
    bottom: 1.75rem;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--rojnu-primary), var(--rojnu-primary-dark));
    color: #fff;
    box-shadow: 0 10px 28px rgba(22, 37, 92, .45);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    transition: transform .18s ease, box-shadow .18s ease;
}
.rojnu-assistant-fab:hover, .rojnu-assistant-fab.is-active { transform: scale(1.07); box-shadow: 0 14px 32px rgba(22, 37, 92, .55); }
.rojnu-assistant-fab svg {
    width: 26px;
    height: 26px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    position: relative;
    z-index: 1;
}
.rojnu-assistant-fab-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid var(--rojnu-primary);
    animation: rojnu-fab-pulse 2.6s ease-out infinite;
    pointer-events: none;
}
.rojnu-assistant-fab.is-active .rojnu-assistant-fab-ring { display: none; }
@keyframes rojnu-fab-pulse {
    0% { transform: scale(1); opacity: .5; }
    100% { transform: scale(1.6); opacity: 0; }
}

.rojnu-assistant-panel {
    display: flex;
    flex-direction: column;
    position: fixed;
    right: 1.75rem;
    bottom: 5.9rem;
    width: 390px;
    max-width: calc(100vw - 2.5rem);
    max-height: 82vh;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    box-shadow: 0 24px 55px rgba(15, 23, 42, .22);
    overflow: hidden;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(14px) scale(.97);
    transform-origin: bottom right;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.rojnu-assistant-panel.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
}

.rojnu-assistant-panel-head {
    display: flex;
    align-items: center;
    gap: .65rem;
    flex-shrink: 0;
    padding: .9rem 1rem;
    background: linear-gradient(135deg, var(--rojnu-primary), var(--rojnu-primary-dark));
}
.rojnu-assistant-panel-head-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #fff;
    color: var(--rojnu-primary);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
}
.rojnu-assistant-panel-head-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rojnu-assistant-panel-head-icon img { width: 100%; height: 100%; object-fit: cover; }
.rojnu-assistant-panel-head-text { flex: 1 1 auto; min-width: 0; }
.rojnu-assistant-panel-head h3 { color: #fff; margin: 0; font-size: 1rem; line-height: 1.3; }

.rojnu-assistant-status { display: flex; align-items: center; gap: .35rem; color: rgba(255, 255, 255, .75); font-size: .72rem; margin-top: .15rem; }
.rojnu-assistant-status-dot { width: 6px; height: 6px; border-radius: 50%; background: #4ade80; animation: rojnu-status-pulse 2s infinite; }
@keyframes rojnu-status-pulse {
    0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, .6); }
    70% { box-shadow: 0 0 0 5px rgba(74, 222, 128, 0); }
    100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}

.rojnu-assistant-close {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, .16);
    color: #fff;
    cursor: pointer;
    transition: background .15s ease;
}
.rojnu-assistant-close svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.rojnu-assistant-close:hover { background: rgba(255, 255, 255, .28); }

.rojnu-assistant-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    padding: 1.1rem;
}

.rojnu-assistant-log {
    flex: 1 1 auto;
    min-height: 120px;
    overflow-y: auto;
    padding: .1rem;
    margin-bottom: .85rem;
}

.rojnu-assistant-turn {
    display: flex;
    gap: .6rem;
    align-items: flex-start;
    margin-bottom: .9rem;
    font-size: .88rem;
    color: #0f172a;
}

.rojnu-assistant-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--rojnu-primary), var(--rojnu-primary-dark));
    color: #fff;
}
.rojnu-assistant-avatar svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rojnu-assistant-turn.is-user .rojnu-assistant-avatar { background: linear-gradient(135deg, #fb923c, var(--rojnu-accent)); color: #fff; }

.rojnu-assistant-turn-content { flex: 1 1 auto; min-width: 0; }
.rojnu-assistant-turn-label { font: 700 .78rem Arial, sans-serif; color: #14264d; margin-bottom: .3rem; }
.rojnu-assistant-turn-time { font-size: .72rem; color: #94a3b8; margin-top: .3rem; }

.rojnu-assistant-turn.is-user .rojnu-assistant-bubble,
.rojnu-assistant-turn.is-answer .rojnu-assistant-answer {
    padding: .8rem 1rem;
    border-radius: 14px;
}
.rojnu-assistant-turn.is-user .rojnu-assistant-bubble {
    background: linear-gradient(135deg, var(--rojnu-primary), var(--rojnu-primary-dark));
    border: none;
    color: #fff;
}
.rojnu-assistant-turn.is-user .rojnu-assistant-bubble p { margin: 0; white-space: pre-wrap; }
.rojnu-assistant-turn.is-answer .rojnu-assistant-answer { background: #fff; border: 1px solid #e2e8f0; box-shadow: 0 2px 10px rgba(15, 23, 42, .05); }

.rojnu-assistant-turn.is-error {
    display: block;
    padding: .85rem 1rem;
    border-radius: 12px;
    margin-bottom: .9rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    font-size: .88rem;
}

.rojnu-assistant-answer h4 { margin: 0 0 .4rem; font-size: .98rem; color: #14264d; }

.rojnu-assistant-period {
    font-size: .74rem;
    color: #64748b;
    margin-bottom: .5rem;
}

.rojnu-assistant-rows { width: 100%; border-collapse: collapse; margin-bottom: .4rem; }
.rojnu-assistant-rows td { padding: .25rem 0; font-size: .85rem; }
.rojnu-assistant-rows td:last-child { text-align: right; font-weight: 600; }

/* The signature CalculusHub "final answer" box: green highlight + round
   checkmark badge, reused here for each answer's bottom-line figure. */
.rojnu-assistant-total {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    margin-top: .9rem;
    padding: .85rem 1rem;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 10px;
    color: #065f46;
    font-weight: 700;
}

.rojnu-assistant-total.is-negative { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }

.rojnu-assistant-total-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: .1rem;
    border-radius: 999px;
    background: #10b981;
    color: #fff;
    font-size: .75rem;
    font-weight: 800;
}

.rojnu-assistant-total.is-negative .rojnu-assistant-total-badge { background: #dc2626; }

.rojnu-assistant-note {
    color: #55607a;
    font-size: .8rem;
    margin: .5rem 0 0;
    line-height: 1.5;
}

.rojnu-assistant-drilldown { margin-top: .75rem; }
.rojnu-assistant-drilldown-title { font-size: .78rem; font-weight: 700; margin-bottom: .35rem; color: #14264d; }
.rojnu-assistant-drilldown .rojnu-table { font-size: .8rem; border: 1px solid #e2e8f0; border-radius: 10px; overflow: hidden; }
.rojnu-assistant-drilldown .rojnu-table th, .rojnu-assistant-drilldown .rojnu-table td { padding: .45rem .6rem; }

.rojnu-assistant-meta {
    display: flex;
    gap: .6rem;
    flex-wrap: wrap;
    margin-top: .5rem;
}

.rojnu-assistant-action {
    display: inline-flex;
    margin-top: .75rem;
    padding: .5rem 1.1rem;
    border-radius: 999px;
    border: 1px solid var(--rojnu-primary);
    background: var(--rojnu-primary);
    color: #fff;
    font: 700 .82rem Arial, sans-serif;
    text-decoration: none;
    transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.rojnu-assistant-action:hover { background: var(--rojnu-primary-dark); transform: translateY(-1px); box-shadow: 0 6px 14px rgba(22, 37, 92, .25); }

.rojnu-assistant-choice {
    margin-top: 0;
    background: #fff;
    color: var(--rojnu-primary);
    cursor: pointer;
}
.rojnu-assistant-choice:hover { background: #eef1fb; }

.rojnu-calculator-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1100;
    padding: 1rem;
}
.rojnu-calculator-overlay[hidden] { display: none; }

.rojnu-calculator {
    position: relative;
    width: 340px;
    max-width: calc(100vw - 2rem);
    background: #000;
    border-radius: 30px;
    padding: 2.5rem 1.2rem 1.4rem;
    box-shadow: 0 30px 70px rgba(0, 0, 0, .45);
}

.rojnu-calculator-close {
    position: absolute;
    top: .8rem;
    right: .8rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: #fee2e2;
    color: #dc2626;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
}

.rojnu-calculator-history {
    color: #8e8e93;
    font: 400 1.15rem/1.3 Arial, sans-serif;
    text-align: right;
    padding: 0 .7rem;
    min-height: 1.5rem;
    word-break: break-all;
}

.rojnu-calculator-display {
    color: #fff;
    font: 300 2.9rem/1.2 Arial, sans-serif;
    text-align: right;
    padding: 0 .6rem 1.1rem;
    word-break: break-all;
}

.rojnu-calculator-keys {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: .75rem;
}

.rojnu-calc-key {
    height: 65px;
    border-radius: 50%;
    border: none;
    font: 500 1.55rem Arial, sans-serif;
    cursor: pointer;
    background: #333;
    color: #fff;
}
.rojnu-calc-key:active { filter: brightness(1.25); }

.rojnu-calc-fn { background: #a5a5a5; color: #000; }
.rojnu-calc-op, .rojnu-calc-equals { background: #ff9f0a; color: #fff; }

.rojnu-calc-zero {
    grid-column: span 2;
    border-radius: 33px;
    text-align: left;
    padding-left: 1.8rem;
}

.rojnu-assistant-loading {
    display: none;
    align-items: center;
    gap: .5rem;
    margin: 0 0 .75rem .1rem;
    color: #55607a;
    font: 600 .85rem Arial, sans-serif;
    flex-shrink: 0;
}

.rojnu-assistant-loading.is-visible { display: flex; }

.rojnu-assistant-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #cbd5e1;
    border-top-color: var(--rojnu-primary);
    border-radius: 50%;
    animation: rojnu-assistant-spin .7s linear infinite;
}

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

.rojnu-assistant-input-row { display: flex; gap: .5rem; align-items: flex-end; flex-shrink: 0; }
.rojnu-assistant-input-row textarea {
    flex: 1;
    min-width: 0;
    min-height: 46px;
    max-height: 160px;
    overflow-y: auto;
    resize: none;
    padding: .7rem 1rem;
    border: 1px solid #c7cfe0;
    border-radius: 20px;
    font: 400 .9rem Arial, sans-serif;
    line-height: 1.4;
    color: #0f172a;
    transition: border-color .15s ease, box-shadow .15s ease;
    scrollbar-width: thin;
    scrollbar-color: #c7cfe0 transparent;
}
.rojnu-assistant-input-row textarea::-webkit-scrollbar { width: 6px; }
.rojnu-assistant-input-row textarea::-webkit-scrollbar-track { background: transparent; }
.rojnu-assistant-input-row textarea::-webkit-scrollbar-thumb { background: #c7cfe0; border-radius: 999px; }
.rojnu-assistant-input-row textarea::-webkit-scrollbar-thumb:hover { background: #a8b3ce; }
.rojnu-assistant-input-row textarea::placeholder { color: #94a3b8; }
.rojnu-assistant-input-row textarea:focus {
    outline: none;
    border-color: var(--rojnu-primary);
    box-shadow: 0 0 0 3px rgba(22, 37, 92, .15);
}

.rojnu-assistant-mic,
.rojnu-assistant-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
}
.rojnu-assistant-mic svg,
.rojnu-assistant-submit svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.rojnu-assistant-mic { background: #eef1fb; color: var(--rojnu-primary); transition: background .15s ease, color .15s ease; }
.rojnu-assistant-mic:hover { background: #dde3f5; }
.rojnu-assistant-mic.is-listening { background: #fee2e2; color: #dc2626; }
.rojnu-assistant-mic.is-unsupported { opacity: .55; }

.rojnu-assistant-submit { background: linear-gradient(135deg, var(--rojnu-primary), var(--rojnu-primary-dark)); color: #fff; transition: transform .12s ease, box-shadow .12s ease; }
.rojnu-assistant-submit:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 6px 14px rgba(22, 37, 92, .3); }
.rojnu-assistant-submit:disabled { opacity: .55; cursor: default; }

/* Dashboard */
.rojnu-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.1rem;
    margin-bottom: 1.5rem;
}

.rojnu-stat-card {
    position: relative;
    background: var(--rojnu-card);
    border: none;
    border-radius: 16px;
    padding: 1.25rem 1.4rem;
    box-shadow: 0 6px 18px rgba(15, 23, 42, .07);
}

.rojnu-stat-kebab {
    position: absolute;
    top: .85rem;
    right: 1rem;
    color: var(--rojnu-muted);
    font-weight: 700;
    letter-spacing: 1px;
    font-size: .9rem;
    line-height: 1;
    user-select: none;
}

.rojnu-stat-card .rojnu-stat-label {
    color: var(--rojnu-muted);
    font-size: .8rem;
    font-weight: 600;
    margin-bottom: .55rem;
}

.rojnu-stat-card .rojnu-stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
}

/* Stock Dashboard's stat card style - light-tint icon badge + colored left
   accent border + big value below, as opposed to .rojnu-stat-card's plain
   border and .rojnu-metric-card's solid-gradient circular icon. */
.rojnu-stat-card-v2 {
    background: var(--rojnu-card);
    border: 1px solid var(--rojnu-border);
    border-left: 4px solid var(--rojnu-stat-accent, var(--rojnu-primary));
    border-radius: 14px;
    padding: 1.1rem 1.3rem;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .05);
}

.rojnu-stat-card-v2-head {
    display: flex;
    align-items: center;
    gap: .65rem;
    margin-bottom: .9rem;
}

.rojnu-stat-card-v2-icon {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--rojnu-stat-tint, #eff6ff);
    color: var(--rojnu-stat-accent, #2563eb);
}
.rojnu-stat-card-v2-icon svg { width: 20px; height: 20px; }

.rojnu-stat-card-v2-label { color: var(--rojnu-muted); font-size: .85rem; font-weight: 600; }
.rojnu-stat-card-v2-value { font-size: 1.6rem; font-weight: 800; color: var(--rojnu-text); }
.rojnu-stat-card-v2-value + .rojnu-trend { margin-top: .5rem; display: inline-flex; }

.rojnu-stat-card-v2.is-tone-success { --rojnu-stat-accent: #16a34a; --rojnu-stat-tint: #ecfdf5; }
.rojnu-stat-card-v2.is-tone-info { --rojnu-stat-accent: #2563eb; --rojnu-stat-tint: #eff6ff; }
.rojnu-stat-card-v2.is-tone-warning { --rojnu-stat-accent: #b45309; --rojnu-stat-tint: #fffbeb; }
.rojnu-stat-card-v2.is-tone-danger { --rojnu-stat-accent: #dc2626; --rojnu-stat-tint: #fef2f2; }
.rojnu-stat-card-v2.is-tone-muted { --rojnu-stat-accent: #64748b; --rojnu-stat-tint: #f1f5f9; }

.rojnu-trend {
    display: inline-flex;
    align-items: center;
    font-size: .72rem;
    font-weight: 700;
    padding: .15rem .55rem;
    border-radius: 999px;
}

.rojnu-trend.is-up { background: #ecfdf5; color: #047857; }
.rojnu-trend.is-down { background: var(--rojnu-danger-bg); color: var(--rojnu-danger); }

.rojnu-dash-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 1.1rem;
    margin-bottom: 1.5rem;
    align-items: stretch;
}

.rojnu-dash-grid-bottom {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.1rem;
}

/* ============================================================
   Return modal (camera capture) + hover proof-photo preview
   ============================================================ */
.rojnu-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}
/* The [hidden] attribute alone isn't enough - this class's own `display:
   flex` above is an author-stylesheet rule, which always beats the
   browser's built-in `[hidden] { display: none }` (a user-agent-stylesheet
   rule) regardless of selector specificity. Without this, the modal is
   visible on every page load instead of only after being opened. */
.rojnu-modal-overlay[hidden] {
    display: none;
}
.rojnu-modal {
    background: var(--rojnu-card);
    border-radius: 16px;
    width: min(440px, 100%);
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 50px rgba(15, 23, 42, .35);
}
.rojnu-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--rojnu-border);
}
.rojnu-modal-head h3 { margin: 0; font-size: 1rem; }
.rojnu-modal-close {
    background: none;
    border: 0;
    font-size: 1.4rem;
    line-height: 1;
    color: var(--rojnu-muted);
    cursor: pointer;
    padding: 0;
}
.rojnu-modal-close:hover { color: var(--rojnu-text); }
.rojnu-modal-body { padding: 1.1rem 1.25rem; }
.rojnu-modal-hint { margin: 0 0 .85rem; font-size: .83rem; color: var(--rojnu-muted); }
.rojnu-modal-foot {
    display: flex;
    justify-content: flex-end;
    gap: .6rem;
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--rojnu-border);
}

.rojnu-camera-stage {
    width: 100%;
    aspect-ratio: 4 / 3;
    background: #0f172a;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.rojnu-camera-stage video,
.rojnu-camera-stage img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.rojnu-camera-fallback-hint {
    margin: .75rem 0 0;
    font-size: .83rem;
    color: var(--rojnu-muted);
    text-align: center;
}
.rojnu-camera-controls {
    display: flex;
    justify-content: center;
    gap: .6rem;
    margin-top: .85rem;
}

/* Per-row "proof" icon on a Returned sale - pure-CSS hover popover, no JS */
.rojnu-return-proof { position: relative; }
.rojnu-return-proof-preview {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    right: 0;
    width: 180px;
    padding: 6px;
    background: var(--rojnu-card);
    border: 1px solid var(--rojnu-border);
    border-radius: 10px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .25);
    z-index: 50;
}
.rojnu-return-proof-preview img {
    width: 100%;
    height: 135px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
}
.rojnu-return-proof:hover .rojnu-return-proof-preview,
.rojnu-return-proof:focus-within .rojnu-return-proof-preview {
    display: block;
}

/* ============================================================
   Staff attendance
   ============================================================ */
.rojnu-att-today {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0;
}
.rojnu-att-today-label { font-size: .8rem; color: var(--rojnu-muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 700; }
.rojnu-att-today-status { display: flex; align-items: center; gap: .55rem; font-size: 1.15rem; font-weight: 700; margin: .45rem 0 .3rem; }
.rojnu-att-today-times { color: var(--rojnu-muted); font-size: .88rem; }
.rojnu-att-today-times strong { color: var(--rojnu-text); }
.rojnu-att-today-actions { display: flex; gap: .6rem; }
.rojnu-att-today-actions .rojnu-btn[disabled] { opacity: .5; cursor: not-allowed; }
.rojnu-face-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
    gap: 1.25rem;
    align-items: start;
}
.rojnu-face-layout .rojnu-form-card { margin-bottom: 0; }
.rojnu-face-ref {
    width: 100%;
    max-width: 260px;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--rojnu-border);
    display: block;
}
.rojnu-face-stage {
    width: 100%;
    max-width: 480px;
    aspect-ratio: 4 / 3;
    background: #0f172a;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}
.rojnu-face-stage video,
.rojnu-face-stage img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
/* Mirror the live preview like a selfie camera; captured images stay true. */
.rojnu-face-stage video { transform: scaleX(-1); }
.rojnu-face-status { margin: .7rem 0 0; font-size: .85rem; color: var(--rojnu-muted); min-height: 1.2em; }
.rojnu-face-status.is-error { color: var(--rojnu-danger); }
@media (max-width: 860px) {
    .rojnu-face-layout { grid-template-columns: 1fr; }
}
.rojnu-modal.rojnu-att-modal { width: min(560px, 100%); }
.rojnu-att-prompt {
    position: absolute;
    left: 50%;
    bottom: 12px;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, .78);
    color: #fff;
    font-weight: 700;
    font-size: .95rem;
    padding: .45rem .9rem;
    border-radius: 999px;
    white-space: nowrap;
}
.rojnu-signature-pad {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 1;
    background: #fff;
    border: 2px dashed var(--rojnu-border);
    border-radius: 10px;
    touch-action: none; /* finger drawing must not scroll the page */
    cursor: crosshair;
    display: block;
}
.rojnu-att-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: .75rem 1rem;
    align-items: end;
    margin-bottom: 1.1rem;
}
.rojnu-att-filters .rojnu-field { margin: 0; }
.rojnu-att-filter-actions { display: flex; gap: .5rem; }
.rojnu-att-filter-hint { grid-column: 1 / -1; margin: 0; font-size: .76rem; color: var(--rojnu-muted); }
.rojnu-att-sub { font-size: .74rem; color: var(--rojnu-muted); }
.rojnu-att-detail { border: 0; }
.rojnu-att-detail th { background: none; border: 0; width: 110px; }
.rojnu-att-detail td { border: 0; white-space: normal; }
.rojnu-att-sig-large {
    width: 100%;
    max-width: 360px;
    background: #fff;
    border: 1px solid var(--rojnu-border);
    border-radius: 10px;
    display: block;
}
.rojnu-sig-samples { display: flex; gap: .5rem; flex-wrap: wrap; margin: .6rem 0 0; }
.rojnu-sig-samples img {
    width: 120px;
    height: 40px;
    object-fit: contain;
    background: #fff;
    border: 1px solid var(--rojnu-border);
    border-radius: 6px;
}
.rojnu-att-sig-thumb {
    height: 34px;
    width: auto;
    max-width: 110px;
    background: #fff;
    border: 1px solid var(--rojnu-border);
    border-radius: 6px;
    display: block;
}

.rojnu-dash-grid .rojnu-form-card,
.rojnu-dash-grid-bottom .rojnu-form-card { max-width: none; }

.rojnu-widget-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: .75rem;
}

.rojnu-widget-head h3 { margin: 0; font-size: 1rem; }

.rojnu-chart-legend {
    display: flex;
    gap: 1.1rem;
    font-size: .78rem;
    color: var(--rojnu-muted);
}

.rojnu-chart-legend span {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-weight: 600;
}

.rojnu-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

svg.rojnu-line-chart { width: 100%; height: 190px; display: block; overflow: visible; }

svg.rojnu-line-chart polyline {
    transition: stroke-width .15s ease, opacity .15s ease;
}

svg.rojnu-line-chart:hover polyline {
    opacity: .35;
}

svg.rojnu-line-chart polyline:hover {
    opacity: 1;
    stroke-width: 3.5;
}

.rojnu-chart-point {
    transition: r .15s ease;
    cursor: pointer;
}

.rojnu-chart-point:hover {
    r: 6.5;
}

.rojnu-line-chart-months {
    display: flex;
    justify-content: space-between;
    margin-top: .5rem;
    font-size: .72rem;
    color: var(--rojnu-muted);
}

.rojnu-pnl-row {
    display: flex;
    justify-content: space-between;
    padding: .5rem 0;
    border-bottom: 1px solid var(--rojnu-border);
    font-size: .92rem;
}
.rojnu-pnl-row:last-child { border-bottom: 0; }
.rojnu-pnl-row.is-total { font-weight: 800; font-size: 1.05rem; padding-top: .75rem; }
.rojnu-pnl-row .rojnu-pnl-label { color: var(--rojnu-text); }
.rojnu-pnl-row .rojnu-pnl-sub { color: var(--rojnu-muted); font-weight: 400; font-size: .82rem; }

.rojnu-bar-chart-frame {
    display: flex;
    align-items: stretch;
    gap: .6rem;
}

.rojnu-bar-axis {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-end;
    height: 280px;
    padding-top: 1.5rem;
    flex-shrink: 0;
    font-size: .68rem;
    color: var(--rojnu-muted);
}

.rojnu-bar-chart {
    display: flex;
    align-items: flex-end;
    gap: .75rem;
    height: 280px;
    padding-top: 1.5rem;
    flex: 1;
    background-image: repeating-linear-gradient(to top, var(--rojnu-border) 0, var(--rojnu-border) 1px, transparent 1px, transparent 25%);
    background-size: 100% calc(100% - 1.5rem);
    background-position: bottom;
    background-repeat: no-repeat;
}

.rojnu-bar-chart .rojnu-bar-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    height: 100%;
    cursor: pointer;
}

.rojnu-bar-chart .rojnu-bar-value {
    font-size: .68rem;
    color: var(--rojnu-muted);
    margin-bottom: .3rem;
    white-space: nowrap;
    transition: color .15s ease, font-weight .15s ease;
}

.rojnu-bar-chart .rojnu-bar {
    width: 60%;
    background: var(--rojnu-primary);
    border-radius: 0;
    min-height: 3px;
    transform-origin: bottom center;
    transition: filter .15s ease, transform .15s ease;
}

.rojnu-bar-chart .rojnu-bar-col:hover .rojnu-bar {
    filter: brightness(1.25);
    transform: scaleX(1.12);
}

.rojnu-bar-chart .rojnu-bar-col:hover .rojnu-bar-value {
    color: var(--rojnu-text);
    font-weight: 800;
}

.rojnu-bar-chart .rojnu-bar-label {
    margin-top: .5rem;
    font-size: .75rem;
    color: var(--rojnu-muted);
    font-weight: 600;
    transition: color .15s ease;
}

.rojnu-bar-chart .rojnu-bar-col:hover .rojnu-bar-label {
    color: var(--rojnu-text);
}

.rojnu-donut-wrap {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.rojnu-donut {
    width: 148px;
    height: 148px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.rojnu-donut::before {
    content: "";
    position: absolute;
    inset: 22px;
    background: var(--rojnu-card);
    border-radius: 50%;
}

.rojnu-donut-center {
    position: relative;
    z-index: 1;
    text-align: center;
}

.rojnu-donut-center .rojnu-donut-val { font-size: 1.15rem; font-weight: 800; line-height: 1.1; }
.rojnu-donut-center .rojnu-donut-lbl { font-size: .62rem; color: var(--rojnu-muted); }

.rojnu-donut-legend {
    flex: 1;
    min-width: 150px;
    display: flex;
    flex-direction: column;
    gap: .6rem;
    font-size: .85rem;
}

.rojnu-donut-legend-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
}

.rojnu-donut-legend-row .rojnu-donut-name {
    display: flex;
    align-items: center;
    gap: .55rem;
    color: var(--rojnu-text);
    min-width: 0;
}

.rojnu-donut-legend-row .rojnu-donut-name span.rojnu-dot { flex-shrink: 0; }
.rojnu-donut-legend-row .rojnu-donut-name-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rojnu-donut-legend-row .rojnu-donut-pct { color: var(--rojnu-muted); font-weight: 700; flex-shrink: 0; }

.rojnu-product-list { display: flex; flex-direction: column; }

.rojnu-product-row {
    display: flex;
    align-items: center;
    gap: .8rem;
    padding: .65rem .1rem;
    border-bottom: 1px solid var(--rojnu-border);
}
.rojnu-product-row:last-child { border-bottom: 0; }

.rojnu-product-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .8rem;
    color: #fff;
}

.rojnu-product-info { flex: 1; min-width: 0; }

.rojnu-product-name {
    font-size: .88rem;
    font-weight: 600;
    color: var(--rojnu-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rojnu-product-sub { font-size: .75rem; color: var(--rojnu-muted); }

.rojnu-product-amount {
    font-weight: 700;
    color: #047857;
    font-size: .88rem;
    white-space: nowrap;
    flex-shrink: 0;
}

@media (max-width: 1100px) {
    .rojnu-stat-grid { grid-template-columns: 1fr 1fr; }
    .rojnu-dash-grid,
    .rojnu-dash-grid-bottom { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
    body.rojnu-app-body { padding: 0; }
    .rojnu-shell-outer { border-radius: 0; flex-direction: column; height: auto; min-height: 100vh; }
    .rojnu-sidebar { width: 100%; flex-direction: row; flex-wrap: wrap; padding: 1rem; overflow-y: visible; }
    .rojnu-sidebar-brand { width: 100%; margin-bottom: 1rem; }
    .rojnu-sidebar-nav { flex-direction: row; flex-wrap: wrap; flex: none; width: 100%; }
    .rojnu-sidebar-footer { width: 100%; margin-top: 1rem; padding-top: 1rem; }
    .rojnu-form-grid { grid-template-columns: 1fr; }
    .rojnu-main { padding: 1.25rem; overflow-y: visible; }
    .rojnu-stat-grid { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------------
   Competitors: "See their ads" links into the official ad libraries
   --------------------------------------------------------------------- */
.is-muted { color: var(--rojnu-muted); }
.rojnu-ci-links { display: flex; flex-wrap: wrap; gap: .35rem .9rem; margin-top: .35rem; font-size: .84rem; color: var(--rojnu-muted); }
.rojnu-ci-links a { color: var(--rojnu-primary); text-decoration: none; }
.rojnu-ci-links a:hover { text-decoration: underline; }
.rojnu-ci-actions { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.rojnu-ci-grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; }
.rojnu-advanced summary { cursor: pointer; font-size: .85rem; font-weight: 600; color: var(--rojnu-primary); }
.rojnu-ci-live-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .8rem; }
.rojnu-ci-live-card {
    display: flex; flex-direction: column; gap: .3rem; padding: 1rem 1.1rem; border-radius: 12px; text-decoration: none;
    border: 1px solid var(--rojnu-border); background: var(--rojnu-bg); color: var(--rojnu-text); transition: border-color .15s ease, transform .15s ease;
}
.rojnu-ci-live-card:hover { border-color: var(--rojnu-primary); transform: translateY(-1px); }
.rojnu-ci-live-card strong { font-size: .95rem; }
.rojnu-ci-live-card span { font-size: .8rem; color: var(--rojnu-muted); }
.rojnu-ci-live-card.is-meta { border-left: 4px solid #1d4ed8; }
.rojnu-ci-live-card.is-google { border-left: 4px solid #16a34a; }
.rojnu-ci-live-card.is-empty { border-style: dashed; background: var(--rojnu-card); }
.rojnu-ci-listlinks a { display: inline-block; margin-right: .7rem; color: var(--rojnu-primary); font-size: .84rem; white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .rojnu-ci-live-card { transition: none; } .rojnu-ci-live-card:hover { transform: none; } }
/* ---------------------------------------------------------------------
   Desktop App page
   --------------------------------------------------------------------- */
.rojnu-app-hero { display: flex; gap: 1.5rem; align-items: flex-start; }
.rojnu-app-hero-icon { width: 96px; height: 96px; border-radius: 22px; flex: none; box-shadow: 0 6px 18px rgba(15, 23, 42, .12); }
.rojnu-app-hero-text { min-width: 0; flex: 1; }
.rojnu-app-hero-text h2 { margin: 0 0 .35rem; font-size: 1.3rem; }
.rojnu-app-hero-text > p { margin: 0 0 1.1rem; color: var(--rojnu-muted); line-height: 1.55; max-width: 640px; }
.rojnu-app-state[data-state="ready"] { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; }
.rojnu-app-state[hidden] { display: none !important; }
.rojnu-app-install { width: auto !important; display: inline-flex; align-items: center; gap: .5rem; padding: .75rem 1.5rem; font-size: 1rem; }
.rojnu-app-install svg { width: 18px; height: 18px; }
.rojnu-app-note { font-size: .82rem; }
.rojnu-app-ok { display: inline-block; padding: .55rem .9rem; border-radius: 10px; background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; font-weight: 600; margin-bottom: .5rem; }
.rojnu-app-steps, .rojnu-app-list { margin: 0; padding-left: 1.15rem; line-height: 1.7; font-size: .9rem; }
.rojnu-app-list li + li { margin-top: .25rem; }
.rojnu-app-key { display: inline-block; min-width: 1.4em; padding: 0 .3rem; border: 1px solid var(--rojnu-border); border-radius: 5px; background: var(--rojnu-bg); text-align: center; font-weight: 700; line-height: 1.4; }
@media (max-width: 640px) {
    .rojnu-app-hero { flex-direction: column; }
    .rojnu-app-hero-icon { width: 72px; height: 72px; }
}