/* =========================================================
   PHARMAY - GLOBAL APPLICATION STYLES
   File: assets/css/style.css
   Theme: Classic Blue & White
   Framework: Bootstrap 5
   ========================================================= */

/* ---------------------------------------------------------
   1. ROOT VARIABLES
   --------------------------------------------------------- */

:root {
    --ph-primary: #1757b7;
    --ph-primary-dark: #10458f;
    --ph-primary-light: #eaf2ff;
    --ph-primary-soft: #fff4fa;

    --ph-secondary: #60728a;
    --ph-success: #16834a;
    --ph-success-light: #e7f8ee;
    --ph-warning: #b87513;
    --ph-warning-light: #fff5df;
    --ph-danger: #c43e45;
    --ph-danger-light: #fff0f0;
    --ph-info: #087eaa;
    --ph-info-light: #e7f7fc;

    --ph-bg: #f4f7fb;
    --ph-surface: #ffffff;
    --ph-surface-soft: #f8fafd;

    --ph-text: #24344d;
    --ph-text-dark: #1d2f49;
    --ph-text-muted: #7b899d;

    --ph-border: #e3eaf3;
    --ph-border-strong: #d5dfeb;

    --ph-sidebar-width: 255px;
    --ph-topbar-height: 72px;

    --ph-radius-sm: 7px;
    --ph-radius: 11px;
    --ph-radius-lg: 15px;

    --ph-shadow-sm: 0 3px 12px rgba(27, 58, 96, 0.035);
    --ph-shadow: 0 6px 24px rgba(27, 58, 96, 0.055);

    --ph-transition: 0.2s ease;
}

/* ---------------------------------------------------------
   2. RESET & BASE
   --------------------------------------------------------- */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body.pharmay-body {
    min-height: 100vh;
    margin: 0;
    background: var(--ph-bg);
    color: var(--ph-text);
    font-family: 'Poppins', Arial, sans-serif;
    font-size: 13px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

a {
    color: var(--ph-primary);
    text-decoration: none;
    transition:
        color var(--ph-transition),
        background-color var(--ph-transition),
        border-color var(--ph-transition);
}

a:hover {
    color: var(--ph-primary-dark);
}

img,
svg {
    max-width: 100%;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid rgba(23, 87, 183, 0.22);
    outline-offset: 2px;
}

::selection {
    background: #d9e8ff;
    color: #163e7d;
}

/* ---------------------------------------------------------
   3. APPLICATION LAYOUT
   --------------------------------------------------------- */

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

.pharmay-main {
    min-height: 100vh;
    min-width: 0;
    margin-left: var(--ph-sidebar-width);
    transition: margin-left var(--ph-transition);
}

.pharmay-content {
    width: 100%;
    max-width: 1800px;
    min-height: calc(100vh - var(--ph-topbar-height));
    margin: 0 auto;
    padding: 28px;
}

.pharmay-content > :last-child {
    margin-bottom: 0;
}

/* ---------------------------------------------------------
   4. SIDEBAR
   Expected structure:
   .pharmay-sidebar
   .pharmay-sidebar-brand
   .pharmay-sidebar-nav
   .pharmay-nav-link
   --------------------------------------------------------- */

.pharmay-sidebar {
    position: fixed;
    z-index: 1040;
    top: 0;
    bottom: 0;
    left: 0;

    display: flex;
    flex-direction: column;

    width: var(--ph-sidebar-width);
    height: 100vh;
    height: 100dvh;

    overflow-x: hidden;
    overflow-y: auto;

    background: #ffffff;
    border-right: 1px solid var(--ph-border);

    scrollbar-width: thin;
    scrollbar-color: #cbd7e7 transparent;

    transition: transform var(--ph-transition);
}

.pharmay-sidebar::-webkit-scrollbar {
    width: 5px;
}

.pharmay-sidebar::-webkit-scrollbar-thumb {
    background: #cbd7e7;
    border-radius: 8px;
}

.pharmay-sidebar-brand {
    min-height: 82px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 21px;
    border-bottom: 1px solid #edf1f6;
}

.pharmay-brand-logo {
    width: 43px;
    height: 43px;
    flex: 0 0 43px;

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

    border-radius: 12px;
    background: var(--ph-primary);
    color: #ffffff;
    font-size: 21px;
}

.pharmay-brand-text {
    min-width: 0;
}

.pharmay-brand-text strong {
    display: block;
    color: var(--ph-text-dark);
    font-size: 19px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.4px;
}

.pharmay-brand-text span {
    display: block;
    margin-top: 3px;
    color: var(--ph-text-muted);
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 1.3px;
    text-transform: uppercase;
}

.pharmay-sidebar-nav {
    flex: 1;
    padding: 20px 13px;
}

.pharmay-sidebar-section {
    margin: 19px 11px 9px;
    color: #99a5b6;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.1px;
    text-transform: uppercase;
}

.pharmay-sidebar-section:first-child {
    margin-top: 0;
}

.pharmay-nav-link {
    position: relative;

    display: flex;
    align-items: center;
    gap: 12px;

    min-height: 43px;
    margin-bottom: 4px;
    padding: 10px 13px;

    border-radius: 9px;
    color: #5f7088;

    font-size: 12px;
    font-weight: 500;
}

.pharmay-nav-link > i {
    width: 18px;
    flex: 0 0 18px;
    color: #8b9ab0;
    font-size: 15px;
    text-align: center;
}

.pharmay-nav-link:hover {
    background: #f2f6fc;
    color: var(--ph-primary);
}

.pharmay-nav-link:hover > i {
    color: var(--ph-primary);
}

.pharmay-nav-link.active {
    background: var(--ph-primary-light);
    color: var(--ph-primary);
    font-weight: 600;
}

.pharmay-nav-link.active > i {
    color: var(--ph-primary);
}

.pharmay-nav-link.active::before {
    position: absolute;
    top: 10px;
    bottom: 10px;
    left: 0;
    width: 3px;
    border-radius: 0 4px 4px 0;
    background: var(--ph-primary);
    content: '';
}

.pharmay-nav-link .nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 21px;
    height: 21px;
    margin-left: auto;
    padding: 0 6px;
    border-radius: 20px;
    background: #fff0df;
    color: #ad6710;
    font-size: 10px;
    font-weight: 700;
}

