/* ======================================================
   RESET
====================================================== */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    width: 100%;
    min-height: 100%;
}

body {
    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    background: #05070d;
    color: #ffffff;

    overflow-x: hidden;
}


/* ======================================================
   APP PAGES
====================================================== */

.app-page {
    width: 100%;
    min-height: 100vh;
}

.app-page:not(.active) {
    display: none !important;
}

.app-page.active {
    display: flex;
}


/* ======================================================
   WELCOME
====================================================== */

#welcomePage {
    position: relative;

    align-items: center;
    justify-content: center;

    min-height: 100vh;

    overflow: hidden;

    background:
        radial-gradient(
            circle at 50% 30%,
            rgba(65, 130, 255, 0.18),
            transparent 35%
        ),
        #05070d;
}

#welcomePage:not(.active) {
    display: none !important;
}

#welcomePage.active {
    display: flex !important;
}

.welcome-background {
    position: absolute;
    inset: 0;

    background:
        linear-gradient(
            135deg,
            rgba(26, 48, 100, 0.18),
            transparent 45%
        );

    pointer-events: none;
}

.welcome-content {
    position: relative;
    z-index: 2;

    width: min(92%, 520px);

    display: flex;
    flex-direction: column;
    align-items: center;

    text-align: center;

    animation:
        welcomeIn 0.8s ease forwards;
}

@keyframes welcomeIn {

    from {
        opacity: 0;
        transform: translateY(25px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

}

.main-logo {
    width: 130px;
    height: 130px;

    object-fit: contain;

    margin-bottom: 18px;

    filter:
        drop-shadow(
            0 0 30px
            rgba(70, 160, 255, 0.35)
        );
}

.brand-name {
    font-size: 48px;
    font-weight: 800;
    letter-spacing: -1.5px;
}

.welcome-tagline {
    margin-top: 8px;

    color: #9da7bd;

    font-size: 16px;
}

.large-btn {
    margin-top: 36px;

    max-width: 300px;
}


/* ======================================================
   BUTTONS
====================================================== */

button {
    font: inherit;
}

.primary-btn,
.secondary-btn,
.text-btn,
.resend-btn,
.logout-btn,
.back-btn,
.dashboard-card,
.modal-close {
    cursor: pointer;
}

.primary-btn {
    width: 100%;

    border: 0;

    padding: 14px 20px;

    border-radius: 13px;

    background:
        linear-gradient(
            135deg,
            #328cff,
            #6d5cff
        );

    color: #ffffff;

    font-weight: 700;

    box-shadow:
        0 12px 30px
        rgba(60, 110, 255, 0.18);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        opacity 0.2s ease;
}

.primary-btn:hover {
    transform: translateY(-2px);

    box-shadow:
        0 16px 35px
        rgba(60, 110, 255, 0.30);
}

.primary-btn:active {
    transform: translateY(0);
}

.primary-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.secondary-btn {
    width: 100%;

    padding: 13px 20px;

    border-radius: 13px;

    border: 1px solid
        rgba(115, 165, 255, 0.30);

    background:
        rgba(70, 130, 255, 0.08);

    color: #dce7ff;

    font-weight: 650;

    transition:
        0.2s ease;
}

.secondary-btn:hover {
    background:
        rgba(70, 130, 255, 0.16);

    border-color:
        rgba(115, 165, 255, 0.5);
}

.text-btn {
    width: 100%;

    border: 0;

    background: transparent;

    color: #8eb7ff;

    padding: 12px;

    margin-top: 8px;

    font-weight: 600;
}

.text-btn:hover {
    color: #ffffff;
}

.resend-btn {
    width: 100%;

    margin-top: 10px;

    padding: 10px;

    border-radius: 10px;

    border: 1px solid
        rgba(100, 150, 255, 0.25);

    background:
        rgba(100, 150, 255, 0.07);

    color: #8eb7ff;

    font-size: 14px;

    font-weight: 650;
}

.resend-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}


/* ======================================================
   AUTH PAGE
====================================================== */

#authPage {
    position: relative;

    align-items: center;
    justify-content: center;

    padding: 50px 20px;

    background: #05070d;

    overflow: hidden;
}

.auth-background {
    position: fixed;
    inset: 0;

    background:
        radial-gradient(
            circle at 15% 20%,
            rgba(52, 112, 255, 0.13),
            transparent 30%
        ),
        radial-gradient(
            circle at 85% 80%,
            rgba(116, 75, 255, 0.12),
            transparent 30%
        );

    pointer-events: none;
}

.auth-wrapper {
    position: relative;
    z-index: 2;

    width: min(100%, 480px);

    perspective: 1600px;
}


/* ======================================================
   BACK
====================================================== */

.back-btn {
    border: 0;

    background: transparent;

    color: #aab5cc;

    font-size: 14px;

    padding: 8px 0;

    margin-bottom: 14px;
}

.back-btn:hover {
    color: #ffffff;
}


/* ======================================================
   AUTH SECTION
====================================================== */

.auth-section {
    width: 100%;
}

.auth-section:not(.active) {
    display: none !important;
}

.auth-section.active {
    display: block !important;
}


/* ======================================================
   PAPER FLIP
====================================================== */

.auth-section.flip-in-right {
    animation:
        paperFlipInRight
        0.65s
        cubic-bezier(0.22, 0.61, 0.36, 1)
        both;
}

.auth-section.flip-in-left {
    animation:
        paperFlipInLeft
        0.65s
        cubic-bezier(0.22, 0.61, 0.36, 1)
        both;
}

@keyframes paperFlipInRight {

    0% {
        opacity: 0;

        transform:
            rotateY(-90deg)
            translateX(35px);

        transform-origin: left center;
    }

    55% {
        opacity: 1;
    }

    100% {
        opacity: 1;

        transform:
            rotateY(0deg)
            translateX(0);

        transform-origin: center;
    }

}

@keyframes paperFlipInLeft {

    0% {
        opacity: 0;

        transform:
            rotateY(90deg)
            translateX(-35px);

        transform-origin: right center;
    }

    55% {
        opacity: 1;
    }

    100% {
        opacity: 1;

        transform:
            rotateY(0deg)
            translateX(0);

        transform-origin: center;
    }

}


/* ======================================================
   AUTH CARD
====================================================== */

.auth-card {
    width: 100%;

    padding: 32px;

    border-radius: 25px;

    border: 1px solid
        rgba(130, 160, 220, 0.16);

    background:
        linear-gradient(
            145deg,
            rgba(20, 28, 49, 0.96),
            rgba(9, 13, 25, 0.97)
        );

    box-shadow:
        0 30px 100px
        rgba(0, 0, 0, 0.45),

        inset 0 1px 0
        rgba(255,255,255,0.04);
}


/* ======================================================
   AUTH LOGO
====================================================== */

.auth-logo-area {
    text-align: center;

    margin-bottom: 28px;
}

.auth-logo {
    width: 68px;
    height: 68px;

    object-fit: contain;

    margin-bottom: 12px;
}

.auth-logo-area h1 {
    font-size: 27px;

    letter-spacing: -0.5px;
}

.auth-logo-area p {
    margin-top: 7px;

    color: #8994ac;

    font-size: 14px;
}


/* ======================================================
   FORMS
====================================================== */

.form-group {
    margin-bottom: 17px;
}

.form-group label,
.otp-area label {
    display: block;

    margin-bottom: 8px;

    color: #d8deed;

    font-size: 13px;

    font-weight: 650;
}

.form-group input,
.otp-area input {
    width: 100%;

    border: 1px solid
        rgba(135, 160, 210, 0.17);

    outline: none;

    border-radius: 12px;

    padding: 13px 14px;

    background:
        rgba(2, 5, 13, 0.68);

    color: #ffffff;

    font-size: 15px;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.form-group input:focus,
.otp-area input:focus {
    border-color:
        rgba(77, 143, 255, 0.7);

    box-shadow:
        0 0 0 3px
        rgba(77, 143, 255, 0.10);
}

.form-group input::placeholder,
.otp-area input::placeholder {
    color: #626d83;
}


/* ======================================================
   OTP
====================================================== */

.otp-area {
    width: 100%;

    margin: 10px 0 18px;

    padding: 17px;

    border-radius: 15px;

    background:
        rgba(57, 116, 220, 0.065);

    border: 1px solid
        rgba(100, 155, 255, 0.16);

    display: none;
}

.otp-area.visible {
    display: block;
}

.otp-status {
    min-height: 21px;

    margin-top: 9px;

    font-size: 13px;

    text-align: center;
}

.otp-timer {
    margin-top: 9px;

    text-align: center;

    color: #8995ad;

    font-size: 12px;

    min-height: 18px;
}

.otp-timer.ready {
    color: #73e6bd;
}

.otp-area .primary-btn {
    margin-top: 3px;
}


/* ======================================================
   NEW PASSWORD
====================================================== */

.new-password-area {
    display: none;

    margin-top: 12px;

    padding-top: 5px;
}

.new-password-area.visible {
    display: block;
}


/* ======================================================
   MESSAGES
====================================================== */

.form-message {
    min-height: 22px;

    margin: 8px 0;

    text-align: center;

    font-size: 13px;

    line-height: 1.5;
}

.success {
    color: #73e6bd !important;
}

.error {
    color: #ff8d9c !important;
}

.warning {
    color: #ffd479 !important;
}


/* ======================================================
   DIVIDER
====================================================== */

.auth-divider {
    display: flex;

    align-items: center;

    gap: 12px;

    margin: 18px 0;

    color: #5d687d;

    font-size: 11px;
}

.auth-divider::before,
.auth-divider::after {
    content: "";

    flex: 1;

    height: 1px;

    background:
        rgba(130, 150, 190, 0.12);
}


/* ======================================================
   CHECKBOX
====================================================== */

.checkbox-row {
    display: flex;

    align-items: flex-start;

    gap: 9px;

    margin: 5px 0 12px;

    color: #8995aa;

    font-size: 12px;

    line-height: 1.5;
}

.checkbox-row input {
    margin-top: 3px;

    accent-color: #4f8cff;
}

.inline-link {
    border: 0;

    background: transparent;

    color: #79a9ff;

    cursor: pointer;

    font-size: inherit;
}

.inline-link:hover {
    text-decoration: underline;
}


/* ======================================================
   DASHBOARD
====================================================== */

#dashboardPage {
    display: none;
}

#dashboardPage.active {
    display: block;
}

.dashboard {
    width: 100%;
    min-height: 100vh;

    background:
        radial-gradient(
            circle at 15% 0%,
            rgba(57, 120, 255, 0.11),
            transparent 30%
        ),
        #05070d;
}

.dashboard-header {
    min-height: 78px;

    padding: 15px 24px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    border-bottom:
        1px solid rgba(140, 160, 200, 0.10);
}

.dashboard-header > div {
    display: flex;

    align-items: center;

    gap: 12px;
}

.dashboard-logo {
    width: 45px;
    height: 45px;

    object-fit: contain;
}

.dashboard-header h1 {
    font-size: 19px;
}

.dashboard-header p {
    margin-top: 2px;

    color: #7e899e;

    font-size: 12px;
}

.logout-btn {
    border: 1px solid
        rgba(255, 100, 120, 0.20);

    background:
        rgba(255, 80, 100, 0.07);

    color: #ff9baa;

    padding: 9px 15px;

    border-radius: 10px;

    font-weight: 650;
}

.dashboard-content {
    width: min(1100px, 92%);

    margin: auto;

    padding: 50px 0;
}

.dashboard-welcome h2 {
    font-size: 31px;
}

.dashboard-welcome p {
    color: #8995aa;

    margin-top: 8px;
}

.dashboard-grid {
    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 18px;

    margin-top: 35px;
}

.dashboard-card {
    min-height: 180px;

    padding: 24px;

    text-align: left;

    border-radius: 20px;

    border: 1px solid
        rgba(130, 160, 220, 0.13);

    background:
        rgba(18, 25, 43, 0.75);

    color: #ffffff;

    transition: 0.2s ease;
}

.dashboard-card:hover {
    transform: translateY(-4px);

    border-color:
        rgba(100, 155, 255, 0.35);
}

.dashboard-card span {
    display: block;

    font-size: 30px;

    margin-bottom: 20px;
}

.dashboard-card strong {
    display: block;

    font-size: 17px;
}

.dashboard-card small {
    display: block;

    margin-top: 6px;

    color: #7f8ba1;
}


/* ======================================================
   SIMPLE PAGES
====================================================== */

.simple-page {
    width: min(100%, 900px);

    margin: auto;

    padding: 35px 20px;
}

.simple-card {
    margin-top: 30px;

    padding: 35px;

    border-radius: 22px;

    border: 1px solid
        rgba(130, 160, 220, 0.13);

    background:
        rgba(16, 22, 38, 0.82);
}

.simple-card h1 {
    font-size: 30px;
}

.simple-card p {
    margin-top: 10px;

    color: #8d98ad;
}


/* ======================================================
   MODAL
====================================================== */

.modal {
    position: fixed;

    inset: 0;

    z-index: 9999;

    display: none;

    align-items: center;
    justify-content: center;

    padding: 20px;

    background:
        rgba(0, 0, 0, 0.72);

    backdrop-filter:
        blur(8px);
}

.modal.active {
    display: flex;
}

.modal-card {
    position: relative;

    width: min(100%, 600px);

    max-height: 85vh;

    overflow-y: auto;

    padding: 30px;

    border-radius: 22px;

    background: #11182a;

    border:
        1px solid
        rgba(130, 160, 220, 0.17);

    box-shadow:
        0 30px 100px
        rgba(0,0,0,0.5);
}

.modal-card h2 {
    margin-bottom: 20px;
}

