html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
}

html {
    box-sizing: border-box;
}

*,
*::before,
*::after {
    box-sizing: inherit;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.app-shell {
    min-height: 100vh;
}

.app-layout {
    display: flex;
    min-height: 100vh;
}

.app-content {
    flex: 1;
    min-height: 100vh;
    overflow: auto;
    display: flex;
    flex-direction: column;
}

.app-content-toolbar {
    flex-shrink: 0;
    padding: 10px 16px;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
}

.app-sidebar-toggle .app-sidebar-icon-expand {
    display: none;
}

.app-layout.sidebar-collapsed .app-sidebar-toggle .app-sidebar-icon-expand {
    display: block;
}

.app-layout.sidebar-collapsed .app-sidebar-toggle .app-sidebar-icon-collapse {
    display: none;
}

/* Menu anësor — stil modern (ikonë + theks vjollcë për aktiv) */
.sidebar {
    --sidebar-bg: #151829;
    --sidebar-accent: #6366f1;
    --sidebar-accent-hover: #5558e3;
    --sidebar-text: rgba(255, 255, 255, 0.72);
    --sidebar-text-muted: rgba(255, 255, 255, 0.42);
    --sidebar-hover: rgba(255, 255, 255, 0.06);
    width: 260px;
    min-width: 260px;
    background: var(--sidebar-bg);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    padding: 20px 14px 16px;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    transition: width 0.22s ease, min-width 0.22s ease, padding 0.22s ease, border-width 0.22s ease;
    overflow: hidden;
    flex-shrink: 0;
}

.app-layout.sidebar-collapsed .sidebar {
    width: 0;
    min-width: 0;
    padding-left: 0;
    padding-right: 0;
    border-right-width: 0;
}

.sidebar-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 4px 8px 20px;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-brand-mark {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 10px;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.company-logo-mark {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.company-logo-fallback {
    font-size: 1.35rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1;
}

.sidebar-brand-name {
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.3;
    color: #ffffff;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 2px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.sidebar-category {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--sidebar-text-muted);
    padding: 18px 10px 6px;
}

.sidebar-category:first-child {
    padding-top: 4px;
}

.sidebar-submenu {
    margin-bottom: 0;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--sidebar-text);
    text-decoration: none;
    border-radius: 10px;
    padding: 10px 12px;
    font-weight: 500;
    font-size: 0.9rem;
    background: transparent;
    border: none;
    transition: background 0.15s ease, color 0.15s ease;
    width: 100%;
}

.sidebar-link:hover {
    background: var(--sidebar-hover);
    color: #ffffff;
}

.sidebar-link.active {
    background: var(--sidebar-accent);
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.35);
}

.sidebar-link.active .sidebar-icon {
    opacity: 1;
}

.sidebar-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    opacity: 0.85;
    stroke: currentColor;
    fill: none;
}