.pharmay-sidebar-footer {
    padding: 15px 17px;
    border-top: 1px solid #edf1f6;
    background: #fcfdff;
}

.pharmay-sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.pharmay-sidebar-user-avatar {
    width: 37px;
    height: 37px;
    flex: 0 0 37px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    background: #fff5ea;
    color: var(--ph-primary);
    font-size: 14px;
    font-weight: 700;
}

.pharmay-sidebar-user-info {
    flex: 1;
    min-width: 0;
}

.pharmay-sidebar-user-info strong {
    display: block;
    overflow: hidden;
    color: var(--ph-text-dark);
    font-size: 11px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pharmay-sidebar-user-info span {
    display: block;
    margin-top: 2px;
    color: var(--ph-text-muted);
    font-size: 10px;
}

/* Sidebar overlay for mobile navigation */
.pharmay-sidebar-overlay {
    position: fixed;
    z-index: 1035;
    inset: 0;
    display: none;
    background: rgba(14, 30, 53, 0.42);
    backdrop-filter: blur(2px);
}

.pharmay-sidebar-overlay.show {
    display: block;
}

/* ---------------------------------------------------------
   5. TOPBAR
   --------------------------------------------------------- */

.pharmay-topbar {
    position: sticky;
    z-index: 1020;
    top: 0;

    min-height: var(--ph-topbar-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;

    padding: 13px 28px;

    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--ph-border);
    backdrop-filter: blur(12px);
}

.pharmay-topbar-left,
.pharmay-topbar-right {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.pharmay-topbar-title {
    margin: 0;
    overflow: hidden;
    color: var(--ph-text-dark);
    font-size: 18px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pharmay-topbar-subtitle {
    margin-top: 3px;
    color: var(--ph-text-muted);
    font-size: 10px;
}

.pharmay-topbar-date {
    color: var(--ph-text-muted);
    font-size: 11px;
    white-space: nowrap;
}

.pharmay-system-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    border: 1px solid #d9f0e3;
    border-radius: 20px;
    background: #f0fbf5;
    color: var(--ph-success);
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
}

.pharmay-system-status .status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #20a45b;
}

.pharmay-topbar-avatar {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--ph-primary-light);
    color: var(--ph-primary);
    font-size: 13px;
    font-weight: 700;
}

.pharmay-topbar-user {
    min-width: 0;
}