.modal-card p {
    color: #a6afc1;

    line-height: 1.7;

    margin-bottom: 15px;
}

.modal-close {
    position: absolute;

    top: 13px;
    right: 15px;

    width: 34px;
    height: 34px;

    border: 0;

    border-radius: 50%;

    background:
        rgba(255,255,255,0.06);

    color: #ffffff;

    font-size: 22px;
}


/* ======================================================
   MOBILE
====================================================== */

@media (max-width: 700px) {

    .brand-name {
        font-size: 39px;
    }

    .main-logo {
        width: 105px;
        height: 105px;
    }

    #authPage {
        padding: 30px 14px;
    }

    .auth-card {
        padding: 23px 18px;

        border-radius: 20px;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-header {
        padding: 13px 15px;
    }

    .dashboard-content {
        padding-top: 35px;
    }

}

/* =========================================================
   MEDZONEX PROFESSIONAL DASHBOARD
========================================================= */

#dashboardPage {
    min-height: 100vh;
    background:
        radial-gradient(
            circle at 70% 10%,
            rgba(65, 110, 255, 0.14),
            transparent 35%
        ),
        #05070d;
}

.dashboard-shell {
    display: flex;
    min-height: 100vh;
}


/* ================= SIDEBAR ================= */

.dashboard-sidebar {
    width: 235px;
    min-width: 235px;
    min-height: 100vh;
    padding: 22px 14px;
    background: rgba(8, 12, 23, 0.96);
    border-right: 1px solid rgba(255,255,255,0.08);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 4px 8px 25px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
}

.sidebar-logo {
    width: 42px;
    height: 42px;
    object-fit: contain;
    border-radius: 12px;
}

.sidebar-brand-text {
    display: flex;
    flex-direction: column;
}

.sidebar-brand-text strong {
    color: #fff;
    font-size: 17px;
}

.sidebar-brand-text span {
    color: rgba(255,255,255,0.45);
    font-size: 11px;
    margin-top: 3px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 22px;
}

.sidebar-bottom {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.sidebar-item {
    width: 100%;
    min-height: 44px;
    border: 0;
    border-radius: 11px;
    background: transparent;
    color: rgba(255,255,255,0.62);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 13px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    text-align: left;
    transition: 0.2s ease;
}

.sidebar-item:hover {
    background: rgba(255,255,255,0.06);
    color: #fff;
}

.sidebar-item.active {
    background: linear-gradient(
        135deg,
        rgba(75, 111, 255, 0.30),
        rgba(87, 65, 210, 0.20)
    );
    color: #fff;
    box-shadow:
        inset 0 0 0 1px rgba(105,130,255,0.18);
}

.sidebar-icon {
    width: 22px;
    text-align: center;
    font-size: 17px;
}

.logout-item {
    color: #ff8ba6;
}

.logout-item:hover {
    background: rgba(255, 70, 110, 0.09);
    color: #ff9bb0;
}


/* ================= MAIN ================= */

.dashboard-main {
    flex: 1;
    min-width: 0;
    padding: 27px 34px 50px;
    overflow: hidden;
}

.dashboard-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 27px;
}

.dashboard-small-title {
    color: rgba(255,255,255,0.42);
    font-size: 12px;
    margin: 0 0 4px;
}

.dashboard-topbar h1 {
    margin: 0;
    color: #fff;
    font-size: 30px;
    letter-spacing: -0.8px;
}

.dashboard-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dashboard-user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.dashboard-user-info strong {
    color: #fff;
    font-size: 13px;
}

.dashboard-user-info span {
    color: rgba(255,255,255,0.4);
    font-size: 11px;
    margin-top: 3px;
}

.dashboard-avatar {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    background: linear-gradient(135deg,#536dff,#885cff);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
}


/* ================= SECTIONS ================= */

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 13px;
}

.section-kicker {
    display: block;
    color: #7188ff;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.5px;
    margin-bottom: 4px;
}

.section-heading h2,
.panel-heading h2 {
    color: #fff;
    margin: 0;
    font-size: 19px;
}


/* ================= ADS ================= */

.dashboard-ad-section {
    margin-bottom: 29px;
}

.ad-carousel {
    height: 225px;
    border-radius: 18px;
    overflow: hidden;
    position: relative;
    background: #101522;
    border: 1px solid rgba(255,255,255,0.08);
}

.ad-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.45s ease;
}

.ad-slide.active {
    opacity: 1;
    pointer-events: auto;
}

.ad-slide img,
.ad-slide video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ad-overlay {
    position: absolute;
    inset: 0;
    padding: 28px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background:
        linear-gradient(
            transparent 20%,
            rgba(0,0,0,0.78)
        );
}

.ad-overlay span {
    color: #9aaaff;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.ad-overlay h3 {
    color: white;
    font-size: 23px;
    max-width: 500px;
    margin: 6px 0 0;
}

.ad-controls {
    display: flex;
    gap: 6px;
}

.ad-controls button {
    width: 32px;
    height: 32px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 9px;
    background: rgba(255,255,255,0.05);
    color: white;
    cursor: pointer;
    font-size: 20px;
}

.ad-dots {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 10px;
}

.ad-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,0.25);
}

.ad-dot.active {
    width: 20px;
    border-radius: 10px;
    background: #7389ff;
}


/* ================= STATS ================= */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 13px;
}

.stat-card {
    padding: 20px;
    border-radius: 16px;
    background: rgba(255,255,255,0.045);
    border: 1px solid rgba(255,255,255,0.075);
}

.stat-card:hover {
    border-color: rgba(115,137,255,0.25);
}

.stat-label {
    display: block;
    color: rgba(255,255,255,0.52);
    font-size: 11px;
}

.stat-value {
    display: block;
    color: white;
    font-size: 26px;
    margin: 8px 0 4px;
}

.stat-card small {
    color: rgba(255,255,255,0.34);
    font-size: 10px;
}

.sales-card {
    background:
        linear-gradient(
            135deg,
            rgba(77,111,255,0.20),
            rgba(255,255,255,0.035)
        );
}

.warning-stat {
    background:
        linear-gradient(
            135deg,
            rgba(255,160,70,0.10),
            rgba(255,255,255,0.035)
        );
}


/* ================= LOWER ================= */

.dashboard-lower-grid {
    display: grid;
    grid-template-columns: 1.45fr 1fr;
    gap: 15px;
    margin-top: 20px;
}

.dashboard-panel {
    padding: 20px;
    border-radius: 17px;
    background: rgba(255,255,255,0.035);
    border: 1px solid rgba(255,255,255,0.075);
}

.panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.text-btn {
    border: 0;
    background: transparent;
    color: #7d91ff;
    cursor: pointer;
    font-size: 11px;
    font-weight: 700;
}

.empty-dashboard {
    min-height: 145px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: rgba(255,255,255,0.35);
}

.empty-dashboard span {
    font-size: 25px;
}

.empty-dashboard p {
    color: rgba(255,255,255,0.62);
    margin: 7px 0 2px;
}

.empty-dashboard small {
    font-size: 10px;
}


/* ================= QUICK ACTIONS ================= */

.quick-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.quick-action {
    width: 100%;
    padding: 13px;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    background: rgba(255,255,255,0.035);
    color: white;
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    cursor: pointer;
}

.quick-action:hover {
    background: rgba(255,255,255,0.07);
}

.quick-action > span {
    width: 35px;
    height: 35px;
    border-radius: 10px;
    background: rgba(99,123,255,0.14);
    display: flex;
    align-items: center;
    justify-content: center;
}

.quick-action div {
    display: flex;
    flex-direction: column;
}

.quick-action strong {
    font-size: 12px;
}

.quick-action small {
    color: rgba(255,255,255,0.38);
    font-size: 9px;
    margin-top: 3px;
}


/* ================= BUTTON ================= */

.primary-small-btn {
    border: 0;
    border-radius: 9px;
    padding: 9px 13px;
    background: #657cff;
    color: white;
    cursor: pointer;
    font-size: 11px;
    font-weight: 700;
}


/* ================= CUSTOMER CARE ================= */

.dashboard-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.dashboard-modal.visible {
    display: flex;
}

.dashboard-modal-card {
    width: min(420px, calc(100% - 30px));
    background: #101522;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 27px;
    position: relative;
    box-shadow: 0 30px 80px rgba(0,0,0,0.5);
}

.modal-close {
    position: absolute;
    right: 15px;
    top: 13px;
    border: 0;
    background: transparent;
    color: rgba(255,255,255,0.55);
    font-size: 25px;
    cursor: pointer;
}

.care-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: rgba(100,125,255,0.16);
    color: #91a2ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 20px;
}

.dashboard-modal-card h2 {
    color: white;
    margin: 0 0 8px;
}

.dashboard-modal-card > p {
    color: rgba(255,255,255,0.5);
    font-size: 12px;
    line-height: 1.6;
    margin-bottom: 18px;
}

.care-contact {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px;
    border-radius: 12px;
    background: rgba(255,255,255,0.04);
    margin-top: 8px;
    color: white;
    text-decoration: none;
}

.care-contact > span {
    width: 35px;
    height: 35px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(100,125,255,0.13);
}

.care-contact div {
    display: flex;
    flex-direction: column;
}

.care-contact small {
    color: rgba(255,255,255,0.4);
    font-size: 9px;
}

.care-contact strong {
    font-size: 12px;
    margin-top: 3px;
}


/* ================= MOBILE ================= */

@media (max-width: 900px) {

    .dashboard-sidebar {
        width: 72px;
        min-width: 72px;
        padding: 18px 9px;
    }

    .sidebar-brand-text,
    .sidebar-item span:not(.sidebar-icon) {
        display: none;
    }

    .sidebar-brand {
        justify-content: center;
        padding-left: 0;
        padding-right: 0;
    }

    .sidebar-item {
        justify-content: center;
        padding: 0;
    }

    .dashboard-main {
        padding: 20px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .dashboard-lower-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {

    .dashboard-main {
        padding: 16px 12px 35px;
    }

    .dashboard-topbar h1 {
        font-size: 24px;
    }

    .dashboard-user-info {
        display: none;
    }

    .ad-carousel {
        height: 185px;
    }

    .ad-overlay h3 {
        font-size: 17px;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .stat-card {
        padding: 14px;
    }

    .stat-value {
        font-size: 20px;
    }
}

/* Subscription sidebar status signal */
.subscription-signal {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    margin-left: auto;
    flex-shrink: 0;
    background: #9ca3af;
}

.subscription-signal.status-green {
    background: #22c55e;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.55);
}

.subscription-signal.status-yellow {
    background: #facc15;
    box-shadow: 0 0 8px rgba(250, 204, 21, 0.55);
}

.subscription-signal.status-red {
    background: #ef4444;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.55);
}

/* Subscription countdown card */
.subscription-countdown-card {
    margin: 0 0 24px;
    padding: 22px;
    border: 1px solid #d1d5db;
    border-radius: 16px;
    background: #fff;
    color: #111827;
}

.subscription-countdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.subscription-countdown-header h3 {
    margin: 0 0 6px;
}

.subscription-countdown-header p,
.subscription-expiry-date {
    margin: 0;
    color: #6b7280;
    font-size: 13px;
}

.subscription-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 7px 11px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.subscription-status-badge.status-green {
    color: #166534;
    background: #dcfce7;
}

.subscription-status-badge.status-yellow {
    color: #854d0e;
    background: #fef9c3;
}

.subscription-status-badge.status-red {
    color: #991b1b;
    background: #fee2e2;
}

.subscription-countdown-timer {
    margin: 22px 0 14px;
    font-size: clamp(16px, 2vw, 24px);
    font-weight: 800;
    line-height: 1.6;
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
}

.subscription-manage-btn {
    margin-top: 16px;
    padding: 10px 15px;
    border: 0;
    border-radius: 9px;
    background: #4338ca;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.subscription-manage-btn:hover {
    background: #3730a3;
}

@media (max-width: 600px) {
    .subscription-countdown-card {
        padding: 16px;
    }

    .subscription-countdown-header {
        align-items: flex-start;
    }
}
/* MedZoneX Inventory Form - consistent field spacing */
.inventory-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 22px;
    row-gap: 8px;
    align-items: start;
}

.inventory-form-grid .form-group {
    min-width: 0;
    margin-bottom: 9px;
}

.inventory-form-grid .form-group label {
    display: block;
    margin-bottom: 8px;
}

.inventory-form-grid .form-group input,
.inventory-form-grid .form-group select,
.inventory-form-grid .form-group textarea {
    box-sizing: border-box;
    width: 100%;
}

@media (max-width: 600px) {
    .inventory-form-grid {
        grid-template-columns: minmax(0, 1fr);
        column-gap: 0;
        row-gap: 4px;
    }
}

/* ==========================================================
   MEDZONEX MEDICINE DETAILS & INVENTORY LIST
========================================================== */

.inventory-item {
    position: relative;
    cursor: pointer;
    transition: box-shadow .18s ease, transform .18s ease;
}

.inventory-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(15, 23, 42, .08);
}

.inventory-item:focus-visible {
    outline: 3px solid #2563eb;
    outline-offset: 3px;
}

.inventory-serial {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 13px;
    font-weight: 800;
}

.inventory-added-date {
    display: block;
    margin-top: 5px;
    color: #64748b;
    font-size: 12px;
}

.medicine-details-panel {
    margin: 24px 0;
}

.medicine-details-panel[hidden] {
    display: none !important;
}

.medicine-details-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.medicine-details-toolbar-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.medicine-details-document {
    width: 100%;
    max-width: 900px;
    min-height: 1050px;
    margin: 0 auto;
    padding: 44px;
    background: #fff;
    color: #172033;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 10px 35px rgba(15, 23, 42, .08);
    box-sizing: border-box;
}

.medicine-details-document-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    padding-bottom: 24px;
    border-bottom: 2px solid #e2e8f0;
}

