/* ==========================================================================
   Dropshop dashboard — new design (ported from the Tawasi design B frame)
   Brand: Dropshop Logo & Brand Identity Guidelines (Sep 2022)
     primary   green  #3A6547, orange #FF9501, white
     secondary sky    #34C6F4, grey   #E8E8E8
     typeface  Bahij TheSansArabic
   Plain CSS, no build step. Loaded after the old theme so it wins.
   Everything new is prefixed `tx-` (same names as the Tawasi dashboard, so
   page redesigns can move between the two). The "Shared parts" section
   restyles the old Bootstrap pieces inside the content area.
   ========================================================================== */

@font-face { font-family: 'Bahij TheSansArabic'; font-weight: 300; font-style: normal; font-display: swap; src: url('fonts/bahij-300.woff') format('woff'); }
@font-face { font-family: 'Bahij TheSansArabic'; font-weight: 400; font-style: normal; font-display: swap; src: url('fonts/bahij-400.woff') format('woff'); }
@font-face { font-family: 'Bahij TheSansArabic'; font-weight: 500; font-style: normal; font-display: swap; src: url('fonts/bahij-400.woff') format('woff'); }
@font-face { font-family: 'Bahij TheSansArabic'; font-weight: 600; font-style: normal; font-display: swap; src: url('fonts/bahij-600.woff') format('woff'); }
@font-face { font-family: 'Bahij TheSansArabic'; font-weight: 700; font-style: normal; font-display: swap; src: url('fonts/bahij-700.woff') format('woff'); }
@font-face { font-family: 'Bahij TheSansArabic'; font-weight: 800; font-style: normal; font-display: swap; src: url('fonts/bahij-800.woff') format('woff'); }

:root {
    /* Brand */
    --ds-green: #3A6547;
    --ds-green-dark: #2C4E37;    /* hover on green */
    --ds-green-deep: #1F3A28;    /* green text on light backgrounds */
    --ds-green-soft: #E3EDE6;
    --ds-orange: #FF9501;
    --ds-orange-dark: #E68400;
    --ds-orange-ink: #8A4B00;    /* orange text on light backgrounds (AA) */
    --ds-orange-soft: #FFEBCC;
    --ds-sky: #34C6F4;
    --ds-sky-ink: #0B5E78;
    --ds-sky-soft: #DDF4FC;
    --ds-grey: #E8E8E8;

    /* The shared tx- names the frame uses, mapped to the Dropshop brand. */
    --tx-teal: var(--ds-green);          /* main brand fill (menu, primary buttons) */
    --tx-teal-ink: var(--ds-green-deep);
    --tx-teal-deep: #D7E6DB;             /* small text on the green menu */
    --tx-teal-soft: var(--ds-green-soft);
    --tx-black: #1E1E1E;
    --tx-cream: #FAFAF7;
    --tx-orange: #C8361F;                /* danger (red); brand orange is --ds-orange */
    --tx-orange-ink: #9E2A17;
    --tx-orange-soft: #FBE2DD;
    --tx-yellow: var(--ds-orange);       /* highlights: badges, avatar, active item */
    --tx-yellow-soft: var(--ds-orange-soft);
    --tx-green-ink: var(--ds-green-deep);
    --tx-green-soft: var(--ds-green-soft);

    --tx-bg: #F3F4F2;
    --tx-surface: #FFFFFF;
    --tx-line: var(--ds-grey);
    --tx-line-strong: #D2D4D0;
    --tx-text: #1E1E1E;
    --tx-muted: #555B57;
    --tx-faint: #676D69;

    --tx-radius-sm: 10px;
    --tx-radius: 14px;
    --tx-radius-lg: 20px;
    --tx-pill: 999px;
    --tx-shadow: 0 1px 2px rgba(30, 30, 30, .04), 0 4px 16px rgba(30, 30, 30, .05);

    --tx-font: 'Bahij TheSansArabic', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
    --tx-num: 'Bahij TheSansArabic', system-ui, sans-serif;
    --tx-side-w: 272px;
}

/* ---------- Base ---------- */
/* The old theme forces left-to-right on html/body; follow the page language instead. */
html.tx-html[dir="rtl"], html.tx-html[dir="rtl"] body { direction: rtl; }
html.tx-html[dir="ltr"], html.tx-html[dir="ltr"] body { direction: ltr; }

html.tx-html, body.tx-body {
    background: var(--tx-bg);
}
body.tx-body {
    margin: 0;
    overflow-x: clip; /* nothing off-screen (e.g. the hidden notifications panel in Arabic) can make the page scroll sideways */
    font-family: var(--tx-font);
    font-size: 14.5px;
    color: var(--tx-text);
    -webkit-font-smoothing: antialiased;
}
body.tx-body h1, body.tx-body h2, body.tx-body h3, body.tx-body h4, body.tx-body h5, body.tx-body h6,
body.tx-body .h1, body.tx-body .h2, body.tx-body .h3, body.tx-body .h4, body.tx-body .h5, body.tx-body .h6,
body.tx-body button, body.tx-body input, body.tx-body select, body.tx-body textarea, body.tx-body table {
    font-family: var(--tx-font);
}
.tx-num { font-family: var(--tx-num); font-variant-numeric: tabular-nums; }
.tx-icon { flex: none; display: inline-block; vertical-align: middle; }
.tx-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Shell ---------- */
.tx-shell { display: flex; min-height: 100vh; align-items: stretch; }
.tx-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.tx-content { padding: 24px 28px 40px; flex: 1 1 auto; min-width: 0; }

/* ---------- Sidebar (Dropshop green, white text) ---------- */
.tx-side {
    width: var(--tx-side-w);
    flex: none;
    box-sizing: border-box;
    background: var(--ds-green);
    color: #FFFFFF;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    padding: 20px 14px 28px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    z-index: 1040;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, .3) transparent;
}
.tx-side > * { flex-shrink: 0; }
.tx-side__brand {
    display: flex; align-items: center; justify-content: center; padding: 6px 8px 4px; text-decoration: none;
}
.tx-side__brand img { height: 52px; width: auto; display: block; }
.tx-iconbtn.tx-side__close { display: none; }