.pharmay-topbar-user strong {
    display: block;
    overflow: hidden;
    color: var(--ph-text-dark);
    font-size: 11px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pharmay-topbar-user span {
    display: block;
    margin-top: 2px;
    color: var(--ph-text-muted);
    font-size: 10px;
}

.pharmay-menu-toggle {
    width: 39px;
    height: 39px;
    flex: 0 0 39px;
    display: none;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--ph-border);
    border-radius: 9px;
    background: #fff;
    color: var(--ph-text);
    font-size: 17px;
}

/* ---------------------------------------------------------
   6. PAGE HEADINGS & BREADCRUMBS
   --------------------------------------------------------- */

.pharmay-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}

.pharmay-page-header h1 {
    margin: 0 0 6px;
    color: var(--ph-text-dark);
    font-size: clamp(22px, 2vw, 29px);
    font-weight: 700;
    letter-spacing: -0.5px;
}

.pharmay-page-header p {
    margin: 0;
    color: var(--ph-text-muted);
    font-size: 12px;
}

.pharmay-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    color: var(--ph-text-muted);
    font-size: 11px;
}

.pharmay-breadcrumb .separator {
    color: #b0bdcc;
}

.pharmay-breadcrumb .current {
    color: var(--ph-primary);
    font-weight: 600;
}

/* ---------------------------------------------------------
   7. CARDS & PANELS
   --------------------------------------------------------- */

.pharmay-card {
    min-width: 0;
    margin-bottom: 22px;
    overflow: hidden;
    background: var(--ph-surface);
    border: 1px solid var(--ph-border);
    border-radius: var(--ph-radius-lg);
    box-shadow: var(--ph-shadow-sm);
}

.pharmay-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 21px 23px;
    border-bottom: 1px solid #edf1f6;
}

.pharmay-card-header h2,
.pharmay-card-header h3 {
    margin: 0;
    color: var(--ph-text-dark);
    font-size: 15px;
    font-weight: 700;
}

.pharmay-card-header p {
    margin: 5px 0 0;
    color: var(--ph-text-muted);
    font-size: 11px;
}

.pharmay-card-body {
    padding: 23px;
}

.pharmay-card-footer {
    padding: 16px 23px;
    background: #fbfcfe;
    border-top: 1px solid #edf1f6;
}

/* ---------------------------------------------------------
   8. BUTTONS
   --------------------------------------------------------- */

.pharmay-body .btn {
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    transition:
        background-color var(--ph-transition),
        border-color var(--ph-transition),
        box-shadow var(--ph-transition);
}

.pharmay-body .btn-primary {
    background: var(--ph-primary);
    border-color: var(--ph-primary);
    color: #fff;
}

.pharmay-body .btn-primary:hover,
.pharmay-body .btn-primary:focus {
    background: var(--ph-primary-dark);
    border-color: var(--ph-primary-dark);
}

.pharmay-body .btn-outline-primary {
    border-color: #bfd3f2;
    color: var(--ph-primary);
}

.pharmay-body .btn-outline-primary:hover {
    background: var(--ph-primary-light);
    border-color: var(--ph-primary);
    color: var(--ph-primary-dark);
}

.pharmay-body .btn-light {
    background: #fff;
    border-color: var(--ph-border-strong);
    color: #50627a;
}

.pharmay-body .btn-light:hover {
    background: #f5f8fc;
}

.pharmay-body .btn-success {
    background: #16834a;
    border-color: #16834a;
}

.pharmay-body .btn-danger {
    background: #c43e45;
    border-color: #c43e45;
}

/* ---------------------------------------------------------
   9. FORMS
   --------------------------------------------------------- */

.pharmay-body .form-label {
    color: #35465e;
    font-size: 12px;
    font-weight: 600;
}

.pharmay-body .form-control,
.pharmay-body .form-select {
    min-height: 42px;
    border-color: var(--ph-border-strong);
    border-radius: 8px;
    background-color: #fff;
    color: var(--ph-text);
    font-size: 12px;
    box-shadow: none;
}

.pharmay-body textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

.pharmay-body .form-control::placeholder {
    color: #a1adbc;
}

.pharmay-body .form-control:focus,
.pharmay-body .form-select:focus {
    border-color: #7eabea;
    box-shadow: 0 0 0 3px rgba(23, 87, 183, 0.09);
}