.medicine-details-document-header h1 {
    margin: 8px 0;
    font-size: clamp(25px, 4vw, 34px);
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.medicine-details-subtitle {
    margin: 0;
    color: #64748b;
    font-size: 15px;
}

.medicine-details-record-id {
    min-width: 100px;
    max-width: 180px;
    text-align: right;
    overflow-wrap: anywhere;
}

.medicine-details-record-id span,
.medicine-details-grid span {
    display: block;
    margin-bottom: 7px;
    color: #64748b;
    font-size: 12px;
}

.medicine-details-record-id strong {
    font-size: 12px;
}

.medicine-details-statuses {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 22px 0;
}

.medicine-details-statuses .inventory-status {
    display: inline-flex;
    align-items: center;
}

.medicine-details-group {
    margin-top: 28px;
}

.medicine-details-group h2 {
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e2e8f0;
    font-size: 17px;
}

.medicine-details-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 28px;
}

.medicine-details-grid > div {
    min-width: 0;
    padding: 15px 0;
    border-bottom: 1px solid #f1f5f9;
}

.medicine-details-grid strong {
    display: block;
    font-size: 15px;
    overflow-wrap: anywhere;
}

.medicine-details-document-footer {
    margin-top: 45px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
    color: #64748b;
    font-size: 11px;
    line-height: 1.6;
}

@media (max-width: 600px) {
    .medicine-details-document {
        min-height: auto;
        padding: 22px 18px;
        border-radius: 8px;
    }

    .medicine-details-document-header {
        flex-direction: column;
        gap: 12px;
    }

    .medicine-details-record-id {
        text-align: left;
    }

    .medicine-details-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .medicine-details-toolbar,
    .medicine-details-toolbar-actions {
        width: 100%;
    }

    .medicine-details-toolbar-actions > button {
        flex: 1 1 auto;
    }
}

@media print {
    body.medicine-details-printing * {
        visibility: hidden !important;
    }

    body.medicine-details-printing #medicineDetailsDocument,
    body.medicine-details-printing #medicineDetailsDocument * {
        visibility: visible !important;
    }

    body.medicine-details-printing #medicineDetailsDocument {
        position: absolute;
        inset: 0 auto auto 0;
        width: 100%;
        max-width: none;
        min-height: 0;
        margin: 0;
        padding: 12mm;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    body.medicine-details-printing .medicine-details-group,
    body.medicine-details-printing .medicine-details-grid > div {
        break-inside: avoid;
    }

    @page {
        size: A4;
        margin: 8mm;
    }
}

/* ==========================================================
   MEDZONEX INVENTORY - CLEAN RESPONSIVE LAYOUT
========================================================== */

.inventory-shell {
    width: min(100% - 32px, 1240px);
    margin-inline: auto;
    padding: 28px 0 36px;
    color: #e5edf8;
}

.inventory-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
}

.inventory-header h1 {
    margin: 6px 0;
    color: #f8fafc;
    font-size: clamp(27px, 4vw, 36px);
    font-weight: 800;
}

.inventory-subtitle {
    margin: 6px 0 0;
    color: #aabbd0;
    line-height: 1.6;
}

.inventory-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.inventory-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin: 24px 0 32px;
}

.inventory-summary-card {
    min-width: 0;
    padding: 20px;
    border: 1px solid rgba(148, 163, 184, .2);
    border-radius: 15px;
    background: #17243a;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
}

.inventory-summary-label {
    display: block;
    margin-bottom: 10px;
    color: #b7c5d8;
    font-size: 13px;
    line-height: 1.5;
}

.inventory-summary-value {
    display: block;
    color: #f8fafc;
    font-size: clamp(23px, 3vw, 30px);
    font-weight: 800;
    overflow-wrap: anywhere;
}

.inventory-summary-card.warning .inventory-summary-value {
    color: #fbbf24;
}

.inventory-summary-card.danger .inventory-summary-value {
    color: #fb7185;
}

.inventory-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.inventory-section-header h2 {
    margin: 5px 0;
    color: #f8fafc;
    font-size: 23px;
}

.inventory-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 20px;
}

.inventory-search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1 1 300px;
    min-width: 0;
    padding: 0 14px;
    border: 1px solid #cbd5e1;
    border-radius: 11px;
    background: #fff;
    color: #334155;
}

.inventory-search-box input {
    width: 100%;
    min-width: 0;
    min-height: 46px;
    padding: 10px 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #0f172a;
    font-size: 14px;
}

.inventory-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.inventory-filter-btn {
    min-height: 40px;
    padding: 9px 14px;
    border: 1px solid #64748b;
    border-radius: 9px;
    background: #17243a;
    color: #dbe7f5;
    font-size: 13px;
    font-weight: 650;
    cursor: pointer;
}

.inventory-filter-btn:hover,
.inventory-filter-btn.active {
    border-color: #38bdf8;
    background: #075985;
    color: #fff;
}

.inventory-list {
    display: grid;
    gap: 12px;
}

.inventory-item {
    display: grid;
    grid-template-columns: minmax(220px, 1.4fr) minmax(240px, 1.5fr);
    gap: 18px 22px;
    align-items: center;
    padding: 20px;
    border: 1px solid rgba(148, 163, 184, .22);
    border-radius: 15px;
    background: #17243a;
    color: #e5edf8;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .1);
}

.inventory-item:hover {
    border-color: #38bdf8;
    background: #1b2b43;
}

.inventory-item-main {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 0;
}

.inventory-serial {
    flex-shrink: 0;
}

.inventory-medicine-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #263a56;
    font-size: 22px;
}

.inventory-medicine-info {
    min-width: 0;
}

.inventory-medicine-info h3 {
    margin: 0 0 5px;
    color: #f8fafc;
    font-size: 19px;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.inventory-medicine-info p {
    margin: 0 0 5px;
    color: #b8d8ff;
    font-size: 14px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.inventory-medicine-info small {
    color: #aabbd0;
    font-size: 12px;
    overflow-wrap: anywhere;
}

.inventory-added-date {
    color: #93a9c2;
}

.inventory-item-details {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.inventory-detail {
    min-width: 0;
}

.inventory-detail span {
    display: block;
    margin-bottom: 5px;
    color: #9fb1c8;
    font-size: 11px;
}

.inventory-detail strong {
    display: block;
    color: #f1f5f9;
    font-size: 13px;
    overflow-wrap: anywhere;
}

.inventory-item-status {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.inventory-item-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.inventory-item-actions button,
.details-edit-actions button {
    min-height: 37px;
    padding: 8px 14px;
    border: 1px solid #52657e;
    border-radius: 8px;
    background: #253750;
    color: #f8fafc;
    font-weight: 700;
    cursor: pointer;
}

.inventory-item-actions .inventory-edit-btn,
.details-edit-actions .primary-btn {
    border-color: #0284c7;
    background: #0369a1;
    color: #fff;
}

.inventory-item-actions .inventory-delete-btn,
.details-edit-actions .details-delete-btn {
    border-color: #be123c;
    background: #9f1239;
    color: #fff;
}

.inventory-empty {
    padding: 40px 20px;
    border: 1px dashed #64748b;
    border-radius: 14px;
    text-align: center;
    color: #cbd5e1;
}

.inventory-empty h3 {
    color: #f8fafc;
}

.inventory-back-area {
    margin-top: 24px;
}

.inventory-form-section {
    margin-bottom: 28px;
}

/* Details toolbar: back arrow left, actions grouped right */

.medicine-details-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 0 auto 18px;
    max-width: 1000px;
}

.details-back-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border: 1px solid #64748b;
    border-radius: 12px;
    background: #17243a;
    color: #fff;
    font-size: 25px;
    cursor: pointer;
}

.medicine-details-toolbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.details-document-actions,
.details-edit-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.medicine-details-document {
    box-sizing: border-box;
    width: 100%;
    max-width: 794px;
    min-height: 1123px;
    padding: 42px;
    margin: 0 auto;
    border-radius: 3px;
    background: #fff;
    color: #172033;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .25);
}

.medicine-details-document h1,
.medicine-details-document h2,
.medicine-details-document strong {
    color: #172033;
}

.medicine-details-document .section-kicker {
    color: #0369a1;
    font-weight: 800;
    letter-spacing: 1.4px;
}

.medicine-details-grid span {
    color: #64748b;
}

.medicine-details-grid > div {
    padding: 16px 10px 16px 0;
}

.medicine-details-document-footer {
    color: #64748b;
}

@media (max-width: 900px) {
    .inventory-item {
        grid-template-columns: minmax(0, 1fr);
    }

    .inventory-item-details {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .inventory-item-actions {
        justify-content: flex-start;
    }

    .inventory-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .inventory-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .inventory-shell {
        width: min(100% - 20px, 1240px);
        padding-top: 18px;
    }

    .inventory-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .inventory-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
    }

    .inventory-summary-card {
        padding: 14px;
    }

    .inventory-filters {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .inventory-filter-btn {
        width: 100%;
        padding-inline: 7px;
    }

    .inventory-item {
        padding: 15px;
        gap: 14px;
    }

    .inventory-item-main {
        flex-wrap: wrap;
    }

    .inventory-item-details {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding-top: 12px;
        border-top: 1px solid rgba(148, 163, 184, .2);
    }

    .medicine-details-toolbar {
        align-items: flex-start;
    }

    .medicine-details-toolbar-actions {
        align-items: flex-end;
        flex-direction: column;
        gap: 8px;
    }

    .details-document-actions,
    .details-edit-actions {
        justify-content: flex-end;
        flex-wrap: wrap;
    }

    .medicine-details-document {
        min-height: auto;
        padding: 22px 18px;
    }
}

@media print {
    body.medicine-details-printing #medicineDetailsDocument {
        width: 100%;
        max-width: none;
        min-height: 0;
        padding: 8mm;
        box-shadow: none;
    }
}

/* FIX: Compact inventory search bar */
.inventory-toolbar {
    display: flex;
    align-items: center;
    gap: 14px;
}

.inventory-search-box {
    box-sizing: border-box;
    display: flex;
    flex: 0 1 480px;
    align-items: center;
    align-self: flex-start;
    width: 100%;
    max-width: 480px;
    height: 48px;
    min-height: 48px;
    max-height: 48px;
    padding: 0 14px;
    overflow: hidden;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #fff;
}

.inventory-search-box input,
.inventory-search-box input[type="search"] {
    box-sizing: border-box;
    display: block;
    flex: 1 1 auto;
    width: 100%;
    height: 44px;
    min-height: 0;
    max-height: 44px;
    margin: 0;
    padding: 0;
    border: 0;
    outline: none;
    box-shadow: none;
    background: transparent;
    color: #0f172a;
    font-size: 14px;
    line-height: normal;
}

.inventory-search-box input:focus {
    outline: none;
    box-shadow: none;
}

@media (max-width: 900px) {
    .inventory-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .inventory-search-box {
        flex: 0 0 48px;
        width: 100%;
        max-width: 100%;
        align-self: stretch;
    }
}

/* FIXED-HEIGHT INVENTORY LIST - SAFE VERSION */

#inventoryPage .inventory-shell {
    height: auto;
    min-height: 0;
    overflow: visible;
    display: block;
}

#inventoryPage .inventory-list-section {
    display: block;
    height: auto;
    min-height: 0;
    overflow: visible;
}

#inventoryPage .inventory-list {
    display: grid;
    gap: 12px;
    height: auto;
    min-height: 180px;
    max-height: 52vh;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior-y: contain;
    padding: 8px;
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: #64748b transparent;
}

#inventoryPage .inventory-list::-webkit-scrollbar {
    width: 8px;
}

#inventoryPage .inventory-list::-webkit-scrollbar-thumb {
    background: #64748b;
    border-radius: 8px;
}

#inventoryPage .inventory-back-area {
    position: static;
    display: block;
    margin-top: 20px;
    padding-bottom: 16px;
}

@media (max-width: 600px) {
    #inventoryPage .inventory-list {
        max-height: 48vh;
        min-height: 160px;
    }
}



