/* ===== Daily Dairy - small additions on top of Sticky Mobile ===== */
:root {
    --dd-brand: #22c55e;
    --dd-brand-2: #4ade80;
    --dd-green: #2E9E5B;
    --dd-red: #D9443A;
    --dd-orange: #E8912D;
    --dd-gray: #8F98A3;
}

body { font-size: 15px; }
.header-title { font-weight: 800 !important; letter-spacing: .2px; }

/* money colours - same meaning everywhere */
.amt-green { color: var(--dd-green) !important; }
.amt-red { color: var(--dd-red) !important; }
.amt-orange { color: var(--dd-orange) !important; }
.amt-gray { color: var(--dd-gray) !important; }
.bg-amt-green { background: #E4F5EA !important; color: var(--dd-green) !important; }
.bg-amt-red { background: #FCE8E6 !important; color: var(--dd-red) !important; }
.bg-amt-orange { background: #FDF0DF !important; color: var(--dd-orange) !important; }
.bg-amt-gray { background: #EEF1F3 !important; color: var(--dd-gray) !important; }
.theme-dark .bg-amt-green, .theme-dark .bg-amt-red, .theme-dark .bg-amt-orange, .theme-dark .bg-amt-gray { background: rgba(255,255,255,.06) !important; }

.gradient-dairy { background-image: linear-gradient(135deg, #4ade80, #22c55e) !important; }

/* ===== Auth login — phone-sized shell on all screens ===== */
.dd-auth-shell {
    width: 100%;
    max-width: 430px;
    margin: 0 auto;
    padding: 0 0 28px;
    box-sizing: border-box;
}
.dd-auth-hero {
    --dd-logo-green: #22BC5C;
    background-color: var(--dd-logo-green);
    background-image: linear-gradient(
        160deg,
        #21C352 0%,
        #22BC5C 42%,
        #33C46A 72%,
        #1ABA53 100%
    );
    text-align: center;
    padding: 0;
    margin: 0;
    border-radius: 0 0 28px 28px;
    overflow: hidden;
    line-height: 0;
    width: 100%;
}
.dd-auth-logo {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    object-fit: contain;
    object-position: center center;
    background: transparent;
    vertical-align: top;
}
.dd-auth-shell .dd-auth-card {
    margin-left: 16px;
    margin-right: 16px;
    margin-top: -18px;
    position: relative;
    z-index: 2;
}
.dd-auth-foot {
    margin: 0 16px;
}
@media (max-width: 380px) {
    .dd-auth-hero { border-radius: 0 0 20px 20px; }
}
/* Desktop / large screens: keep a centered phone column */
@media (min-width: 576px) {
    .dd-auth-shell {
        max-width: 420px;
        padding-top: 36px;
        padding-bottom: 48px;
    }
    .dd-auth-hero {
        border-radius: 20px 20px 28px 28px;
        box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
    }
}
@media (min-width: 992px) {
    .dd-auth-shell {
        max-width: 400px;
        padding-top: 48px;
    }
}

/* ===== Login PIN step (6 boxes) ===== */
.dd-pin-step {
    margin: 4px 0 18px;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity .22s ease, transform .22s ease;
}
.dd-pin-step.is-open {
    opacity: 1;
    transform: translateY(0);
}
.dd-pin-label {
    display: block;
    margin: 0 0 10px;
}
.dd-pin-boxes {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
}
.dd-pin-box {
    width: 100%;
    aspect-ratio: 1 / 1;
    max-height: 56px;
    border: 1.5px solid rgba(0, 0, 0, 0.14);
    border-radius: 12px;
    text-align: center;
    font-size: 22px;
    font-weight: 800;
    color: #111827;
    background: #fff;
    caret-color: #22c55e;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.dd-pin-box:focus {
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
}
.theme-dark .dd-pin-box {
    background: #1b1d21;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.18);
}
@media (max-width: 360px) {
    .dd-pin-boxes { gap: 6px; }
    .dd-pin-box { font-size: 18px; border-radius: 10px; }
}

/* emoji avatar */
.dd-emoji { width: 44px; height: 44px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; font-size: 24px; background: #dcfce7; flex-shrink: 0; }
.theme-dark .dd-emoji { background: rgba(255,255,255,.07); }
.dd-avatar { width: 44px; height: 44px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 15px; color: #fff; background: var(--dd-brand); flex-shrink: 0; }
.dd-avatar svg { width: 20px; height: 20px; }

/* list rows */
.dd-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid rgba(0,0,0,.06); color: inherit; }
.theme-dark .dd-row { border-bottom-color: rgba(255,255,255,.06); }
.dd-row:last-child { border-bottom: 0; }
.dd-row .dd-main { flex: 1; min-width: 0; }
.dd-row .dd-main h5 { margin: 0; font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dd-row .dd-main p { margin: 0; font-size: 12px; opacity: .65; line-height: 1.4; }
.dd-row .dd-end { text-align: right; flex-shrink: 0; }
.dd-row .dd-end h5 { margin: 0; font-size: 15px; font-weight: 800; }
.dd-row .dd-end p { margin: 0; font-size: 11px; opacity: .6; }

.dd-section-title { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .6px; opacity: .55; margin: 0 0 6px; }

/* floating add button */
.dd-fab { position: fixed; right: 18px; bottom: calc(80px + env(safe-area-inset-bottom)); width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 22px; color: #fff !important; background: var(--dd-brand); box-shadow: 0 8px 20px rgba(34,197,94,.4); z-index: 90; }

/* footer centre plus */
#footer-bar a.dd-plus .dd-plus-ico {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--dd-brand);
    color: #fff !important;
    margin: -14px auto 0 !important;
    box-shadow: 0 6px 16px rgba(34,197,94,.45);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
#footer-bar a.dd-plus .dd-plus-ico svg {
    width: 20px;
    height: 20px;
    stroke: #fff;
}
#footer-bar a.dd-plus span:not(.dd-plus-ico) { opacity: .8; }

/* stat tiles */
.dd-stat {
    border-radius: 18px;
    padding: 14px 14px 13px;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.05);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.045);
    height: 100%;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
    position: relative;
    overflow: hidden;
}
.dd-stat::before {
    content: "";
    position: absolute;
    left: 0;
    top: 12px;
    bottom: 12px;
    width: 3px;
    border-radius: 999px;
    background: rgba(34, 197, 94, 0.35);
}
.theme-dark .dd-stat { background: #1b1d21; border-color: rgba(255,255,255,.06); }
a.dd-stat:active { transform: scale(0.985); }
.dd-stat .dd-stat-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
    opacity: .58;
    padding-left: 8px;
}
.dd-stat .dd-stat-value {
    font-size: 22px;
    font-weight: 800;
    line-height: 1.15;
    margin-top: 6px;
    letter-spacing: -.3px;
    padding-left: 8px;
    color: #0f172a;
}
.theme-dark .dd-stat .dd-stat-value { color: #fff; }
.dd-stat .dd-stat-sub {
    font-size: 11px;
    opacity: .62;
    margin-top: 4px;
    padding-left: 8px;
}
.dd-stat--tone-sky::before { background: #38bdf8; }
.dd-stat--tone-mint::before { background: #34d399; }
.dd-stat--tone-green::before { background: #22c55e; }
.dd-stat--tone-warm::before { background: #f97316; }

/* big quick action tiles */
.dd-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 16px 6px 14px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.05);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.045);
    color: inherit;
    height: 100%;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.theme-dark .dd-action { background: #1b1d21; border-color: rgba(255,255,255,.06); }
.dd-action:active { transform: scale(0.98); }
.dd-action .dd-action-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    line-height: 1;
    margin-bottom: 8px;
    background: linear-gradient(180deg, #f0fdf4 0%, #dcfce7 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
}
.theme-dark .dd-action .dd-action-icon { background: rgba(34,197,94,.12); }
.dd-action span {
    font-size: 12px;
    font-weight: 700;
    line-height: 1.25;
    color: #1f2937;
}
.theme-dark .dd-action span { color: #e5e7eb; }

/* ===== Home dashboard polish ===== */
.dd-home {
    padding-bottom: 8px;
}
.dd-home-hero {
    padding-top: 4px;
}
.dd-home-date {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .2px;
    color: #64748b;
}
.dd-home-greet {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -.4px;
    color: #0f172a;
    line-height: 1.25;
    margin-top: 2px !important;
}
.theme-dark .dd-home-greet { color: #fff; }
.dd-home-stats .col-6,
.dd-home-actions .col-4 {
    display: flex;
}
.dd-home-stats .dd-stat,
.dd-home-actions .dd-action {
    width: 100%;
}
.dd-home .card-style {
    border-radius: 20px;
    border: 1px solid rgba(15, 23, 42, 0.05);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}
.dd-home-alert {
    margin-left: 15px;
    margin-right: 15px;
}

/* App chrome polish */
.theme-light .page-content {
    background:
        radial-gradient(1200px 420px at 50% -8%, rgba(34, 197, 94, 0.10), transparent 60%),
        linear-gradient(180deg, #f7faf8 0%, #f1f5f9 100%);
}
.theme-dark .page-content {
    background:
        radial-gradient(900px 360px at 50% -10%, rgba(34, 197, 94, 0.08), transparent 55%),
        #1b1d21;
}
.theme-light .header.header-fixed {
    background: rgba(255, 255, 255, 0.92) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06);
}
.theme-dark .header.header-fixed,
.theme-dark .header.dd-dash-top,
.theme-dark .dd-dash-top {
    background: rgba(15, 17, 23, 0.94) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
    color: #e5e7eb !important;
}
.theme-light .header-title {
    font-weight: 800 !important;
    letter-spacing: -.2px;
    color: #0f172a !important;
}
.theme-dark .header-title {
    font-weight: 800 !important;
    letter-spacing: -.2px;
    color: #f8fafc !important;
}
.header-icon img {
    border-radius: 8px !important;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.25);
}
#footer-bar {
    left: 12px !important;
    right: 12px !important;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px)) !important;
    width: auto !important;
    min-height: 62px;
    height: 62px !important;
    border-radius: 22px !important;
    background: rgba(255, 255, 255, 0.55) !important;
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    box-shadow:
        0 10px 30px rgba(15, 23, 42, 0.10),
        0 1px 0 rgba(255, 255, 255, 0.55) inset;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-top: 1px solid rgba(255, 255, 255, 0.45);
    overflow: visible;
}
.theme-dark #footer-bar {
    background: rgba(27, 29, 33, 0.55) !important;
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.35),
        0 1px 0 rgba(255, 255, 255, 0.06) inset;
}
#footer-bar a span {
    font-weight: 700;
    letter-spacing: .1px;
}
/* Keep page content clear of the floating nav */
.page-content {
    padding-bottom: calc(92px + env(safe-area-inset-bottom, 0px)) !important;
}

/* segmented tabs (Morning / Evening etc.) */
.dd-tabs { display: flex; background: rgba(0,0,0,.05); border-radius: 12px; padding: 4px; gap: 4px; }
.theme-dark .dd-tabs { background: rgba(255,255,255,.06); }
.dd-tabs a, .dd-tabs label { flex: 1; text-align: center; padding: 9px 6px; border-radius: 9px; font-weight: 700; font-size: 13px; color: inherit; cursor: pointer; margin: 0; }
.dd-tabs a.active, .dd-tabs input:checked + label { background: var(--dd-brand); color: #fff !important; box-shadow: 0 3px 10px rgba(34,197,94,.3); }
.dd-tabs input { display: none; }

/* choice chips */
.dd-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.dd-chips input { display: none; }
.dd-chips label { padding: 8px 14px; border-radius: 20px; border: 1px solid rgba(0,0,0,.12); font-weight: 600; font-size: 13px; cursor: pointer; margin: 0; }
.theme-dark .dd-chips label { border-color: rgba(255,255,255,.15); }
.dd-chips input:checked + label { background: var(--dd-brand); border-color: var(--dd-brand); color: #fff; }

/* date navigator */
.dd-datenav { display: flex; align-items: center; gap: 8px; }
.dd-datenav a { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.05); color: inherit; }
.theme-dark .dd-datenav a { background: rgba(255,255,255,.06); }
.dd-datenav input { flex: 1; height: 40px; border-radius: 12px; border: 1px solid rgba(0,0,0,.1); text-align: center; font-weight: 700; background: transparent; color: inherit; }

/* forms - a little bigger for easy typing */
.input-style input, .input-style select, .input-style textarea { font-size: 15px !important; }
.input-style.dd-big input { height: 56px !important; font-size: 22px !important; font-weight: 800; }
.dd-help { font-size: 12px; opacity: .6; margin-top: -14px; margin-bottom: 16px; }
.dd-error { color: var(--dd-red); font-size: 12px; margin-top: -14px; margin-bottom: 14px; font-weight: 600; }
.btn-dd { background: var(--dd-brand) !important; color: #fff !important; }

/* qty stepper */
.dd-stepper { display: flex; align-items: center; gap: 6px; }
.dd-stepper button { width: 38px; height: 38px; border-radius: 10px; border: 0; background: rgba(34,197,94,.12); color: var(--dd-brand); font-size: 18px; font-weight: 800; }
.dd-stepper input { width: 70px; height: 38px; text-align: center; border-radius: 10px; border: 1px solid rgba(0,0,0,.12); font-weight: 800; font-size: 16px; background: transparent; color: inherit; }

/* ===== Swipe delivery cards ===== */
.dd-swipe-wrap { position: relative; margin: 0 15px 12px; border-radius: 18px; overflow: hidden; }
.dd-swipe-bg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: space-between; padding: 0 22px; font-weight: 800; color: #fff; font-size: 15px; }
.dd-swipe-bg .left { opacity: 0; } .dd-swipe-bg .right { opacity: 0; }
.dd-swipe-wrap.go-right .dd-swipe-bg { background: var(--dd-green); }
.dd-swipe-wrap.go-right .dd-swipe-bg .left { opacity: 1; }
.dd-swipe-wrap.go-left .dd-swipe-bg { background: var(--dd-red); }
.dd-swipe-wrap.go-left .dd-swipe-bg .right { opacity: 1; }
.dd-swipe-card { position: relative; background: #fff; border-radius: 18px; padding: 14px; box-shadow: 0 4px 18px rgba(0,0,0,.06); touch-action: pan-y; user-select: none; will-change: transform; }
.theme-dark .dd-swipe-card { background: #1b1d21; }
.dd-swipe-card.animate { transition: transform .25s ease, opacity .25s ease; }
.dd-swipe-wrap.collapsing-out { transition: max-height .3s ease, margin .3s ease, opacity .3s ease; max-height: 0 !important; margin-bottom: 0; opacity: 0; }
.dd-item-pill { display: inline-block; padding: 5px 10px; border-radius: 10px; background: #dcfce7; color: #15803d; font-weight: 700; font-size: 13px; margin: 3px 4px 0 0; }
.dd-item-pill.extra { background: #FDF0DF; color: #9a5a0f; }
.theme-dark .dd-item-pill { background: rgba(34,197,94,.15); color: #86efac; }
.dd-card-done { opacity: .75; }
.dd-status { font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 8px; text-transform: uppercase; }
.dd-swipe-hint { font-size: 12px; text-align: center; opacity: .55; margin: -4px 0 10px; }

/* undo bar */
.dd-undo { position: fixed; left: 12px; right: 12px; bottom: calc(80px + env(safe-area-inset-bottom)); background: #23272b; color: #fff; border-radius: 14px; padding: 12px 14px; display: flex; align-items: center; gap: 10px; z-index: 200; transform: translateY(40px); opacity: 0; visibility: hidden; transition: all .25s ease; box-shadow: 0 10px 30px rgba(0,0,0,.3); }
.dd-undo.show { transform: translateY(0); opacity: 1; visibility: visible; }
.dd-undo .dd-undo-text { flex: 1; font-size: 14px; font-weight: 600; }
.dd-undo a { color: #86efac !important; font-weight: 800; text-transform: uppercase; font-size: 14px; padding: 4px 8px; }
.dd-undo .dd-undo-bar { position: absolute; left: 0; bottom: 0; height: 3px; background: #86efac; border-radius: 0 0 14px 14px; width: 100%; }

/* flash message */
.dd-flash { margin: 0 15px 15px; border-radius: 14px; padding: 12px 14px; font-weight: 600; display: flex; gap: 10px; align-items: center; }

/* calendar */
.dd-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; text-align: center; }
.dd-cal .h { font-size: 11px; font-weight: 800; opacity: .5; padding: 2px 0; }
.dd-cal .d { border-radius: 10px; padding: 6px 0 4px; font-weight: 700; font-size: 13px; background: rgba(0,0,0,.03); min-height: 44px; }
.theme-dark .dd-cal .d { background: rgba(255,255,255,.04); }
.dd-cal .d small { display: block; font-size: 10px; font-weight: 700; opacity: .9; }
.dd-cal .d.delivered { background: #E4F5EA; color: #1f7a45; }
.dd-cal .d.skipped { background: #EEF1F3; color: #6b747d; text-decoration: line-through; }
.dd-cal .d.pending { background: #dcfce7; color: #15803d; }
.dd-cal .d.paused { background: #FDF0DF; color: #9a5a0f; }
.dd-cal .d.today { outline: 2px solid var(--dd-brand); }
.dd-legend span { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; margin-right: 10px; }
.dd-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* simple table for reports */
.dd-table { width: 100%; font-size: 13px; }
.dd-table th { font-size: 11px; text-transform: uppercase; opacity: .6; font-weight: 800; padding: 6px 4px; border-bottom: 1px solid rgba(0,0,0,.08); }
.dd-table td { padding: 8px 4px; border-bottom: 1px solid rgba(0,0,0,.05); }
.dd-table .r { text-align: right; }
.dd-table tfoot td { font-weight: 800; border-top: 2px solid rgba(0,0,0,.1); }

/* POS product tiles */
.dd-pos-tile { border-radius: 16px; background: #fff; padding: 12px; box-shadow: 0 4px 18px rgba(0,0,0,.05); text-align: center; position: relative; cursor: pointer; }
.theme-dark .dd-pos-tile { background: #1b1d21; }
.dd-pos-tile .e { font-size: 30px; }
.dd-pos-tile .n { font-weight: 700; font-size: 13px; line-height: 1.2; }
.dd-pos-tile .p { font-size: 12px; opacity: .6; }
.dd-pos-tile .q { position: absolute; top: 8px; right: 8px; background: var(--dd-brand); color: #fff; border-radius: 12px; min-width: 24px; padding: 0 6px; font-weight: 800; font-size: 12px; line-height: 24px; display: none; }
.dd-pos-tile.has .q { display: block; }

/* receipt */
.dd-receipt { background: #fff; border-radius: 18px; padding: 20px; }
.dd-receipt .big { font-size: 34px; font-weight: 800; }

@media print {
    #footer-bar, .header, .dd-fab, .no-print { display: none !important; }
    .page-content { padding-top: 0 !important; }
}

/* tiles that are links keep normal text colour */
a.dd-stat, a.dd-action, a.dd-row { color: inherit; }
.theme-light a.dd-stat .dd-stat-value:not([class*="amt-"]), .theme-light a.dd-row h5:not([class*="amt-"]) { color: #1f1f1f; }
.theme-dark a.dd-stat .dd-stat-value:not([class*="amt-"]), .theme-dark a.dd-row h5:not([class*="amt-"]) { color: #fff; }

/* customer picker (search) */
.dd-picker-chosen { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: rgba(34,197,94,.07); margin-bottom: 8px; }
.dd-picker-chosen .n { font-weight: 800; font-size: 15px; }
.dd-picker-chosen .s { font-size: 12px; opacity: .65; }
.dd-picker-chosen .x { font-size: 16px; padding: 2px 8px; color: var(--dd-red); font-weight: 800; }
.dd-picker-wrap { position: relative; }
.dd-picker-wrap > i { position: absolute; left: 12px; top: 14px; opacity: .45; }
.dd-picker-search { width: 100%; height: 44px; border-radius: 12px; border: 1px solid rgba(0,0,0,.12); padding: 0 12px 0 36px; font-size: 15px; background: transparent; color: inherit; }
.dd-picker-list { display: none; max-height: 300px; overflow-y: auto; border: 1px solid rgba(0,0,0,.08); border-radius: 12px; margin-top: 6px; background: #fff; box-shadow: 0 8px 24px rgba(0,0,0,.08); }
.theme-dark .dd-picker-list { background: #1b1d21; }
.dd-picker-list.open { display: block; }
.dd-picker-item { display: block; padding: 10px 12px; border-bottom: 1px solid rgba(0,0,0,.05); color: inherit !important; }
.dd-picker-item b { display: block; font-size: 14px; }
.dd-picker-item small { font-size: 12px; opacity: .65; }
.dd-picker-none { padding: 12px; font-size: 13px; opacity: .7; }

/* product icon choices with meaning */
.dd-icon-chips label { display: inline-flex; flex-direction: column; align-items: center; min-width: 64px; padding: 6px 8px !important; border-radius: 12px !important; }
.dd-icon-chips label small { font-size: 10px; opacity: .75; line-height: 1.1; margin-top: 2px; }

.dd-chips a.bg-theme { color: inherit !important; }

/* ===== Dashboard mockup (home) ===== */
.dd-dash-top {
    height: auto !important;
    min-height: 64px;
    padding: 10px 14px 8px !important;
    background: rgba(255,255,255,.96);
    box-shadow: 0 1px 0 rgba(15,23,42,.06);
    display: block !important;
}
.theme-light .dd-dash-top {
    background: rgba(255,255,255,.96) !important;
}
.dd-dash-top .dd-dash-top-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
}
.dd-dash-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    color: inherit;
    text-decoration: none !important;
}
.dd-dash-brand-logo {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(34,197,94,.28);
    flex-shrink: 0;
}
.dd-dash-brand-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.15;
}
.dd-dash-brand-line {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
}
.dd-dash-brand-line b {
    color: #16a34a;
    font-weight: 800;
    letter-spacing: .3px;
}
.dd-dash-brand-line em {
    font-style: normal;
    font-weight: 600;
}
.dd-dash-brand-name {
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.theme-dark .dd-dash-brand-name { color: #fff; }
.dd-dash-top-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* Uniform app header (Delivery-style, dynamic title) */
.dd-app-top .dd-dash-top-inner {
    gap: 8px;
}
.dd-app-back {
    flex-shrink: 0;
}
.dd-app-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
    color: inherit;
    text-decoration: none !important;
}
.dd-app-brand-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.15;
}
.dd-app-brand-title {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
.theme-dark .dd-app-brand-title { color: #f8fafc; }
.dd-app-brand-sub {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #16a34a;
}
.dd-app-live-dot,
.dd-deliv-live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22c55e;
    display: inline-block;
    flex-shrink: 0;
    box-shadow: 0 0 0 3px rgba(34,197,94,.18);
}
.dd-dash-icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(15,23,42,.08);
    background: #fff;
    color: #334155 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 2px 8px rgba(15,23,42,.04);
}
.theme-dark .dd-dash-icon-btn {
    background: #1b1d21;
    border-color: rgba(255,255,255,.1);
    color: #e5e7eb !important;
}
.dd-dash-dot {
    position: absolute;
    top: 8px;
    right: 9px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    border: 2px solid #fff;
}
.theme-dark .dd-dash-dot { border-color: #1b1d21; }

.dd-dash {
    padding: 4px 0 12px;
}
.dd-dash-welcome {
    margin: 0 15px 14px;
    padding: 16px 16px 15px;
    border-radius: 20px;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 55%, #bbf7d0 100%);
    border: 1px solid rgba(34,197,94,.28);
    box-shadow: 0 10px 28px rgba(34,197,94,.08);
}
.theme-dark .dd-dash-welcome {
    background: linear-gradient(135deg, rgba(34,197,94,.18), rgba(34,197,94,.08));
    border-color: rgba(34,197,94,.25);
}
.dd-dash-welcome-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}
.dd-dash-date {
    font-size: 12px;
    font-weight: 600;
    color: #166534;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.theme-dark .dd-dash-date { color: #86efac; }
.dd-dash-live {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(255,255,255,.72);
    color: #15803d;
    font-size: 11px;
    font-weight: 800;
}
.theme-dark .dd-dash-live {
    background: rgba(255,255,255,.1);
    color: #86efac;
}
.dd-dash-live i { font-size: 7px; color: #22c55e; }
.dd-dash-greet {
    margin: 0;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -.4px;
    color: #0f172a;
    line-height: 1.2;
}
.theme-dark .dd-dash-greet { color: #fff; }
.dd-dash-sub {
    margin: 6px 0 0;
    font-size: 13px;
    color: #3f6212;
    opacity: .85;
}
.theme-dark .dd-dash-sub { color: #bbf7d0; }

.dd-dash-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 0 15px;
    margin-bottom: 18px;
}
.dd-metric {
    background: #fff;
    border: 1px solid rgba(15,23,42,.06);
    border-radius: 18px;
    padding: 12px 12px 10px;
    box-shadow: 0 8px 22px rgba(15,23,42,.045);
    color: inherit;
    text-decoration: none !important;
    min-height: 118px;
    display: flex;
    flex-direction: column;
}
.theme-dark .dd-metric { background: #1b1d21; border-color: rgba(255,255,255,.06); }
.dd-metric-head {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}
.dd-metric-ico {
    width: 28px;
    height: 28px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}
.dd-metric-title {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .3px;
    flex: 1;
}
.dd-metric-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 3px 7px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #64748b;
}
.dd-metric-value {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -.4px;
    line-height: 1.1;
    color: #0f172a;
}
.dd-metric-value span {
    font-size: 14px;
    font-weight: 700;
    color: #94a3b8;
}
.theme-dark .dd-metric-value { color: #fff; }
.dd-metric-sub {
    margin-top: 4px;
    font-size: 11px;
    color: #64748b;
    font-weight: 600;
}
.dd-metric-bar {
    margin-top: auto;
    padding-top: 10px;
    height: 4px;
    border-radius: 999px;
    background: #eef2f7;
    overflow: hidden;
}
.dd-metric-bar i {
    display: block;
    height: 100%;
    border-radius: inherit;
    font-style: normal;
}
.dd-metric--blue .dd-metric-ico { background: #e0f2fe; }
.dd-metric--blue .dd-metric-title { color: #0284c7; }
.dd-metric--blue .dd-metric-badge { background: #e0f2fe; color: #0369a1; }
.dd-metric--blue .dd-metric-bar i { background: #38bdf8; }
.dd-metric--cyan .dd-metric-ico { background: #cffafe; }
.dd-metric--cyan .dd-metric-title { color: #0e7490; }
.dd-metric--cyan .dd-metric-badge { background: #cffafe; color: #0e7490; }
.dd-metric--cyan .dd-metric-bar i { background: #22d3ee; }
.dd-metric--green .dd-metric-ico { background: #dcfce7; }
.dd-metric--green .dd-metric-title { color: #15803d; }
.dd-metric--green .dd-metric-badge { background: #dcfce7; color: #15803d; }
.dd-metric--green .dd-metric-bar i { background: #22c55e; }
.dd-metric--red .dd-metric-ico { background: #fee2e2; }
.dd-metric--red .dd-metric-title { color: #b91c1c; }
.dd-metric--red .dd-metric-badge { background: #fee2e2; color: #b91c1c; }
.dd-metric--red .dd-metric-bar i { background: #f87171; }

.dd-dash-block {
    padding: 0 15px;
    margin-bottom: 18px;
}
.dd-dash-kicker {
    margin: 0 2px 10px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .7px;
    text-transform: uppercase;
    color: #94a3b8;
}
.dd-dash-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.dd-qa {
    background: #fff;
    border: 1px solid rgba(15,23,42,.06);
    border-radius: 18px;
    padding: 14px 8px 12px;
    text-align: center;
    box-shadow: 0 8px 22px rgba(15,23,42,.04);
    color: inherit;
    text-decoration: none !important;
    min-height: 112px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.theme-dark .dd-qa { background: #1b1d21; border-color: rgba(255,255,255,.06); }
.dd-qa-ico {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 8px;
}
.dd-qa strong {
    display: block;
    font-size: 12px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
}
.theme-dark .dd-qa strong { color: #fff; }
.dd-qa small {
    display: block;
    margin-top: 3px;
    font-size: 10px;
    font-weight: 600;
    color: #94a3b8;
}
.dd-qa--blue .dd-qa-ico { background: #e0f2fe; }
.dd-qa--orange .dd-qa-ico { background: #ffedd5; }
.dd-qa--rose .dd-qa-ico { background: #ffe4e6; }
.dd-qa--green .dd-qa-ico { background: #dcfce7; }
.dd-qa--pink .dd-qa-ico { background: #fce7f3; }
.dd-qa--indigo .dd-qa-ico { background: #e0e7ff; }

.dd-dash-panel {
    background: #fff;
    border: 1px solid rgba(15,23,42,.06);
    border-radius: 20px;
    padding: 14px 14px 12px;
    box-shadow: 0 8px 24px rgba(15,23,42,.045);
}
.theme-dark .dd-dash-panel { background: #1b1d21; border-color: rgba(255,255,255,.06); }
.dd-dash-need-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(15,23,42,.05);
}
.dd-dash-need-row:last-of-type { border-bottom: 0; }
.dd-dash-need-row .dd-main h5,
.dd-dash-need-row .dd-end h5 {
    margin: 0;
    font-size: 14px;
    font-weight: 800;
}
.dd-dash-link {
    display: inline-block;
    margin-top: 8px;
    font-size: 12px;
    font-weight: 800;
    color: #16a34a !important;
}
.dd-dash-status-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}
.dd-dash-live-dot {
    font-size: 8px;
    color: #22c55e;
    margin-right: 4px;
    vertical-align: middle;
}
.dd-dash-status-meta {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
}
.dd-dash-status-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(15,23,42,.05);
    color: inherit;
    text-decoration: none !important;
}
.dd-dash-status-item:last-child { border-bottom: 0; padding-bottom: 2px; }
.dd-dash-status-num {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #f1f5f9;
    color: #475569;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 13px;
    flex-shrink: 0;
}
.theme-dark .dd-dash-status-num { background: rgba(255,255,255,.06); color: #cbd5e1; }
.dd-dash-status-main { flex: 1; min-width: 0; }
.dd-dash-status-main strong {
    display: block;
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
}
.theme-dark .dd-dash-status-main strong { color: #fff; }
.dd-dash-status-main small {
    display: block;
    margin-top: 2px;
    font-size: 11px;
    color: #94a3b8;
    font-weight: 600;
}
.dd-dash-status-badge {
    font-size: 11px;
    font-weight: 800;
    padding: 5px 9px;
    border-radius: 999px;
    border: 1.5px solid;
    flex-shrink: 0;
}
.dd-dash-status-badge.is-pending {
    color: #c2410c;
    border-color: #fdba74;
    background: #fff7ed;
}
.dd-dash-status-badge.is-done {
    color: #15803d;
    border-color: #86efac;
    background: #f0fdf4;
}
.page-content.header-clear-medium {
    padding-top: 78px !important;
}


/* ===== Lucide icon system ===== */
.dd-lucide,
i[data-lucide],
svg.dd-lucide,
svg.lucide {
    width: 1.15em;
    height: 1.15em;
    stroke: currentColor;
    fill: none;
    flex-shrink: 0;
    vertical-align: -0.15em;
}
#footer-bar a > svg.lucide,
#footer-bar a > svg.dd-lucide {
    width: 20px;
    height: 20px;
    display: block;
    margin: 0 auto 2px;
}
.header-icon svg.lucide,
.header-icon svg.dd-lucide,
.dd-dash-icon-btn svg.lucide,
.dd-dash-icon-btn svg.dd-lucide {
    width: 18px;
    height: 18px;
    display: block;
}
.dd-dash-date svg,
.dd-dash-live svg {
    width: 14px;
    height: 14px;
    display: inline-block;
    vertical-align: -2px;
    margin-right: 4px;
}
.dd-fab svg.lucide,
.dd-fab svg.dd-lucide {
    width: 24px;
    height: 24px;
    stroke: #fff;
}
.input-style.has-icon > svg.dd-lucide:first-of-type,
.input-style.has-icon > svg.lucide:first-of-type,
.input-style.has-icon > i.dd-lucide:first-child {
    position: absolute;
    top: 50%;
    left: 14px;
    width: 16px !important;
    height: 16px !important;
    margin-top: -8px;
    z-index: 2;
    color: var(--dd-brand);
}
.dd-picker-wrap > svg.lucide,
.dd-picker-wrap > svg.dd-lucide,
.dd-picker-wrap > i.dd-lucide {
    position: absolute;
    left: 12px;
    top: 14px;
    width: 16px;
    height: 16px;
    opacity: .45;
    z-index: 2;
}
.dd-emoji.dd-emoji-icon {
    background: #f0fdf4;
}
.dd-emoji.dd-emoji-icon svg {
    width: 20px;
    height: 20px;
    color: #16a34a;
}
.dd-empty-ico {
    width: 64px;
    height: 64px;
    margin: 0 auto;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f0fdf4;
    color: #16a34a;
}
.theme-dark .dd-empty-ico { background: rgba(34,197,94,.12); color: #4ade80; }
.dd-empty-ico svg { width: 28px; height: 28px; }
.dd-chip-ico, .dd-tab-ico {
    width: 14px;
    height: 14px;
    display: inline;
    vertical-align: -2px;
    margin-right: 2px;
}
.dd-metric-ico svg,
.dd-qa-ico svg,
.dd-action-icon svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
}
.dd-metric-ico, .dd-qa-ico, .dd-action-icon {
    color: #0f172a;
}
.dd-metric--blue .dd-metric-ico, .dd-qa--blue { color: #0284c7; }
.dd-metric--cyan .dd-metric-ico { color: #0e7490; }
.dd-metric--green .dd-metric-ico, .dd-qa--green { color: #15803d; }
.dd-metric--red .dd-metric-ico { color: #b91c1c; }
.dd-qa--orange { color: #c2410c; }
.dd-qa--rose { color: #e11d48; }
.dd-qa--pink { color: #db2777; }
.dd-qa--indigo { color: #4f46e5; }
.dd-qa-ico svg { color: inherit; }
.me-1.svg-inline, .me-1.dd-lucide, svg.me-1 { margin-right: .35rem; }
.me-2.svg-inline, .me-2.dd-lucide, svg.me-2 { margin-right: .5rem; }

/* ===== Deliveries screen (mockup) ===== */
.dd-deliv {
    padding: 4px 0 28px;
}
.dd-deliv-toolbar {
    padding: 0 15px 8px;
}
.dd-deliv-monthrow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}
.dd-deliv-month {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid rgba(15,23,42,.06);
    box-shadow: 0 4px 14px rgba(15,23,42,.04);
    font-weight: 800;
    font-size: 14px;
    color: #0f172a;
    cursor: pointer;
    margin: 0;
    text-decoration: none !important;
    min-width: 0;
}
.theme-dark .dd-deliv-month {
    background: #1b1d21;
    color: #f8fafc;
    border-color: rgba(255,255,255,.08);
}
.dd-deliv-month svg { width: 16px; height: 16px; color: #16a34a; flex-shrink: 0; }
.dd-deliv-month-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    min-width: 0;
}
.dd-deliv-month-copy strong {
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}
.dd-deliv-month-copy small {
    font-size: 10px;
    font-weight: 700;
    color: #64748b;
    text-transform: none;
}
.dd-deliv-month-chev { width: 14px !important; height: 14px !important; opacity: .45; color: inherit !important; }
.dd-deliv-month input[type=date] {
    display: none;
}
.dd-deliv-daynav {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.dd-deliv-navbtn {
    width: 34px;
    height: 34px;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid rgba(15,23,42,.06);
    color: #0f172a;
    box-shadow: 0 2px 8px rgba(15,23,42,.04);
}
.theme-dark .dd-deliv-navbtn {
    background: #1b1d21;
    color: #f8fafc;
    border-color: rgba(255,255,255,.08);
}
.dd-deliv-navbtn svg { width: 16px; height: 16px; }
.dd-deliv-today {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 999px;
    background: #ecfdf5;
    color: #15803d;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none !important;
}
.dd-deliv-today.is-today {
    background: #16a34a;
    color: #fff;
}
.dd-deliv-today.is-today .dd-deliv-live-dot {
    background: #fff;
    box-shadow: 0 0 0 3px rgba(255,255,255,.25);
}

/* Bottom tray date picker */
.dd-date-tray {
    padding: 10px 16px 22px !important;
    border-radius: 28px 28px 0 0 !important;
    max-height: 88vh;
    overflow: auto;
}
.dd-date-tray-handle {
    width: 42px;
    height: 4px;
    border-radius: 999px;
    background: #d1d5db;
    margin: 2px auto 14px;
}
.dd-date-tray-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}
.dd-date-tray-title {
    display: flex;
    align-items: center;
    gap: 10px;
}
.dd-date-tray-ico {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #ecfdf5;
    color: #16a34a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.dd-date-tray-ico svg { width: 18px; height: 18px; }
.dd-date-tray-title h1 {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
}
.theme-dark .dd-date-tray-title h1 { color: #f8fafc; }
.dd-date-tray-title p {
    margin: 2px 0 0;
    font-size: 12px;
    font-weight: 600;
    color: #94a3b8;
}
.dd-date-tray-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f1f5f9;
    color: #0f172a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
}
.theme-dark .dd-date-tray-close {
    background: rgba(255,255,255,.08);
    color: #f8fafc;
}
.dd-date-tray-close svg { width: 16px; height: 16px; }
.dd-date-tray-quick {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    margin-bottom: 14px;
    scrollbar-width: none;
}
.dd-date-tray-quick::-webkit-scrollbar { display: none; }
.dd-date-pill {
    flex: 0 0 auto;
    padding: 9px 14px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #334155;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none !important;
    white-space: nowrap;
}
.theme-dark .dd-date-pill {
    background: rgba(255,255,255,.08);
    color: #e2e8f0;
}
.dd-date-pill.is-active,
.dd-date-pill-today.is-active {
    background: #16a34a;
    color: #fff;
    box-shadow: 0 8px 16px rgba(22,163,74,.25);
}
.dd-date-tray-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.dd-date-tray-nav strong {
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
}
.theme-dark .dd-date-tray-nav strong { color: #f8fafc; }
.dd-date-navbtn {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: #f1f5f9;
    color: #0f172a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.theme-dark .dd-date-navbtn {
    background: rgba(255,255,255,.08);
    color: #f8fafc;
}
.dd-date-navbtn svg { width: 16px; height: 16px; }
.dd-date-tray-week,
.dd-date-tray-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    text-align: center;
}
.dd-date-tray-week {
    margin-bottom: 6px;
}
.dd-date-tray-week span {
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    padding: 6px 0;
}
.dd-date-cell {
    height: 40px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: #0f172a;
    font-size: 14px;
    font-weight: 700;
    padding: 0;
}
.theme-dark .dd-date-cell { color: #f8fafc; }
.dd-date-cell.is-muted { color: #cbd5e1; font-weight: 600; }
.theme-dark .dd-date-cell.is-muted { color: #475569; }
.dd-date-cell.is-today:not(.is-selected) {
    box-shadow: inset 0 0 0 1.5px #86efac;
    color: #15803d;
}
.dd-date-cell.is-selected {
    background: #16a34a;
    color: #fff !important;
    box-shadow: 0 6px 14px rgba(22,163,74,.28);
}
.dd-deliv-shifts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 4px;
    border-radius: 18px;
    background: #f1f5f9;
    margin-bottom: 12px;
}
.theme-dark .dd-deliv-shifts { background: rgba(255,255,255,.06); }
.dd-deliv-shift {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 46px;
    border-radius: 14px;
    font-weight: 800;
    font-size: 14px;
    color: #64748b;
    text-decoration: none !important;
}
.dd-deliv-shift svg { width: 16px; height: 16px; }
.dd-deliv-shift.is-active {
    background: #16a34a;
    color: #fff;
    box-shadow: 0 8px 18px rgba(22,163,74,.28);
}
.dd-deliv-boy {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    background: #fff;
    border-radius: 16px;
    border: 1px solid rgba(15,23,42,.06);
    box-shadow: 0 4px 14px rgba(15,23,42,.04);
    overflow: hidden;
}
.theme-dark .dd-deliv-boy {
    background: #1b1d21;
    border-color: rgba(255,255,255,.08);
}
.dd-deliv-boy-ico {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #16a34a;
    flex-shrink: 0;
}
.dd-deliv-boy-ico svg { width: 18px; height: 18px; }
.dd-deliv-boy select {
    flex: 1;
    height: 48px;
    border: 0;
    background: transparent;
    font-weight: 700;
    font-size: 14px;
    color: inherit;
    appearance: none;
    padding-right: 36px;
    outline: none;
}
.dd-deliv-boy-chev {
    position: absolute;
    right: 14px;
    width: 16px;
    height: 16px;
    opacity: .4;
    pointer-events: none;
}
.dd-deliv-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 12px;
}
.dd-deliv-sumcard {
    background: #fff;
    border-radius: 18px;
    padding: 14px;
    border: 1px solid rgba(15,23,42,.05);
    box-shadow: 0 6px 18px rgba(15,23,42,.05);
    min-height: 108px;
}
.theme-dark .dd-deliv-sumcard {
    background: #1b1d21;
    border-color: rgba(255,255,255,.06);
}
.dd-deliv-sumlabel {
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 6px;
}
.dd-deliv-sumhead {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}
.dd-deliv-fuel {
    width: 28px;
    height: 28px;
    border-radius: 10px;
    background: #ecfdf5;
    color: #16a34a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.dd-deliv-fuel svg { width: 14px; height: 14px; }
.dd-deliv-sumvalue {
    font-size: 28px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -.03em;
    line-height: 1.1;
}
.theme-dark .dd-deliv-sumvalue { color: #f8fafc; }
.dd-deliv-sumof {
    font-size: 16px;
    font-weight: 700;
    color: #94a3b8;
}
.dd-deliv-progress {
    margin-top: 14px;
    height: 6px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}
.theme-dark .dd-deliv-progress { background: rgba(255,255,255,.08); }
.dd-deliv-progress > i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #4ade80, #16a34a);
}
.dd-deliv-loadline {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}
.dd-deliv-loadico { font-size: 16px; line-height: 1; }
.dd-deliv-loadtxt {
    font-size: 13px;
    color: #334155;
    line-height: 1.25;
}
.theme-dark .dd-deliv-loadtxt { color: #e2e8f0; }
.dd-deliv-loadtxt b { color: #0f172a; font-weight: 800; }
.theme-dark .dd-deliv-loadtxt b { color: #fff; }
.dd-deliv-loadempty {
    font-size: 13px;
    color: #94a3b8;
    margin-bottom: 8px;
}
.dd-deliv-dispatch {
    display: inline-flex;
    margin-top: 6px;
    padding: 4px 8px;
    border-radius: 999px;
    background: #ecfdf5;
    color: #15803d;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .02em;
}
.theme-dark .dd-deliv-dispatch {
    background: rgba(34,197,94,.15);
    color: #86efac;
}
.dd-deliv-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0 15px 12px;
    padding: 9px 12px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
}
.theme-dark .dd-deliv-hint { background: rgba(255,255,255,.06); color: #94a3b8; }
.dd-deliv-hint-bar {
    width: 3px;
    height: 14px;
    border-radius: 4px;
}
.dd-deliv-hint-bar.is-green { background: #22c55e; }
.dd-deliv-hint-bar.is-red { background: #ef4444; }
.dd-deliv-list { padding-bottom: 4px; }
.dd-deliv-done-title {
    margin: 8px 18px 10px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #94a3b8;
}
.dd-deliv-empty {
    margin: 0 15px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 6px 18px rgba(15,23,42,.05);
}
.theme-dark .dd-deliv-empty { background: #1b1d21; }

/* Delivery cards */
.dd-deliv .dd-swipe-wrap {
    margin: 0 15px 12px;
    border-radius: 20px;
}
.dd-deliv .dd-swipe-card.dd-deliv-card {
    border-radius: 20px;
    padding: 0;
    box-shadow: none;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    background: #fff;
}
.theme-dark .dd-deliv .dd-swipe-card.dd-deliv-card {
    background: #1b1d21;
    border-color: rgba(255,255,255,.08);
}
.dd-deliv-card-body {
    padding: 16px 16px 14px;
}
.dd-deliv-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}
.dd-deliv-card-who { flex: 1; min-width: 0; }
.dd-deliv-card-name {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    color: #111827;
    letter-spacing: -.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}
.theme-dark .dd-deliv-card-name { color: #f8fafc; }
.dd-deliv-card-addr {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 5px 0 0;
    font-size: 12.5px;
    font-weight: 500;
    color: #6b7280;
    line-height: 1.3;
}
.dd-deliv-card-addr span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dd-deliv-card-addr svg {
    width: 13px;
    height: 13px;
    color: #9ca3af;
    flex-shrink: 0;
}
.dd-deliv-card-bal {
    text-align: right;
    flex-shrink: 0;
    padding-top: 1px;
}
.dd-deliv-card-amt {
    font-size: 17px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -.02em;
}
.dd-deliv-card-amt.amt-red { color: #dc2626 !important; }
.dd-deliv-bal-tag {
    display: inline-block;
    margin-top: 5px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    background: #f3f4f6;
    color: #6b7280;
    line-height: 1;
}
.dd-deliv-bal-tag--red { background: #fee2e2; color: #dc2626; }
.dd-deliv-bal-tag--green { background: #dcfce7; color: #15803d; }
.dd-deliv-bal-tag--orange { background: #ffedd5; color: #c2410c; }
.dd-deliv-bal-tag--gray { background: #f3f4f6; color: #6b7280; }
.dd-deliv-card-items {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.dd-deliv .dd-item-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: 999px;
    background: #e8f8ef;
    color: #166534;
    font-size: 13px;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}
.dd-deliv .dd-item-pill.extra {
    background: #fff7ed;
    color: #9a3412;
}
.dd-deliv-pill-emoji { font-size: 15px; line-height: 1; }
.dd-deliv-pill-txt { font-weight: 700; }
.dd-deliv-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 0;
    padding: 12px 14px 12px 16px;
    border-top: 1px solid #f1f5f9;
    background: #fff;
}
.theme-dark .dd-deliv-card-foot {
    border-top-color: rgba(255,255,255,.06);
    background: #1b1d21;
}
.dd-deliv-card-today {
    font-size: 14px;
    color: #111827;
    font-weight: 800;
    letter-spacing: -.01em;
    white-space: nowrap;
}
.theme-dark .dd-deliv-card-today { color: #f8fafc; }
.dd-deliv-card-right {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.dd-deliv-card-acts {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.dd-deliv-act {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    padding: 0;
    text-decoration: none !important;
    cursor: pointer;
    flex-shrink: 0;
}
.dd-deliv-act svg { width: 18px; height: 18px; stroke-width: 2.25; }
.dd-deliv-act--call {
    background: #fff;
    color: #16a34a;
    border: 1.5px solid #e5e7eb !important;
    box-shadow: none;
}
.theme-dark .dd-deliv-act--call {
    background: #121417;
    border-color: rgba(255,255,255,.12) !important;
}
.dd-deliv-act--ok {
    background: #16a34a;
    color: #fff;
    box-shadow: none;
}
.dd-deliv-card-more {
    display: inline-flex;
    align-items: center;
    margin: 0;
    font-size: 11px;
    font-weight: 600;
    color: #9ca3af;
    white-space: nowrap;
    line-height: 1;
}
.dd-deliv-card.dd-card-done {
    opacity: .78;
}

/* Delivery card bottom sheet */
.dd-sheet {
    padding: 8px 0 18px !important;
    border-radius: 28px 28px 0 0 !important;
    background: #fff !important;
}
.theme-dark .dd-sheet { background: #16181c !important; }
.dd-sheet-handle {
    width: 42px;
    height: 4px;
    border-radius: 999px;
    background: #d1d5db;
    margin: 4px auto 12px;
}
.dd-sheet-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 0 16px 14px;
    border-bottom: 1px solid #f1f5f9;
}
.theme-dark .dd-sheet-head { border-bottom-color: rgba(255,255,255,.06); }
.dd-sheet-head-main { min-width: 0; flex: 1; }
.dd-sheet-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.dd-sheet-name-row h1 {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
    color: #111827;
    letter-spacing: -.02em;
    line-height: 1.15;
}
.theme-dark .dd-sheet-name-row h1 { color: #f8fafc; }
.dd-sheet-flat {
    display: inline-flex;
    align-items: center;
    padding: 4px 9px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #6b7280;
    font-size: 11px;
    font-weight: 700;
    max-width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.theme-dark .dd-sheet-flat {
    background: rgba(255,255,255,.08);
    color: #cbd5e1;
}
.dd-sheet-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
}
.dd-sheet-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    background: #fff7ed;
    color: #c2410c;
    font-size: 12px;
    font-weight: 700;
}
.dd-sheet-status > i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #f59e0b;
    display: inline-block;
}
.dd-sheet-status.is-done {
    background: #ecfdf5;
    color: #15803d;
}
.dd-sheet-status.is-done > i { background: #22c55e; }
.dd-sheet-status.is-skip {
    background: #f3f4f6;
    color: #6b7280;
}
.dd-sheet-status.is-skip > i { background: #9ca3af; }
.dd-sheet-route {
    font-size: 12px;
    font-weight: 600;
    color: #9ca3af;
}
.dd-sheet-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f3f4f6;
    color: #111827;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
    flex-shrink: 0;
}
.theme-dark .dd-sheet-close {
    background: rgba(255,255,255,.08);
    color: #f8fafc;
}
.dd-sheet-close svg { width: 16px; height: 16px; }
.dd-sheet-body { padding: 14px 16px 8px; }
.dd-sheet-sec-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 4px 0 10px;
}
.dd-sheet-sec-head > span {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #9ca3af;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.dd-sheet-sec-head em {
    font-style: normal;
    padding: 4px 9px;
    border-radius: 999px;
    background: #ecfdf5;
    color: #15803d;
    font-size: 11px;
    font-weight: 800;
}
.dd-sheet-sec-head--extra > span {
    text-transform: none;
    letter-spacing: 0;
    font-size: 13px;
    color: #16a34a;
    font-weight: 800;
}
.dd-sheet-sec-head--extra svg {
    width: 15px;
    height: 15px;
}
.dd-sheet-sec-head--extra small {
    color: #9ca3af;
    font-size: 11px;
    font-weight: 600;
}
.dd-sheet-items { display: grid; gap: 8px; margin-bottom: 16px; }
.dd-sheet-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    background: #fff;
}
.theme-dark .dd-sheet-item {
    background: #1b1d21;
    border-color: rgba(255,255,255,.08);
}
.dd-sheet-item--extra {
    background: #f8fdf9;
    border-color: #d1fae5;
}
.theme-dark .dd-sheet-item--extra {
    background: rgba(34,197,94,.06);
    border-color: rgba(34,197,94,.2);
}
.dd-sheet-item-ico {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: #ecfdf5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    color: #16a34a;
}
.dd-sheet-item-ico.is-muted,
.dd-sheet-item--extra .dd-sheet-item-ico {
    background: #f3f4f6;
    color: #6b7280;
}
.dd-sheet-item-ico svg { width: 20px; height: 20px; }
.dd-sheet-item-main { flex: 1; min-width: 0; }
.dd-sheet-item-main h5 {
    margin: 0;
    font-size: 15px;
    font-weight: 800;
    color: #111827;
}
.theme-dark .dd-sheet-item-main h5 { color: #f8fafc; }
.dd-sheet-item-main p {
    margin: 2px 0 0;
    font-size: 12px;
    font-weight: 600;
    color: #9ca3af;
}
.dd-sheet-select {
    width: 100%;
    border: 0;
    background: transparent;
    font-size: 15px;
    font-weight: 800;
    color: #111827;
    padding: 0;
    margin: 0;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    line-height: 1.2;
}
.theme-dark .dd-sheet-select { color: #f8fafc; }
.dd-sheet-pick {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1.5px solid #bbf7d0;
    background: #f0fdf4;
    margin-bottom: 10px;
    cursor: pointer;
}
.theme-dark .dd-sheet-pick {
    background: rgba(34,197,94,.08);
    border-color: rgba(34,197,94,.28);
}
.dd-sheet-pick-ico {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid #dcfce7;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    color: #16a34a;
}
.theme-dark .dd-sheet-pick-ico {
    background: #1b1d21;
    border-color: rgba(255,255,255,.08);
}
.dd-sheet-pick-ico svg { width: 20px; height: 20px; }
.dd-sheet-pick-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    position: relative;
}
.dd-sheet-pick-main small {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: #16a34a;
    line-height: 1;
}
.dd-sheet-pick-main em {
    font-style: normal;
    font-size: 12px;
    font-weight: 700;
    color: #6b7280;
    line-height: 1.2;
}
.dd-sheet-pick-chev {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #16a34a;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    pointer-events: none;
}
.dd-sheet-pick-chev svg { width: 16px; height: 16px; }
.dd-sheet-qtyrow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    background: #fff;
    margin-bottom: 10px;
}
.theme-dark .dd-sheet-qtyrow {
    background: #1b1d21;
    border-color: rgba(255,255,255,.08);
}
.dd-sheet-qtylabel {
    font-size: 13px;
    font-weight: 800;
    color: #374151;
}
.theme-dark .dd-sheet-qtylabel { color: #e2e8f0; }
.dd-sheet-stepper {
    gap: 6px !important;
    flex-shrink: 0;
}
.dd-sheet-stepper button {
    width: 34px !important;
    height: 34px !important;
    border-radius: 10px !important;
    background: #ecfdf5 !important;
    color: #15803d !important;
    font-size: 16px !important;
}
.dd-sheet-stepper input {
    width: 52px !important;
    height: 34px !important;
    border-radius: 10px !important;
    border: 1px solid #e5e7eb !important;
    font-size: 14px !important;
}
.dd-sheet-extra { margin-bottom: 8px; }
.dd-sheet-quick {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}
.dd-sheet-quick > span {
    font-size: 12px;
    font-weight: 700;
    color: #9ca3af;
}
.dd-sheet-chip {
    border: 0;
    background: #ecfdf5;
    color: #15803d;
    font-size: 12px;
    font-weight: 800;
    padding: 7px 12px;
    border-radius: 999px;
}
.dd-sheet-total {
    text-align: right;
    font-size: 14px;
    font-weight: 700;
    color: #374151;
    margin: 12px 0 16px;
}
.dd-sheet-total b {
    font-size: 16px;
    font-weight: 800;
    color: #111827;
}
.theme-dark .dd-sheet-total { color: #cbd5e1; }
.theme-dark .dd-sheet-total b { color: #fff; }
.dd-sheet-actions { display: grid; gap: 10px; }
.dd-sheet-actions-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.dd-sheet-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 12px 14px;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 800;
    text-decoration: none !important;
    border: 0;
}
.dd-sheet-btn svg { width: 18px; height: 18px; }
.dd-sheet-btn--primary {
    background: #16a34a;
    color: #fff !important;
    box-shadow: 0 10px 22px rgba(22,163,74,.28);
}
.dd-sheet-btn--soft {
    background: #ecfdf5;
    color: #15803d !important;
}
.dd-sheet-btn--outline {
    background: #fff;
    color: #374151 !important;
    border: 1.5px solid #e5e7eb !important;
}
.theme-dark .dd-sheet-btn--outline {
    background: #1b1d21;
    color: #e2e8f0 !important;
    border-color: rgba(255,255,255,.1) !important;
}
.dd-sheet-btn--mint {
    background: #e8f8ef;
    color: #15803d !important;
}
.dd-sheet-btn--ghost {
    background: transparent;
    color: #6b7280 !important;
    min-height: 40px;
    font-size: 13px;
}
.dd-sheet-empty {
    margin: 0;
    padding: 16px;
    text-align: center;
    color: #9ca3af;
    font-size: 13px;
    font-weight: 600;
}

@media (min-width: 992px) {
    .dd-deliv {
        max-width: 560px;
        margin: 0 auto;
    }
}

/* ===== Parties / Customers screen ===== */
.dd-party {
    padding: 4px 0 100px;
}
.dd-party-toolbar { padding: 0 15px 8px; }
.dd-party-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding: 4px;
    border-radius: 16px;
    background: #f1f5f9;
    margin-bottom: 12px;
}
.theme-dark .dd-party-tabs { background: rgba(255,255,255,.06); }
.dd-party-tabs a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 42px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 800;
    color: #64748b;
    text-decoration: none !important;
}
.dd-party-tabs a svg { width: 15px; height: 15px; }
.dd-party-tabs a.is-active {
    background: #16a34a;
    color: #fff;
    box-shadow: 0 8px 18px rgba(22,163,74,.28);
}
.dd-party-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 12px;
}
.dd-party-sumcard {
    position: relative;
    display: block;
    padding: 14px 14px 12px 16px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid #eef2f7;
    text-decoration: none !important;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(15,23,42,.04);
}
.theme-dark .dd-party-sumcard {
    background: #1b1d21;
    border-color: rgba(255,255,255,.06);
}
.dd-party-sumcard::before {
    content: '';
    position: absolute;
    left: 0;
    top: 12px;
    bottom: 12px;
    width: 4px;
    border-radius: 0 4px 4px 0;
}
.dd-party-sumcard--due::before { background: #ef4444; }
.dd-party-sumcard--adv::before { background: #22c55e; }
.dd-party-sumtop {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}
.dd-party-sumtop span {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .06em;
    color: #94a3b8;
}
.dd-party-sumtop i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
}
.dd-party-sumcard--due .dd-party-sumtop i { background: #ef4444; }
.dd-party-sumcard--adv .dd-party-sumtop i { background: #22c55e; }
.dd-party-sumcard strong {
    display: block;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -.02em;
    line-height: 1.15;
}
.dd-party-search {
    position: relative;
    display: flex;
    align-items: center;
    height: 48px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 12px rgba(15,23,42,.04);
    margin-bottom: 10px;
    overflow: hidden;
}
.theme-dark .dd-party-search {
    background: #1b1d21;
    border-color: rgba(255,255,255,.08);
}
.dd-party-search-ico {
    position: absolute;
    left: 14px;
    width: 18px;
    height: 18px;
    color: #94a3b8;
    pointer-events: none;
}
.dd-party-search input {
    flex: 1;
    height: 100%;
    border: 0;
    background: transparent;
    padding: 0 44px 0 42px;
    font-size: 14px;
    font-weight: 600;
    color: inherit;
    outline: none;
}
.dd-party-search-mic {
    position: absolute;
    right: 12px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    pointer-events: none;
}
.dd-party-search-mic svg { width: 16px; height: 16px; }
.dd-party-filters {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    margin-bottom: 12px;
    scrollbar-width: none;
}
.dd-party-filters::-webkit-scrollbar { display: none; }
.dd-party-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
    padding: 8px 12px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #e5e7eb;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none !important;
    white-space: nowrap;
}
.theme-dark .dd-party-chip {
    background: #1b1d21;
    border-color: rgba(255,255,255,.1);
    color: #cbd5e1;
}
.dd-party-chip.is-active {
    background: #16a34a;
    border-color: #16a34a;
    color: #fff;
    box-shadow: 0 6px 14px rgba(22,163,74,.25);
}
.dd-party-chip em {
    font-style: normal;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: rgba(0,0,0,.18);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 800;
}
.dd-party-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
}
.dd-party-dot.is-red { background: #ef4444; }
.dd-party-dot.is-green { background: #22c55e; }
.dd-party-list {
    margin: 0 15px;
    background: #fff;
    border-radius: 22px;
    border: 1px solid #eef2f7;
    box-shadow: 0 6px 18px rgba(15,23,42,.05);
    overflow: hidden;
}
.theme-dark .dd-party-list {
    background: #1b1d21;
    border-color: rgba(255,255,255,.06);
}
.dd-party-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 12px 12px 14px;
    border-bottom: 1px solid #f1f5f9;
}
.theme-dark .dd-party-row { border-bottom-color: rgba(255,255,255,.06); }
.dd-party-row:last-child { border-bottom: 0; }
.dd-party-row.is-off { opacity: .55; }
.dd-party-row-main {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 11px;
    color: inherit;
    text-decoration: none !important;
}
.dd-party-avatar {
    width: 42px;
    height: 42px;
    font-size: 13px;
}
.dd-party-info { flex: 1; min-width: 0; }
.dd-party-info h5 {
    margin: 0;
    font-size: 15px;
    font-weight: 800;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.theme-dark .dd-party-info h5 { color: #f8fafc; }
.dd-party-info p {
    margin: 2px 0 0;
    font-size: 12px;
    font-weight: 600;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dd-party-bal {
    text-align: right;
    flex-shrink: 0;
}
.dd-party-bal strong {
    display: block;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.15;
}
.dd-party-tag {
    display: inline-block;
    margin-top: 4px;
    padding: 3px 7px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    background: #f3f4f6;
    color: #6b7280;
    line-height: 1;
}
.dd-party-tag--red { background: #fee2e2; color: #dc2626; }
.dd-party-tag--green { background: #dcfce7; color: #15803d; }
.dd-party-tag--orange { background: #ffedd5; color: #c2410c; }
.dd-party-tag--gray { background: #f3f4f6; color: #6b7280; }
.dd-party-call {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: #f3f4f6;
    color: #475569;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    text-decoration: none !important;
}
.theme-dark .dd-party-call {
    background: rgba(255,255,255,.08);
    color: #e2e8f0;
}
.dd-party-call svg { width: 16px; height: 16px; }
.dd-party-call.is-disabled { opacity: .35; }
.dd-party-empty { padding: 8px 0; }
.dd-party-hint {
    margin: 12px 20px 0;
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
}
.dd-party-fab {
    position: fixed;
    right: 16px;
    bottom: calc(84px + env(safe-area-inset-bottom));
    z-index: 90;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 52px;
    padding: 0 18px 0 16px;
    border-radius: 999px;
    background: #16a34a;
    color: #fff !important;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none !important;
    box-shadow: 0 10px 24px rgba(22,163,74,.35);
}
.dd-party-fab svg { width: 18px; height: 18px; }

@media (min-width: 992px) {
    .dd-party {
        max-width: 560px;
        margin: 0 auto;
    }
}

/* ===== Party / Customer details ===== */
.dd-pdetail-top .dd-dash-top-inner { gap: 8px; }
.dd-pdetail-head {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}
.dd-pdetail-kicker {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #16a34a;
}
.dd-pdetail-name {
    font-size: 17px;
    font-weight: 800;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.theme-dark .dd-pdetail-name { color: #f8fafc; }

.dd-pdetail {
    padding: 4px 15px 110px;
    max-width: 560px;
    margin: 0 auto;
}
.dd-pdetail-hero {
    border-radius: 22px;
    padding: 18px 18px 20px;
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 55%, #16a34a 100%);
    color: #fff;
    box-shadow: 0 14px 28px rgba(22, 163, 74, .28);
    margin-bottom: 14px;
}
.dd-pdetail-hero-top {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 18px;
}
.dd-pdetail-hero-copy { min-width: 0; flex: 1; }
.dd-pdetail-hero-copy h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -.02em;
}
.dd-pdetail-hero-copy p {
    margin: 4px 0 0;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255,255,255,.78);
}
.dd-pdetail-hero-call {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1.5px solid rgba(255,255,255,.55);
    color: #fff !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    text-decoration: none !important;
    background: rgba(255,255,255,.12);
}
.dd-pdetail-hero-call svg { width: 18px; height: 18px; }
.dd-pdetail-hero-bal {
    text-align: center;
}
.dd-pdetail-pill {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,.92);
    color: #15803d;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .06em;
}
.dd-pdetail-hero-bal strong {
    display: block;
    margin-top: 8px;
    font-size: 34px;
    font-weight: 800;
    letter-spacing: -.03em;
    color: #fff;
    line-height: 1.1;
}
.dd-pdetail-hero-bal small {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255,255,255,.8);
}
.dd-pdetail-stopped {
    display: inline-block;
    margin-top: 8px;
    padding: 3px 10px;
    border-radius: 999px;
    background: #fff;
    color: #dc2626;
    font-size: 11px;
    font-weight: 800;
}

.dd-pdetail-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 18px;
}
.dd-pdetail-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 92px;
    padding: 14px 8px 12px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid rgba(15,23,42,.06);
    box-shadow: 0 4px 14px rgba(15,23,42,.04);
    text-decoration: none !important;
    color: inherit;
    text-align: center;
}
.theme-dark .dd-pdetail-action {
    background: #1b1d21;
    border-color: rgba(255,255,255,.06);
}
.dd-pdetail-action > span:last-child {
    font-size: 11px;
    font-weight: 700;
    line-height: 1.25;
    color: #334155;
}
.theme-dark .dd-pdetail-action > span:last-child { color: #e2e8f0; }
.dd-pdetail-action-ico {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.dd-pdetail-action-ico svg { width: 20px; height: 20px; }
.dd-pdetail-action-ico--green { background: #dcfce7; color: #16a34a; }
.dd-pdetail-action-ico--blue { background: #dbeafe; color: #2563eb; }
.dd-pdetail-action-ico--purple { background: #ede9fe; color: #7c3aed; }
.dd-pdetail-action-ico--wa { background: #dcfce7; color: #16a34a; }
.dd-pdetail-action-ico--orange { background: #ffedd5; color: #ea580c; }
.dd-pdetail-action-ico--pink { background: #fce7f3; color: #db2777; }

.dd-pdetail-sec { margin-bottom: 20px; }
.dd-pdetail-sec-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}
.dd-pdetail-sec-head h4,
.dd-pdetail-book-head h4 {
    margin: 0;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #0f172a;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.theme-dark .dd-pdetail-sec-head h4,
.theme-dark .dd-pdetail-book-head h4 { color: #f8fafc; }
.dd-pdetail-sec-head h4 .dd-app-live-dot,
.dd-pdetail-sec-head h4 .dd-deliv-live-dot { margin-right: 0; }
.dd-pdetail-book-head h4 svg { width: 16px; height: 16px; color: #16a34a; }
.dd-pdetail-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    background: #dcfce7;
    color: #15803d;
    font-size: 11px;
    font-weight: 800;
    text-decoration: none !important;
    white-space: nowrap;
}
.dd-pdetail-chip--hist { background: #f1f5f9; color: #475569; }
.dd-pdetail-chip--hist span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #16a34a;
    color: #fff;
    font-size: 10px;
}

.dd-pdetail-plan {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.dd-pdetail-plan-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 12px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid rgba(15,23,42,.06);
}
.theme-dark .dd-pdetail-plan-row {
    background: #1b1d21;
    border-color: rgba(255,255,255,.06);
}
.dd-pdetail-plan-ico {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}
.dd-pdetail-plan-ico.is-am { background: #dcfce7; }
.dd-pdetail-plan-ico.is-pm { background: #dbeafe; }
.dd-pdetail-plan-copy { min-width: 0; flex: 1; }
.dd-pdetail-plan-copy strong {
    display: block;
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
}
.theme-dark .dd-pdetail-plan-copy strong { color: #f8fafc; }
.dd-pdetail-plan-copy small {
    display: block;
    margin-top: 2px;
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
}
.dd-pdetail-plan-edit {
    font-size: 13px;
    font-weight: 800;
    color: #16a34a !important;
    text-decoration: none !important;
    flex-shrink: 0;
}
.dd-pdetail-plan-boy {
    margin: 4px 2px 0;
    font-size: 12px;
    font-weight: 600;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 6px;
}
.dd-pdetail-plan-boy svg { width: 14px; height: 14px; }

.dd-pdetail-book-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}
.dd-pdetail-book-head p {
    margin: 2px 0 0;
    font-size: 12px;
    font-weight: 600;
    color: #94a3b8;
}
.dd-pdetail-book-sum {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 14px;
    border-radius: 16px;
    margin-bottom: 10px;
}
.dd-pdetail-book-sum--due { background: #fef2f2; }
.dd-pdetail-book-sum--pay { background: #fff7ed; }
.dd-pdetail-book-sum--adv { background: #f0fdf4; }
.dd-pdetail-book-sum--clear { background: #f8fafc; }
.theme-dark .dd-pdetail-book-sum--due { background: rgba(239,68,68,.12); }
.theme-dark .dd-pdetail-book-sum--pay { background: rgba(249,115,22,.12); }
.theme-dark .dd-pdetail-book-sum--adv { background: rgba(34,197,94,.12); }
.theme-dark .dd-pdetail-book-sum--clear { background: rgba(255,255,255,.05); }
.dd-pdetail-book-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .05em;
    color: #64748b;
}
.dd-pdetail-book-sum--due .dd-pdetail-book-label { color: #dc2626; }
.dd-pdetail-book-sum--pay .dd-pdetail-book-label { color: #ea580c; }
.dd-pdetail-book-sum--adv .dd-pdetail-book-label { color: #16a34a; }
.dd-pdetail-book-label i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    display: inline-block;
}
.dd-pdetail-book-sum strong {
    display: block;
    margin-top: 4px;
    font-size: 24px;
    font-weight: 800;
    line-height: 1.1;
}
.dd-pdetail-book-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
}
.dd-pdetail-book-side b { font-weight: 800; color: #0f172a; }
.theme-dark .dd-pdetail-book-side b { color: #f8fafc; }
.dd-pdetail-legend {
    margin: 0 0 14px;
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
}
.dd-pdetail-ledger-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: #94a3b8;
}
.dd-pdetail-ledger-head em {
    font-style: normal;
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0;
}
.dd-pdetail-ledger {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
}
.dd-pdetail-ledger-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 4px;
    border-bottom: 1px solid rgba(15,23,42,.05);
}
.theme-dark .dd-pdetail-ledger-row { border-bottom-color: rgba(255,255,255,.06); }
.dd-pdetail-ledger-row:last-child { border-bottom: 0; }
.dd-pdetail-ledger-ico {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: #f1f5f9;
    color: #475569;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.theme-dark .dd-pdetail-ledger-ico { background: rgba(255,255,255,.06); color: #cbd5e1; }
.dd-pdetail-ledger-ico svg { width: 16px; height: 16px; }
.dd-pdetail-ledger-copy { min-width: 0; flex: 1; }
.dd-pdetail-ledger-copy strong {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
}
.theme-dark .dd-pdetail-ledger-copy strong { color: #f8fafc; }
.dd-pdetail-ledger-copy small {
    display: block;
    margin-top: 2px;
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
}
.dd-pdetail-ledger-amt {
    text-align: right;
    flex-shrink: 0;
}
.dd-pdetail-ledger-amt strong {
    display: block;
    font-size: 13px;
    font-weight: 800;
}
.dd-pdetail-tag {
    display: inline-flex;
    margin-top: 3px;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.dd-pdetail-tag--red { background: #fee2e2; color: #dc2626; }
.dd-pdetail-tag--green { background: #dcfce7; color: #15803d; }
.dd-pdetail-tag--orange { background: #ffedd5; color: #c2410c; }
.dd-pdetail-empty {
    padding: 18px 8px;
    text-align: center;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 600;
}
.dd-pdetail-more {
    display: inline-block;
    margin-bottom: 12px;
    font-size: 12px;
    font-weight: 800;
    color: #16a34a !important;
}
.dd-pdetail-book-btns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.dd-pdetail-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 46px;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none !important;
}
.dd-pdetail-btn svg { width: 15px; height: 15px; }
.dd-pdetail-btn--credit {
    background: #fff;
    border: 1.5px solid #fca5a5;
    color: #dc2626 !important;
}
.theme-dark .dd-pdetail-btn--credit {
    background: transparent;
    border-color: rgba(248,113,113,.55);
}
.dd-pdetail-btn--pay {
    background: #16a34a;
    border: 1.5px solid #16a34a;
    color: #fff !important;
    box-shadow: 0 8px 18px rgba(22,163,74,.28);
}

.dd-pdetail-hint {
    margin: -2px 0 10px;
    font-size: 12px;
    font-weight: 600;
    color: #94a3b8;
}
.dd-pdetail-prices {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.dd-pdetail-price-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid rgba(15,23,42,.06);
    margin: 0;
}
.theme-dark .dd-pdetail-price-row {
    background: #1b1d21;
    border-color: rgba(255,255,255,.06);
}
.dd-pdetail-price-ico {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: #f8fafc;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}
.theme-dark .dd-pdetail-price-ico { background: rgba(255,255,255,.06); }
.dd-pdetail-price-copy { min-width: 0; flex: 1; }
.dd-pdetail-price-copy strong {
    display: block;
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
}
.theme-dark .dd-pdetail-price-copy strong { color: #f8fafc; }
.dd-pdetail-price-copy small {
    display: block;
    margin-top: 2px;
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
}
.dd-pdetail-price-input {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 40px;
    padding: 0 10px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid rgba(15,23,42,.08);
    flex-shrink: 0;
}
.theme-dark .dd-pdetail-price-input {
    background: rgba(255,255,255,.04);
    border-color: rgba(255,255,255,.08);
}
.dd-pdetail-price-input em {
    font-style: normal;
    font-size: 13px;
    font-weight: 800;
    color: #94a3b8;
}
.dd-pdetail-price-input input {
    width: 72px;
    border: 0;
    background: transparent;
    outline: none;
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
    text-align: right;
}
.theme-dark .dd-pdetail-price-input input { color: #f8fafc; }
.dd-pdetail-save {
    margin-top: 6px;
    height: 48px;
    border: 0;
    border-radius: 14px;
    background: #16a34a;
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    box-shadow: 0 10px 22px rgba(22,163,74,.28);
}
.dd-pdetail-save svg { width: 18px; height: 18px; }

.dd-pdetail-sticky {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 95;
    display: grid;
    grid-template-columns: .9fr 1.2fr;
    gap: 10px;
    padding: 12px 15px calc(12px + env(safe-area-inset-bottom));
    background: rgba(255,255,255,.94);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(15,23,42,.06);
    box-shadow: 0 -8px 24px rgba(15,23,42,.06);
}
.theme-dark .dd-pdetail-sticky {
    background: rgba(22,24,28,.94);
    border-top-color: rgba(255,255,255,.06);
}
.dd-pdetail-sticky-log,
.dd-pdetail-sticky-add {
    height: 48px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none !important;
}
.dd-pdetail-sticky-log svg,
.dd-pdetail-sticky-add svg { width: 17px; height: 17px; }
.dd-pdetail-sticky-log {
    background: #fff;
    border: 1px solid rgba(15,23,42,.1);
    color: #334155 !important;
}
.theme-dark .dd-pdetail-sticky-log {
    background: #1b1d21;
    border-color: rgba(255,255,255,.08);
    color: #e2e8f0 !important;
}
.dd-pdetail-sticky-add {
    background: #16a34a;
    color: #fff !important;
    box-shadow: 0 8px 18px rgba(22,163,74,.3);
}

@media (min-width: 992px) {
    .dd-pdetail-sticky {
        left: 50%;
        right: auto;
        width: 560px;
        transform: translateX(-50%);
        border-radius: 18px 18px 0 0;
    }
}

/* ===== Dark mode visibility fixes (app-wide) ===== */
body.theme-dark {
    color: #d1d5db !important;
    background-color: #1b1d21 !important;
}
.theme-dark p,
.theme-dark .dd-main p,
.theme-dark .dd-row .dd-main p,
.theme-dark .content > p,
.theme-dark .card-style p {
    color: #a1a1aa !important;
}
.theme-dark .opacity-30 { opacity: .45 !important; }
.theme-dark .opacity-50 { opacity: .65 !important; }
.theme-dark .opacity-60 { opacity: .75 !important; }
.theme-dark .opacity-70 { opacity: .82 !important; }

.theme-dark .dd-flash {
    color: #e5e7eb !important;
    border: 1px solid rgba(255,255,255,.08);
}
.theme-dark .dd-flash.bg-amt-green { color: #86efac !important; }
.theme-dark .dd-flash.bg-amt-red { color: #fca5a5 !important; }
.theme-dark .dd-flash.bg-amt-orange { color: #fdba74 !important; }

.theme-dark .dd-status {
    background: rgba(255,255,255,.08);
    color: #e5e7eb;
}
.theme-dark .card-style {
    background: #0f1117 !important;
    border-color: rgba(255,255,255,.06) !important;
    color: #e5e7eb;
}
.theme-dark .card-style .content,
.theme-dark .card-style .dd-main h5,
.theme-dark .menu-title h1,
.theme-dark .menu-title h2 {
    color: #f8fafc !important;
}
.theme-dark .menu-title p { color: #86efac !important; }

.theme-dark .form-control,
.theme-dark input.form-control,
.theme-dark textarea.form-control,
.theme-dark select.form-control,
.theme-dark .form-select,
.theme-dark input[type="text"],
.theme-dark input[type="number"],
.theme-dark input[type="tel"],
.theme-dark input[type="password"],
.theme-dark input[type="date"],
.theme-dark input[type="search"],
.theme-dark textarea,
.theme-dark select {
    background-color: #1b1d21 !important;
    border-color: rgba(255,255,255,.12) !important;
    color: #f8fafc !important;
}
.theme-dark .form-control::placeholder,
.theme-dark input::placeholder,
.theme-dark textarea::placeholder {
    color: #64748b !important;
}
.theme-dark label,
.theme-dark .form-label,
.theme-dark .color-gray-dark {
    color: #cbd5e1 !important;
}
.theme-dark .btn.bg-amt-red,
.theme-dark button.bg-amt-red {
    color: #fca5a5 !important;
}

.theme-dark .dd-metric-badge {
    background: rgba(255,255,255,.08) !important;
}
.theme-dark .dd-metric--blue .dd-metric-badge { background: rgba(14,165,233,.18) !important; color: #7dd3fc !important; }
.theme-dark .dd-metric--cyan .dd-metric-badge { background: rgba(6,182,212,.18) !important; color: #67e8f9 !important; }
.theme-dark .dd-metric--green .dd-metric-badge { background: rgba(34,197,94,.18) !important; color: #86efac !important; }
.theme-dark .dd-metric--red .dd-metric-badge { background: rgba(239,68,68,.18) !important; color: #fca5a5 !important; }

.theme-dark .dd-dash-status-badge {
    background: rgba(255,255,255,.08);
    color: #cbd5e1;
}
.theme-dark .dd-metric-ico {
    background: rgba(255,255,255,.06);
    color: #e2e8f0;
}

.theme-dark .dd-deliv-today {
    background: rgba(255,255,255,.06);
    border-color: rgba(255,255,255,.1);
    color: #e2e8f0;
}
.theme-dark .dd-deliv-today.is-today {
    background: rgba(34,197,94,.16);
    border-color: rgba(34,197,94,.35);
    color: #86efac;
}
.theme-dark .dd-deliv-bal-tag--red { background: rgba(239,68,68,.18); color: #fca5a5; }
.theme-dark .dd-deliv-bal-tag--green { background: rgba(34,197,94,.18); color: #86efac; }
.theme-dark .dd-deliv-bal-tag--orange { background: rgba(249,115,22,.18); color: #fdba74; }
.theme-dark .dd-deliv-bal-tag--gray { background: rgba(255,255,255,.08); color: #94a3b8; }

.theme-dark .dd-sheet-status {
    background: rgba(255,255,255,.06);
    color: #e2e8f0;
}
.theme-dark .dd-sheet-item-ico {
    background: rgba(255,255,255,.06);
    color: #cbd5e1;
}

.theme-dark .dd-party-tag--red { background: rgba(239,68,68,.18); color: #fca5a5; }
.theme-dark .dd-party-tag--green { background: rgba(34,197,94,.18); color: #86efac; }
.theme-dark .dd-party-tag--orange { background: rgba(249,115,22,.18); color: #fdba74; }
.theme-dark .dd-party-tag--gray { background: rgba(255,255,255,.08); color: #94a3b8; }
.theme-dark .dd-party-tabs a { color: #94a3b8; }
.theme-dark .dd-party-tabs a.is-active { color: #0f172a; background: #fff; }
.theme-dark .dd-party-sumtop span { color: #94a3b8; }
.theme-dark .dd-party-search input { color: #f8fafc; }
.theme-dark .dd-party-search input::placeholder { color: #64748b; }
.theme-dark .dd-party-filters .dd-party-chip.is-active {
    background: #16a34a;
    color: #fff;
    border-color: #16a34a;
}

.theme-dark .dd-pdetail-kicker { color: #4ade80; }
.theme-dark .dd-pdetail-chip--hist {
    background: rgba(255,255,255,.08);
    color: #cbd5e1;
}
.theme-dark .dd-pdetail-stopped {
    background: rgba(239,68,68,.18);
    color: #fca5a5;
}
.theme-dark .dd-pdetail-action-ico--green { background: rgba(34,197,94,.16); color: #4ade80; }
.theme-dark .dd-pdetail-action-ico--blue { background: rgba(37,99,235,.18); color: #93c5fd; }
.theme-dark .dd-pdetail-action-ico--purple { background: rgba(124,58,237,.18); color: #c4b5fd; }
.theme-dark .dd-pdetail-action-ico--wa { background: rgba(34,197,94,.16); color: #4ade80; }
.theme-dark .dd-pdetail-action-ico--orange { background: rgba(234,88,12,.18); color: #fdba74; }
.theme-dark .dd-pdetail-action-ico--pink { background: rgba(219,39,119,.18); color: #f9a8d4; }
.theme-dark .dd-pdetail-plan-ico.is-am { background: rgba(34,197,94,.16); }
.theme-dark .dd-pdetail-plan-ico.is-pm { background: rgba(37,99,235,.18); }
.theme-dark .dd-pdetail-tag--red { background: rgba(239,68,68,.18); color: #fca5a5; }
.theme-dark .dd-pdetail-tag--green { background: rgba(34,197,94,.18); color: #86efac; }
.theme-dark .dd-pdetail-tag--orange { background: rgba(249,115,22,.18); color: #fdba74; }
.theme-dark .dd-pdetail-sticky {
    background: rgba(15,17,23,.96);
    border-top-color: rgba(255,255,255,.08);
}

.theme-dark .dd-tabs a { color: #94a3b8; }
.theme-dark .dd-tabs a.active,
.theme-dark .dd-tabs a.is-active {
    color: #0f172a;
    background: #fff;
}
.theme-dark .dd-chips label {
    background: rgba(255,255,255,.06);
    color: #e2e8f0;
}
.theme-dark .dd-chips input:checked + label,
.theme-dark .dd-chips label.active {
    background: rgba(34,197,94,.2);
    color: #86efac;
    border-color: rgba(34,197,94,.35);
}

.theme-dark .dd-home-setup {
    background: #0f1117 !important;
    color: #e5e7eb;
}
.theme-dark .dd-receipt,
.theme-dark .dd-receipt * {
    color: inherit;
}
.theme-dark .dd-receipt {
    background: #0f1117;
    border-color: rgba(255,255,255,.08);
    color: #e5e7eb;
}

.theme-dark #footer-bar a {
    color: #94a3b8 !important;
}
.theme-dark #footer-bar a.active-nav,
.theme-dark #footer-bar a.active-nav span {
    color: #22c55e !important;
}
.theme-dark #footer-bar a > svg {
    color: inherit;
}

.theme-dark .dd-auth-shell .dd-auth-card,
.theme-dark .dd-auth-card {
    background: #0f1117 !important;
    color: #e5e7eb;
}
.theme-dark .dd-auth-card h3 { color: #f8fafc !important; }
.theme-dark .dd-pin-box {
    background: #1b1d21;
    border-color: rgba(255,255,255,.14);
    color: #f8fafc;
}
.theme-dark .dd-auth-foot { color: #94a3b8; }

.theme-dark .list-group-item,
.theme-dark .table,
.theme-dark .table td,
.theme-dark .table th {
    background-color: transparent !important;
    color: #e5e7eb !important;
    border-color: rgba(255,255,255,.08) !important;
}
.theme-dark .divider-icon,
.theme-dark .divider {
    background-color: rgba(255,255,255,.08) !important;
}
.theme-dark .close-menu,
.theme-dark .menu .close-menu {
    color: #e5e7eb !important;
}
.theme-dark .boxed-text-l,
.theme-dark .boxed-text-xl,
.theme-dark .boxed-text-l p,
.theme-dark .boxed-text-xl p {
    color: #cbd5e1 !important;
}
.theme-dark .color-black,
.theme-dark .color-dark-dark {
    color: #f8fafc !important;
}