.pharmay-body .form-text {
    color: var(--ph-text-muted);
    font-size: 10px;
}

.pharmay-body .input-group-text {
    border-color: var(--ph-border-strong);
    background: #f8fafd;
    color: #72839a;
    font-size: 12px;
}

.pharmay-body .form-check-input {
    border-color: #bdcadd;
}

.pharmay-body .form-check-input:checked {
    background-color: var(--ph-primary);
    border-color: var(--ph-primary);
}

/* ---------------------------------------------------------
   10. TABLES
   --------------------------------------------------------- */

.pharmay-body .table {
    margin-bottom: 0;
    color: var(--ph-text);
    font-size: 12px;
}

.pharmay-body .table > thead > tr > th {
    padding: 14px 16px;
    background: #f7f9fc;
    color: #718198;
    border-bottom: 1px solid var(--ph-border);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    white-space: nowrap;
}

.pharmay-body .table > tbody > tr > td {
    padding: 14px 16px;
    border-color: #edf1f6;
    vertical-align: middle;
}

.pharmay-body .table-hover > tbody > tr:hover > * {
    background-color: #f9fbff;
}

.pharmay-table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ---------------------------------------------------------
   11. BADGES & STATUS LABELS
   --------------------------------------------------------- */

.pharmay-body .badge {
    padding: 6px 9px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
}

.pharmay-badge-primary {
    background: var(--ph-primary-light);
    color: var(--ph-primary);
}

.pharmay-badge-success {
    background: var(--ph-success-light);
    color: var(--ph-success);
}

.pharmay-badge-warning {
    background: var(--ph-warning-light);
    color: var(--ph-warning);
}

.pharmay-badge-danger {
    background: var(--ph-danger-light);
    color: var(--ph-danger);
}

.pharmay-badge-info {
    background: var(--ph-info-light);
    color: var(--ph-info);
}

/* ---------------------------------------------------------
   12. ALERTS & FLASH MESSAGES
   --------------------------------------------------------- */

.pharmay-body .alert {
    margin-bottom: 20px;
    padding: 14px 17px;
    border-radius: 10px;
    font-size: 12px;
}

.pharmay-body .alert-success {
    background: var(--ph-success-light);
    border-color: #ccebd8;
    color: #176c40;
}

.pharmay-body .alert-danger {
    background: var(--ph-danger-light);
    border-color: #f3d0d2;
    color: #a62e35;
}

.pharmay-body .alert-warning {
    background: var(--ph-warning-light);
    border-color: #f1e0b9;
    color: #8e5d11;
}

.pharmay-body .alert-info {
    background: var(--ph-info-light);
    border-color: #ccecf6;
    color: #086a8f;
}

/* ---------------------------------------------------------
   13. PAGINATION
   --------------------------------------------------------- */

.pharmay-body .pagination {
    gap: 5px;
}

.pharmay-body .pagination .page-link {
    min-width: 34px;
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--ph-border);
    border-radius: 7px;
    background: #fff;
    color: #50627a;
    font-size: 11px;
    box-shadow: none;
}

.pharmay-body .pagination .page-item.active .page-link {
    background: var(--ph-primary);
    border-color: var(--ph-primary);
    color: #fff;
}

.pharmay-body .pagination .page-item.disabled .page-link {
    background: #f8fafc;
    color: #b1bdcc;
}

/* ---------------------------------------------------------
   14. DROPDOWNS & MODALS
   --------------------------------------------------------- */

.pharmay-body .dropdown-menu {
    padding: 7px;
    border: 1px solid var(--ph-border);
    border-radius: 11px;
    box-shadow: var(--ph-shadow);
    font-size: 12px;
}

.pharmay-body .dropdown-item {
    padding: 9px 12px;
    border-radius: 7px;
}

.pharmay-body .dropdown-item:hover,
.pharmay-body .dropdown-item:focus {
    background: var(--ph-primary-light);
    color: var(--ph-primary);
}

.pharmay-body .modal-content {
    overflow: hidden;
    border: 1px solid var(--ph-border);
    border-radius: 15px;
    box-shadow: var(--ph-shadow);
}

.pharmay-body .modal-header {
    padding: 19px 22px;
    border-bottom-color: var(--ph-border);
}

.pharmay-body .modal-title {
    color: var(--ph-text-dark);
    font-size: 16px;
    font-weight: 700;
}