/* CUSTOMER DIRECTORY SEARCH */
#customersPage .mz-customer-search {
    display: block;
    width: 100%;
    min-height: 46px;
    margin: 0 0 16px;
    padding: 11px 14px;
    box-sizing: border-box;
    border: 1px solid var(--border-color, #d1d5db);
    border-radius: 10px;
    background: var(--panel-bg, #fff);
    color: inherit;
    font: inherit;
}
#customersPage .mz-customer-search::placeholder {
    color: var(--text-muted, #64748b);
}
#customersPage .mz-customer-search:focus {
    outline: 2px solid var(--accent-color, #c6f432);
    outline-offset: 2px;
}

/* MEDZONEX SALES AND CUSTOMER HISTORY */
.mz-sale-row,.mz-record-row {
    width:100%;display:flex;align-items:center;
    justify-content:space-between;gap:16px;
    padding:15px 12px;border:0;
    border-bottom:1px solid var(--border-color,#e5e7eb);
    background:transparent;color:inherit;text-align:left;cursor:pointer;
}
.mz-sale-row:hover,.mz-record-row:hover {
    background:rgba(100,116,139,.08);
}
.mz-sale-main,.mz-record-row>span {
    display:flex;flex-direction:column;gap:5px;min-width:0;
}
.mz-sale-row small,.mz-record-row small {
    color:var(--text-muted,#64748b);overflow-wrap:anywhere;
}
.mz-back {
    width:42px;height:42px;flex:0 0 42px;
    border:1px solid var(--border-color,#e5e7eb);
    border-radius:12px;background:transparent;
    color:inherit;font-size:24px;cursor:pointer;
}
.mz-empty {padding:25px;text-align:center;color:var(--text-muted,#64748b);}
.mz-paper {
    max-width:850px;margin:20px auto;padding:35px;
    background:#fff;color:#111;border:1px solid #e5e7eb;
}
.mz-paper h1,.mz-paper h2,.mz-thanks {text-align:center;}
.mz-paper table {width:100%;border-collapse:collapse;margin-top:24px;}
.mz-paper th,.mz-paper td {
    padding:10px 7px;border:1px solid #d1d5db;
    text-align:left;font-size:13px;
}
.mz-invoice-total {margin:22px 0 22px auto;max-width:280px;text-align:right;}
@media print {
    @page {size:A4;margin:12mm;}
    body * {visibility:hidden!important;}
    .print-document,.print-document * {visibility:visible!important;}
    .print-document {
        position:absolute!important;top:0!important;left:0!important;
        width:100%!important;margin:0!important;
    }
    .mz-paper {max-width:none;margin:0;padding:0;border:0;}
    .no-print {display:none!important;}
}


/* ==========================================
   MEDZONEX INTERNAL SCROLL AREAS
========================================== */

/* Dashboard: Recent Sales internal scrolling */
#recentSalesList {
    max-height: 360px;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior-y: contain;
    scrollbar-width: thin;
    scrollbar-color: #64748b transparent;
    padding-right: 6px;
}

#recentSalesList::-webkit-scrollbar,
#billingItemsContainer::-webkit-scrollbar {
    width: 8px;
}

#recentSalesList::-webkit-scrollbar-thumb,
#billingItemsContainer::-webkit-scrollbar-thumb {
    background: #64748b;
    border-radius: 8px;
}

/* Billing: medicines added to current bill */
#billingItemsContainer {
    display: grid;
    gap: 12px;
    max-height: 480px;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior-y: contain;
    scrollbar-width: thin;
    scrollbar-color: #64748b transparent;
    padding: 8px;
    box-sizing: border-box;
    align-content: start;
}

/* Keep medicine cards inside the scroll area */
#billingItemsContainer > .inventory-item {
    min-width: 0;
}

/* Smaller screens */
@media (max-width: 600px) {
    #recentSalesList {
        max-height: 320px;
    }

    #billingItemsContainer {
        max-height: 55vh;
    }
}


/* MEDZONEX SCROLL FIX V2 */

/* Dashboard Recent Sales: internal vertical scroll */
#recentSalesList {
    max-height: 360px;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior-y: contain;
    scrollbar-width: thin;
    scrollbar-color: #64748b transparent;
    padding-right: 8px;
    box-sizing: border-box;
}

/* Billing: added medicines scroll independently */
#billingItemsContainer {
    display: grid;
    gap: 12px;
    max-height: 480px;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior-y: contain;
    scrollbar-width: thin;
    scrollbar-color: #64748b transparent;
    padding: 8px;
    box-sizing: border-box;
    align-content: start;
}

#recentSalesList::-webkit-scrollbar,
#billingItemsContainer::-webkit-scrollbar {
    width: 8px;
}

#recentSalesList::-webkit-scrollbar-thumb,
#billingItemsContainer::-webkit-scrollbar-thumb {
    background: #64748b;
    border-radius: 8px;
}

@media (max-width: 600px) {
    #recentSalesList {
        max-height: 320px;
    }

    #billingItemsContainer {
        max-height: 55vh;
    }
}

/* Customer purchase statement */
.mz-customer-purchase {
    margin-top: 24px;
    page-break-inside: avoid;
    break-inside: avoid;
}

.mz-purchase-heading {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #999;
}

.mz-customer-purchase table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
}

.mz-customer-purchase th,
.mz-customer-purchase td {
    border: 1px solid #bbb;
    padding: 8px;
    text-align: left;
    font-size: 12px;
}

@media print {
    .mz-customer-purchase {
        break-inside: avoid;
    }
}


/* MedZoneX Purchases workspace */
.mz-purchase-layout{display:grid;gap:18px}
.mz-purchase-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.mz-purchase-card{background:var(--panel-bg,#fff);border:1px solid var(--border-color,#e5e7eb);border-radius:14px;padding:20px;min-width:0}
.mz-purchase-card h3{margin:0 0 16px}
.mz-purchase-card label{display:block;margin:12px 0 6px;font-size:13px;font-weight:600}
.mz-purchase-card input,.mz-purchase-card select{width:100%;min-height:42px;padding:9px 11px;border:1px solid var(--border-color,#d1d5db);border-radius:8px;box-sizing:border-box}
.mz-purchase-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 14px}
.mz-purchase-total-row{display:flex;justify-content:space-between;gap:12px;padding:10px 0;border-bottom:1px solid var(--border-color,#eee)}
.mz-purchase-actions,.mz-purchase-history-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.purchase-search-results{display:grid;gap:6px;margin-top:6px}
.purchase-search-item{display:flex;flex-direction:column;text-align:left;gap:4px;padding:10px;border:1px solid var(--border-color,#ddd);border-radius:8px;background:transparent;color:inherit}
.purchase-history-card,.purchase-item-card{margin:12px 0;padding:14px;border:1px solid var(--border-color,#e5e7eb);border-radius:10px}
@media(max-width:760px){.mz-purchase-grid,.mz-purchase-fields{grid-template-columns:1fr}}

/* ===== MedZoneX Purchases: High Contrast UI Fix ===== */

#purchasePage .dashboard-panel,
#purchasePage .mz-purchase-card {
    opacity: 1 !important;
    filter: none !important;
    background: #ffffff !important;
    color: #172033 !important;
    border: 1px solid #dce3ed !important;
}

#purchasePage .mz-purchase-card h3,
#purchasePage .mz-purchase-card strong,
#purchasePage .mz-purchase-card label,
#purchasePage .mz-purchase-total-row,
#purchasePage .mz-purchase-history-heading {
    color: #172033 !important;
    opacity: 1 !important;
}

#purchasePage .mz-purchase-card input,
#purchasePage .mz-purchase-card select {
    background: #ffffff !important;
    color: #172033 !important;
    border: 1px solid #b8c4d5 !important;
    opacity: 1 !important;
}

#purchasePage .mz-purchase-card input::placeholder {
    color: #78869a !important;
    opacity: 1 !important;
}

#purchasePage .mz-purchase-card button {
    opacity: 1 !important;
    filter: none !important;
}

#purchasePage .purchase-search-item,
#purchasePage .purchase-history-card,
#purchasePage .purchase-item-card {
    background: #f8fafc !important;
    color: #172033 !important;
    border: 1px solid #dce3ed !important;
    opacity: 1 !important;
}

#purchasePage .purchase-search-item span,
#purchasePage .purchase-search-item small,
#purchasePage .purchase-item-card span,
#purchasePage .purchase-item-card small {
    color: #475569 !important;
}

#purchasePage .mz-purchase-total-row {
    border-bottom: 1px solid #e2e8f0 !important;
}

#purchasePage .mz-purchase-grand {
    font-size: 20px;
    font-weight: 700;
    color: #087443 !important;
}

#purchasePage .purchase-empty,
#purchasePage .purchase-loading {
    color: #64748b !important;
    opacity: 1 !important;
}

/* Mobile layout */
@media(max-width:760px) {
    #purchasePage .mz-purchase-grid,
    #purchasePage .mz-purchase-fields {
        grid-template-columns: 1fr !important;
    }
}



/* =====================================================
   MEDZONEX — PREMIUM PROFILE & SETTINGS UI
===================================================== */

#profilePage .dashboard-panel,
#settingsPage .dashboard-panel {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 10px 0 35px;
}

#profilePage .mz-account-layout,
#settingsPage .mz-account-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px;
  align-items: start;
  margin-top: 26px;
}

#profilePage .mz-account-card,
#settingsPage .mz-account-card {
  background: #ffffff;
  border: 1px solid #e5eaf2;
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 8px 28px rgba(20, 35, 60, 0.055);
  transition: transform .2s ease, box-shadow .2s ease;
  min-width: 0;
}

#profilePage .mz-account-card:hover,
#settingsPage .mz-account-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(20, 35, 60, 0.09);
}

#profilePage .mz-account-card h3,
#settingsPage .mz-account-card h3 {
  color: #17243b;
  font-size: 19px;
  font-weight: 750;
  letter-spacing: -.35px;
  margin: 0 0 9px;
}

#profilePage .mz-account-description {
  color: #718096;
  font-size: 13px;
  line-height: 1.6;
  margin: 0 0 25px;
}

#profilePage .mz-account-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 18px;
  margin-top: 24px;
}

#profilePage .mz-account-full {
  grid-column: 1 / -1;
}

#profilePage .mz-account-card label,
#settingsPage .mz-account-card label {
  display: block;
  color: #35445b;
  font-size: 13px;
  font-weight: 650;
  margin: 0 0 9px;
}

#profilePage .mz-account-card input,
#profilePage .mz-account-card textarea,
#settingsPage .mz-account-card input:not([type="checkbox"]) {
  width: 100%;
  min-height: 47px;
  padding: 12px 15px;
  border: 1px solid #dce3ed;
  border-radius: 11px;
  background: #f9fbfe;
  color: #17243b;
  font: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
  box-sizing: border-box;
}

#profilePage .mz-account-card textarea {
  min-height: 100px;
  resize: vertical;
}

#profilePage .mz-account-card input:focus,
#profilePage .mz-account-card textarea:focus,
#settingsPage .mz-account-card input:not([type="checkbox"]):focus {
  background: #ffffff;
  border-color: #4778e8;
  box-shadow: 0 0 0 4px rgba(71, 120, 232, .11);
}

#profilePage .mz-account-card input[readonly] {
  background: #f0f3f8;
  color: #718096;
  cursor: not-allowed;
}

#settingsPage .mz-account-card > label {
  margin-top: 23px;
}

#settingsPage .mz-setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 17px 0;
  border-bottom: 1px solid #edf0f5;
}

#settingsPage .mz-setting-row strong {
  display: block;
  color: #26354b;
  font-size: 14px;
  margin-bottom: 5px;
}

#settingsPage .mz-setting-row small {
  display: block;
  color: #8190a5;
  font-size: 12px;
  line-height: 1.5;
}

#settingsPage .mz-setting-row input[type="checkbox"] {
  width: 19px;
  height: 19px;
  accent-color: #386ce0;
  flex-shrink: 0;
  cursor: pointer;
}

#profilePage #saveProfileBtn,
#settingsPage #saveSettingsBtn {
  min-height: 47px;
  padding: 0 25px;
  margin-top: 24px;
  border-radius: 11px;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 5px 14px rgba(40, 95, 210, .16);
  transition: transform .2s ease, box-shadow .2s ease;
}

#profilePage #saveProfileBtn:hover,
#settingsPage #saveSettingsBtn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(40, 95, 210, .22);
}

#profilePage .mz-account-message,
#settingsPage .mz-account-message {
  margin-top: 18px;
  font-size: 13px;
  line-height: 1.5;
}

@media (max-width: 900px) {
  #profilePage .mz-account-layout,
  #settingsPage .mz-account-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  #profilePage .mz-account-card,
  #settingsPage .mz-account-card {
    padding: 21px;
    border-radius: 16px;
  }

  #profilePage .mz-account-fields {
    grid-template-columns: 1fr;
    gap: 17px;
  }

  #profilePage .mz-account-full {
    grid-column: auto;
  }
}

/* End Premium Profile & Settings UI */


/* MEDZONEX PREMIUM PROFILE VIEW */
#profilePage .mz-profile-view {
  background:#fff;
  border:1px solid #e5eaf2;
  border-radius:22px;
  padding:30px;
  margin-top:25px;
  box-shadow:0 10px 35px rgba(20,35,60,.055);
}
#profilePage .mz-profile-view-header {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:20px;
  margin-bottom:28px;
}
#profilePage .mz-profile-view-header h2 {
  color:#17243b;
  font-size:23px;
  margin:8px 0;
}
#profilePage .mz-profile-view-header p {color:#78869a;font-size:13px}
#profilePage .mz-edit-profile-btn {
  border:1px solid #d7e2f7;
  background:#edf3ff;
  color:#285dc4;
  border-radius:11px;
  padding:12px 19px;
  font-weight:700;
  cursor:pointer;
}
#profilePage .mz-profile-identity {
  display:flex;
  align-items:center;
  gap:19px;
  background:linear-gradient(120deg,#f0f5ff,#f8faff);
  border:1px solid #e2eaff;
  border-radius:17px;
  padding:23px;
  margin-bottom:25px;
}
#profilePage .mz-profile-avatar {
  width:58px;height:58px;border-radius:17px;
  display:grid;place-items:center;
  background:#315fcb;color:white;
  font-size:25px;font-weight:800;flex-shrink:0;
}
#profilePage .mz-profile-identity h2 {margin:0 0 6px;color:#17243b}
#profilePage .mz-profile-identity p,
#profilePage .mz-profile-identity span {
  display:block;margin:4px 0;color:#718096;font-size:13px;
}
#profilePage .mz-profile-view-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:15px;
}
#profilePage .mz-profile-detail {
  padding:18px;border:1px solid #edf0f5;
  background:#fcfdff;border-radius:13px;min-width:0;
}
#profilePage .mz-profile-detail small {
  display:block;color:#8491a5;font-size:12px;margin-bottom:9px;
}
#profilePage .mz-profile-detail strong {
  display:block;color:#26364d;font-size:14px;
  overflow-wrap:anywhere;
}
#profilePage .mz-profile-form-actions {
  display:flex;gap:12px;align-items:center;margin-top:24px;
}
#profilePage .mz-cancel-profile-btn {
  min-height:45px;padding:0 23px;
  border:1px solid #dce3ed;background:white;
  color:#46556b;border-radius:10px;font-weight:650;cursor:pointer;
}
@media(max-width:650px) {
  #profilePage .mz-profile-view {padding:19px}
  #profilePage .mz-profile-view-header {align-items:flex-start;flex-direction:column}
  #profilePage .mz-profile-view-grid {grid-template-columns:1fr}
  #profilePage .mz-profile-identity {padding:17px}
}