.tx-side__shop {
    display: flex; align-items: center; gap: 12px;
    background: rgba(255, 255, 255, .12); border-radius: var(--tx-radius); padding: 10px 12px;
}
.tx-side__shop-logo {
    width: 44px; height: 44px; border-radius: 22px; flex: none; object-fit: cover; background: #FFFFFF; color: var(--ds-green);
    display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 18px;
}
.tx-side__shop-name { font-weight: 700; font-size: 15px; line-height: 1.3; color: #FFFFFF; }
.tx-side__shop-branch { font-size: 12.5px; color: var(--tx-teal-deep); font-weight: 600; }

.tx-find {
    display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px; margin: 0;
    background: rgba(255, 255, 255, .14); border-radius: var(--tx-pill); color: var(--tx-teal-deep);
}
.tx-find input {
    border: none; background: transparent; outline: none; width: 100%;
    font: inherit; font-size: 13.5px; color: #FFFFFF;
}
.tx-find input::placeholder { color: var(--tx-teal-deep); opacity: 1; }
.tx-find:focus-within { background: #FFFFFF; color: var(--ds-green); box-shadow: 0 0 0 2px var(--ds-orange); }
.tx-find:focus-within input { color: var(--tx-black); }
.tx-find:focus-within input::placeholder { color: var(--tx-muted); }

.tx-nav { display: flex; flex-direction: column; gap: 14px; margin: 0; padding: 0; }
.tx-nav__section { display: flex; flex-direction: column; gap: 2px; }
.tx-nav__title {
    font-size: 12px; font-weight: 700; color: var(--tx-teal-deep);
    padding: 0 14px 4px; margin: 0; letter-spacing: 0;
}
.tx-nav__link {
    display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 14px;
    border-radius: var(--tx-pill); color: #FFFFFF; text-decoration: none;
    font-size: 14.5px; font-weight: 600; cursor: pointer; list-style: none; user-select: none;
}
.tx-nav__link::-webkit-details-marker { display: none; }
.tx-nav__link:hover, .tx-nav__link:focus-visible { background: rgba(255, 255, 255, .12); color: #FFFFFF; text-decoration: none; }
.tx-nav__link.is-active { background: var(--ds-orange); color: var(--tx-black); }
.tx-nav__link.is-active .tx-nav__chev { color: var(--tx-black); }
.tx-nav__label { flex: 1 1 auto; min-width: 0; }
.tx-nav__chev { transition: transform .15s ease; }
.tx-nav__group[open] > .tx-nav__link .tx-nav__chev { transform: rotate(180deg); }
.tx-nav__sub {
    display: flex; flex-direction: column; gap: 2px; padding: 6px; margin: 4px 0 2px;
    background: rgba(0, 0, 0, .14); border-radius: 18px;
}
.tx-nav__sublink {
    display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 14px;
    border-radius: var(--tx-pill); color: #F1F6F2; text-decoration: none; font-size: 13.5px; font-weight: 500;
}
.tx-nav__sublink:hover, .tx-nav__sublink:focus-visible { background: rgba(255, 255, 255, .12); color: #FFFFFF; text-decoration: none; }
.tx-nav__sublink.is-active { background: #FFFFFF; color: var(--ds-green-deep); font-weight: 700; }
.tx-nav__badge {
    min-width: 22px; height: 22px; padding: 0 6px; box-sizing: border-box; border-radius: 11px;
    background: var(--ds-orange); color: var(--tx-black); font-size: 12px; font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center;
}
.tx-nav__empty { display: none; padding: 8px 14px; font-size: 13px; color: var(--tx-teal-deep); }
.tx-nav.is-filtering .tx-nav__title { display: none; }
.tx-nav [hidden] { display: none !important; }

/* Old dev-only menus (crud/trash) rendered inside a group */
.tx-nav__sub .slide-item {
    display: flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: var(--tx-pill);
    color: #F1F6F2; font-size: 13px; text-decoration: none;
}
.tx-nav__sub .slide-item:hover { background: rgba(255, 255, 255, .12); color: #FFFFFF; }
.tx-nav__sub ul, ul.tx-nav__sub { list-style: none; margin: 0; padding: 6px; }

/* DEMO marker in the top bar (demo site only) */
.tx-demo {
    display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border-radius: var(--tx-pill);
    background: #C8361F; color: #FFFFFF; font-weight: 800; letter-spacing: 1px; font-size: 13px;
}

/* ---------- Top bar ---------- */
.tx-topbar {
    position: sticky; top: 0; z-index: 1030;
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
    padding: 12px 28px; background: var(--tx-surface); border-bottom: 1px solid var(--tx-line);
    min-height: 72px; box-sizing: border-box;
}
.tx-topbar__start { display: flex; align-items: center; gap: 12px; min-width: 0; }
.tx-topbar__title { margin: 0; font-size: 20px; font-weight: 800; line-height: 1.3; color: var(--tx-black); }
.tx-crumb { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--tx-muted); min-width: 0; }
.tx-crumb__group { white-space: nowrap; }
.tx-crumb__page { font-weight: 800; color: var(--tx-black); font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-topbar__end { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tx-menu-btn { display: none !important; }

.tx-iconbtn {
    width: 42px; height: 42px; border-radius: var(--tx-pill); border: none; padding: 0;
    background: #F1F0EC; color: #2B2B2B; cursor: pointer; position: relative;
    display: inline-flex; align-items: center; justify-content: center; text-decoration: none; flex: none;
}
.tx-iconbtn:hover, .tx-iconbtn:focus-visible { background: #E6E4DE; color: var(--tx-black); text-decoration: none; }
.tx-iconbtn--text { width: auto; padding: 0 14px; gap: 8px; font: inherit; font-size: 13.5px; font-weight: 700; }
.tx-iconbtn__dot {
    position: absolute; top: 4px; inset-inline-end: 2px; min-width: 18px; height: 18px; padding: 0 5px; box-sizing: border-box;
    border-radius: 9px; background: var(--ds-orange); color: var(--tx-black); font-size: 11px; font-weight: 800;
    display: inline-flex; align-items: center; justify-content: center; border: 2px solid #FFFFFF; line-height: 1;
}
.tx-iconbtn__dot.is-zero { display: none; }

.tx-chip-link {
    display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 14px; border-radius: var(--tx-pill);
    background: var(--tx-yellow-soft); color: var(--tx-black); text-decoration: none; font-size: 13.5px; font-weight: 700;
}
.tx-chip-link:hover { background: #FFEAB0; color: var(--tx-black); text-decoration: none; }

.tx-user {
    display: inline-flex; align-items: center; gap: 10px; height: 46px; padding: 4px; padding-inline-end: 14px;
    background: #F1F0EC; border-radius: var(--tx-pill); border: none; cursor: pointer; font: inherit; color: var(--tx-black);
    text-decoration: none;
}
.tx-user:hover { background: #E6E4DE; color: var(--tx-black); text-decoration: none; }
.tx-user__avatar {
    width: 38px; height: 38px; border-radius: 19px; background: var(--tx-yellow);
    display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 16px;
}
.tx-user__text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.25; }
.tx-user__name { font-size: 14px; font-weight: 700; white-space: nowrap; }
.tx-user__role { font-size: 12px; color: var(--tx-muted); }

/* Dropdowns from the top bar (Bootstrap's JS, our look) */
.tx-topbar .dropdown-menu {
    border: 1px solid var(--tx-line); border-radius: var(--tx-radius); box-shadow: var(--tx-shadow);
    padding: 6px; min-width: 220px; font-size: 14px;
}
.tx-topbar .dropdown-item {
    display: flex; align-items: center; gap: 10px; border-radius: var(--tx-radius-sm);
    min-height: 40px; padding: 0 12px; color: var(--tx-black); text-align: start;
}
.tx-topbar .dropdown-item:hover, .tx-topbar .dropdown-item:focus { background: var(--tx-bg); color: var(--tx-black); }
.tx-topbar .dropdown-header { font-size: 12.5px; color: var(--tx-muted); padding: 8px 12px 4px; text-align: start; }
.tx-topbar .dropdown-divider { margin: 6px 0; border-color: var(--tx-line); }
[dir="rtl"] .tx-topbar .dropdown-menu-right { right: auto; left: 0; }

.tx-iconbtn--brand { background: var(--ds-orange); color: var(--tx-black); }
.tx-iconbtn--brand:hover, .tx-iconbtn--brand:focus-visible { background: var(--ds-orange-dark); color: var(--tx-black); }
.tx-iconbtn .fe { font-size: 17px; line-height: 1; }
#global-scan-mode-btn.text-primary { background: var(--ds-green-soft); color: var(--ds-green-deep) !important; }

/* Pages not in the menu keep their old title + breadcrumb, shown compactly in the bar */
.tx-oldcrumb { display: flex; align-items: center; gap: 12px; min-width: 0; }
.tx-oldcrumb .page-title { margin: 0; font-size: 18px; font-weight: 800; color: var(--tx-black); white-space: nowrap; }
.tx-oldcrumb .breadcrumb { margin: 0; padding: 0; background: transparent; font-size: 13px; }
.tx-oldcrumb .breadcrumb a { color: var(--tx-muted); }

/* ---------- Page header (inside content) ---------- */
.tx-page-head {
    display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px;
}
.tx-page-head__id { display: flex; align-items: center; gap: 14px; min-width: 0; }
.tx-page-head__icon {
    width: 56px; height: 56px; border-radius: 18px; background: var(--ds-green); color: #FFFFFF;
    display: inline-flex; align-items: center; justify-content: center; flex: none;
}
.tx-page-head__title { margin: 0; font-size: 26px; font-weight: 800; line-height: 1.25; color: var(--tx-black); }
.tx-page-head__sub { margin: 2px 0 0; font-size: 14px; color: var(--tx-muted); }
.tx-page-head__actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* ---------- Components ---------- */
.tx-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 46px; padding: 0 20px; border-radius: var(--tx-pill); border: none; cursor: pointer;
    font: inherit; font-size: 14.5px; font-weight: 700; text-decoration: none; white-space: nowrap;
    background: var(--tx-black); color: #FFFFFF;
}
.tx-btn:hover, .tx-btn:focus-visible { background: #2E2E2E; color: #FFFFFF; text-decoration: none; }
.tx-btn--teal { background: var(--ds-green); color: #FFFFFF; }
.tx-btn--teal:hover, .tx-btn--teal:focus-visible { background: var(--ds-green-dark); color: #FFFFFF; }
.tx-btn--light { background: var(--tx-surface); color: var(--tx-black); box-shadow: inset 0 0 0 1px var(--tx-line-strong); }
.tx-btn--light:hover, .tx-btn--light:focus-visible { background: #F1F0EC; color: var(--tx-black); }
.tx-btn--danger { background: var(--tx-orange); color: #FFFFFF; }
.tx-btn--danger:hover { background: var(--tx-orange-ink); color: #FFFFFF; }
.tx-btn--sm { height: 38px; padding: 0 14px; font-size: 13.5px; }
.tx-btn:disabled, .tx-btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }

.tx-tabs {
    display: inline-flex; flex-wrap: wrap; gap: 6px; padding: 6px; background: var(--tx-surface);
    border-radius: 16px; margin-bottom: 18px; max-width: 100%; box-sizing: border-box;
}
.tx-tab {
    display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px; border-radius: 12px;
    text-decoration: none; color: #555; font-size: 14px; font-weight: 600; white-space: nowrap;
}
.tx-tab:hover, .tx-tab:focus-visible { background: #EFEDE8; color: var(--tx-black); text-decoration: none; }
.tx-tab.is-active { background: var(--ds-green); color: #FFFFFF; }

.tx-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.tx-toolbar__spacer { flex: 1 1 auto; }

.tx-field {
    display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px; box-sizing: border-box;
    background: var(--tx-surface); border-radius: var(--tx-pill); color: var(--tx-muted);
    box-shadow: inset 0 0 0 1px var(--tx-line);
}
.tx-field:focus-within { box-shadow: inset 0 0 0 2px var(--tx-black); }
.tx-field input, .tx-field select {
    border: none !important; background: transparent !important; outline: none; box-shadow: none !important;
    font: inherit; font-size: 13.5px; color: var(--tx-black); width: 100%; height: 40px; padding: 0 !important; min-width: 0;
}
.tx-field--search { width: 260px; max-width: 100%; }
.tx-field--select { width: auto; }
.tx-field--select select { width: auto; cursor: pointer; }

.tx-chip {
    display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px; border-radius: var(--tx-pill);
    background: var(--tx-teal-soft); color: var(--ds-green-deep); font-size: 14px; font-weight: 600; white-space: nowrap;
}
.tx-tag {
    display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: var(--tx-pill);
    background: var(--tx-bg); font-size: 12.5px; font-weight: 600; color: var(--tx-muted); white-space: nowrap;
}
.tx-tag--teal { background: var(--tx-teal-soft); color: var(--ds-green-deep); }
.tx-tag--yellow { background: var(--tx-yellow-soft); color: var(--ds-orange-ink); }
.tx-tag--orange { background: var(--tx-orange-soft); color: var(--tx-orange-ink); }
.tx-tag--green { background: var(--tx-green-soft); color: var(--tx-green-ink); }

.tx-card { background: var(--tx-surface); border-radius: var(--tx-radius-lg); box-shadow: var(--tx-shadow); }
.tx-card__body { padding: 20px; }

/* Row list (design B tables) */
.tx-rows { overflow-x: auto; padding: 2px; }
.tx-rows__inner { display: flex; flex-direction: column; gap: 8px; min-width: 760px; }
.tx-row {
    display: grid; align-items: center; gap: 16px; padding: 12px 18px;
    background: var(--tx-surface); border-radius: 16px;
}
.tx-row:hover { box-shadow: 0 0 0 2px var(--tx-teal); }
.tx-row--head { background: transparent; padding-top: 0; padding-bottom: 0; font-size: 13px; font-weight: 700; color: var(--tx-muted); }
.tx-row--head:hover { box-shadow: none; }
.tx-row__name { display: flex; align-items: center; gap: 12px; min-width: 0; }
.tx-row__index {
    width: 34px; height: 34px; border-radius: 17px; background: var(--tx-bg); flex: none;
    display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; color: var(--tx-muted);
}
.tx-row__main { font-size: 15px; font-weight: 700; line-height: 1.35; }
.tx-row__sub { font-size: 12.5px; color: var(--tx-muted); line-height: 1.35; }
.tx-row__actions { display: flex; gap: 6px; justify-content: flex-end; }
.tx-price { font-family: var(--tx-num); font-variant-numeric: tabular-nums; font-size: 19px; font-weight: 700; white-space: nowrap; }
.tx-price small { font-family: var(--tx-font); font-size: 12.5px; font-weight: 600; color: var(--tx-muted); }
.tx-price--old { font-size: 13px; color: var(--tx-faint); text-decoration: line-through; font-weight: 500; }

.tx-act {
    width: 40px; height: 40px; border-radius: var(--tx-pill); border: none; padding: 0; cursor: pointer;
    background: #F1F0EC; color: #2B2B2B; display: inline-flex; align-items: center; justify-content: center;
}
.tx-act:hover, .tx-act:focus-visible { background: #E6E4DE; color: var(--tx-black); }
.tx-act--danger:hover, .tx-act--danger:focus-visible { background: var(--tx-orange-soft); color: var(--tx-orange-ink); }

.tx-empty {
    text-align: center; padding: 48px 20px; background: var(--tx-surface); border-radius: var(--tx-radius-lg);
    color: var(--tx-muted);
}
.tx-empty__icon {
    width: 64px; height: 64px; border-radius: 32px; background: var(--tx-yellow-soft); color: var(--tx-black);
    display: inline-flex; align-items: center; justify-content: center; margin-bottom: 12px;
}
.tx-empty__title { font-size: 17px; font-weight: 800; color: var(--tx-black); margin: 0 0 4px; }

.tx-pager { display: flex; justify-content: center; margin-top: 18px; }

.tx-check { width: 18px; height: 18px; accent-color: var(--tx-teal-ink); cursor: pointer; }

.tx-bulkbar {
    display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 14px; margin-bottom: 12px;
    background: var(--tx-black); color: #FFFFFF; border-radius: var(--tx-radius);
}

/* Scan mode (page opened inside the scan pop-up) */
.tx-scan-mode .tx-content { padding: 8px 10px; }

/* ---------- Footer ---------- */
.tx-footer { padding: 16px 28px 24px; font-size: 12.5px; color: var(--tx-faint); }
.tx-footer a { color: var(--ds-green); font-weight: 700; }

/* ---------- Phone / tablet ---------- */
.tx-backdrop { display: none; }
@media (max-width: 991.98px) {
    .tx-side {
        position: fixed; top: 0; bottom: 0; inset-inline-start: 0; height: auto;
        transform: translateX(-105%); transition: transform .2s ease; box-shadow: 0 0 40px rgba(0, 0, 0, .2);
        width: min(86vw, var(--tx-side-w));
    }
    [dir="rtl"] .tx-side { transform: translateX(105%); }
    body.tx-side-open .tx-side { transform: translateX(0); }
    body.tx-side-open .tx-backdrop {
        display: block; position: fixed; inset: 0; background: rgba(30, 30, 30, .4); z-index: 1035;
    }
    .tx-iconbtn.tx-side__close { display: inline-flex; position: absolute; top: 14px; inset-inline-end: 14px; z-index: 1; }
    .tx-menu-btn { display: inline-flex !important; }
    .tx-topbar { padding: 10px 16px; min-height: 64px; }
    .tx-topbar__title { font-size: 17px; }
    .tx-user__text { display: none !important; }
    .tx-user { padding-inline-end: 4px; }
    .tx-content { padding: 18px 16px 32px; }
    .tx-footer { padding: 12px 16px 20px; }
    .tx-page-head__title { font-size: 22px; }
    .tx-page-head__icon { width: 48px; height: 48px; border-radius: 16px; }
    .tx-chip-link__text { display: none; }
    .tx-crumb__group, .tx-crumb > .tx-icon { display: none; }
    /* one row on phones: title shrinks, buttons stay compact */
    .tx-topbar { flex-wrap: nowrap; gap: 8px; }
    .tx-topbar__start { flex: 1 1 auto; }
    .tx-topbar__end { flex-wrap: nowrap; gap: 6px; flex: none; }
    .tx-crumb, .tx-oldcrumb { min-width: 0; overflow: hidden; }
    .tx-oldcrumb .breadcrumb { display: none; }
    .tx-oldcrumb .page-title, .tx-crumb__page { font-size: 15px; overflow: hidden; text-overflow: ellipsis; }
    .tx-topbar .tx-iconbtn { width: 38px; height: 38px; }
    .tx-topbar .tx-iconbtn--text { width: auto; padding: 0 10px; }
    #global-scan-mode-btn { display: none; }
    .tx-user { height: 42px; }
    .tx-user > .tx-icon { display: none; }
    .tx-user__avatar { width: 34px; height: 34px; }
    .tx-side__brand { padding-inline-end: 52px; justify-content: flex-start; }
    .tx-side__brand img { height: 44px; }
}
@media (max-width: 575.98px) {
    .tx-topbar { padding: 10px 12px; }
    .tx-topbar__end { gap: 4px; }
    .tx-topbar .tx-iconbtn { width: 36px; height: 36px; }
    .tx-topbar .tx-iconbtn--text { width: auto; padding: 0 8px; gap: 4px; }
    .tx-topbar .tx-iconbtn--text .tx-chip-link__text,
    .tx-topbar .dropdown .tx-iconbtn--text > .tx-icon:last-child { display: none; }
    .tx-user { height: 38px; padding: 2px; }
    .tx-user__avatar { width: 34px; height: 34px; }
}
@media (prefers-reduced-motion: reduce) {
    .tx-side, .tx-nav__chev { transition: none; }
}

/* ==========================================================================
   Shared parts — the old Bootstrap pieces inside the content area, in the
   new look. Scoped to .tx-content so the frame itself is never affected.
   ========================================================================== */
.tx-content .card {
    border: none; border-radius: var(--tx-radius-lg); box-shadow: var(--tx-shadow); background: var(--tx-surface);
    margin-bottom: 20px;
}
.tx-content .card-header {
    background: transparent; border-bottom: 1px solid var(--tx-line); padding: 16px 20px; min-height: 0;
    border-radius: var(--tx-radius-lg) var(--tx-radius-lg) 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
}
.tx-content .card-title { font-size: 17px; font-weight: 800; margin: 0; color: var(--tx-black); }
.tx-content .card-body { padding: 20px; }
.tx-content .card-footer { background: transparent; border-top: 1px solid var(--tx-line); padding: 14px 20px; }

/* Buttons */
.tx-content .btn, .modal .btn {
    border-radius: var(--tx-pill); font-weight: 700; font-family: var(--tx-font);
    min-height: 40px; padding: 0 16px; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    border-width: 1px; box-shadow: none !important; line-height: 1.2;
}
.tx-content .btn-sm, .modal .btn-sm { min-height: 34px; padding: 0 12px; font-size: 13px; }
.tx-content .btn-primary, .modal .btn-primary,
.tx-content .btn-success, .modal .btn-success { background: var(--ds-green) !important; border-color: var(--ds-green) !important; color: #FFFFFF !important; }
.tx-content .btn-primary:hover, .modal .btn-primary:hover,
.tx-content .btn-success:hover, .modal .btn-success:hover { background: var(--ds-green-dark) !important; border-color: var(--ds-green-dark) !important; color: #FFFFFF !important; }
.tx-content .btn-info, .modal .btn-info { background: var(--ds-sky) !important; border-color: var(--ds-sky) !important; color: var(--tx-black) !important; }
.tx-content .btn-info:hover, .modal .btn-info:hover { background: #1FB3E3 !important; border-color: #1FB3E3 !important; color: var(--tx-black) !important; }
.tx-content .btn-warning, .modal .btn-warning { background: var(--ds-orange) !important; border-color: var(--ds-orange) !important; color: var(--tx-black) !important; }
.tx-content .btn-warning:hover, .modal .btn-warning:hover { background: var(--ds-orange-dark) !important; border-color: var(--ds-orange-dark) !important; color: var(--tx-black) !important; }
.tx-content .btn-danger, .modal .btn-danger { background: var(--tx-orange) !important; border-color: var(--tx-orange) !important; color: #FFFFFF !important; }
.tx-content .btn-danger:hover, .modal .btn-danger:hover { background: var(--tx-orange-ink) !important; border-color: var(--tx-orange-ink) !important; color: #FFFFFF !important; }
.tx-content .btn-secondary, .modal .btn-secondary,
.tx-content .btn-light, .modal .btn-light,
.tx-content .btn-default, .modal .btn-default { background: #F1F0EC !important; border-color: #F1F0EC !important; color: var(--tx-black) !important; }
.tx-content .btn-secondary:hover, .modal .btn-secondary:hover,
.tx-content .btn-light:hover, .modal .btn-light:hover { background: #E6E4DE !important; border-color: #E6E4DE !important; color: var(--tx-black) !important; }
.tx-content .btn-dark, .modal .btn-dark { background: var(--tx-black) !important; border-color: var(--tx-black) !important; color: #FFFFFF !important; }
.tx-content [class*="btn-outline-"], .modal [class*="btn-outline-"] { background: var(--tx-surface) !important; border-color: var(--tx-line-strong) !important; color: var(--tx-black) !important; }
.tx-content [class*="btn-outline-"]:hover, .modal [class*="btn-outline-"]:hover { background: #F1F0EC !important; color: var(--tx-black) !important; }

/* Forms */
.tx-content .form-control, .tx-content .custom-select, .modal .form-control, .modal .custom-select {
    border: 1px solid var(--tx-line-strong); border-radius: 12px; min-height: 42px; font-family: var(--tx-font);
    font-size: 14px; color: var(--tx-black); background-color: var(--tx-surface); box-shadow: none;
}
.tx-content .form-control:focus, .tx-content .custom-select:focus, .modal .form-control:focus, .modal .custom-select:focus {
    border-color: var(--tx-black); box-shadow: 0 0 0 1px var(--tx-black);
}
.tx-content textarea.form-control, .modal textarea.form-control { min-height: 90px; }
.tx-content label, .modal label { font-weight: 600; color: var(--tx-black); }
.tx-content .form-group, .modal .form-group { margin-bottom: 16px; }
.tx-content input[type="checkbox"], .modal input[type="checkbox"],
.tx-content input[type="radio"], .modal input[type="radio"] { accent-color: var(--tx-teal-ink); }

/* Tables */
.tx-content .table { color: var(--tx-black); margin-bottom: 0; }
.tx-content .table thead th {
    background: var(--tx-bg); color: var(--tx-muted); font-size: 12.5px; font-weight: 700; border: none;
    padding: 12px 14px; white-space: nowrap; text-align: start;
}
.tx-content .table thead th:first-child { border-start-start-radius: 12px; border-end-start-radius: 12px; }
.tx-content .table thead th:last-child { border-start-end-radius: 12px; border-end-end-radius: 12px; }
.tx-content .table td { border-top: 1px solid var(--tx-line); padding: 10px 10px; vertical-align: middle; font-size: 14px; text-align: start; }
.tx-content .table-bordered, .tx-content .table-bordered td, .tx-content .table-bordered th { border-left: none; border-right: none; }
.tx-content .table-striped tbody tr:nth-of-type(odd), .tx-content .table-striped tbody tr:nth-of-type(2n) { background: transparent !important; }
.tx-content .table-hover tbody tr:hover, .tx-content .table tbody tr:hover { background: #FBFAF7; }
.tx-content .table-responsive { border-radius: 12px; }

/* Badges & alerts */
.tx-content .badge { border-radius: var(--tx-pill); padding: 5px 10px; font-weight: 700; font-size: 12px; }
/* !important: the old style.css paints .badge-* and .bg-* with `background: … !important`, which
   kept the old saturated fill under the new dark text (e.g. dark green on #09AD95 = 2.3:1). */
.tx-content .badge-success, .tx-content .badge.bg-success, .modal .badge-success, .modal .badge.bg-success { background: var(--tx-green-soft) !important; color: var(--tx-green-ink) !important; }
.tx-content .badge-warning, .tx-content .badge.bg-warning, .modal .badge-warning, .modal .badge.bg-warning { background: var(--tx-yellow-soft) !important; color: var(--ds-orange-ink) !important; }
.tx-content .badge-danger, .tx-content .badge.bg-danger, .modal .badge-danger, .modal .badge.bg-danger { background: var(--tx-orange-soft) !important; color: var(--tx-orange-ink) !important; }
.tx-content .badge-primary, .tx-content .badge-info, .tx-content .badge.bg-primary, .tx-content .badge.bg-info,
.modal .badge-primary, .modal .badge-info, .modal .badge.bg-primary, .modal .badge.bg-info { background: var(--tx-teal-soft) !important; color: var(--ds-green-deep) !important; }
.tx-content .badge-secondary, .tx-content .badge-light, .tx-content .badge.bg-secondary, .tx-content .badge.bg-light,
.modal .badge-secondary, .modal .badge-light, .modal .badge.bg-secondary, .modal .badge.bg-light { background: #F1F0EC !important; color: var(--tx-black) !important; }
.tx-content .badge-dark, .tx-content .badge.bg-dark, .modal .badge-dark, .modal .badge.bg-dark { background: var(--tx-black) !important; color: #FFFFFF !important; }
.tx-content .alert, .tx-alert { border: none; border-radius: var(--tx-radius); padding: 14px 18px; font-weight: 600; }
.tx-content .alert-success { background: var(--tx-green-soft); color: var(--tx-green-ink); }
.tx-content .alert-danger { background: var(--tx-orange-soft); color: var(--tx-orange-ink); }
.tx-content .alert-warning { background: var(--tx-yellow-soft); color: var(--ds-orange-ink); }
.tx-content .alert-info, .tx-content .alert-primary { background: var(--tx-teal-soft); color: var(--ds-green-deep); }

/* Pagination */
.tx-content .pagination { gap: 6px; flex-wrap: wrap; margin: 0; }
.tx-content .page-link {
    border: none; border-radius: var(--tx-pill) !important; min-width: 40px; height: 40px; display: inline-flex;
    align-items: center; justify-content: center; background: var(--tx-surface); color: var(--tx-black);
    font-family: var(--tx-num); font-weight: 600; margin: 0 !important;
}
.tx-content .page-item.active .page-link { background: var(--ds-green); color: #FFFFFF; }
.tx-content .page-item.disabled .page-link { background: transparent; color: var(--tx-faint); }
.tx-content nav[role="navigation"] p { color: var(--tx-muted); font-size: 13px; }

/* Nav tabs inside pages */
.tx-content .nav-tabs { border: none; gap: 6px; }
.tx-content .nav-tabs .nav-link {
    border: none; border-radius: 12px; color: #555; font-weight: 600; padding: 10px 16px;
}
/* Active tab = black fill + white text. !important because colors/color1.css sets
   `.nav-tabs .nav-link.active { color: #000 !important }` (and a teal fill on hover), which turned
   the active tab into black text on a black pill (1.2:1). Same for pills. */
.tx-content .nav-tabs .nav-link.active, .tx-content .nav-tabs .nav-link.active:hover, .tx-content .nav-tabs .nav-link.active:focus,
.tx-content .nav-tabs .nav-item.show .nav-link,
.tx-content .nav-pills .nav-link.active, .tx-content .nav-pills .nav-link.active:hover, .tx-content .nav-pills .show > .nav-link,
.modal .nav-tabs .nav-link.active, .modal .nav-pills .nav-link.active {
    background: var(--ds-green) !important; color: #FFFFFF !important;
}

/* Readable text colours. The old theme's text utilities are bright brand colours with
   !important that fail on white (text-primary #00C9C3 = 1.9:1, text-success 2.8:1,
   text-info 2.1:1, text-warning 2.1:1, text-danger 3.7:1, text-muted 3.8:1). Use the darker
   "ink" of the same colour inside pages and pop-ups. */
.tx-content .text-primary, .modal .text-primary { color: var(--ds-green) !important; }
.tx-content .text-info, .modal .text-info { color: var(--ds-sky-ink) !important; }
.tx-content .text-success, .modal .text-success { color: var(--tx-green-ink) !important; }
.tx-content .text-warning, .modal .text-warning { color: #8A5A00 !important; }
.tx-content .text-danger, .modal .text-danger { color: #B42318 !important; }
.tx-content .text-muted, .modal .text-muted { color: var(--tx-muted) !important; }

/* Bright fills used as card / header backgrounds: bg-info #34C6F4, bg-warning #FF9501 and
   bg-success #09AD95 are too light for white text. Keep the fill, put dark text on it.
   bg-primary is Dropshop green (#3A6547) and keeps its white text. */
.tx-content .bg-info:not(.badge), .tx-content .bg-warning:not(.badge), .tx-content .bg-success:not(.badge),
.modal .bg-info:not(.badge), .modal .bg-warning:not(.badge), .modal .bg-success:not(.badge) { color: var(--tx-black) !important; }
.tx-content .bg-info:not(.badge) .text-white, .tx-content .bg-warning:not(.badge) .text-white, .tx-content .bg-success:not(.badge) .text-white,
.modal .bg-info:not(.badge) .text-white, .modal .bg-warning:not(.badge) .text-white, .modal .bg-success:not(.badge) .text-white { color: var(--tx-black) !important; }
.modal .bg-info .close, .modal .bg-warning .close, .modal .bg-success .close { color: var(--tx-black); }

/* Icons marked `text-white` inside the teal / yellow / orange buttons (filter, columns, import,
   export…): white on yellow is 1.6:1. Follow the button's own black text instead. */
.tx-content .btn-info .text-white, .tx-content .btn-warning .text-white,
.modal .btn-info .text-white, .modal .btn-warning .text-white { color: inherit !important; }

/* ---------- Number tiles (home dashboard, finance) ---------- */
.tx-sect { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 800; color: var(--tx-muted); margin: 22px 2px 12px; }
.tx-sect:first-of-type { margin-top: 4px; }
.tx-kpis { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); margin-bottom: 8px; }
.tx-kpis--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tx-kpis--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tx-kpis--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tx-kpi {
    display: flex; align-items: flex-start; gap: 14px; padding: 18px; background: var(--tx-surface);
    border-radius: var(--tx-radius-lg); box-shadow: var(--tx-shadow); min-width: 0; position: relative; overflow: hidden;
}
.tx-kpi::before { content: ''; position: absolute; inset-block: 0; inset-inline-start: 0; width: 5px; background: var(--kpi-c); }
.tx-kpi__icon {
    width: 46px; height: 46px; border-radius: 14px; flex: none; display: inline-flex; align-items: center; justify-content: center;
    background: var(--kpi-soft); color: var(--kpi-ink);
}
.tx-kpi__text { min-width: 0; }
.tx-kpi__label { font-size: 13.5px; font-weight: 600; color: var(--tx-muted); line-height: 1.35; }
.tx-kpi__value { font-size: 28px; font-weight: 800; line-height: 1.15; margin-top: 4px; color: var(--tx-black); word-break: break-word; }
.tx-kpi__value small { font-family: var(--tx-font); font-size: 13px; font-weight: 700; color: var(--tx-muted); margin-inline-start: 6px; }
.tx-kpi--green { --kpi-c: var(--ds-green); --kpi-soft: var(--ds-green-soft); --kpi-ink: var(--ds-green-deep); }
.tx-kpi--orange { --kpi-c: var(--ds-orange); --kpi-soft: var(--ds-orange-soft); --kpi-ink: var(--ds-orange-ink); }
.tx-kpi--sky { --kpi-c: var(--ds-sky); --kpi-soft: var(--ds-sky-soft); --kpi-ink: var(--ds-sky-ink); }
.tx-kpi--red { --kpi-c: var(--tx-orange); --kpi-soft: var(--tx-orange-soft); --kpi-ink: var(--tx-orange-ink); }
.tx-kpi--grey { --kpi-c: #9AA09C; --kpi-soft: #EEF0EE; --kpi-ink: #3F4542; }
.tx-kpi--ink { --kpi-c: var(--ds-green-deep); --kpi-soft: var(--ds-green); --kpi-ink: #FFFFFF; }
.tx-home-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 14px; align-items: stretch; }
.tx-home-grid > .card { margin-bottom: 0; }
.tx-home-grid .tx-kpis { margin-bottom: 0; }
.tx-donut-card .card-body { display: flex; flex-direction: column; justify-content: center; }
.tx-legend { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; font-size: 13px; color: var(--tx-muted); font-weight: 600; }
.tx-legend i, .tx-rate__legend i { display: inline-block; width: 10px; height: 10px; border-radius: 5px; margin-inline-end: 6px; vertical-align: middle; }
.tx-rate { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 20px; align-items: center; }
.tx-rate__legend { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.tx-rate__legend li { padding: 10px 14px; border-radius: 12px; background: var(--tx-bg); font-weight: 600; font-size: 14px; }
@media (max-width: 1199.98px) {
    .tx-kpis--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tx-home-grid, .tx-rate { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 767.98px) {
    .tx-kpis--2, .tx-kpis--3, .tx-kpis--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tx-kpi { padding: 14px; gap: 10px; flex-direction: column; }
    .tx-kpi__icon { width: 38px; height: 38px; border-radius: 12px; }
    .tx-kpi__value { font-size: 22px; }
}

/* ---------- Old coloured stat cards (finance summary and others): white tiles with a colour bar ---------- */
.tx-content .card.text-white:is(.bg-warning, .bg-info, .bg-primary, .bg-success, .bg-danger, .bg-secondary),
.tx-content .card.img-card {
    background: var(--tx-surface) !important; color: var(--tx-black) !important; position: relative; overflow: hidden;
    border-inline-start: 5px solid var(--kpi-c, var(--ds-green)) !important; box-shadow: var(--tx-shadow) !important;
    background-image: none !important;
}
.tx-content .card.bg-warning { --kpi-c: var(--ds-orange); }
.tx-content .card.bg-info { --kpi-c: var(--ds-sky); }
.tx-content .card.bg-primary { --kpi-c: var(--ds-green); }
.tx-content .card.bg-success { --kpi-c: #09AD95; }
.tx-content .card.bg-secondary { --kpi-c: #D43F8D; }
.tx-content .card.bg-danger { --kpi-c: var(--tx-orange); }
.tx-content .card.text-white:is(.bg-warning, .bg-info, .bg-primary, .bg-success, .bg-danger, .bg-secondary) *,
.tx-content .card.img-card * { color: inherit !important; }
.tx-content .card.text-white .card-widget p.h4, .tx-content .card.text-white .card-order p.h4,
.tx-content .card.img-card p { font-size: 13.5px !important; font-weight: 600 !important; color: var(--tx-muted) !important; margin-bottom: 4px !important; }
.tx-content .card.text-white .h2, .tx-content .card.img-card h3, .tx-content .card.img-card .number-font {
    font-size: 26px !important; font-weight: 800 !important; color: var(--tx-black) !important; font-family: var(--tx-num);
}
.tx-content .card.img-card i { color: var(--kpi-c) !important; opacity: .9; }
.tx-content .card.img-card::before, .tx-content .card.img-card::after { display: none !important; }

/* ---------- List pages (generated list screens: *-top + *-index) ---------- */
/* Toolbar: search/sort/per-page on one side, tools on the other */
.tx-content .card-body > div > .d-flex.mb-2,
.tx-content .card-body > div > div > .d-flex.mb-2 {
    flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 18px !important;
}
.tx-content #search-sort-section { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tx-content #search-sort-section > div, .tx-content .form-inline > div { margin: 0; }
.tx-content #search-sort-section .form-group { margin: 0; }
.tx-content #search-sort-section .form-control {
    border-radius: var(--tx-pill); min-height: 42px; height: 42px; padding: 0 16px; width: auto;
}
.tx-content #search-sort-section select.form-control { padding-inline-end: 34px; }
.tx-content .tx-search-input {
    min-width: 240px; padding-inline-start: 40px !important;
    background: var(--tx-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23555B57' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") no-repeat 14px center !important;
}
[dir="rtl"] .tx-content .tx-search-input { background-position: calc(100% - 14px) center !important; }
.tx-content .form-inline { gap: 8px; flex-wrap: wrap; }
.tx-content .form-inline .mr-1 { margin: 0 !important; }

/* Toolbar tools: round light buttons; "add new" is the one green pill with a label */
.tx-content .tx-tool:not(td .tx-tool) {
    width: 42px; height: 42px; min-height: 42px; padding: 0; border-radius: var(--tx-pill);
    background: var(--tx-surface) !important; border: 1px solid var(--tx-line-strong) !important; color: var(--tx-black) !important;
}
.tx-content .tx-tool:not(td .tx-tool):hover { background: var(--ds-green-soft) !important; border-color: var(--ds-green) !important; }
.tx-content .tx-tool:not(td .tx-tool) i { color: inherit !important; font-size: 16px; }
.tx-content .tx-tool--add:not(td .tx-tool) {
    width: auto; padding: 0 18px; gap: 8px; background: var(--ds-green) !important; border-color: var(--ds-green) !important; color: #FFFFFF !important;
}
.tx-content .tx-tool--add:not(td .tx-tool):hover { background: var(--ds-green-dark) !important; }
.tx-content .tx-tool--add i { color: #FFFFFF !important; }
.tx-tool__text { font-weight: 700; font-size: 14px; }

/* Tables: the generated lists use <td> in <thead> */
.tx-content .table thead td {
    background: var(--tx-bg); color: var(--tx-muted); font-size: 12.5px; font-weight: 700; border: none;
    padding: 12px 10px; white-space: nowrap; vertical-align: middle;
}
.tx-content .table thead td:first-child { border-start-start-radius: 12px; border-end-start-radius: 12px; }
.tx-content .table thead td:last-child { border-start-end-radius: 12px; border-end-end-radius: 12px; }
.tx-content .table-sm td { padding: 10px 12px; }
.tx-content .table.text-center td { text-align: center; }
.tx-content .table tbody td:first-child { color: var(--tx-faint); font-size: 13px; }

/* Row actions: small round icon buttons, soft colours */
.tx-content td .btn-sm {
    width: 32px; height: 32px; min-height: 32px; padding: 0; border-radius: var(--tx-pill); margin: 2px !important;
}
.tx-content td:has(> .btn-sm), .tx-content td:has(> .dropdown > .btn-sm) { white-space: nowrap; }
.tx-content td .btn-sm i { color: inherit !important; font-size: 15px; }
.tx-content td .btn-sm.btn-primary, .tx-content td .btn-sm.btn-info, .tx-content td .btn-sm.btn-success {
    background: var(--ds-green-soft) !important; border-color: var(--ds-green-soft) !important; color: var(--ds-green-deep) !important;
}
.tx-content td .btn-sm.btn-primary:hover, .tx-content td .btn-sm.btn-info:hover, .tx-content td .btn-sm.btn-success:hover {
    background: var(--ds-green) !important; border-color: var(--ds-green) !important; color: #FFFFFF !important;
}
.tx-content td .btn-sm.btn-danger { background: var(--tx-orange-soft) !important; border-color: var(--tx-orange-soft) !important; color: var(--tx-orange-ink) !important; }
.tx-content td .btn-sm.btn-danger:hover { background: var(--tx-orange) !important; border-color: var(--tx-orange) !important; color: #FFFFFF !important; }
.tx-content td .btn-sm.btn-warning { background: var(--ds-orange-soft) !important; border-color: var(--ds-orange-soft) !important; color: var(--ds-orange-ink) !important; }
.tx-content td .btn-sm.btn-warning:hover { background: var(--ds-orange) !important; border-color: var(--ds-orange) !important; color: var(--tx-black) !important; }
/* Row buttons that carry text keep their width */
.tx-content td .btn-sm:not(:empty):not(.tx-tool) { width: auto; padding: 0 12px; }
.tx-content td .btn-sm:has(> i:only-child) { width: 32px; padding: 0; }

/* Pager line under lists */
.tx-content nav[role="navigation"] { margin-top: 16px; }
.tx-content nav[role="navigation"] .flex.justify-between { gap: 10px; }

/* Card that wraps a list page */
.tx-content > .card > .card-body { padding: 22px; }

/* Status tags (order lists keep their own colours from the order status) */
.tx-content .tag {
    display: inline-block; border-radius: var(--tx-pill); padding: 5px 12px; font-size: 12px; font-weight: 700;
    line-height: 1.3; white-space: normal; max-width: 150px; min-width: 80px;
}
.tx-content .table td input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--ds-green); }

/* Orders page: drivers map on top (staff) */
.tx-content > #map, #tx-content #map { height: 440px !important; border-radius: var(--tx-radius-lg); overflow: hidden; margin-bottom: 18px; box-shadow: var(--tx-shadow); }

/* Order process timeline (order pop-up): brand green instead of blue */
.tx-content .timeline-date-header, .modal .timeline-date-header { color: var(--ds-green-deep); }
.tx-content .timeline-date-body::before, .modal .timeline-date-body::before { background: var(--ds-green); }
.tx-content .timeline-event-box.completed, .modal .timeline-event-box.completed { background: var(--ds-green); color: #FFFFFF; }
.tx-content .timeline-event-box.current, .modal .timeline-event-box.current { background: var(--ds-orange); color: var(--tx-black); }
.tx-content .order-process-timeline, .modal .order-process-timeline { background: var(--tx-bg); border-radius: var(--tx-radius); }

/* Pop-ups */
.modal-content { border: none; border-radius: var(--tx-radius-lg); box-shadow: 0 20px 60px rgba(30, 30, 30, .2); font-family: var(--tx-font); }
.modal-header { border-bottom: 1px solid var(--tx-line); padding: 18px 22px; align-items: center; }
.modal-title { font-size: 18px; font-weight: 800; color: var(--tx-black); }
.modal-body { padding: 20px 22px; }
.modal-footer { border-top: 1px solid var(--tx-line); padding: 14px 22px; gap: 8px; }
.modal-header .close {
    width: 40px; height: 40px; border-radius: var(--tx-pill); background: #F1F0EC; opacity: 1; margin: 0;
    margin-inline-start: auto; padding: 0; display: inline-flex; align-items: center; justify-content: center; text-shadow: none;
}
.modal-backdrop.show { opacity: .4; }

/* Right-to-left fixes for the old Bootstrap pieces */
[dir="rtl"] .tx-content .text-left, [dir="rtl"] .modal .text-left { text-align: right !important; }
[dir="rtl"] .tx-content .text-right, [dir="rtl"] .modal .text-right { text-align: left !important; }
[dir="rtl"] .tx-content .ml-auto { margin-left: 0 !important; margin-right: auto !important; }
[dir="rtl"] .tx-content .mr-auto { margin-right: 0 !important; margin-left: auto !important; }
[dir="rtl"] .tx-content .float-right { float: left !important; }
[dir="rtl"] .tx-content .float-left { float: right !important; }
[dir="rtl"] .modal-footer > :not(:first-child) { margin-left: 0; margin-right: .25rem; }
[dir="rtl"] .tx-content .dropdown-menu { text-align: right; }
[dir="rtl"] .tx-content .input-group > .form-control:not(:last-child) { border-radius: 0 12px 12px 0; }
[dir="rtl"] .tx-content .input-group > .input-group-append > .btn,
[dir="rtl"] .tx-content .input-group > .input-group-append > .input-group-text { border-radius: 12px 0 0 12px; }
[dir="rtl"] .select2-container { direction: rtl; }

/* ---------- Notifications panel (old right-hand sidebar) ---------- */
.sidebar-right { font-family: var(--tx-font); background: var(--tx-bg) !important; box-shadow: -10px 0 40px rgba(30, 30, 30, .12); z-index: 1050; }
.sidebar-right > .p-4.border-bottom {
    background: var(--ds-green); color: #FFFFFF; border: none !important; display: flex; align-items: center; justify-content: space-between;
}
.sidebar-right > .p-4.border-bottom .fs-17 { font-weight: 800; }
.sidebar-right > .p-4.border-bottom a { color: #FFFFFF !important; float: none !important; font-size: 18px; }
.sidebar-right .list {
    background: var(--tx-surface); border: none !important; border-radius: var(--tx-radius); margin: 10px 12px; padding: 14px !important;
    box-shadow: var(--tx-shadow);
}
.sidebar-right .list .wrapper { margin: 0 !important; }
.sidebar-right .list a { color: var(--tx-black); font-size: 13.5px; line-height: 1.6; }
.sidebar-right .list .btn-success {
    background: var(--ds-green) !important; border-color: var(--ds-green) !important; color: #FFFFFF !important;
    border-radius: var(--tx-pill); font-weight: 700; padding: 6px 16px; margin-bottom: 6px;
}
[dir="rtl"] .sidebar-right .float-right { float: left !important; }

/* ---------- Print ---------- */
.tx-shell > .hidden-print, .tx-main > .hidden-print { display: contents; }
@media print {
    .tx-side, .tx-topbar, .tx-backdrop, .tx-footer, .hidden-print { display: none !important; }
    .tx-content { padding: 0; }
    body.tx-body, html.tx-html { background: #FFFFFF; }
}


/* ==========================================================================
   Sign-in pages (guest layout)
   ========================================================================== */
body.tx-auth-body { margin: 0; background: var(--tx-bg); font-family: var(--tx-font); color: var(--tx-black); }
.tx-auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
.tx-auth__brand {
    background: var(--ds-green); color: #FFFFFF; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 18px; padding: 40px; position: relative; overflow: hidden;
}
.tx-auth__brand::before, .tx-auth__brand::after {
    content: ''; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .06);
}
.tx-auth__brand::before { width: 420px; height: 420px; top: -140px; inset-inline-start: -120px; }
.tx-auth__brand::after { width: 300px; height: 300px; bottom: -110px; inset-inline-end: -80px; background: rgba(255, 149, 1, .16); }
.tx-auth__logo { width: min(360px, 80%); height: auto; position: relative; z-index: 1; }
.tx-auth__tag { font-size: 20px; font-weight: 600; letter-spacing: .5px; margin: 0; position: relative; z-index: 1; color: #E8F0EA; }
.tx-auth__dots { display: flex; gap: 10px; position: relative; z-index: 1; }
.tx-auth__dots i { width: 14px; height: 14px; border-radius: 7px; background: var(--ds-orange); display: block; }
.tx-auth__main { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 20px; gap: 18px; }
.tx-auth__mobile-logo { display: none; }
.tx-auth__card {
    width: 100%; max-width: 420px; background: var(--tx-surface); border-radius: var(--tx-radius-lg); box-shadow: var(--tx-shadow);
    padding: 32px 30px; box-sizing: border-box;
}
.tx-auth__card label { display: block; font-weight: 700; font-size: 14px; color: var(--tx-black); margin-bottom: 6px; }
.tx-auth__card label.inline-flex { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--tx-muted); }
.tx-auth__card input[type="email"], .tx-auth__card input[type="password"], .tx-auth__card input[type="text"] {
    width: 100%; height: 48px; padding: 0 16px; box-sizing: border-box; border: 1px solid var(--tx-line-strong) !important;
    border-radius: 14px !important; font: inherit; font-size: 15px; background: #FFFFFF; box-shadow: none !important;
}
.tx-auth__card input:focus { outline: none; border-color: var(--ds-green) !important; box-shadow: 0 0 0 3px var(--ds-green-soft) !important; }
.tx-auth__card input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--ds-green); }
.tx-auth__card button[type="submit"] {
    background: var(--ds-green) !important; color: #FFFFFF !important; border: none; border-radius: var(--tx-pill) !important;
    height: 48px; padding: 0 28px !important; font: inherit !important; font-weight: 700 !important; font-size: 15px !important;
    text-transform: none !important; letter-spacing: 0 !important; cursor: pointer;
}
.tx-auth__card button[type="submit"]:hover { background: var(--ds-green-dark) !important; }
.tx-auth__card a { color: var(--ds-green-deep); font-weight: 600; }
.tx-auth__card .text-red-600 { color: var(--tx-orange-ink); }
.tx-auth__foot { font-size: 12.5px; color: var(--tx-faint); margin: 0; }
@media (max-width: 860px) {
    .tx-auth { grid-template-columns: minmax(0, 1fr); }
    .tx-auth__brand { display: none; }
    .tx-auth__mobile-logo { display: block; }
    .tx-auth__mobile-logo img { width: 240px !important; height: auto; }
}