.pharmay-body .modal-body {
    padding: 22px;
}

.pharmay-body .modal-footer {
    padding: 15px 22px;
    border-top-color: var(--ph-border);
}

/* ---------------------------------------------------------
   15. EMPTY STATES
   --------------------------------------------------------- */

.pharmay-empty-state {
    padding: 48px 20px;
    text-align: center;
}

.pharmay-empty-state > i {
    display: block;
    margin-bottom: 13px;
    color: #a7b5c8;
    font-size: 35px;
}

.pharmay-empty-state h3 {
    margin: 0 0 7px;
    color: #354760;
    font-size: 15px;
    font-weight: 700;
}

.pharmay-empty-state p {
    margin: 0;
    color: var(--ph-text-muted);
    font-size: 11px;
}

/* ---------------------------------------------------------
   16. FOOTER
   --------------------------------------------------------- */

.pharmay-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding: 18px 28px;
    border-top: 1px solid var(--ph-border);
    background: #fff;
    color: var(--ph-text-muted);
    font-size: 10px;
}

.pharmay-footer strong {
    color: #5c6d84;
    font-weight: 600;
}

/* ---------------------------------------------------------
   17. UTILITIES
   --------------------------------------------------------- */

.pharmay-text-primary {
    color: var(--ph-primary) !important;
}

.pharmay-text-muted {
    color: var(--ph-text-muted) !important;
}

.pharmay-bg-white {
    background: #fff !important;
}

.pharmay-rounded {
    border-radius: var(--ph-radius) !important;
}

.pharmay-shadow {
    box-shadow: var(--ph-shadow) !important;
}

.pharmay-divider {
    height: 1px;
    margin: 18px 0;
    background: var(--ph-border);
}

.pharmay-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 35px;
    color: var(--ph-text-muted);
    font-size: 12px;
}

/* ---------------------------------------------------------
   18. RESPONSIVE - TABLETS
   --------------------------------------------------------- */

@media (max-width: 1199.98px) {
    :root {
        --ph-sidebar-width: 235px;
    }

    .pharmay-content {
        padding: 23px;
    }

    .pharmay-topbar {
        padding-right: 23px;
        padding-left: 23px;
    }
}

/* ---------------------------------------------------------
   19. RESPONSIVE - MOBILE
   --------------------------------------------------------- */

@media (max-width: 991.98px) {
    .pharmay-sidebar {
        transform: translateX(-100%);
        box-shadow: none;
    }

    .pharmay-sidebar.show {
        transform: translateX(0);
        box-shadow: 10px 0 35px rgba(15, 35, 62, 0.12);
    }

    .pharmay-main {
        margin-left: 0;
    }

    .pharmay-menu-toggle {
        display: inline-flex;
    }

    .pharmay-content {
        padding: 22px;
    }

    .pharmay-topbar {
        min-height: 66px;
        padding: 12px 20px;
    }

    .pharmay-topbar-title {
        font-size: 16px;
    }

    .pharmay-topbar-date {
        display: none;
    }

    .pharmay-footer {
        padding: 17px 22px;
    }
}

@media (max-width: 575.98px) {
    :root {
        --ph-topbar-height: 64px;
    }

    body.pharmay-body {
        font-size: 12px;
    }

    .pharmay-content {
        padding: 17px 13px;
    }

    .pharmay-topbar {
        gap: 9px;
        padding: 11px 13px;
    }

    .pharmay-topbar-left,
    .pharmay-topbar-right {
        gap: 9px;
    }

    .pharmay-topbar-title {
        max-width: 170px;
        font-size: 14px;
    }

    .pharmay-topbar-subtitle {
        display: none;
    }

    .pharmay-system-status {
        display: none;
    }

    .pharmay-topbar-user {
        display: none;
    }

    .pharmay-topbar-avatar {
        width: 34px;
        height: 34px;
        flex-basis: 34px;
    }

    .pharmay-menu-toggle {
        width: 35px;
        height: 35px;
        flex-basis: 35px;
    }

    .pharmay-page-header {
        margin-bottom: 18px;
    }

    .pharmay-page-header h1 {
        font-size: 22px;
    }

    .pharmay-card-header {
        padding: 17px;
    }

    .pharmay-card-body {
        padding: 17px;
    }

    .pharmay-card-footer {
        padding: 14px 17px;
    }

    .pharmay-footer {
        align-items: flex-start;
        flex-direction: column;
        padding: 15px 13px;
    }

    .pharmay-body .table > thead > tr > th,
    .pharmay-body .table > tbody > tr > td {
        padding: 11px 12px;
    }
}