/* END PREMIUM PROFILE VIEW */

/* Sales History Search Bar */
.mz-sales-search {
    margin-bottom: 20px;
    padding: 4px 0;
}

#mzSalesSearch {
    width: 100%;
    min-height: 48px;
    padding: 12px 16px;
    border: 1px solid #dce3ec;
    border-radius: 10px;
    background: #ffffff;
    color: #1e293b;
    font-size: 15px;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#mzSalesSearch:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.10);
}

#mzSalesSearch::placeholder {
    color: #94a3b8;
}

/* ======================================================
   MEDZONEX DASHBOARD NOTIFICATIONS
====================================================== */

.dashboard-notification-area {
    position: relative;
    display: flex;
    align-items: center;
    margin-right: 18px;
    z-index: 100;
}

.notification-bell {
    position: relative;
    width: 43px;
    height: 43px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 13px;
    background: rgba(255,255,255,0.06);
    color: #fff;
    font-size: 23px;
    cursor: pointer;
}

.notification-bell:hover {
    background: rgba(255,255,255,0.13);
}

.notification-unread-count {
    position: absolute;
    top: -7px;
    right: -7px;
    min-width: 19px;
    height: 19px;
    padding: 0 4px;
    border-radius: 20px;
    background: #ff4e67;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    justify-content: center;
    align-items: center;
}

.notification-unread-count[hidden] {
    display: none;
}

.notification-panel {
    position: absolute;
    top: 55px;
    right: 0;
    width: min(370px, calc(100vw - 28px));
    max-height: 470px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 16px;
    background: #171b2b;
    box-shadow: 0 18px 55px rgba(0,0,0,0.4);
}

.notification-panel[hidden] {
    display: none;
}

.notification-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 17px;
    border-bottom: 1px solid rgba(255,255,255,0.09);
}

.notification-panel-header div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.notification-panel-header strong {
    color: #fff;
    font-size: 15px;
}

.notification-panel-header span {
    color: rgba(255,255,255,0.5);
    font-size: 11px;
}

.notification-panel-header button {
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
}

.notification-list {
    max-height: 390px;
    overflow-y: auto;
}

.notification-card {
    padding: 15px 17px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
}

.notification-card.is-unread {
    background: rgba(83,109,255,0.09);
}

.notification-card.is-resolved {
    opacity: 0.65;
}

.notification-card-content strong {
    color: #fff;
    font-size: 13px;
}

.notification-card-content p {
    margin: 7px 0 10px;
    color: rgba(255,255,255,0.65);
    font-size: 12px;
    line-height: 1.6;
}

.notification-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.notification-actions button {
    padding: 7px 10px;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    background: transparent;
    color: #fff;
    font-size: 11px;
    cursor: pointer;
}

.notification-actions .notification-subscribe-btn {
    border-color: transparent;
    background: #536dff;
    color: #fff;
}

.notification-actions button:disabled {
    opacity: 0.5;
    cursor: wait;
}

.notification-status {
    display: inline-block;
    color: #72d6a0;
    font-size: 11px;
}

.notification-empty {
    padding: 24px 15px;
    color: rgba(255,255,255,0.55);
    font-size: 12px;
    text-align: center;
}

@media (max-width: 600px) {
    .dashboard-notification-area {
        margin-right: 10px;
    }

    .notification-bell {
        width: 39px;
        height: 39px;
    }

    .notification-panel {
        right: -55px;
        top: 50px;
    }
}


/* Compact My Subscription accordion */
.subscription-countdown-card {
    padding: 0;
    margin-bottom: 18px;
    overflow: hidden;
}

.subscription-countdown-details > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 15px 20px;
    cursor: pointer;
    list-style: none;
}

.subscription-countdown-details > summary::-webkit-details-marker {
    display: none;
}

.subscription-countdown-details > summary::after {
    content: "⌄";
    font-size: 23px;
    font-weight: 700;
    color: #4338ca;
    margin-left: auto;
    transition: transform 0.2s ease;
}

.subscription-countdown-details[open] > summary::after {
    content: "⌃";
}

.subscription-countdown-details > summary h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 750;
}

.subscription-countdown-content {
    padding: 0 20px 18px;
    border-top: 1px solid #e5e7eb;
}

.subscription-countdown-content > p:first-child {
    margin: 14px 0 0;
    color: #6b7280;
    font-size: 13px;
}

.subscription-countdown-content .subscription-countdown-timer {
    margin: 12px 0;
}

@media (max-width: 600px) {
    .subscription-countdown-details > summary {
        padding: 14px;
    }

    .subscription-countdown-content {
        padding: 0 14px 16px;
    }
}



/* ======================================================
   FULL-PAGE NOTIFICATIONS
====================================================== */

#notificationsPage {
    display: none;
    width: 100%;
    min-height: 100vh;
    padding: clamp(18px, 4vw, 42px);
    box-sizing: border-box;
    background: #05070d;
}

#notificationsPage.active {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.notifications-page-shell {
    width: min(100%, 1040px);
    min-height: calc(100vh - 2 * clamp(18px, 4vw, 42px));
    margin: 0 auto;
    padding: clamp(18px, 3vw, 32px);
    box-sizing: border-box;
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 20px;
    background: #101525;
    box-shadow: 0 18px 55px rgba(0,0,0,0.24);
}

.notifications-page-header {
    display: flex;
    align-items: center;
    gap: 18px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.notifications-page-heading {
    flex: 1;
    min-width: 0;
}

.notifications-page-heading h1 {
    margin: 4px 0 0;
    color: #fff;
    font-size: clamp(25px, 4vw, 34px);
}

.notifications-page-subtitle {
    margin: 7px 0 0;
    color: rgba(255,255,255,0.58);
    font-size: 13px;
}

.notifications-page-unread {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 76px;
    padding: 10px 14px;
    border: 1px solid rgba(83,109,255,0.3);
    border-radius: 12px;
    background: rgba(83,109,255,0.12);
}

.notifications-page-unread span {
    color: #fff;
    font-size: 22px;
    font-weight: 750;
}

.notifications-page-unread small {
    margin-top: 2px;
    color: rgba(255,255,255,0.58);
    font-size: 11px;
}

.notifications-page-list {
    max-height: none;
    overflow: visible;
    padding-top: 10px;
}

.notifications-page-list .notification-card {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin: 12px 0;
    padding: 20px;
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 14px;
    background: rgba(255,255,255,0.035);
}

.notifications-page-list .notification-card.is-unread {
    border-color: rgba(83,109,255,0.38);
    background: rgba(83,109,255,0.1);
}

.notifications-page-list .notification-card-content {
    flex: 1;
    min-width: 0;
}

.notifications-page-list .notification-card-content strong {
    font-size: 15px;
}

.notifications-page-list .notification-card-content p {
    margin-bottom: 0;
    font-size: 13px;
}

.notifications-page-list .notification-actions {
    flex-shrink: 0;
}

@media (max-width: 600px) {
    #notificationsPage {
        padding: 10px;
    }

    .notifications-page-shell {
        min-height: calc(100vh - 20px);
        padding: 15px;
        border-radius: 14px;
    }

    .notifications-page-header {
        align-items: flex-start;
        gap: 11px;
    }

    .notifications-page-header .mz-back {
        flex-shrink: 0;
    }

    .notifications-page-unread {
        min-width: 56px;
        padding: 8px;
    }

    .notifications-page-list .notification-card {
        flex-direction: column;
        gap: 13px;
        padding: 16px;
    }
}

/* =====================================================
   MEDZONEX NEW WELCOME PAGE
   MIDNIGHT BLACK + WHITE + LIME GREEN
===================================================== */

#welcomePage {
    --mzx-black: #0B0B0C;
    --mzx-white: #FFFFFF;
    --mzx-lime: #C6F432;

    position: relative;
    width: 100%;
    min-height: 100vh;
    min-height: 100svh;
    padding: 35px 4%;
    display: flex !important;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    isolation: isolate;

    background:
        radial-gradient(ellipse at 50% 45%, rgba(198,244,50,.075), transparent 38%),
        radial-gradient(ellipse at 10% 80%, rgba(198,244,50,.035), transparent 30%),
        var(--mzx-black);
    color: var(--mzx-white);
}

#welcomePage .welcome-background {
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        linear-gradient(90deg, transparent 49.9%, rgba(198,244,50,.07) 50%, transparent 50.1%),
        radial-gradient(circle at center, transparent 0, transparent 55%, rgba(0,0,0,.35) 100%);
}

#welcomePage .welcome-content {
    position: relative;
    z-index: 3;
    width: 340px;
    max-width: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

#welcomePage .main-logo {
    width: 112px;
    height: 112px;
    object-fit: contain;
    margin-bottom: 12px;
    filter: drop-shadow(0 0 24px rgba(198,244,50,.22));
}

#welcomePage .brand-name {
    color: var(--mzx-white);
    font-size: clamp(38px, 4vw, 48px);
    font-weight: 850;
    letter-spacing: -1.8px;
}

#welcomePage .welcome-tagline {
    margin-top: 9px;
    color: #B9B9B9;
    font-size: 15px;
    letter-spacing: .5px;
}

#welcomePage .large-btn {
    width: 240px;
    max-width: 100%;
    margin-top: 30px;
    padding: 15px 25px;
    border: 1px solid var(--mzx-lime);
    border-radius: 12px;
    background: var(--mzx-lime);
    color: #11130A;
    font-size: 16px;
    font-weight: 800;
    box-shadow: 0 0 30px rgba(198,244,50,.16);
    transition: .25s ease;
}

#welcomePage .large-btn:hover {
    background: #D8FF62;
    box-shadow: 0 0 38px rgba(198,244,50,.30);
    transform: translateY(-3px);
}

#welcomePage .welcome-caption {
    margin-top: 17px;
    color: #777777;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 2px;
}

#welcomePage .welcome-feature {
    position: absolute;
    z-index: 2;
    top: 39%;
    width: min(23%, 285px);
    padding: 25px 23px;
    border: 1px solid rgba(198,244,50,.20);
    border-radius: 19px;
    background: linear-gradient(145deg, rgba(255,255,255,.055), rgba(255,255,255,.015));
    box-shadow: 0 18px 55px rgba(0,0,0,.22);
    backdrop-filter: blur(12px);
}

#welcomePage .welcome-feature-left {
    left: 5%;
}

#welcomePage .welcome-feature-right {
    right: 5%;
}

#welcomePage .feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    margin-bottom: 17px;
    border-radius: 12px;
    background: rgba(198,244,50,.12);
    color: var(--mzx-lime);
    font-size: 25px;
}

#welcomePage .feature-label {
    display: block;
    margin-bottom: 11px;
    color: var(--mzx-lime);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 2px;
}

#welcomePage .welcome-feature h2 {
    color: #FFFFFF;
    font-size: clamp(19px, 2vw, 25px);
    line-height: 1.2;
    letter-spacing: -.6px;
}

#welcomePage .welcome-feature p {
    margin-top: 13px;
    color: #A7A7A7;
    font-size: 12px;
    line-height: 1.7;
}

#welcomePage .feature-line {
    width: 42px;
    height: 3px;
    margin-top: 19px;
    border-radius: 5px;
    background: var(--mzx-lime);
}

#welcomePage .welcome-feature > small {
    display: block;
    margin-top: 12px;
    color: #777777;
    font-size: 8px;
    letter-spacing: 1px;
}

#welcomePage .welcome-support {
    position: absolute;
    z-index: 5;
    top: 25px;
    right: 4%;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
    text-decoration: none;
    color: #FFFFFF;
}

#welcomePage .welcome-support span {
    color: #AAAAAA;
    font-size: 11px;
}

#welcomePage .welcome-support strong {
    color: var(--mzx-lime);
    font-size: 13px;
}

#welcomePage .welcome-support small {
    color: #777777;
    font-size: 10px;
}

#welcomePage .welcome-support:hover strong {
    color: #FFFFFF;
}

#welcomePage .welcome-ads {
    position: absolute;
    z-index: 3;
    left: 50%;
    bottom: 22px;
    transform: translateX(-50%);
    width: min(570px, 65%);
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 13px;
}

#welcomePage .welcome-ad-card {
    height: 82px;
    overflow: hidden;
    border: 1px solid rgba(198,244,50,.20);
    border-radius: 11px;
    background: #171717;
    transition: .25s ease;
}

#welcomePage .welcome-ad-card:hover {
    border-color: var(--mzx-lime);
    transform: translateY(-4px);
}

#welcomePage .welcome-ad-card img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* TABLET */

@media (max-width: 950px) {
    #welcomePage {
        padding: 100px 25px 145px;
    }

    #welcomePage .welcome-feature {
        top: auto;
        bottom: 125px;
        width: 28%;
        padding: 17px;
    }

    #welcomePage .welcome-feature-left {
        left: 2%;
    }

    #welcomePage .welcome-feature-right {
        right: 2%;
    }

    #welcomePage .welcome-feature p {
        font-size: 11px;
    }

    #welcomePage .welcome-ads {
        width: 58%;
        gap: 8px;
    }
}

/* MOBILE */