.sidebar-link span:not(.sidebar-submenu-arrow) {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-submenu-toggle {
    cursor: pointer;
    font-weight: 500;
}

.sidebar-submenu-toggle.active {
    color: #ffffff;
    background: rgba(99, 102, 241, 0.18);
}

.sidebar-submenu-arrow {
    display: inline-flex;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    opacity: 0.6;
    transition: transform 0.2s ease;
}

.sidebar-submenu-toggle[aria-expanded="true"] .sidebar-submenu-arrow {
    transform: rotate(180deg);
}

.sidebar-submenu-items {
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding: 4px 0 4px 30px;
    margin-bottom: 2px;
}

.sidebar-link.sidebar-sublink {
    padding: 7px 10px;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 8px;
}

.sidebar-link.sidebar-sublink.active {
    background: var(--sidebar-accent);
    color: #ffffff;
    font-weight: 600;
    box-shadow: none;
}

.sidebar-footer {
    margin-top: auto;
    padding: 14px 6px 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-footer .sidebar-user {
    font-size: 0.82rem;
    color: var(--sidebar-text-muted);
    margin-bottom: 10px;
    padding: 0 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-footer .btn-outline-light {
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.85rem;
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--sidebar-text);
}

.sidebar-footer .btn-outline-light:hover {
    background: var(--sidebar-hover);
    border-color: rgba(255, 255, 255, 0.35);
    color: #ffffff;
}

.sidebar-footer .btn-primary {
    border-radius: 10px;
    font-size: 0.85rem;
    background: var(--sidebar-accent);
    border-color: var(--sidebar-accent);
}

.sidebar-footer .btn-primary:hover {
    background: var(--sidebar-accent-hover);
    border-color: var(--sidebar-accent-hover);
}

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    background:
        radial-gradient(ellipse 80% 60% at 50% -10%, rgba(88, 80, 236, 0.18) 0%, transparent 55%),
        radial-gradient(ellipse 60% 50% at 100% 100%, rgba(30, 41, 59, 0.5) 0%, transparent 50%),
        linear-gradient(160deg, #0f172a 0%, #1e293b 45%, #0f172a 100%);
}

.login-card {
    width: 360px;
    background: #fff;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 22px 20px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
}

.login-card.register-card {
    width: 420px;
    max-width: 95vw;
}

/* Login: two-tone branded card */
.login-card-split {
    width: 400px;
    max-width: 100%;
    background: #fff;
    border-radius: 20px;
    box-shadow:
        0 24px 64px rgba(0, 0, 0, 0.35),
        0 0 0 1px rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

.login-card-header {
    background: linear-gradient(145deg, #1e293b 0%, #151829 100%);
    padding: 32px 28px 28px;
    text-align: center;
    color: #fff;
    position: relative;
}

.login-card-header::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, rgba(88, 80, 236, 0.12) 0%, transparent 60%);
    pointer-events: none;
}

.login-brand-box {
    position: relative;
    z-index: 1;
    display: inline-flex;
    justify-content: center;
    margin: 0 auto 18px;
    padding: 12px 18px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.login-brand-logo-row {
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
}

.login-brand-as {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, #5850ec 0%, #4a42d4 100%);
    color: #fff;
    font-weight: 700;
    font-size: 0.82rem;
    letter-spacing: -0.02em;
    box-shadow: 0 2px 8px rgba(88, 80, 236, 0.35);
    flex-shrink: 0;
}

.login-brand-logo {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    object-fit: contain;
    flex-shrink: 0;
}

.login-brand-text-block {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.login-brand-title {
    color: #1e293b;
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: -0.01em;
}

.login-brand-tagline {
    color: #64748b;
    font-size: 0.68rem;
    margin-top: 2px;
}

.login-card-company {
    position: relative;
    z-index: 1;
    margin: 0 0 6px;
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.02em;
}

.login-card-subtitle {
    position: relative;
    z-index: 1;
    margin: 0;
    font-size: 0.88rem;
    font-weight: 500;
    color: #94a3b8;
    letter-spacing: 0.02em;
}

.login-card-body {
    padding: 28px 28px 26px;
    background: #fff;
}

.login-form .login-field {
    margin-bottom: 1.15rem;
}

.login-label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 600;
    font-size: 0.82rem;
    color: #1e293b;
}

.login-input {
    display: block;
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    color: #1e293b;
    font-size: 0.95rem;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.login-input:focus {
    outline: none;
    border-color: #5850ec;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(88, 80, 236, 0.14);
}

.login-remember {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.35rem;
}

.login-checkbox {
    width: 17px;
    height: 17px;
    accent-color: #5850ec;
    border-radius: 4px;
    cursor: pointer;
}

.login-remember-label {
    margin: 0;
    font-weight: 500;
    font-size: 0.88rem;
    color: #64748b;
    cursor: pointer;
}

.login-actions {
    text-align: center;
}

.login-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.85rem 1.25rem;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #5850ec 0%, #4a42d4 100%);
    color: #fff;
    font-weight: 650;
    font-size: 0.95rem;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(88, 80, 236, 0.35);
    transition: transform 0.15s, box-shadow 0.15s;
}

.login-submit-btn:hover {
    color: #fff;
    box-shadow: 0 6px 22px rgba(88, 80, 236, 0.42);
    transform: translateY(-1px);
}

.login-submit-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(88, 80, 236, 0.3);
}

.login-submit-text {
    padding: 0;
    border: none;
    background: none;
    color: #5850ec;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
}

.login-submit-text:hover {
    text-decoration: underline;
    color: #4a42d4;
}

.login-footer-links {
    margin: 22px 0 0;
    font-size: 0.85rem;
    color: #64748b;
    text-align: center;
    line-height: 1.5;
}

.login-footer-links a {
    color: #5850ec;
    font-weight: 600;
    text-decoration: none;
}

.login-footer-links a:hover {
    text-decoration: underline;
}

.login-footer-demo {
    color: #94a3b8;
}

.app-shell:has(.login-page) {
    min-height: 100vh;
}

.image-path-picker-preview {
    max-height: 56px;
    max-width: 120px;
    object-fit: contain;
    display: none;
}

.image-path-picker-preview.is-visible {
    display: inline-block;
}

.image-library-tile img {
    pointer-events: none;
}

.module-page,
.dashboard-page {
    padding: 16px;
}

.desktop-area {
    position: relative;
    min-height: 1200px;
    overflow: auto;
    background: linear-gradient(135deg, #153256 0%, #184875 45%, #1f6293 100%);
}

.toast-status {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 2000;
    border-radius: 8px;
    padding: 8px 12px;
    color: #fff;
    font-weight: 600;
}

.toast-success {
    background: rgba(20, 120, 56, 0.95);
}

.toast-error {
    background: rgba(182, 42, 42, 0.95);
}

.window-card {
    position: absolute;
    border-radius: 10px;
    border: 1px solid #1f2b3a;
    background: #f7f8fb;
    box-shadow: 0 18px 35px rgba(7, 15, 32, 0.35);
    overflow: hidden;
    min-width: 280px;
}

.window-card.is-hidden .window-content {
    display: none;
}

.window-titlebar {
    user-select: none;
    cursor: move;
    background: linear-gradient(180deg, #1f3550 0%, #17293f 100%);
    color: #f2f6ff;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.window-actions {
    display: flex;
    gap: 6px;
}

.window-btn {
    width: 24px;
    height: 24px;
    border: 1px solid #4b6078;
    border-radius: 4px;
    background: #243a56;
    color: #f2f6ff;
    line-height: 1;
    cursor: pointer;
}

.window-btn:hover {
    background: #2d4c71;
}

.window-content {
    padding: 12px;
    background: #fdfdff;
}

.dock-bar {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    display: flex;
    justify-content: flex-end;
}

.dock-btn {
    border: 1px solid #7f93aa;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 8px;
    padding: 8px 12px;
    font-weight: 600;
}

.dock-btn:hover {
    background: #ffffff;
}

.invoice-totals {
    margin-left: auto;
    width: 240px;
    border: 1px solid #d9e0ea;
    border-radius: 8px;
    background: #f8fbff;
    padding: 8px 10px;
}

.totals-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}

.totals-grand {
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px solid #cbd8ea;
    font-size: 1.06rem;
}

.window-types-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-height: 118px;
    overflow: auto;
    padding: 4px;
    border: 1px solid #d5dfef;
    border-radius: 8px;
    background: #f7faff;
}

.type-pill {
    border: 1px solid #9db3cc;
    background: #ffffff;
    border-radius: 20px;
    padding: 4px 10px;
    font-size: 0.75rem;
}

.type-pill:hover {
    background: #e9f2ff;
}

.window-types-grid {
    display: grid;
    grid-template-columns: repeat(14, minmax(110px, 1fr));
    gap: 8px;
    max-height: 520px;
    overflow: auto;
    padding-right: 3px;
}

.type-card {
    border: 1px solid #d2deef;
    border-radius: 8px;
    padding: 6px;
    background: #ffffff;
}

.type-figure {
    height: 74px;
    border: 1px solid #889ab1;
    background: #a3b3c4;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.glass-shape {
    width: 68%;
    height: 80%;
    background: #6eeeff;
    border: 2px solid #427185;
    position: relative;
}

.glass-shape::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 44%, rgba(255, 255, 255, 0.7) 45%, transparent 48%);
}