/* ---------------------------------------------------------
   20. REDUCED MOTION
   --------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* =========================================================
   PHARMAY SIDEBAR — CLASSIC BLUE & WHITE
   ========================================================= */

.pharmay-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1040;
    display: flex;
    flex-direction: column;
    width: 260px;
    height: 100vh;
    overflow: hidden;
    background: #ffffff;
    border-right: 1px solid #e5eaf2;
    box-shadow: 5px 0 25px rgba(23, 74, 139, 0.06);
    transition: transform 0.25s ease;
}

.pharmay-sidebar-brand {
    min-height: 82px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 18px;
    border-bottom: 1px solid #edf1f7;
}

.pharmay-brand-link {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    color: #174a8b;
    text-decoration: none;
}

.pharmay-brand-icon {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 13px;
    color: #ffffff;
    background: linear-gradient(135deg, #174a8b, #2878ce);
    font-size: 21px;
    box-shadow: 0 5px 14px rgba(23, 74, 139, 0.20);
}

.pharmay-brand-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.4;
}

.pharmay-brand-text strong {
    color: #173c70;
    font-size: 18px;
    font-weight: 700;
    white-space: nowrap;
}

.pharmay-brand-text small {
    color: #7c8ba2;
    font-size: 11px;
    white-space: nowrap;
}

.pharmay-sidebar-close {
    display: none;
    border: 0;
    background: transparent;
    color: #64748b;
    font-size: 20px;
}

.pharmay-sidebar-user {
    display: flex;
    align-items: center;
    gap: 11px;
    margin: 18px 14px;
    padding: 13px 12px;
    border: 1px solid #e7edf6;
    border-radius: 12px;
    background: #f6f9fe;
}

.pharmay-user-avatar {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: #ffffff;
    background: #174a8b;
    font-size: 17px;
    font-weight: 700;
}

.pharmay-user-info {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
}

.pharmay-user-info strong {
    overflow: hidden;
    color: #26364d;
    font-size: 13px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pharmay-user-info span {
    margin-top: 3px;
    color: #718096;
    font-size: 11px;
}

.pharmay-user-status,
.pharmay-version-dot {
    width: 8px;
    height: 8px;
    flex-shrink: 0;
    border-radius: 50%;
    background: #22c55e;
}

.pharmay-sidebar-nav {
    flex: 1;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 0 12px 18px;
}

.pharmay-nav-heading {
    padding: 17px 11px 9px;
    color: #96a3b6;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.15px;
}

.pharmay-nav-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 45px;
    margin: 3px 0;
    padding: 11px 13px;
    border: 0;
    border-radius: 9px;
    color: #56657a;
    background: transparent;
    text-align: left;
    text-decoration: none;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    transition: color 0.2s ease, background 0.2s ease;
    cursor: pointer;
}

.pharmay-nav-link > i:first-child {
    width: 19px;
    flex-shrink: 0;
    color: #8291a7;
    text-align: center;
    font-size: 15px;
}

.pharmay-nav-link span {
    flex: 1;
}

.pharmay-nav-link:hover {
    color: #174a8b;
    background: #eef5ff;
}

.pharmay-nav-link:hover > i:first-child {
    color: #174a8b;
}

.pharmay-nav-link.active {
    color: #174a8b;
    background: #eaf2ff;
    font-weight: 600;
}

.pharmay-nav-link.active > i:first-child {
    color: #174a8b;
}

.pharmay-nav-link.active::before {
    position: absolute;
    top: 9px;
    bottom: 9px;
    left: 0;
    width: 3px;
    border-radius: 0 4px 4px 0;
    background: #2878ce;
    content: "";
}

.pharmay-nav-arrow {
    color: #a0aec0;
    font-size: 10px;
}

.pharmay-sidebar-footer {
    flex-shrink: 0;
    padding: 10px 12px 14px;
    border-top: 1px solid #edf1f7;
    background: #ffffff;
}

.pharmay-sidebar-footer-label {
    padding: 4px 11px 8px;
    color: #96a3b6;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.15px;
}

.pharmay-sidebar-footer form {
    margin: 0;
}