@media (max-width: 650px) {
    #welcomePage {
        min-height: 100svh;
        padding: 100px 18px 25px;
        flex-direction: column;
        justify-content: flex-start;
        overflow-y: auto;
    }

    #welcomePage .welcome-support {
        top: 17px;
        right: 18px;
    }

    #welcomePage .welcome-content {
        margin: 35px auto 0;
        width: 100%;
    }

    #welcomePage .main-logo {
        width: 88px;
        height: 88px;
    }

    #welcomePage .brand-name {
        font-size: 38px;
    }

    #welcomePage .welcome-feature {
        position: relative;
        inset: auto;
        width: 100%;
        max-width: 420px;
        margin-top: 25px;
        padding: 18px;
    }

    #welcomePage .welcome-feature h2 {
        font-size: 21px;
    }

    #welcomePage .welcome-feature p {
        font-size: 12px;
    }

    #welcomePage .welcome-ads {
        position: relative;
        inset: auto;
        transform: none;
        width: 100%;
        max-width: 420px;
        margin: 22px auto 10px;
        gap: 7px;
    }

    #welcomePage .welcome-ad-card {
        height: 68px;
    }
}

@media (prefers-reduced-motion: reduce) {
    #welcomePage *,
    #welcomePage *::before,
    #welcomePage *::after {
        animation: none !important;
        transition: none !important;
    }
}

/* HOMEPAGE SINGLE AD AUTO SLIDER */

#welcomePage .welcome-ads {
    position: absolute;
    z-index: 4;
    left: 50%;
    bottom: 22px;
    transform: translateX(-50%);
    width: min(650px, 75%);
    height: 125px;
    overflow: hidden;
    border: 1px solid rgba(198,244,50,.25);
    border-radius: 15px;
    background: #151515;
    box-shadow: 0 12px 40px rgba(0,0,0,.35);
}

#welcomePage .welcome-ad-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform .65s cubic-bezier(.22,.61,.36,1);
    will-change: transform;
}

#welcomePage .welcome-ad-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
}

#welcomePage .welcome-ad-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

@media (max-width: 950px) {
    #welcomePage .welcome-ads {
        width: 58%;
        height: 100px;
    }
}

@media (max-width: 650px) {
    #welcomePage .welcome-ads {
        position: relative;
        left: auto;
        bottom: auto;
        transform: none;
        width: 100%;
        max-width: 420px;
        height: 115px;
        margin: 22px auto 10px;
    }
}


/* MEDZONEX HOMEPAGE - LARGE MANUAL HORIZONTAL ADS */

#welcomePage .welcome-ads {
    position: absolute;
    z-index: 5;
    left: 50%;
    bottom: 22px;
    transform: translateX(-50%);
    display: block;
    width: min(1100px, 92%);
    height: 230px;
    overflow-x: auto;
    overflow-y: hidden;
    grid-template-columns: none;
    gap: 0;
    border: none;
    border-radius: 16px;
    background: transparent;
    box-shadow: none;
    scrollbar-width: thin;
    scrollbar-color: #C6F432 #222;
    scroll-behavior: smooth;
}

#welcomePage .welcome-ad-track {
    display: flex;
    flex-direction: row;
    gap: 18px;
    width: max-content;
    height: 100%;
    transform: none !important;
    transition: none;
}

#welcomePage .welcome-ad-slide {
    flex: 0 0 680px;
    width: 680px;
    height: 100%;
    overflow: hidden;
    border: 1px solid rgba(198,244,50,.3);
    border-radius: 15px;
    background: #151515;
    scroll-snap-align: start;
}

#welcomePage .welcome-ad-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#welcomePage .welcome-ads {
    scroll-snap-type: x mandatory;
}

@media (max-width: 950px) {
    #welcomePage .welcome-ads {
        width: 92%;
        height: 190px;
    }

    #welcomePage .welcome-ad-slide {
        flex-basis: 560px;
        width: 560px;
    }
}

@media (max-width: 650px) {
    #welcomePage .welcome-ads {
        position: relative;
        left: auto;
        bottom: auto;
        transform: none;
        width: 100%;
        max-width: 100%;
        height: 165px;
        margin: 22px auto 10px;
    }

    #welcomePage .welcome-ad-slide {
        flex-basis: 88vw;
        width: 88vw;
    }
}

/* MEDZONEX HOMEPAGE - FULL VERTICAL SCROLL LAYOUT */

#welcomePage {
    display: flex !important;
    flex-direction: row;
    flex-wrap: wrap;
    align-content: flex-start;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    min-height: 100svh;
    height: auto;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 110px 4% 50px;
    gap: 22px;
}

/* BRAND CONTENT FIRST */
#welcomePage .welcome-content {
    order: 1;
    position: relative;
    width: 100%;
    max-width: 520px;
    margin: 0 auto 20px;
}

/* FEATURE PANELS */
#welcomePage .welcome-feature {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    flex: 1 1 42%;
    width: auto;
    max-width: 520px;
    margin: 0;
}

#welcomePage .welcome-feature-left {
    order: 2;
}

#welcomePage .welcome-feature-right {
    order: 3;
}

/* ADS STACK VERTICALLY */
#welcomePage .welcome-ads {
    order: 4;
    position: relative;
    left: auto;
    bottom: auto;
    transform: none;
    display: block;
    width: 100%;
    max-width: 1400px;
    height: auto;
    max-height: none;
    overflow: visible;
    margin: 25px auto 0;
    border: none;
    background: transparent;
    box-shadow: none;
}

#welcomePage .welcome-ad-track {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 25px;
    width: 100%;
    height: auto;
    transform: none !important;
    transition: none;
}

#welcomePage .welcome-ad-slide {
    flex: none;
    width: 52%;
    max-width: 700px;
    height: auto;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border: 1px solid rgba(198,244,50,.3);
    border-radius: 15px;
}

#welcomePage .welcome-ad-slide:nth-child(odd) {
    align-self: flex-start;
}

#welcomePage .welcome-ad-slide:nth-child(even) {
    align-self: flex-end;
}

#welcomePage .welcome-ad-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* TABLET */
@media (max-width: 950px) {
    #welcomePage {
        padding: 100px 4% 40px;
    }

    #welcomePage .welcome-ad-slide {
        width: 65%;
    }
}

/* MOBILE */
@media (max-width: 650px) {
    #welcomePage {
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: flex-start;
        padding: 100px 18px 35px;
        overflow-x: hidden;
        overflow-y: auto;
    }

    #welcomePage .welcome-content {
        order: 1;
        margin: 25px auto;
    }

    #welcomePage .welcome-feature {
        flex: none;
        width: 100%;
        max-width: 420px;
        margin: 8px auto;
    }

    #welcomePage .welcome-feature-left {
        order: 2;
    }

    #welcomePage .welcome-feature-right {
        order: 3;
    }

    #welcomePage .welcome-ads {
        order: 4;
        width: 100%;
        margin: 20px auto 0;
    }

    #welcomePage .welcome-ad-track {
        gap: 20px;
    }

    #welcomePage .welcome-ad-slide {
        width: 90%;
        max-width: 420px;
        aspect-ratio: 16 / 9;
    }

    #welcomePage .welcome-ad-slide:nth-child(odd) {
        align-self: flex-start;
    }

    #welcomePage .welcome-ad-slide:nth-child(even) {
        align-self: flex-end;
    }
}

/* HOMEPAGE AD IMAGE + TEXT PANELS */

#welcomePage .welcome-ad-track {
    gap: 28px;
}

#welcomePage .welcome-ad-slide {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 1100px;
    aspect-ratio: auto;
    min-height: 260px;
    height: auto;
    border: 1px solid rgba(198,244,50,.22);
    border-radius: 18px;
    background: #151515;
    overflow: hidden;
}

#welcomePage .welcome-ad-image {
    width: 52%;
    height: 260px;
    flex-shrink: 0;
    overflow: hidden;
}

#welcomePage .welcome-ad-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #0B0B0C;
}

#welcomePage .welcome-ad-copy {
    flex: 1;
    padding: 28px;
    text-align: left;
}

#welcomePage .welcome-ad-copy span {
    color: #C6F432;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2px;
}

#welcomePage .welcome-ad-copy h2 {
    color: #FFFFFF;
    font-size: clamp(20px, 2.3vw, 30px);
    line-height: 1.2;
    margin: 13px 0;
}

#welcomePage .welcome-ad-copy p {
    color: #BBBBBB;
    font-size: 14px;
    line-height: 1.7;
}

#welcomePage .welcome-ad-copy strong {
    display: block;
    color: #C6F432;
    margin-top: 14px;
}

@media (max-width: 650px) {
    #welcomePage .welcome-ad-slide {
        flex-direction: column;
        width: 100%;
        min-height: auto;
    }

    #welcomePage .welcome-ad-image {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }

    #welcomePage .welcome-ad-copy {
        padding: 22px;
    }

    #welcomePage .welcome-ad-copy h2 {
        font-size: 23px;
    }
}

/* MEDZONEX BRAND THEME - PROFILE & NOTIFICATIONS */

/* PROFILE */
#profilePage .mz-profile-view {
    background: #171717;
    border: 1px solid rgba(198,244,50,.22);
    color: #FFFFFF;
    box-shadow: 0 10px 35px rgba(0,0,0,.25);
}

#profilePage .mz-profile-view-header h2,
#profilePage .mz-profile-identity h2 {
    color: #FFFFFF;
}

#profilePage .mz-profile-view-header p,
#profilePage .mz-profile-identity p,
#profilePage .mz-profile-identity span {
    color: #A3A3A3;
}

#profilePage .mz-edit-profile-btn,
#profilePage .mz-profile-avatar {
    background: #C6F432;
    color: #0B0B0C;
    border-color: #C6F432;
}

#profilePage .mz-profile-identity {
    background: #202020;
    border-color: rgba(198,244,50,.2);
}

#profilePage .mz-profile-detail {
    background: #111111;
    border-color: #303030;
}

#profilePage .mz-profile-detail small {
    color: #A3A3A3;
}

#profilePage .mz-profile-detail strong {
    color: #FFFFFF;
}

#profilePage .mz-cancel-profile-btn {
    background: #202020;
    border-color: #444444;
    color: #FFFFFF;
}

/* SALES SEARCH */
#mzSalesSearch {
    background: #171717;
    border-color: #383838;
    color: #FFFFFF;
}

#mzSalesSearch:focus {
    border-color: #C6F432;
    box-shadow: 0 0 0 3px rgba(198,244,50,.12);
}

#mzSalesSearch::placeholder {
    color: #A3A3A3;
}

/* NOTIFICATION PANEL */
.notification-panel {
    background: #171717;
    border-color: rgba(198,244,50,.2);
}

.notification-card.is-unread {
    background: rgba(198,244,50,.07);
}

.notification-actions .notification-subscribe-btn {
    background: #C6F432;
    color: #0B0B0C;
}

.notification-actions .notification-subscribe-btn:hover {
    background: #D8FF62;
}

.notification-status {
    color: #72D6A0;
}

/* SUBSCRIPTION ACCORDION */
.subscription-countdown-details > summary::after {
    color: #C6F432;
}

/* FULL PAGE NOTIFICATIONS */
#notificationsPage {
    background: #0B0B0C;
}

.notifications-page-shell {
    background: #171717;
    border-color: rgba(198,244,50,.2);
}

.notifications-page-unread {
    background: rgba(198,244,50,.08);
    border-color: rgba(198,244,50,.35);
}

.notifications-page-unread span {
    color: #C6F432;
}

.notifications-page-list .notification-card.is-unread {
    border-color: rgba(198,244,50,.35);
    background: rgba(198,244,50,.07);
}

/* MEDZONEX GLOBAL BRAND - DASHBOARD */

#dashboardPage,
.dashboard {
    background: #0B0B0C !important;
    color: #FFFFFF;
}

.dashboard-header {
    background: #111111;
    border-color: #303030;
}

.dashboard-header p,
.dashboard-welcome p {
    color: #A3A3A3;
}

.dashboard-card {
    background: #171717;
    border-color: #303030;
    color: #FFFFFF;
}

.dashboard-card:hover {
    border-color: #C6F432;
    box-shadow: 0 8px 25px rgba(198,244,50,.08);
}

.dashboard-card small {
    color: #A3A3A3;
}

/* SIDEBAR */
.dashboard-sidebar {
    background: #111111;
    border-color: #303030;
}

.sidebar-item {
    color: #BDBDBD;
}

.sidebar-item:hover {
    background: rgba(198,244,50,.08);
    color: #FFFFFF;
}

.sidebar-item.active {
    background: rgba(198,244,50,.14);
    color: #C6F432;
    box-shadow: inset 0 0 0 1px rgba(198,244,50,.25);
}

.sidebar-brand-text strong {
    color: #FFFFFF;
}

/* DASHBOARD HEADINGS */
.dashboard-topbar h1,
.section-heading h2,
.panel-heading h2 {
    color: #FFFFFF;
}

.dashboard-small-title,
.section-kicker {
    color: #C6F432;
}

/* USER AVATAR */
.dashboard-avatar {
    background: #C6F432;
    color: #0B0B0C;
}

/* DASHBOARD ADVERTISEMENT CONTROLS */
.ad-carousel {
    background: #171717;
    border-color: #303030;
}

.ad-overlay span {
    color: #C6F432;
}

.ad-dot.active {
    background: #C6F432;
}

/* STATISTICS */
.stat-card {
    background: #171717;
    border-color: #303030;
}

.stat-card:hover {
    border-color: rgba(198,244,50,.35);
}

.stat-value {
    color: #FFFFFF;
}

.sales-card {
    background: linear-gradient(
        135deg,
        rgba(198,244,50,.12),
        #171717
    );
}