.shape-1 {
    border-radius: 0 0 20px 0;
}

.shape-2 {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 85%);
}

.shape-3 {
    border-radius: 40% 40% 0 0;
}

.shape-4 {
    clip-path: polygon(0 15%, 100% 0, 100% 100%, 0 100%);
}

.shape-5 {
    border-radius: 50%;
}

.type-name {
    margin-top: 5px;
    font-size: 0.72rem;
    text-align: center;
    line-height: 1.2;
    min-height: 30px;
}

.config-tabs {
    border: 1px solid #d8e2f1;
    border-radius: 8px;
    background: #f9fbff;
}

.config-tab-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    padding: 4px;
    border-bottom: 1px solid #d8e2f1;
}

.config-tab-btn {
    border: 1px solid #2a2a2a;
    color: #fff;
    padding: 5px 10px;
    font-size: 0.78rem;
    cursor: pointer;
}

.config-tab-btn.is-active {
    box-shadow: inset 0 -2px 0 rgba(255, 255, 255, 0.7);
}

.c-red { background: #8f1111; }
.c-cyan { background: #067e9f; }
.c-green { background: #0f7b36; }
.c-blue { background: #0f3f8d; }
.c-blue2 { background: #073465; }
.c-dark { background: #121212; }
.c-olive { background: #5b6f16; }
.c-navy { background: #00396f; }
.c-red2 { background: #8f2e2e; }
.c-brown { background: #7b1e1e; }

.config-tab-panels {
    padding: 10px;
}

.config-panel {
    display: none;
}

.config-panel.is-active {
    display: block;
}

.photo-picker-btn {
    border: 1px solid #9aacbf;
    border-radius: 4px;
    background: #fff;
    padding: 2px;
    width: 42px;
    height: 30px;
}

.photo-picker-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.invoice-spec-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.invoice-spec-table {
    min-width: 920px;
}

.invoice-spec-table thead th {
    white-space: nowrap;
    font-size: 0.72rem;
    vertical-align: middle;
    background-color: #1e293b;
    color: #fff;
    border-color: #334155;
}

.invoice-spec-table td,
.invoice-spec-table th {
    vertical-align: middle;
}

.invoice-spec-table th:nth-child(1),
.invoice-spec-table td:nth-child(1) {
    width: 52px;
    min-width: 52px;
}

.invoice-spec-table th:nth-child(2),
.invoice-spec-table td:nth-child(2) {
    min-width: 140px;
}

.invoice-spec-table td:nth-child(2) .form-control {
    min-width: 130px;
}

.invoice-spec-table th:nth-child(3),
.invoice-spec-table td:nth-child(3),
.invoice-spec-table th:nth-child(4),
.invoice-spec-table td:nth-child(4),
.invoice-spec-table th:nth-child(5),
.invoice-spec-table td:nth-child(5),
.invoice-spec-table th:nth-child(6),
.invoice-spec-table td:nth-child(6),
.invoice-spec-table th:nth-child(7),
.invoice-spec-table td:nth-child(7),
.invoice-spec-table th:nth-child(8),
.invoice-spec-table td:nth-child(8) {
    min-width: 88px;
}

.invoice-spec-table th:nth-child(9),
.invoice-spec-table td:nth-child(9) {
    width: 42px;
    min-width: 42px;
}

.invoice-item-spec-row > td {
    padding: 0.35rem 0.5rem 0.65rem;
    background: #fff;
    border-top: none;
}

.invoice-spec-chars-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.invoice-spec-chars-table {
    min-width: 480px;
}

.invoice-spec-chars-table thead th {
    white-space: nowrap;
    font-size: 0.72rem;
    vertical-align: middle;
    background-color: #1e293b;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.08);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.55rem 0.65rem;
}

.invoice-spec-chars-table tbody td,
.invoice-spec-chars-table tfoot td {
    vertical-align: middle;
    padding: 0.35rem 0.55rem;
}

.invoice-spec-chars-table tbody td:first-child {
    min-width: 200px;
}

.invoice-spec-chars-table .form-select {
    font-size: 0.78rem;
    min-height: 2rem;
}

.help-manual-page .help-manual-body {
    max-width: 52rem;
    line-height: 1.65;
    font-size: 0.95rem;
}

.help-manual-body h1,
.help-manual-body h2,
.help-manual-body h3,
.help-manual-body h4 {
    margin-top: 1.75rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.help-manual-body h1 { font-size: 1.75rem; }
.help-manual-body h2 { font-size: 1.35rem; border-bottom: 1px solid #dee2e6; padding-bottom: 0.35rem; }
.help-manual-body h3 { font-size: 1.1rem; }

.help-manual-body p,
.help-manual-body ul,
.help-manual-body ol {
    margin-bottom: 1rem;
}

.help-manual-body ul,
.help-manual-body ol {
    padding-left: 1.5rem;
}

.help-manual-body li {
    margin-bottom: 0.35rem;
}

.help-manual-body table {
    width: 100%;
    margin-bottom: 1.25rem;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.help-manual-body th,
.help-manual-body td {
    border: 1px solid #dee2e6;
    padding: 0.5rem 0.75rem;
    vertical-align: top;
}

.help-manual-body th {
    background: #151829;
    color: #fff;
    font-weight: 600;
}

.help-manual-body code {
    background: #f1f3f5;
    padding: 0.1rem 0.35rem;
    border-radius: 0.2rem;
    font-size: 0.88em;
}

.help-manual-body hr {
    margin: 2rem 0;
}

.window-picker-cat-btn.is-active {
    background: #0d6efd;
    color: #fff;
    border-color: #0d6efd;
}

.window-picker-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.window-picker-content {
    width: min(1100px, 95vw);
    max-height: 82vh;
    overflow: auto;
    background: #fdfdff;
    border-radius: 10px;
    border: 1px solid #ced9ea;
    padding: 10px;
}

.window-picker-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(120px, 1fr));
    gap: 8px;
}

.window-picker-item {
    border: 1px solid #c5d3e8;
    border-radius: 8px;
    background: #fff;
    padding: 6px;
    text-align: left;
}

.window-picker-item img {
    width: 100%;
    height: 76px;
    object-fit: contain;
    background: #f5f8fc;
    border: 1px solid #d2deef;
}

.window-picker-item span {
    display: block;
    font-size: 0.78rem;
    margin-top: 4px;
    line-height: 1.2;
}

.window-picker-item small {
    color: #1d5c95;
}

/* ——— Forma Blerjet (përafërt me Abacus frmEntryBarcode: Guna #0d1c2f) ——— */
.blerjet-page {
    --blerjet-bg: #0a1624;
    --blerjet-panel: #0d1c2f;
    --blerjet-border: rgba(255, 255, 255, 0.22);
    --blerjet-label: #e2e8f0;
    --blerjet-muted: #94a3b8;
    --blerjet-input-bg: #ffffff;
    --blerjet-accent: #3b82f6;
    --blerjet-grid-head: #4a5568;
    flex: 1;
    background: var(--blerjet-bg);
    color: var(--blerjet-label);
    padding: 12px 16px 20px;
    min-height: calc(100vh - 52px);
}

.blerjet-page a {
    color: #93c5fd;
}

.blerjet-page a:hover {
    color: #bfdbfe;
}

.blerjet-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.blerjet-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: #fff;
}

.blerjet-brand-home {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--blerjet-border);
    color: #fff;
    text-decoration: none;
}

.blerjet-brand-home:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

.blerjet-title {
    flex: 1;
    text-align: center;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #fff;
    margin: 0;
}

.blerjet-toolbar {
    background: var(--blerjet-panel);
    border: 1px solid var(--blerjet-border);
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 10px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
}

.blerjet-seg {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
}

.blerjet-seg-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--blerjet-muted);
    width: 100%;
}

.blerjet-radio-row {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    align-items: center;
}

.blerjet-radio {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 0.88rem;
    color: var(--blerjet-label);
    margin: 0;
}

.blerjet-radio input {
    accent-color: var(--blerjet-accent);
}

.blerjet-discount-box {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.blerjet-discount-box input[type="text"] {
    width: 56px;
    height: 30px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    text-align: center;
    font-size: 0.85rem;
}

.blerjet-btn-amber {
    background: linear-gradient(180deg, #f59e0b, #d97706);
    border: 1px solid #b45309;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
}

.blerjet-btn-amber:hover {
    filter: brightness(1.06);
}

.blerjet-form-panel {
    background: var(--blerjet-panel);
    border: 1px solid var(--blerjet-border);
    border-radius: 10px;
    padding: 14px 14px 12px;
    margin-bottom: 10px;
}

.blerjet-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.blerjet-field label {
    font-size: 0.78rem;
    color: var(--blerjet-muted);
    margin: 0;
}

.blerjet-input,
.blerjet-page .blerjet-form-panel .form-select,
.blerjet-page .blerjet-form-panel .form-control {
    background: var(--blerjet-input-bg);
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.9rem;
    color: #0f172a;
}

.blerjet-page .text-danger {
    color: #fca5a5 !important;
}

.blerjet-legend {
    font-size: 0.72rem;
    color: var(--blerjet-muted);
    line-height: 1.35;
    margin-top: 6px;
}

.blerjet-supplier-wrap {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.blerjet-supplier-wrap .form-select {
    flex: 1;
}

.blerjet-icon-btn {
    width: 38px;
    min-width: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    border: 1px solid var(--blerjet-border);
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
    text-decoration: none;
    cursor: pointer;
    padding: 0;
}

.blerjet-icon-btn:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

.blerjet-icon-btn--add {
    background: rgba(234, 88, 12, 0.35);
    border-color: rgba(234, 88, 12, 0.6);
    color: #ffedd5;
}

.blerjet-icon-btn--add:hover {
    background: rgba(234, 88, 12, 0.5);
    color: #fff;
}

.blerjet-actions-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 10px 0 8px;
}

.blerjet-pill {
    min-width: 36px;
    height: 32px;
    padding: 0 10px;
    border-radius: 6px;
    border: 1px solid var(--blerjet-border);
    background: rgba(255, 255, 255, 0.06);
    color: var(--blerjet-label);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
}

.blerjet-pill:hover {
    background: rgba(255, 255, 255, 0.12);
}

.blerjet-barcode {
    width: 100%;
    height: 38px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    padding: 0 12px;
    font-size: 0.95rem;
    color: #0f172a;
    background: #fff;
}

.blerjet-summary {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 10px;
}

@media (max-width: 992px) {
    .blerjet-summary {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 576px) {
    .blerjet-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.blerjet-sum-cell {
    background: #0d1c2f;
    border: 1px solid #fff;
    border-radius: 4px;
    padding: 10px 10px 8px;
    text-align: center;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2);
}

.blerjet-sum-cell .lbl {
    display: block;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 6px;
    font-weight: 600;
}

.blerjet-sum-cell .val {
    font-size: 1.08rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: #fff;
}

/* Butona Barkod / Kërko si Guna2 (kufi i bardhë, transparencë) */
.blerjet-guna-btn {
    min-height: 34px;
    padding: 6px 14px;
    border-radius: 4px;
    border: 1px solid #fff;
    background: transparent;
    color: #fff;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
}

.blerjet-guna-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.blerjet-guna-btn:focus-visible {
    outline: 2px solid #93c5fd;
    outline-offset: 2px;
}

.blerjet-grid-wrap {
    border: 1px solid var(--blerjet-border);
    border-radius: 10px;
    overflow: hidden;
    background: #0d1c2f;
    margin-bottom: 12px;
}

.blerjet-grid-wrap .table {
    margin: 0;
    color: var(--blerjet-label);
    --bs-table-bg: transparent;
    --bs-table-color: var(--blerjet-label);
}

.blerjet-grid-wrap thead th {
    background: var(--blerjet-grid-head) !important;
    color: #f1f5f9 !important;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-color: rgba(0, 0, 0, 0.35) !important;
    padding: 10px 8px;
    white-space: nowrap;
}

.blerjet-grid-wrap tbody td {
    border-color: var(--blerjet-border);
    vertical-align: middle;
    padding: 6px 8px;
    background: rgba(15, 23, 42, 0.5);
}

.blerjet-grid-wrap .form-select,
.blerjet-grid-wrap .form-control {
    background: #fff;
    border-color: #cbd5e1;
    color: #0f172a;
    font-size: 0.85rem;
}

.blerjet-grid-wrap tfoot td {
    background: rgba(30, 41, 59, 0.9);
    border-color: var(--blerjet-border);
    color: #fff;
    font-weight: 600;
}

.blerjet-grid-wrap .table-blerjet-lines tbody tr:nth-child(even) td {
    background: rgba(30, 41, 59, 0.45);
}

.blerjet-grid-wrap .table-blerjet-lines .line-col-nr {
    width: 2.2rem;
}

.blerjet-grid-wrap .table-blerjet-lines .line-col-b {
    min-width: 5.5rem;
}

.blerjet-grid-wrap .table-blerjet-lines .line-col-art {
    min-width: 12rem;
}

.blerjet-grid-wrap .table-blerjet-lines .line-total {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.blerjet-footer-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 10px;
    align-items: center;
    padding: 12px 0 8px;
    border-top: 1px solid var(--blerjet-border);
}

.blerjet-foot-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid var(--blerjet-border);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}

.blerjet-foot-btn:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

.blerjet-foot-btn svg {
    flex-shrink: 0;
    opacity: 0.9;
}

.blerjet-foot-btn--primary {
    background: rgba(37, 99, 235, 0.45);
    border-color: rgba(59, 130, 246, 0.6);
}

.blerjet-foot-btn--primary:hover {
    background: rgba(37, 99, 235, 0.6);
}

.blerjet-foot-btn--danger {
    background: rgba(220, 38, 38, 0.25);
    border-color: rgba(248, 113, 113, 0.45);
}

.blerjet-foot-btn--danger:hover {
    background: rgba(220, 38, 38, 0.4);
}

.blerjet-shortcuts {
    margin-top: 10px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--blerjet-border);
    border-radius: 8px;
    font-size: 0.72rem;
    color: var(--blerjet-muted);
    line-height: 1.65;
}

.blerjet-shortcuts kbd {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--blerjet-border);
    color: #e2e8f0;
    font-size: 0.68rem;
    font-family: inherit;
}

.blerjet-pdf-details {
    margin-bottom: 12px;
    border: 1px dashed var(--blerjet-border);
    border-radius: 8px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.2);
}

.blerjet-pdf-details summary {
    cursor: pointer;
    color: var(--blerjet-muted);
    font-size: 0.85rem;
}

.blerjet-pdf-details[open] summary {
    margin-bottom: 8px;
}

/* ——— Paneli i inxhinierit: pipeline 7-hapësh (si diagrami «NDRYSHO») ——— */
.engineer-process-pipeline {
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.25rem 1rem 1rem;
    margin-bottom: 1.5rem;
}

.engineer-process-pipeline__track {
    display: flex;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0.25rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
}

.process-step-card {
    flex: 1 1 0;
    min-width: 118px;
    max-width: 160px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0.85rem 0.5rem 0.65rem;
    border-radius: 14px;
    border: 3px solid var(--step-border, #cbd5e1);
    background: #fff;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
    color: #1e293b;
    scroll-snap-align: start;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.process-step-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.1);
}

.process-step-card--1 { --step-border: #2563eb; --step-accent: #2563eb; }
.process-step-card--2 { --step-border: #16a34a; --step-accent: #16a34a; }
.process-step-card--3 { --step-border: #ca8a04; --step-accent: #ca8a04; }
.process-step-card--4 { --step-border: #9333ea; --step-accent: #9333ea; }
.process-step-card--5 { --step-border: #0d9488; --step-accent: #0d9488; }
.process-step-card--6 { --step-border: #ea580c; --step-accent: #ea580c; }
.process-step-card--7 { --step-border: #38bdf8; --step-accent: #0284c7; }

.process-step-card__badge {
    width: 1.85rem;
    height: 1.85rem;
    border-radius: 50%;
    background: var(--step-accent, #64748b);
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
    line-height: 1;
}

.process-step-card__icon {
    color: var(--step-accent, #64748b);
    margin-bottom: 0.45rem;
}

.process-step-svg {
    width: 52px;
    height: 52px;
    display: block;
}

.process-step-card__title {
    font-weight: 600;
    font-size: 0.78rem;
    line-height: 1.25;
    margin-bottom: 0.35rem;
    hyphens: auto;
}

.process-step-card__meta {
    margin-top: auto;
}

.process-step-card__count {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.06);
    color: #475569;
}

.process-step-card__responsible {
    font-size: 0.65rem;
    color: #64748b;
    line-height: 1.2;
    margin-top: 0.35rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.process-step-arrow {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    color: #94a3b8;
    padding: 0 0.1rem;
    align-self: center;
}

.engineer-process-loop {
    text-align: center;
    padding-top: 0.35rem;
    border-top: 1px dashed #cbd5e1;
}

.engineer-process-loop__label {
    font-style: italic;
}

@media (max-width: 991.98px) {
    .process-step-card {
        min-width: 108px;
    }

    .process-step-svg {
        width: 44px;
        height: 44px;
    }
}

/* Inxhinieri: karta për fatura / oferta (pamje katrore) */
.engineer-doc-card {
    min-height: 11.5rem;
    border-radius: 0.5rem;
}

.engineer-documents-page .engineer-doc-card .card-body {
    min-height: 10rem;
}

/* Background i kartës sipas statusit të prodhimit (i përputhur me badge-in) */
.engineer-doc-card.engineer-doc-card--tone-success {
    background-color: rgba(var(--bs-success-rgb), 0.14);
    border-color: rgba(var(--bs-success-rgb), 0.42);
}

.engineer-doc-card.engineer-doc-card--tone-primary {
    background-color: rgba(var(--bs-primary-rgb), 0.11);
    border-color: rgba(var(--bs-primary-rgb), 0.38);
}

.engineer-doc-card.engineer-doc-card--tone-info {
    background-color: rgba(var(--bs-info-rgb), 0.13);
    border-color: rgba(var(--bs-info-rgb), 0.4);
}

.engineer-doc-card.engineer-doc-card--tone-warning {
    background-color: rgba(var(--bs-warning-rgb), 0.18);
    border-color: rgba(var(--bs-warning-rgb), 0.5);
}

.engineer-doc-card.engineer-doc-card--tone-secondary {
    background-color: rgba(var(--bs-secondary-rgb), 0.08);
    border-color: rgba(var(--bs-secondary-rgb), 0.28);
}

.engineer-doc-card.engineer-doc-card--tone-prep {
    background-color: rgba(253, 248, 237, 1);
    border-color: rgba(201, 162, 39, 0.45);
}

.engineer-doc-days {
    display: inline-block;
    align-self: flex-start;
    margin-bottom: 0.65rem;
    padding: 0.25rem 0.6rem;
    font-size: 0.72rem;
    font-weight: 650;
    border-radius: 999px;
    letter-spacing: 0.01em;
}

.engineer-doc-days--ok {
    background: rgba(22, 163, 74, 0.12);
    color: #15803d;
}

.engineer-doc-days--soon {
    background: rgba(245, 158, 11, 0.15);
    color: #b45309;
}

.engineer-doc-days--overdue {
    background: rgba(220, 38, 38, 0.12);
    color: #b91c1c;
}

.engineer-doc-days--none {
    background: rgba(100, 116, 139, 0.12);
    color: #64748b;
}

.pwa-install-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1080;
    padding: 0.75rem;
    pointer-events: none;
}

.pwa-install-banner-inner {
    pointer-events: auto;
    max-width: 42rem;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 1rem;
    border-radius: 0.75rem;
    background: #fff;
    border: 1px solid rgba(28, 43, 77, 0.12);
    box-shadow: 0 8px 28px rgba(28, 43, 77, 0.18);
}

@media (max-width: 575.98px) {
    .pwa-install-banner-inner {
        flex-direction: column;
        align-items: stretch;
    }
}