.pharmay-logout-link {
    color: #d04444;
}

.pharmay-logout-link > i:first-child {
    color: #d04444;
}

.pharmay-logout-link:hover {
    color: #b42323;
    background: #fff0f0;
}

.pharmay-sidebar-version {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 12px;
    padding: 12px 10px 3px;
    border-top: 1px solid #edf1f7;
    color: #7d8ba0;
    font-size: 10px;
}

.pharmay-sidebar-version small {
    width: 100%;
    padding-left: 15px;
    color: #9aa6b7;
    font-size: 10px;
}

.pharmay-sidebar-overlay {
    display: none;
}

/* Keep the page content beside the fixed sidebar. */
.pharmay-main {
    min-height: 100vh;
    margin-left: 260px;
    transition: margin-left 0.25s ease;
}

@media (max-width: 991.98px) {
    .pharmay-sidebar {
        transform: translateX(-100%);
    }

    .pharmay-app.sidebar-open .pharmay-sidebar {
        transform: translateX(0);
    }

    .pharmay-sidebar-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
    }

    .pharmay-sidebar-overlay {
        position: fixed;
        inset: 0;
        z-index: 1035;
        background: rgba(15, 23, 42, 0.45);
    }

    .pharmay-app.sidebar-open .pharmay-sidebar-overlay {
        display: block;
    }

    .pharmay-main {
        margin-left: 0;
    }
}


/* =========================================================
   PHARMAY TOPBAR — CLASSIC BLUE & WHITE
   ========================================================= */

.pharmay-topbar {
    position: sticky;
    top: 0;
    z-index: 1020;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
    min-height: 82px;
    padding: 14px 28px;
    background: #ffffff;
    border-bottom: 1px solid #e8edf5;
    box-shadow: 0 3px 14px rgba(23, 74, 139, 0.035);
}

.pharmay-topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.pharmay-menu-toggle {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid #e3eaf4;
    border-radius: 10px;
    color: #174a8b;
    background: #f7faff;
    font-size: 17px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.pharmay-menu-toggle:hover {
    color: #ffffff;
    background: #174a8b;
}

.pharmay-topbar-heading {
    min-width: 0;
}

.pharmay-topbar-title {
    margin: 0;
    color: #183b6b;
    font-size: 23px;
    font-weight: 700;
    line-height: 1.35;
}

.pharmay-topbar-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    color: #8997aa;
    font-size: 11px;
}

.pharmay-topbar-breadcrumb > i:first-child {
    color: #2878ce;
    font-size: 11px;
}

.pharmay-topbar-breadcrumb .breadcrumb-chevron {
    color: #b5bfcc;
    font-size: 9px;
}

.pharmay-topbar-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 21px;
    flex-shrink: 0;
}

.pharmay-topbar-date {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #637187;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.pharmay-topbar-date-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    color: #2878ce;
    background: #eef5ff;
    font-size: 15px;
}

.pharmay-system-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border: 1px solid #d9f2e4;
    border-radius: 20px;
    color: #198754;
    background: #f0fbf5;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.pharmay-system-status-dot {
    position: relative;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.12);
}

.pharmay-topbar-divider {
    width: 1px;
    height: 40px;
    background: #e7ecf3;
}