/* DASHBOARD PANELS */
.dashboard-panel {
    background: #171717;
    border-color: #303030;
}

.text-btn {
    color: #C6F432;
}

/* =====================================================
   MEDZONEX BRAND THEME — INVENTORY, BILLING & PURCHASE
   Colors only: preserve layout and functionality
===================================================== */

/* INVENTORY */
#inventoryPage,
#inventoryPage .inventory-shell {
    background: #0B0B0C;
    color: #FFFFFF;
}

#inventoryPage .inventory-header h1,
#inventoryPage .inventory-section-header h2,
#inventoryPage .inventory-medicine-info h3 {
    color: #FFFFFF;
}

#inventoryPage .inventory-subtitle,
#inventoryPage .inventory-summary-label,
#inventoryPage .inventory-medicine-info small,
#inventoryPage .inventory-added-date,
#inventoryPage .inventory-detail span {
    color: #A3A3A3;
}

#inventoryPage .inventory-summary-card,
#inventoryPage .inventory-item {
    background: #171717;
    border-color: #303030;
    color: #FFFFFF;
}

#inventoryPage .inventory-summary-value,
#inventoryPage .inventory-detail strong {
    color: #FFFFFF;
}

#inventoryPage .inventory-item:hover {
    background: #1D1D1D;
    border-color: #C6F432;
}

#inventoryPage .inventory-medicine-info p {
    color: #C6F432;
}

#inventoryPage .inventory-medicine-icon,
#inventoryPage .inventory-serial {
    background: rgba(198,244,50,.12);
    color: #C6F432;
}

#inventoryPage .inventory-search-box {
    background: #171717;
    border-color: #383838;
    color: #FFFFFF;
}

#inventoryPage .inventory-search-box input {
    background: transparent;
    color: #FFFFFF;
}

#inventoryPage .inventory-search-box input::placeholder {
    color: #A3A3A3;
}

#inventoryPage .inventory-filter-btn {
    background: #171717;
    border-color: #383838;
    color: #FFFFFF;
}

#inventoryPage .inventory-filter-btn:hover,
#inventoryPage .inventory-filter-btn.active {
    background: rgba(198,244,50,.14);
    border-color: #C6F432;
    color: #C6F432;
}

#inventoryPage .inventory-item-actions button,
#inventoryPage .details-edit-actions button {
    background: #242424;
    border-color: #444444;
    color: #FFFFFF;
}

#inventoryPage .inventory-item-actions .inventory-edit-btn,
#inventoryPage .details-edit-actions .primary-btn {
    background: #C6F432;
    border-color: #C6F432;
    color: #0B0B0C;
}

#inventoryPage .inventory-empty {
    color: #A3A3A3;
    border-color: #555555;
}

#inventoryPage .inventory-empty h3 {
    color: #FFFFFF;
}

#inventoryPage .inventory-list {
    scrollbar-color: #C6F432 transparent;
}

#inventoryPage .inventory-list::-webkit-scrollbar-thumb {
    background: #C6F432;
}

/* MEDICINE DETAILS DOCUMENT — ON-SCREEN VIEW */
#medicineDetailsDocument {
    background: #171717;
    color: #FFFFFF;
    border-color: #383838;
}

#medicineDetailsDocument h1,
#medicineDetailsDocument h2,
#medicineDetailsDocument strong {
    color: #FFFFFF;
}

#medicineDetailsDocument .medicine-details-subtitle,
#medicineDetailsDocument .medicine-details-record-id span,
#medicineDetailsDocument .medicine-details-grid span,
#medicineDetailsDocument .medicine-details-document-footer {
    color: #A3A3A3;
}

#medicineDetailsDocument .medicine-details-document-header,
#medicineDetailsDocument .medicine-details-group h2,
#medicineDetailsDocument .medicine-details-grid > div,
#medicineDetailsDocument .medicine-details-document-footer {
    border-color: #383838;
}

/* BILLING AND CUSTOMER SALES RECORDS */
#billingPage,
#billingPage .dashboard-panel {
    background: #0B0B0C;
    color: #FFFFFF;
}

#billingPage .dashboard-panel {
    background: #171717;
    border-color: #303030;
}

#billingItemsContainer {
    scrollbar-color: #C6F432 transparent;
}

#billingItemsContainer::-webkit-scrollbar-thumb {
    background: #C6F432;
}

#billingItemsContainer > .inventory-item {
    background: #171717;
    border-color: #383838;
    color: #FFFFFF;
}

#billingItemsContainer > .inventory-item:hover {
    border-color: #C6F432;
}

#billingPage input,
#billingPage select,
#billingPage textarea {
    background-color: #FFFFFF;
    border-color: #D1D5DB;
    color: #000000;
}

#billingPage select option {
    background-color: #FFFFFF;
    color: #000000;
}

#billingPage input::placeholder,
#billingPage textarea::placeholder {
    color: #A3A3A3;
}

#billingPage input:focus,
#billingPage select:focus,
#billingPage textarea:focus {
    border-color: #C6F432;
    outline-color: #C6F432;
}

.mz-sale-row,
.mz-record-row {
    border-color: #303030;
    color: #FFFFFF;
}

.mz-sale-row:hover,
.mz-record-row:hover {
    background: rgba(198,244,50,.07);
}

.mz-sale-row small,
.mz-record-row small,
.mz-empty {
    color: #A3A3A3;
}

.mz-back {
    border-color: #444444;
    color: #C6F432;
}

/* CUSTOMER PURCHASE STATEMENT — SCREEN VIEW */
.mz-customer-purchase,
.mz-customer-purchase table {
    color: #111111;
}

.mz-purchase-heading {
    border-color: #383838;
}

.mz-customer-purchase th,
.mz-customer-purchase td {
    border-color: #444444;
}

/* PURCHASE WORKSPACE */
#purchasePage,
#purchasePage .dashboard-panel {
    background: #0B0B0C;
    color: #FFFFFF;
}

#purchasePage .dashboard-panel,
#purchasePage .mz-purchase-card {
    background: #171717 !important;
    color: #FFFFFF !important;
    border-color: #383838 !important;
}

#purchasePage .mz-purchase-card h3,
#purchasePage .mz-purchase-card strong,
#purchasePage .mz-purchase-card label,
#purchasePage .mz-purchase-total-row,
#purchasePage .mz-purchase-history-heading {
    color: #FFFFFF !important;
}

#purchasePage .mz-purchase-card input,
#purchasePage .mz-purchase-card select {
    background: #0B0B0C !important;
    color: #FFFFFF !important;
    border-color: #444444 !important;
}

#purchasePage .mz-purchase-card input::placeholder {
    color: #A3A3A3 !important;
}

#purchasePage .purchase-search-item,
#purchasePage .purchase-history-card,
#purchasePage .purchase-item-card {
    background: #111111 !important;
    color: #FFFFFF !important;
    border-color: #383838 !important;
}

#purchasePage .purchase-search-item span,
#purchasePage .purchase-search-item small,
#purchasePage .purchase-item-card span,
#purchasePage .purchase-item-card small {
    color: #A3A3A3 !important;
}

#purchasePage .mz-purchase-total-row {
    border-color: #383838 !important;
}

#purchasePage .mz-purchase-grand {
    color: #C6F432 !important;
}

#purchasePage .purchase-empty,
#purchasePage .purchase-loading {
    color: #A3A3A3 !important;
}

/* BRAND PRIMARY BUTTONS */
#inventoryPage .primary-btn,
#billingPage .primary-btn,
#purchasePage .primary-btn {
    background: #C6F432;
    border-color: #C6F432;
    color: #0B0B0C;
}

#inventoryPage .primary-btn:hover,
#billingPage .primary-btn:hover,
#purchasePage .primary-btn:hover {
    background: #D5FF45;
    border-color: #D5FF45;
}

/* PRINT DOCUMENTS KEEP WHITE PAPER FOR READABILITY */
@media print {
    #medicineDetailsDocument,
    .mz-paper {
        background: #FFFFFF !important;
        color: #111111 !important;
        border-color: #DDDDDD !important;
    }
}

/* =====================================================
   MEDZONEX AUTH BRAND THEME — LOGIN / SIGNUP / OTP
===================================================== */

#authPage {
    background: #0B0B0C;
    color: #FFFFFF;
}

#authPage .auth-background {
    background:
        radial-gradient(
            circle at 15% 20%,
            rgba(198,244,50,.09),
            transparent 30%
        ),
        radial-gradient(
            circle at 85% 80%,
            rgba(198,244,50,.05),
            transparent 30%
        );
}

#authPage .auth-card {
    background: linear-gradient(145deg, #1B1B1B, #111111);
    border-color: rgba(198,244,50,.22);
    color: #FFFFFF;
    box-shadow:
        0 30px 100px rgba(0,0,0,.55),
        inset 0 1px 0 rgba(255,255,255,.04);
}

#authPage .auth-logo-area h1,
#authPage .auth-section h1,
#authPage .auth-section h2 {
    color: #FFFFFF;
}

#authPage .auth-logo-area p {
    color: #A3A3A3;
}

#authPage .back-btn {
    color: #A3A3A3;
}

#authPage .back-btn:hover {
    color: #C6F432;
}

#authPage .form-group label,
#authPage .otp-area label {
    color: #E5E5E5;
}

#authPage .form-group input,
#authPage .otp-area input {
    background: #0B0B0C;
    border-color: #383838;
    color: #FFFFFF;
}

#authPage .form-group input:focus,
#authPage .otp-area input:focus {
    border-color: #C6F432;
    box-shadow: 0 0 0 3px rgba(198,244,50,.12);
}

#authPage .form-group input::placeholder,
#authPage .otp-area input::placeholder {
    color: #777777;
}

#authPage .otp-area {
    background: rgba(198,244,50,.055);
    border-color: rgba(198,244,50,.2);
}

#authPage .otp-timer {
    color: #A3A3A3;
}

#authPage .otp-timer.ready {
    color: #C6F432;
}

#authPage .resend-btn {
    background: rgba(198,244,50,.08);
    color: #C6F432;
}

#authPage .primary-btn {
    background: #C6F432;
    border-color: #C6F432;
    color: #0B0B0C;
}

#authPage .primary-btn:hover {
    background: #D5FF45;
    border-color: #D5FF45;
}

#authPage a {
    color: #C6F432;
}

#authPage a:hover {
    color: #D5FF45;
}

/* =====================================================
   MEDZONEX BRAND THEME — DASHBOARD & SUBSCRIPTION
===================================================== */

/* Dashboard background and modal */
#dashboardPage {
    background: #0B0B0C !important;
}

#dashboardPage .modal-card,
#dashboardPage .dashboard-modal-card {
    background: #171717;
    color: #FFFFFF;
    border-color: #383838;
}

#dashboardPage .modal-card p,
#dashboardPage .dashboard-modal-card > p {
    color: #A3A3A3;
}

/* Sidebar */
#dashboardPage .dashboard-sidebar {
    background: #111111;
    border-color: #303030;
}

#dashboardPage .sidebar-item.active {
    background: rgba(198,244,50,.14);
    color: #C6F432;
    box-shadow: inset 0 0 0 1px rgba(198,244,50,.25);
}

#dashboardPage .sidebar-item:hover {
    background: rgba(198,244,50,.08);
    color: #FFFFFF;
}

/* Dashboard headings */
#dashboardPage .dashboard-small-title,
#dashboardPage .section-kicker {
    color: #C6F432;
}

/* Avatar */
#dashboardPage .dashboard-avatar {
    background: #C6F432;
    color: #0B0B0C;
}

/* Dashboard ad controls — images and slider unchanged */
#dashboardPage .ad-carousel {
    background: #171717;
    border-color: #303030;
}

#dashboardPage .ad-overlay span {
    color: #C6F432;
}

#dashboardPage .ad-dot.active {
    background: #C6F432;
}

/* Dashboard statistics */
#dashboardPage .stat-card {
    background: #171717;
    border-color: #303030;
}

#dashboardPage .stat-card:hover {
    border-color: rgba(198,244,50,.35);
}

#dashboardPage .sales-card {
    background: linear-gradient(135deg, rgba(198,244,50,.12), #171717);
}

/* Dashboard panels */
#dashboardPage .dashboard-panel {
    background: #171717;
    border-color: #303030;
}

#dashboardPage .text-btn {
    color: #C6F432;
}

/* Quick actions */
#dashboardPage .quick-action {
    background: #171717;
    border-color: #303030;
    color: #FFFFFF;
}

#dashboardPage .quick-action:hover {
    background: #202020;
    border-color: #C6F432;
}

#dashboardPage .quick-action > span {
    background: rgba(198,244,50,.12);
    color: #C6F432;
}

/* Dashboard primary small button */
#dashboardPage .primary-small-btn {
    background: #C6F432;
    color: #0B0B0C;
}

/* Customer care */
#dashboardPage .care-icon,
#dashboardPage .care-contact > span {
    background: rgba(198,244,50,.12);
    color: #C6F432;
}

#dashboardPage .care-contact {
    background: #202020;
    color: #FFFFFF;
}

/* Subscription countdown */
.subscription-countdown-card {
    background: #171717;
    border-color: #383838;
    color: #FFFFFF;
}

.subscription-countdown-header h3 {
    color: #FFFFFF;
}

.subscription-countdown-header p,
.subscription-expiry-date {
    color: #A3A3A3;
}

.subscription-manage-btn {
    background: #C6F432;
    color: #0B0B0C;
}

.subscription-manage-btn:hover {
    background: #D5FF45;
}

/* Preserve subscription status meanings */
.subscription-status-badge.status-green {
    color: #166534;
    background: #dcfce7;
}

.subscription-status-badge.status-yellow {
    color: #854d0e;
    background: #fef9c3;
}

.subscription-status-badge.status-red {
    color: #991b1b;
    background: #fee2e2;
}

/* =====================================================
   MEDZONEX BRAND THEME — PROFILE, SETTINGS & NOTIFICATIONS
===================================================== */

/* PROFILE AND SETTINGS CARDS */
#profilePage .mz-account-card,
#settingsPage .mz-account-card,
#profilePage .mz-profile-view {
    background: #171717 !important;
    color: #FFFFFF !important;
    border-color: #383838 !important;
    box-shadow: 0 8px 28px rgba(0,0,0,.2);
}

#profilePage .mz-account-card h3,
#settingsPage .mz-account-card h3,
#profilePage .mz-profile-view-header h2,
#profilePage .mz-profile-identity h2 {
    color: #FFFFFF !important;
}

#profilePage .mz-account-description,
#profilePage .mz-profile-view-header p,
#profilePage .mz-profile-identity p,
#profilePage .mz-profile-identity span {
    color: #A3A3A3 !important;
}

#profilePage .mz-account-card label,
#settingsPage .mz-account-card label {
    color: #E5E5E5 !important;
}

/* PROFILE AND SETTINGS INPUTS */
#profilePage .mz-account-card input,
#profilePage .mz-account-card textarea,
#settingsPage .mz-account-card input:not([type="checkbox"]) {
    background: #0B0B0C !important;
    color: #FFFFFF !important;
    border-color: #383838 !important;
}

#profilePage .mz-account-card input:focus,
#profilePage .mz-account-card textarea:focus,
#settingsPage .mz-account-card input:not([type="checkbox"]):focus {
    background: #111111 !important;
    border-color: #C6F432 !important;
    box-shadow: 0 0 0 3px rgba(198,244,50,.12) !important;
}

#profilePage .mz-account-card input[readonly] {
    background: #202020 !important;
    color: #A3A3A3 !important;
}

#settingsPage .mz-setting-row {
    border-color: #303030 !important;
}

#settingsPage .mz-setting-row strong {
    color: #FFFFFF !important;
}

#settingsPage .mz-setting-row small {
    color: #A3A3A3 !important;
}

#settingsPage .mz-setting-row input[type="checkbox"] {
    accent-color: #C6F432 !important;
}

/* PROFILE VIEW */
#profilePage .mz-profile-identity {
    background: #202020 !important;
    border-color: #383838 !important;
}

#profilePage .mz-profile-avatar {
    background: #C6F432 !important;
    color: #0B0B0C !important;
}

#profilePage .mz-profile-detail {
    background: #111111 !important;
    border-color: #383838 !important;
}

#profilePage .mz-profile-detail small {
    color: #A3A3A3 !important;
}

#profilePage .mz-profile-detail strong {
    color: #FFFFFF !important;
}

#profilePage .mz-edit-profile-btn {
    background: #C6F432 !important;
    border-color: #C6F432 !important;
    color: #0B0B0C !important;
}

#profilePage .mz-cancel-profile-btn {
    background: #242424 !important;
    border-color: #444444 !important;
    color: #FFFFFF !important;
}

/* SAVE BUTTONS */
#profilePage #saveProfileBtn,
#settingsPage #saveSettingsBtn {
    background: #C6F432 !important;
    border-color: #C6F432 !important;
    color: #0B0B0C !important;
    box-shadow: none;
}

/* SALES HISTORY SEARCH */
#mzSalesSearch {
    background: #171717 !important;
    color: #FFFFFF !important;
    border-color: #383838 !important;
}

#mzSalesSearch:focus {
    border-color: #C6F432 !important;
    box-shadow: 0 0 0 3px rgba(198,244,50,.12) !important;
}

#mzSalesSearch::placeholder {
    color: #A3A3A3 !important;
}

/* NOTIFICATION PANEL */
.notification-panel {
    background: #171717 !important;
    border-color: #383838 !important;
}

.notification-panel-header,
.notification-card {
    border-color: #303030 !important;
}

.notification-card.is-unread {
    background: rgba(198,244,50,.07) !important;
}

.notification-actions .notification-subscribe-btn {
    background: #C6F432 !important;
    color: #0B0B0C !important;
}

.notification-actions .notification-subscribe-btn:hover {
    background: #D5FF45 !important;
}

/* FULL-PAGE NOTIFICATIONS */
#notificationsPage {
    background: #0B0B0C !important;
}

#notificationsPage .notifications-page-shell {
    background: #171717 !important;
    border-color: #383838 !important;
}

#notificationsPage .notifications-page-unread {
    background: rgba(198,244,50,.08) !important;
    border-color: rgba(198,244,50,.3) !important;
}

#notificationsPage .notifications-page-unread span {
    color: #C6F432 !important;
}

#notificationsPage .notifications-page-list .notification-card.is-unread {
    background: rgba(198,244,50,.07) !important;
    border-color: rgba(198,244,50,.3) !important;
}

/* SUBSCRIPTION ACCORDION */
.subscription-countdown-details > summary::after {
    color: #C6F432 !important;
}

.subscription-countdown-content {
    border-color: #383838 !important;
}

.subscription-countdown-content > p:first-child {
    color: #A3A3A3 !important;
}

/* SUBSCRIPTION PAGE — LIME BRAND ACCENTS */
#subscriptionPage .section-kicker {
    color: #C6F432 !important;
}
/* MEDZONEX COLLAPSIBLE SIDEBAR */
.dashboard-sidebar {
    position: sticky;
    flex: 0 0 76px;
    width: 76px;
    min-width: 76px;
    transition: width .25s ease, min-width .25s ease, flex-basis .25s ease;
    overflow-x: hidden;
    box-sizing: border-box;
    z-index: 20;
}

.dashboard-sidebar.is-expanded {
    flex-basis: 235px;
    width: 235px;
    min-width: 235px;
}

.sidebar-toggle-btn {
    width: 34px;
    height: 34px;
    min-width: 34px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 9px;
    background: rgba(255,255,255,.08);
    color: inherit;
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
}

.sidebar-toggle-btn:hover {
    background: rgba(255,255,255,.16);
}

.dashboard-sidebar.is-collapsed .sidebar-brand {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
}

.dashboard-sidebar.is-collapsed .sidebar-brand-text,
.dashboard-sidebar.is-collapsed .sidebar-item > span:not(.sidebar-icon) {
    display: none !important;
}

.dashboard-sidebar.is-collapsed .sidebar-item {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
}

.dashboard-sidebar.is-expanded .sidebar-brand {
    justify-content: flex-start;
    padding-left: 8px;
    padding-right: 8px;
}

.dashboard-sidebar.is-expanded .sidebar-brand-text {
    display: flex !important;
}

.dashboard-sidebar.is-expanded .sidebar-item {
    justify-content: flex-start;
    padding-left: 13px;
    padding-right: 13px;
}

.dashboard-sidebar.is-expanded .sidebar-item > span:not(.sidebar-icon) {
    display: inline !important;
}

@media (max-width: 900px) {
    .dashboard-sidebar.is-expanded {
        flex-basis: 235px !important;
        width: 235px !important;
        min-width: 235px !important;
    }

    .dashboard-sidebar.is-expanded .sidebar-brand-text {
        display: flex !important;
    }

    .dashboard-sidebar.is-expanded .sidebar-item > span:not(.sidebar-icon) {
        display: inline !important;
    }

    .dashboard-sidebar.is-expanded .sidebar-item {
        justify-content: flex-start;
        padding-left: 13px;
        padding-right: 13px;
    }
}


/* SELL & SHARE MOBILE HINT */
.sell-share-hint {
    margin: 7px 0 12px;
    color: #f0c96b;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
}



/* MedZoneX: Disable number spinners and wheel changes */
input[type="number"] {
    appearance: none !important;
    -moz-appearance: textfield !important;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    display: none !important;
    -webkit-appearance: none !important;
    margin: 0 !important;
}

/* MEDZONEX CUSTOMER SEARCH — BLACK THEME */
#customersPage .mz-customer-search {
    background: #171717 !important;
    color: #FFFFFF !important;
    border: 1px solid #444444 !important;
    caret-color: #C6F432;
}

#customersPage .mz-customer-search::placeholder {
    color: #A3A3A3 !important;
    opacity: 1;
}

#customersPage .mz-customer-search:focus {
    background: #171717 !important;
    color: #FFFFFF !important;
    border-color: #C6F432 !important;
    outline: 1px solid #C6F432;
}

#customersPage .mz-customer-search::-webkit-search-cancel-button {
    filter: invert(1);
}

/* MEDZONEX DASHBOARD ADS — FULL IMAGE RESPONSIVE FIX */

#dashboardAdCarousel.ad-carousel {
    width: 100%;
    height: auto !important;
    aspect-ratio: 3 / 1;
    min-height: 0;
    overflow: hidden;
    background: #0B0B0C;
    box-sizing: border-box;
}

#dashboardAdCarousel .ad-slide {
    width: 100%;
    height: 100%;
    inset: 0;
}

#dashboardAdCarousel .ad-slide img,
#dashboardAdCarousel .ad-slide video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain !important;
    object-position: center center;
}

@media (max-width: 650px) {
    #dashboardAdCarousel.ad-carousel {
        width: 100%;
        height: auto !important;
        aspect-ratio: 3 / 1;
    }
}


/* DASHBOARD ADS — DESKTOP SIZE LIMIT */
#dashboardAdCarousel.ad-carousel {
    width: 100%;
    max-width: 1100px;
    height: auto !important;
    aspect-ratio: 3 / 1;
    margin-left: auto;
    margin-right: auto;
    overflow: hidden;
}

#dashboardAdCarousel .ad-slide img,
#dashboardAdCarousel .ad-slide video {
    width: 100%;
    height: 100%;
    object-fit: contain !important;
    object-position: center;
}

@media (max-width: 650px) {
    #dashboardAdCarousel.ad-carousel {
        max-width: 100%;
        aspect-ratio: 3 / 1;
    }
}

/* FINAL DASHBOARD AD SIZE — COMPACT DESKTOP */
#dashboardAdCarousel.ad-carousel {
    width: 100%;
    max-width: 760px !important;
    height: auto !important;
    aspect-ratio: 3 / 1;
    margin: 0 auto;
}

#dashboardAdCarousel .ad-slide img,
#dashboardAdCarousel .ad-slide video {
    width: 100%;
    height: 100%;
    object-fit: contain !important;
}

@media (max-width: 650px) {
    #dashboardAdCarousel.ad-carousel {
        max-width: 100% !important;
        aspect-ratio: 3 / 1;
    }
}


/* HOMEPAGE WEBSITE STUDIO CUSTOMER LINK */
#welcomePage .home-website-studio-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin-top: 17px;
    padding: 12px 18px;
    width: min(100%, 340px);
    text-align: center;
    text-decoration: none;
    border: 1px solid rgba(198, 244, 50, 0.28);
    border-radius: 12px;
    background: rgba(198, 244, 50, 0.055);
    transition: .25s ease;
}

#welcomePage .home-website-studio-link strong {
    color: #F2F5E8;
    font-size: 13px;
    font-weight: 750;
}

#welcomePage .home-website-studio-link span {
    color: #C6F432;
    font-size: 12px;
    font-weight: 700;
}

#welcomePage .home-website-studio-link:hover {
    transform: translateY(-2px);
    border-color: #C6F432;
    background: rgba(198, 244, 50, 0.11);
    box-shadow: 0 5px 22px rgba(198, 244, 50, 0.10);
}

@media (max-width: 650px) {
    #welcomePage .home-website-studio-link {
        margin-top: 15px;
        width: min(92%, 340px);
    }
}

/* PREMIUM HOMEPAGE WEBSITE STUDIO CTA */
#welcomePage .home-website-studio-link {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: min(92%, 440px);
    margin: 22px auto 18px;
    padding: 21px 24px;
    overflow: hidden;
    text-align: center;
    text-decoration: none;
    border: 1.5px solid rgba(198, 244, 50, 0.75);
    border-radius: 18px;
    background: linear-gradient(
        135deg,
        rgba(198, 244, 50, 0.17),
        rgba(198, 244, 50, 0.045)
    );
    box-shadow:
        0 0 18px rgba(198, 244, 50, 0.13),
        inset 0 0 18px rgba(198, 244, 50, 0.045);
    transition: transform .25s ease, box-shadow .25s ease,
                border-color .25s ease;
}

#welcomePage .home-website-studio-link::before {
    content: "✦  WEBSITE STUDIO";
    color: #C6F432;
    font-size: 10px;
    font-weight: 850;
    letter-spacing: 2px;
}

#welcomePage .home-website-studio-link strong {
    color: #FFFFFF;
    font-size: clamp(16px, 2.2vw, 19px);
    font-weight: 850;
    line-height: 1.35;
}

#welcomePage .home-website-studio-link span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 3px;
    padding: 9px 17px;
    border-radius: 30px;
    background: #C6F432;
    color: #172000;
    font-size: 13px;
    font-weight: 850;
}

#welcomePage .home-website-studio-link:hover {
    transform: translateY(-4px);
    border-color: #C6F432;
    box-shadow:
        0 8px 30px rgba(198, 244, 50, 0.22),
        inset 0 0 22px rgba(198, 244, 50, 0.08);
}

@media (max-width: 650px) {
    #welcomePage .home-website-studio-link {
        width: min(92%, 420px);
        margin: 18px auto 15px;
        padding: 19px 16px;
        border-radius: 16px;
    }

    #welcomePage .home-website-studio-link strong {
        font-size: 16px;
    }

    #welcomePage .home-website-studio-link span {
        font-size: 12px;
    }
}