.pharmay-topbar-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.pharmay-topbar-avatar {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 2px solid #e5efff;
    border-radius: 50%;
    color: #ffffff;
    background: linear-gradient(135deg, #174a8b, #3685d8);
    box-shadow: 0 3px 9px rgba(23, 74, 139, 0.13);
    font-size: 17px;
    font-weight: 700;
}

.pharmay-topbar-user-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.pharmay-topbar-user-info strong {
    max-width: 160px;
    overflow: hidden;
    color: #26364d;
    font-size: 12px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pharmay-topbar-user-info span {
    margin-top: 3px;
    color: #8492a6;
    font-size: 11px;
}

.pharmay-profile-chevron {
    margin-left: 3px;
    color: #91a0b4;
    font-size: 10px;
}

/* Tablet */
@media (max-width: 1100px) {
    .pharmay-topbar {
        padding-right: 20px;
        padding-left: 20px;
    }

    .pharmay-topbar-right {
        gap: 13px;
    }

    .pharmay-topbar-date {
        font-size: 11px;
    }
}

/* Mobile */
@media (max-width: 767.98px) {
    .pharmay-topbar {
        min-height: 70px;
        gap: 10px;
        padding: 12px 14px;
    }

    .pharmay-topbar-left {
        gap: 10px;
    }

    .pharmay-menu-toggle {
        width: 36px;
        height: 36px;
    }

    .pharmay-topbar-title {
        font-size: 18px;
    }

    .pharmay-topbar-breadcrumb {
        font-size: 10px;
    }

    .pharmay-topbar-right {
        gap: 10px;
    }

    .pharmay-topbar-date,
    .pharmay-topbar-divider,
    .pharmay-topbar-user-info,
    .pharmay-profile-chevron {
        display: none;
    }

    .pharmay-system-status {
        gap: 6px;
        padding: 7px 9px;
        font-size: 10px;
    }

    .pharmay-topbar-avatar {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
}

@media (max-width: 420px) {
    .pharmay-topbar {
        padding-right: 10px;
        padding-left: 10px;
    }

    .pharmay-system-status {
        padding: 7px;
        font-size: 0;
    }

    .pharmay-system-status-dot {
        width: 9px;
        height: 9px;
    }
}

/* =========================================================
   PHARMAY FOOTER — CLASSIC BLUE & WHITE
   ========================================================= */

.pharmay-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    width: 100%;
    min-height: 62px;
    margin-top: auto;
    padding: 15px 28px;
    border-top: 1px solid #e7edf5;
    background: #ffffff;
    color: #8190a5;
    font-size: 11px;
}

.pharmay-footer-left,
.pharmay-footer-right {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.pharmay-footer-copyright {
    color: #718096;
}

.pharmay-footer-copyright strong {
    color: #174a8b;
    font-weight: 600;
}

.pharmay-footer-separator {
    color: #d1d9e5;
}

.pharmay-footer-rights {
    color: #8b98aa;
}

.pharmay-footer-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #198754;
    font-size: 10px;
    font-weight: 600;
}

.pharmay-footer-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.10);
}

.pharmay-footer-version {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border: 1px solid #e4ebf5;
    border-radius: 7px;
    color: #63748b;
    background: #f7faff;
    font-size: 10px;
    white-space: nowrap;
}

.pharmay-footer-version i {
    color: #2878ce;
}

/* Footer responsiveness */
@media (max-width: 767.98px) {
    .pharmay-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 15px 18px;
    }

    .pharmay-footer-left,
    .pharmay-footer-right {
        gap: 8px;
    }
}

@media (max-width: 420px) {
    .pharmay-footer {
        font-size: 10px;
    }

    .pharmay-footer-separator,
    .pharmay-footer-rights {
        display: none;
    }
}


/* Global topbar master-reminder notification */
.pharmay-notification{position:relative}.pharmay-notification summary{list-style:none;cursor:pointer;display:grid;place-items:center;width:38px;height:38px;border-radius:11px;border:1px solid #e3eaf3;color:#315779;background:#fff;position:relative}.pharmay-notification summary::-webkit-details-marker{display:none}.pharmay-notification .md-notification-badge{position:absolute;top:-5px;right:-5px;min-width:17px;height:17px;padding:0 4px;border-radius:20px;background:#d93b43;color:#ffffff;font-size:9px;font-weight:800;display:grid;place-items:center;border:2px solid #fff}.pharmay-notification[open] .md-notification-menu{display:block}.md-notification-menu{display:none;position:absolute;right:0;top:46px;width:310px;max-width:calc(100vw - 30px);z-index:1100;padding:14px;background:#fff;border:1px solid #e5ebf3;border-radius:14px;box-shadow:0 14px 38px rgba(16,44,78,.18)}.md-notification-menu strong{display:block;font-size:12px;color:#203653;margin-bottom:8px}.md-notification-menu a{display:flex;align-items:center;gap:10px;padding:10px 8px;border-radius:8px;color:#40536c;font-size:11px}.md-notification-menu a:hover{background:#99ef94}.md-notification-menu a i{width:18px;color:#2369a9}.md-notification-menu .md-notice-count{margin-left:auto;min-width:24px;text-align:center;padding:3px 6px;background:#eaf3ff;border-radius:20px;color:#205e9a;font-weight:800}.md-notification-menu .md-all-reminders{margin-top:8px;justify-content:center;background:#174a8b;color:#fff;font-weight:700}.md-notification-menu .md-all-reminders i{color:#fff}

