/* =========================================================
   PMC ERP - PROFESSIONAL RESPONSIVE THEME
   File: public/assets/css/app.css
   Theme: Navy Blue + Teal + Clean White
========================================================= */

:root {
    --pharma-navy: #102b46;
    --pharma-navy-dark: #0b2036;
    --pharma-blue: #164e78;
    --pharma-blue-light: #eaf3fa;
    --pharma-teal: #20b8a5;
    --pharma-teal-dark: #159987;
    --pharma-body: #f4f7fb;
    --pharma-white: #ffffff;
    --pharma-text: #26384a;
    --pharma-muted: #748397;
    --pharma-border: #e3eaf1;
    --pharma-success: #198754;
    --pharma-danger: #dc3545;
    --pharma-warning: #f0ad25;
    --pharma-info: #0d9bb5;
    --pharma-radius: 10px;
    --pharma-radius-sm: 7px;
    --pharma-shadow: 0 3px 15px rgba(16, 43, 70, .055);
    --pharma-shadow-hover: 0 7px 22px rgba(16, 43, 70, .10);
}

/* 1. Global */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    width: 100%;
    -webkit-text-size-adjust: 100%;
}

body {
    min-height: 100vh;
    width: 100%;
    margin: 0;
    overflow-x: hidden;
    background: var(--pharma-body);
    color: var(--pharma-text);
    font-family: "Source Sans 3", "Segoe UI", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.55;
}

.app-wrapper {
    min-height: 100vh;
}

.app-main {
    min-width: 0;
    min-height: calc(100vh - 120px);
    background: var(--pharma-body);
}

.app-content {
    min-width: 0;
    padding: 20px;
}

.app-content-header {
    padding: 20px 20px 10px !important;
}

.app-content-header .container-fluid {
    padding-right: 0;
    padding-left: 0;
}

.app-content-header h1,
.app-content-header h2,
.app-content-header h3,
.page-title,
.content-header h1 {
    color: var(--pharma-navy);
    font-weight: 700;
}

.app-content-header h1 {
    margin-bottom: 5px;
    font-size: 24px;
    letter-spacing: -.3px;
}

a {
    color: var(--pharma-blue);
    text-decoration: none;
}

a:hover {
    color: var(--pharma-teal-dark);
}

:focus-visible {
    outline: 2px solid var(--pharma-teal);
    outline-offset: 2px;
}

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

.row>* {
    min-width: 0;
}



/* ==========================================
   PMC ERP - HEADER UI
   Frontend Design Only
========================================== */

.app-header {
    min-height: 68px;
    background: #fff !important;
    border-bottom: 1px solid #e3eaf1;
    box-shadow: 0 3px 14px rgba(16, 43, 70, 0.045);
    padding: 0;
}

.app-header .container-fluid {
    min-height: 68px;
    padding: 0 22px;
}

.app-header .navbar-nav {
    align-items: center;
}

.app-header .nav-link {
    color: #526579;
    text-decoration: none;
}

/* Sidebar Toggle */
.sidebar-toggle-btn {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e3eaf1;
    border-radius: 10px;
    background: #f8fafc;
    color: #102b46 !important;
    cursor: pointer;
    transition: all .2s ease;
}

.sidebar-toggle-btn i {
    font-size: 23px;
}

.sidebar-toggle-btn:hover {
    background: #eaf9f6;
    border-color: #bdebe3;
    color: #159987 !important;
}

/* Brand */
.brand-title {
    display: inline-flex !important;
    align-items: center;
    gap: 11px;
    padding: 0 !important;
    color: #102b46 !important;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: .3px;
}

.brand-icon {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #fff;
    background: linear-gradient(135deg, #20b8a5, #159987);
    border-radius: 11px;
    box-shadow: 0 4px 10px rgba(32, 184, 165, .20);
}

.brand-icon i {
    font-size: 23px;
    font-weight: bold;
}

.brand-highlight {
    color: #159987;
}

.brand-title small {
    display: block;
    margin-top: 4px;
    color: #8493a4;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .7px;
}

/* Online Status */
.header-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    color: #526579;
    background: #f5faf9;
    border: 1px solid #e1f1ed;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #20b88a;
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(32, 184, 165, .12);
}

/* Notifications */
.header-icon-btn {
    position: relative;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    background: #fff;
    border: 1px solid #e3eaf1;
    border-radius: 10px;
    cursor: pointer;
    transition: all .2s ease;
}

.header-icon-btn i {
    font-size: 17px;
}

.header-icon-btn:hover {
    color: #159987;
    background: #f0fbf9;
    border-color: #c8ece5;
}

.notification-dot {
    position: absolute;
    top: 8px;
    right: 9px;
    width: 7px;
    height: 7px;
    background: #e05260;
    border: 1px solid #fff;
    border-radius: 50%;
}

/* User Profile */
.user-profile-link {
    display: flex !important;
    align-items: center;
    gap: 10px;
    padding: 6px 10px !important;
    margin-left: 5px;
    border: 1px solid transparent;
    border-radius: 10px;
    transition: all .2s ease;
}

.user-profile-link:hover,
.user-profile-link[aria-expanded="true"] {
    background: #f5f8fb;
    border-color: #e3eaf1;
}

.user-avatar,
.dropdown-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #164e78;
    background: #eaf3fa;
    border: 1px solid #d7e8f5;
    border-radius: 50%;
}

.user-avatar {
    width: 39px;
    height: 39px;
}

.user-avatar i {
    font-size: 21px;
}

.user-details {
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    line-height: 1.2;
}

.user-details strong {
    color: #102b46;
    font-size: 14px;
    font-weight: 700;
}

.user-details small {
    color: #8493a4;
    font-size: 12px;
}

.dropdown-arrow {
    margin-left: 3px;
    color: #8493a4;
    font-size: 12px;
}

/* User Dropdown */
.user-dropdown {
    min-width: 235px;
    margin-top: 10px !important;
    padding: 8px;
    background: #fff;
    border: 1px solid #e3eaf1;
    border-radius: 12px;
    box-shadow: 0 12px 35px rgba(16, 43, 70, .12);
}

.dropdown-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 10px;
}

.dropdown-avatar {
    width: 42px;
    height: 42px;
    font-size: 22px;
}

.dropdown-user-info strong,
.dropdown-user-info small {
    display: block;
}

.dropdown-user-info strong {
    margin-bottom: 4px;
    color: #102b46;
    font-size: 14px;
    font-weight: 700;
}

.dropdown-user-info small {
    color: #8493a4;
    font-size: 13px;
    overflow-wrap: anywhere;
}

.user-dropdown .dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    color: #405368;
    background: transparent;
    border: 0;
    border-radius: 7px;
    text-align: left;
    font-size: 14px;
    cursor: pointer;
}

.user-dropdown .dropdown-item i {
    width: 17px;
    font-size: 15px;
}

.user-dropdown .dropdown-item:hover {
    color: #164e78;
    background: #eaf3fa;
}

.user-dropdown .logout-item {
    color: #dc3545;
}

.user-dropdown .logout-item:hover {
    color: #b42332;
    background: #fff0f1;
}

/* Responsive */
@media (max-width: 767.98px) {

    .app-header,
    .app-header .container-fluid {
        min-height: 60px;
    }

    .app-header .container-fluid {
        padding: 0 12px;
    }

    .sidebar-toggle-btn {
        width: 38px;
        height: 38px;
    }

    .user-profile-link {
        gap: 7px;
        padding: 5px !important;
    }

    .user-avatar {
        width: 36px;
        height: 36px;
    }

    .user-dropdown {
        min-width: 220px;
    }
}

@media (max-width: 380px) {
    .app-header .container-fluid {
        padding: 0 8px;
    }

    .header-icon-btn {
        width: 35px;
        height: 35px;
    }

    .brand-title {
        font-size: 15px;
    }
}


/* 2. Sidebar */
.app-sidebar {
    color: #e6eef6 !important;
    background: linear-gradient(180deg, var(--pharma-navy) 0%, #123653 55%, var(--pharma-navy-dark) 100%) !important;
    border-right: 1px solid #244660;
    box-shadow: 3px 0 15px rgba(15, 35, 55, .12) !important;
}

.app-sidebar .sidebar-brand {
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 18px;
    background: rgba(255, 255, 255, .035);
    border-bottom: 1px solid rgba(255, 255, 255, .09);
}

.app-sidebar .sidebar-brand .brand-link {
    width: 100%;
    min-height: 68px;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 0;
    border: 0;
    text-decoration: none;
}

.app-sidebar .sidebar-brand .brand-link::before {
    content: "+";
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    background: linear-gradient(135deg, #20b8a5, #42d5bc);
    color: #fff;
    font-size: 29px;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 4px 12px rgba(32, 184, 165, .2);
}

.app-sidebar .sidebar-brand .brand-text {
    color: #fff !important;
    font-size: 19px;
    font-weight: 700 !important;
    letter-spacing: .7px;
    line-height: 1.2;
}

.app-sidebar .sidebar-wrapper {
    padding: 10px 9px 18px;
    scrollbar-width: thin;
    scrollbar-color: #42617b transparent;
}

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

.app-sidebar .sidebar-wrapper::-webkit-scrollbar-thumb {
    background: #42617b;
    border-radius: 10px;
}

.app-sidebar .sidebar-wrapper::-webkit-scrollbar-track {
    background: transparent;
}

.app-sidebar .sidebar-menu {
    gap: 3px;
}

.app-sidebar .sidebar-menu .nav-item {
    width: 100%;
}

.app-sidebar .sidebar-menu .nav-header {
    margin-top: 16px;
    padding: 9px 11px 6px;
    color: #a8bfd3 !important;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.25px;
    text-transform: uppercase;
    border-top: 1px solid rgba(255, 255, 255, .055);
}

.app-sidebar .sidebar-menu .nav-header:first-child {
    margin-top: 0;
    border-top: 0;
}

.app-sidebar .sidebar-menu .nav-link {
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    margin: 0;
    color: #e6eef6 !important;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

.app-sidebar .sidebar-menu .nav-link .nav-icon {
    width: 21px;
    min-width: 21px;
    margin: 0 !important;
    color: #a8c8df !important;
    font-size: 16px;
    text-align: center;
    transition: color .2s ease;
}

.app-sidebar .sidebar-menu .nav-link p {
    flex: 1;
    min-width: 0;
    margin: 0;
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
    line-height: 1.5;
}

.app-sidebar .sidebar-menu .nav-link:hover {
    color: #fff !important;
    background: #1c4262 !important;
    border-color: rgba(255, 255, 255, .055);
}

.app-sidebar .sidebar-menu .nav-link:hover .nav-icon {
    color: #5ce0cb !important;
}

.app-sidebar .sidebar-menu .nav-link.active {
    color: #fff !important;
    background: linear-gradient(100deg, rgba(32, 184, 165, .23), rgba(32, 184, 165, .09)) !important;
    border-color: rgba(58, 211, 190, .22);
    box-shadow: inset 3px 0 0 var(--pharma-teal);
    font-weight: 600;
}

.app-sidebar .sidebar-menu .nav-link.active .nav-icon {
    color: #45dfc7 !important;
}

.app-sidebar .sidebar-menu .nav-treeview {
    margin: 4px 0 5px 12px;
    padding: 4px 0 4px 8px;
    border-left: 1px solid rgba(143, 190, 216, .25);
}

.app-sidebar .sidebar-menu .nav-treeview .nav-link {
    min-height: 36px;
    padding: 8px 9px;
    color: #c6d7e6 !important;
    border-radius: 6px;
    font-size: 14px;
}

.app-sidebar .sidebar-menu .nav-treeview .nav-icon {
    color: #7fa7c4 !important;
    font-size: 13px;
}

.app-sidebar .sidebar-menu .nav-treeview .nav-link.active {
    color: #fff !important;
    background: rgba(32, 184, 165, .15) !important;
}

.app-sidebar .sidebar-menu .nav-link .nav-arrow {
    margin-left: auto;
    color: #9bb6cb;
    font-size: 13px;
    transition: transform .2s ease;
}

.app-sidebar .sidebar-menu .menu-open>.nav-link .nav-arrow {
    color: #45dfc7;
    transform: rotate(90deg);
}

.app-sidebar .sidebar-menu .nav-link .badge {
    margin-left: auto;
    padding: 4px 7px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 700;
}

/* 3. Header */
.app-header {
    position: relative;
    z-index: 100;
    min-height: 64px;
    background: #fff !important;
    border-bottom: 1px solid var(--pharma-border);
    box-shadow: 0 2px 10px rgba(16, 43, 70, .035);
}

.app-header .nav-link {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    /* padding: 8px 11px; */
    margin: 0 2px;
    color: #526579 !important;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    transition: background-color .2s ease, color .2s ease;
}

.app-header .nav-link:hover {
    color: var(--pharma-blue) !important;
    background: var(--pharma-blue-light);
}

.app-header [data-lte-toggle="sidebar"] {
    color: var(--pharma-navy) !important;
    border-radius: 8px;
}

.app-header [data-lte-toggle="sidebar"]:hover {
    color: var(--pharma-teal-dark) !important;
    background: #eaf9f6;
}

.app-header .nav-link i,
.app-header .nav-link .nav-icon {
    font-size: 16px;
}


.app-header .dropdown-menu {
    min-width: 220px;
    padding: 7px;
    background: #fff;
    border: 1px solid var(--pharma-border);
    border-radius: 10px;
    box-shadow: 0 8px 28px rgba(16, 43, 70, .12);
}

.app-header .dropdown-menu .dropdown-item {
    padding: 9px 11px;
    color: var(--pharma-text);
    border-radius: 6px;
    font-size: 15px;
}

.app-header .dropdown-menu .dropdown-item:hover {
    color: var(--pharma-blue);
    background: var(--pharma-blue-light);
}

.app-header .user-image,
.app-header .nav-user-image {
    width: 32px;
    height: 32px;
    object-fit: cover;
    border: 2px solid #e4f3f1;
    border-radius: 50%;
}

/* 4. Cards and page headings */
.card {
    min-width: 0;
    margin-bottom: 20px;
    overflow: visible;
    background: #fff;
    border: 1px solid var(--pharma-border) !important;
    border-radius: var(--pharma-radius) !important;
    box-shadow: var(--pharma-shadow);
    transition: box-shadow .2s ease;
}

.card>.card-header:first-child {
    border-radius: var(--pharma-radius) var(--pharma-radius) 0 0;
}

.card>.card-footer:last-child {
    border-radius: 0 0 var(--pharma-radius) var(--pharma-radius);
}

.card:hover {
    box-shadow: var(--pharma-shadow-hover);
}

.card-header {
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding: 13px 18px;
    background: #fff;
    border-bottom: 1px solid var(--pharma-border);
}

.card-header .card-title {
    float: none;
    min-width: 0;
    margin: 0;
    color: var(--pharma-navy);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.45;
}

.card-tools {
    margin-left: auto;
}

.card-body {
    min-width: 0;
    padding: 18px;
    overflow-wrap: break-word;
}

.card-footer {
    padding: 13px 18px;
    background: #fbfcfe;
    border-top: 1px solid var(--pharma-border);
}

.card-primary>.card-header {
    color: #fff;
    background: var(--pharma-navy);
}

.card-primary>.card-header .card-title {
    color: #fff;
}

/* 5. KPI cards */
.dashboard-kpi-row>div {
    min-width: 0;
}

.dashboard-kpi-row>div>a {
    display: block;
    height: 100%;
}

.app-main a.text-decoration-none {
    text-decoration: none !important;
}

.app-main .small-box {
    position: relative;
    width: 100%;
    min-width: 0;
    min-height: 118px;
    height: calc(100% - 20px);
    margin-bottom: 20px;
    padding: 18px;
    overflow: hidden;
    color: var(--pharma-text) !important;
    background: #fff !important;
    border: 1px solid var(--pharma-border) !important;
    border-top: 3px solid var(--pharma-blue) !important;
    border-radius: 12px !important;
    box-shadow: var(--pharma-shadow);
    transition: transform .2s ease, box-shadow .2s ease;
}

.app-main .small-box:hover {
    transform: translateY(-3px);
    box-shadow: var(--pharma-shadow-hover);
}

.app-main .small-box .inner {
    position: relative;
    min-width: 0;
    padding: 0;
}

.app-main .small-box .small-box-icon {
    position: absolute;
    top: 0px;
    right: 5px;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #e8f8f5;
    color: var(--pharma-teal-dark);
    font-size: 18px;
    line-height: 1;
}

.app-main .small-box .inner h3 {
    margin: 8px 0 9px;
    padding: 0;
    color: var(--pharma-navy) !important;
    font-size: clamp(20px, 1.7vw, 27px);
    font-weight: 750;
    line-height: 1.25;
    letter-spacing: -.4px;
    white-space: nowrap;
}

.app-main .small-box .inner p {
    margin: 0 0 5px;
    color: #64768a !important;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
}

.app-main .small-box .inner small {
    display: inline-block;
    margin-top: 5px;
    color: var(--pharma-teal-dark) !important;
    font-size: 13px;
    font-weight: 600;
    opacity: 1 !important;
}

.app-main .small-box.text-bg-primary {
    border-top-color: #164e78 !important;
}

.app-main .small-box.text-bg-primary .small-box-icon {
    color: #164e78;
    background: #eaf3fa;
}

.app-main .small-box.text-bg-success {
    border-top-color: #198754 !important;
}

.app-main .small-box.text-bg-success .small-box-icon {
    color: #198754;
    background: #e4f6ec;
}

.app-main .small-box.text-bg-danger {
    border-top-color: #dc3545 !important;
}

.app-main .small-box.text-bg-danger .small-box-icon {
    color: #dc3545;
    background: #fff0f1;
}

.app-main .small-box.text-bg-warning {
    border-top-color: #e4a11b !important;
}

.app-main .small-box.text-bg-warning .small-box-icon {
    color: #b47b08;
    background: #fff5dc;
}

.app-main .small-box.text-bg-info {
    border-top-color: #0d9bb5 !important;
}

.app-main .small-box.text-bg-info .small-box-icon {
    color: #0d9bb5;
    background: #e4f7fb;
}

.app-main .small-box.text-bg-secondary {
    border-top-color: #748397 !important;
}

.app-main .small-box.text-bg-secondary .small-box-icon {
    color: #748397;
    background: #eef2f6;
}

.app-main .small-box.text-bg-dark {
    border-top-color: #102b46 !important;
}

.app-main .small-box.text-bg-dark .small-box-icon {
    color: #102b46;
    background: #eaf0f6;
}

.app-main .small-box .small-box-footer {
    display: block;
    margin-top: 10px;
    padding: 8px 0 0;
    color: var(--pharma-blue) !important;
    background: transparent !important;
    border-top: 1px dashed var(--pharma-border);
    font-size: 13px;
    font-weight: 600;
    text-align: left;
}

.app-main .small-box .small-box-footer:hover {
    color: var(--pharma-teal-dark) !important;
}

/* 6. Tables */
.table {
    width: 100%;
    margin-bottom: 0;
    color: var(--pharma-text);
    vertical-align: middle;
    font-size: 14px;
}

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

.table thead th {
    padding: 12px 13px;
    color: #526579;
    background: #f4f7fb;
    border-top: 0;
    border-bottom: 1px solid var(--pharma-border);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .35px;
    text-transform: uppercase;
    white-space: nowrap;
    vertical-align: middle;
}

.table tbody td {
    padding: 11px 13px;
    border-color: #edf1f5;
    vertical-align: middle;
}

.table tbody tr {
    transition: background-color .15s ease;
}

.table tbody tr:hover {
    background: #f7fbff;
}

.table-striped>tbody>tr:nth-of-type(odd)>* {
    background-color: #fbfcfe;
}

.table-bordered,
.table-bordered th,
.table-bordered td {
    border-color: var(--pharma-border);
}

.table tfoot th,
.table tfoot td {
    padding: 12px 13px;
    background: #f4f7fb;
    font-weight: 700;
}

.table .btn {
    margin: 1px;
}

/* 7. DataTables v3 */
.dt-container {
    color: var(--pharma-text);
    font-size: 14px;
}

.dt-container .dt-length,
.dt-container .dt-search,
.dt-container .dt-info {
    color: var(--pharma-muted);
}

.dt-container .dt-length select,
.dt-container .dt-search input {
    width: auto;
    min-height: 32px;
    padding: 4px 9px;
    font-size: 14px;
}

.dt-container .dt-length select {
    margin-right: 6px;
}

.dt-container .dt-search input {
    min-width: 190px;
    margin-left: 6px;
}

.dt-container .dt-paging .pagination {
    margin: 0;
}

.dt-container .dt-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

/* ==========================================
   PMC ERP - DataTables Excel Export Button
========================================== */

.dt-container .dt-buttons .dt-button.buttons-excel {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 7px;

    min-height: 36px;
    padding: 8px 15px !important;

    color: #fff !important;
    background: linear-gradient(135deg, #20b8a5, #159987) !important;
    border: 1px solid #159987 !important;
    border-radius: 7px !important;

    font-family: inherit;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.4;

    box-shadow: 0 3px 8px rgba(32, 184, 165, .18);
    cursor: pointer;

    transition: all .2s ease;
}

/* Hover */
.dt-container .dt-buttons .dt-button.buttons-excel:hover {
    color: #fff !important;
    background: linear-gradient(135deg, #159987, #117f72) !important;
    border-color: #117f72 !important;
    box-shadow: 0 5px 12px rgba(32, 184, 165, .25);
    transform: translateY(-1px);
}

/* Click */
.dt-container .dt-buttons .dt-button.buttons-excel:active {
    transform: translateY(0);
    box-shadow: none;
}

/* Focus */
.dt-container .dt-buttons .dt-button.buttons-excel:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(32, 184, 165, .15) !important;
}

/* Mobile */
@media (max-width: 767.98px) {
    .dt-container .dt-buttons .dt-button.buttons-excel {
        min-height: 34px;
        padding: 7px 12px !important;
        font-size: 13px !important;
    }
}

/* 8. Buttons */
.btn {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 13px;
    border-radius: 7px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease, transform .15s ease;
}

.btn:active {
    transform: translateY(1px);
}

.btn:focus {
    box-shadow: 0 0 0 3px rgba(32, 184, 165, .13);
}

.btn-primary {
    color: #fff;
    background: var(--pharma-blue);
    border-color: var(--pharma-blue);
}

.btn-primary:hover,
.btn-primary:focus {
    color: #fff;
    background: var(--pharma-navy);
    border-color: var(--pharma-navy);
}

.btn-success {
    color: #fff;
    background: #198754;
    border-color: #198754;
}

.btn-success:hover {
    color: #fff;
    background: #146c43;
    border-color: #146c43;
}

.btn-teal {
    color: #fff;
    background: var(--pharma-teal-dark);
    border-color: var(--pharma-teal-dark);
}

.btn-teal:hover {
    color: #fff;
    background: #117f72;
    border-color: #117f72;
}

.btn-outline-primary {
    color: var(--pharma-blue);
    border-color: #b7ccdd;
}

.btn-outline-primary:hover {
    color: #fff;
    background: var(--pharma-blue);
    border-color: var(--pharma-blue);
}

.btn-outline-secondary {
    color: #5e6d7e;
    border-color: #d5dee7;
}

.btn-outline-secondary:hover {
    color: #fff;
    background: #5e6d7e;
    border-color: #5e6d7e;
}

.btn-light {
    color: var(--pharma-text);
    background: #f5f8fb;
    border-color: #e0e7ef;
}

.btn-light:hover {
    color: var(--pharma-blue);
    background: #eaf1f8;
    border-color: #d4e0eb;
}

.btn-sm {
    min-height: 29px;
    padding: 5px 9px;
    border-radius: 6px;
    font-size: 13px;
}

.btn-lg {
    min-height: 42px;
    padding: 10px 18px;
    font-size: 16px;
}

.btn i,
.btn .fas,
.btn .far,
.btn .fa {
    font-size: 14px;
}

/* 9. Forms */
.form-label,
.form-group label,
label {
    margin-bottom: 6px;
    color: #405368;
    font-size: 14px;
    font-weight: 600;
}

.form-control,
.form-select,
select.form-control,
textarea.form-control,
input.form-control {
    width: 100%;
    max-width: 100%;
    min-height: 38px;
    padding: 8px 11px;
    color: var(--pharma-text);
    background: #fff;
    border: 1px solid #d8e2ec;
    border-radius: 7px;
    font-size: 14px;
    transition: border-color .2s ease, box-shadow .2s ease;
}

textarea.form-control {
    min-height: 90px;
    resize: vertical;
}

.form-control::placeholder {
    color: #a0adba;
    opacity: 1;
}

.form-control:focus,
.form-select:focus {
    color: var(--pharma-text);
    background: #fff;
    border-color: var(--pharma-teal);
    box-shadow: 0 0 0 3px rgba(32, 184, 165, .12);
    outline: 0;
}

.form-control:disabled,
.form-control[readonly],
.form-select:disabled {
    color: #7d8a98;
    background: #f2f5f8;
}

.form-control.is-invalid,
.form-select.is-invalid {
    border-color: var(--pharma-danger);
}

.form-control.is-valid,
.form-select.is-valid {
    border-color: var(--pharma-success);
}

.form-text,
.text-muted {
    color: var(--pharma-muted) !important;
}

.form-check-input {
    cursor: pointer;
}

.form-check-input:checked {
    background-color: var(--pharma-teal-dark);
    border-color: var(--pharma-teal-dark);
}

.input-group .input-group-text {
    color: #64768a;
    background: #f4f7fb;
    border-color: #d8e2ec;
    font-size: 14px;
}

/* 10. Filters */
.filter-card,
.filter-section {
    padding: 15px;
    margin-bottom: 18px;
    background: #fff;
    border: 1px solid var(--pharma-border);
    border-radius: var(--pharma-radius);
    box-shadow: var(--pharma-shadow);
}

.filter-card .form-label,
.filter-section .form-label {
    margin-bottom: 5px;
}

/* 11. Badges */
.badge {
    padding: 5px 8px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .1px;
    vertical-align: middle;
}

.badge.bg-success,
.badge.text-bg-success {
    color: #146c43 !important;
    background: #d9f4e5 !important;
}

.badge.bg-danger,
.badge.text-bg-danger {
    color: #b42332 !important;
    background: #fde5e7 !important;
}

.badge.bg-warning,
.badge.text-bg-warning {
    color: #8a5b00 !important;
    background: #fff0c2 !important;
}

.badge.bg-info,
.badge.text-bg-info {
    color: #087990 !important;
    background: #d9f5fa !important;
}

.badge.bg-primary,
.badge.text-bg-primary {
    color: #164e78 !important;
    background: #e2effb !important;
}

.badge.bg-secondary,
.badge.text-bg-secondary {
    color: #526579 !important;
    background: #e9eef3 !important;
}

/* 12. Alerts */
.alert {
    padding: 12px 15px;
    margin-bottom: 16px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 14px;
}

.alert-success {
    color: #176b42;
    background: #e7f7ee;
    border-color: #c8ecd7;
}

.alert-danger {
    color: #b42332;
    background: #fff0f1;
    border-color: #f5d0d4;
}

.alert-warning {
    color: #805600;
    background: #fff7df;
    border-color: #f3e2a9;
}

.alert-info {
    color: #087990;
    background: #e6f7fb;
    border-color: #c6ebf2;
}

/* 13. Modals */
.modal-content {
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--pharma-border);
    border-radius: 12px;
    box-shadow: 0 15px 45px rgba(16, 43, 70, .18);
}

.modal-header {
    padding: 15px 20px;
    background: #fff;
    border-bottom: 1px solid var(--pharma-border);
}

.modal-title {
    color: var(--pharma-navy);
    font-size: 16px;
    font-weight: 700;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 13px 20px;
    background: #fbfcfe;
    border-top: 1px solid var(--pharma-border);
}

.modal-backdrop.show {
    opacity: .48;
}

/* 14. Dropdowns */
.dropdown-menu {
    padding: 7px;
    background: #fff;
    border: 1px solid var(--pharma-border);
    border-radius: 9px;
    box-shadow: 0 8px 25px rgba(16, 43, 70, .12);
}

.dropdown-item {
    padding: 8px 11px;
    color: var(--pharma-text);
    border-radius: 6px;
    font-size: 14px;
}

.dropdown-item:hover,
.dropdown-item:focus {
    color: var(--pharma-blue);
    background: var(--pharma-blue-light);
}

.dropdown-divider {
    border-top-color: var(--pharma-border);
}

/* 15. Tabs */
.nav-tabs {
    border-bottom: 1px solid var(--pharma-border);
}

.nav-tabs .nav-link {
    padding: 10px 14px;
    color: #64768a;
    background: transparent;
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    font-size: 14px;
    font-weight: 600;
}

.nav-tabs .nav-link:hover {
    color: var(--pharma-blue);
    background: #f7fafc;
}

.nav-tabs .nav-link.active {
    color: var(--pharma-blue);
    background: #fff;
    border-bottom-color: var(--pharma-teal);
}

.nav-pills .nav-link {
    padding: 8px 13px;
    color: #526579;
    border-radius: 7px;
    font-size: 14px;
}

.nav-pills .nav-link.active {
    color: #fff;
    background: var(--pharma-blue);
}

/* 16. Pagination */
.pagination {
    gap: 4px;
}

.pagination .page-link {
    padding: 7px 11px;
    color: var(--pharma-blue);
    background: #fff;
    border: 1px solid var(--pharma-border);
    border-radius: 6px !important;
    font-size: 14px;
}

.pagination .page-link:hover {
    color: var(--pharma-blue);
    background: var(--pharma-blue-light);
    border-color: #d5e5f1;
}

.pagination .page-item.active .page-link {
    color: #fff;
    background: var(--pharma-blue);
    border-color: var(--pharma-blue);
}

.pagination .page-item.disabled .page-link {
    color: #a0adba;
    background: #f5f7fa;
}

/* 17. Progress */
.progress {
    height: 8px;
    overflow: hidden;
    background: #eaf0f5;
    border-radius: 20px;
}

.progress-bar {
    background: var(--pharma-teal);
    border-radius: 20px;
}

/* 18. Tooltip / popover */
.tooltip-inner {
    padding: 6px 9px;
    color: #fff;
    background: var(--pharma-navy);
    border-radius: 5px;
    font-size: 13px;
}

.popover {
    border: 1px solid var(--pharma-border);
    border-radius: 9px;
    box-shadow: var(--pharma-shadow-hover);
}

.popover-header {
    color: var(--pharma-navy);
    background: #f7fafc;
    border-bottom-color: var(--pharma-border);
    font-size: 15px;
    font-weight: 700;
}

.popover-body {
    color: var(--pharma-text);
    font-size: 14px;
}

/* 19. Footer */
.app-footer {
    padding: 14px 20px;
    color: #748397;
    background: #fff;
    border-top: 1px solid var(--pharma-border);
    font-size: 13px;
}

.app-footer a {
    color: var(--pharma-blue);
    font-weight: 600;
}

.app-footer a:hover {
    color: var(--pharma-teal-dark);
}

/* 20. Login */
.login-page,
.register-page {
    min-height: 100vh;
    background: radial-gradient(circle at top right, rgba(32, 184, 165, .10), transparent 35%), linear-gradient(135deg, #f4f7fb, #eaf1f8);
}

.login-box,
.register-box {
    width: 100%;
    max-width: 410px;
}

.login-box .card,
.register-box .card {
    border-radius: 14px !important;
    box-shadow: 0 12px 40px rgba(16, 43, 70, .10);
}

.login-logo,
.register-logo {
    color: var(--pharma-navy);
    font-weight: 800;
}

.login-logo b,
.register-logo b {
    color: var(--pharma-teal-dark);
}

/* 21. Utility */
.empty-state {
    padding: 35px 20px;
    color: var(--pharma-muted);
    text-align: center;
}

.empty-state i {
    display: block;
    margin-bottom: 12px;
    color: #b4c5d5;
    font-size: 36px;
}

.text-pharma-primary {
    color: var(--pharma-blue) !important;
}

.text-pharma-teal {
    color: var(--pharma-teal-dark) !important;
}

.bg-pharma-primary {
    color: #fff !important;
    background: var(--pharma-blue) !important;
}

.bg-pharma-teal {
    color: #fff !important;
    background: var(--pharma-teal-dark) !important;
}

.border-pharma {
    border-color: var(--pharma-border) !important;
}

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

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

/* 22. Tablet */
@media (max-width: 991.98px) {
    .app-content {
        padding: 15px;
    }

    .app-content-header {
        padding: 15px 15px 8px;
    }

    .app-content-header h1 {
        font-size: 21px;
    }

    .card-body {
        padding: 15px;
    }

    .card-header {
        padding: 12px 15px;
    }

    .app-main .small-box .inner h3 {
        font-size: 23px;
    }
}

/* 23. Mobile */
@media (max-width: 767.98px) {
    .app-main {
        min-height: calc(100vh - 100px);
    }

    .app-content {
        padding: 12px;
    }

    .app-content-header {
        padding: 14px 12px 8px;
    }

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

    .app-sidebar .sidebar-brand,
    .app-sidebar .sidebar-brand .brand-link {
        min-height: 60px;
    }

    .app-sidebar .sidebar-wrapper {
        padding-right: 8px;
        padding-left: 8px;
    }

    .app-sidebar .sidebar-menu .nav-link {
        min-height: 40px;
    }

    .app-header {
        min-height: 56px;
    }

    .card {
        margin-bottom: 14px;
    }

    .card-body {
        padding: 13px;
    }

    .card-header {
        align-items: flex-start;
        padding: 12px 13px;
    }

    .card-header .card-title {
        font-size: 16px;
    }

    .card-tools {
        margin-left: 0;
    }

    .card-tools .btn {
        padding: 5px 8px;
        font-size: 13px;
    }

    .app-main .small-box {
        min-height: 118px;
        height: calc(100% - 12px);
        margin-bottom: 12px;
        padding: 14px;
    }

    .app-main .small-box .inner h3 {
        font-size: clamp(18px, 5vw, 24px);
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .app-main .small-box .small-box-icon {
        top: 12px;
        right: 12px;
        width: 32px;
        height: 32px;
        font-size: 15px;
    }

    .table thead th,
    .table tbody td {
        padding: 9px 10px;
    }

    .modal-body {
        padding: 15px;
    }

    .modal-header,
    .modal-footer {
        padding: 12px 15px;
    }

    .app-footer {
        padding: 12px;
    }

    .dt-container .dt-length,
    .dt-container .dt-search {
        width: 100%;
        text-align: left !important;
    }

    .dt-container .dt-search input {
        width: 100%;
        min-width: 0;
        margin-left: 0;
    }
}

/* 24. Small phones */
@media (max-width: 480px) {
    .app-content {
        padding: 10px;
    }

    .app-content-header {
        padding: 12px 10px 8px;
    }

    .app-content-header h1 {
        font-size: 17px;
    }

    .card-header .card-title {
        font-size: 15px;
    }

    .table {
        font-size: 13px;
    }

    .app-main .small-box {
        padding: 12px;
    }

    .app-main .small-box .inner h3 {
        font-size: 20px;
    }
}

/* 25. Reduced motion */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}


/* Fixed Header */
.app-header {
    position: fixed !important;
    top: 0;
    left: var(--lte-sidebar-width, 250px);
    right: 0;
    width: auto;
    z-index: 1030;
    min-height: 68px;
    margin: 0;
}

.app-main {
    padding-top: 68px;
}

.sidebar-collapse .app-header {
    left: 0;
}

@media (max-width: 991.98px) {
    .app-header {
        left: 0;
        min-height: 60px;
    }

    .app-main {
        padding-top: 60px;
    }
}


/* ==========================================
   PMC ERP - Excel Export Button
========================================== */

.btn-excel-export {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 7px;

    min-height: 35px !important;
    padding: 7px 13px !important;

    color: #fff !important;
    background: linear-gradient(135deg, #20b8a5, #159987) !important;
    border: 1px solid #159987 !important;
    border-radius: 7px !important;

    font-family: inherit;
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1.4;

    box-shadow: 0 3px 9px rgba(32, 184, 165, .18);
    transition: all .2s ease;
}

.btn-excel-export i {
    font-size: 15px;
}

.btn-excel-export:hover {
    color: #fff !important;
    background: linear-gradient(135deg, #159987, #117f72) !important;
    border-color: #117f72 !important;
    box-shadow: 0 5px 12px rgba(32, 184, 165, .25);
    transform: translateY(-1px);
}

.btn-excel-export:active {
    transform: translateY(0);
    box-shadow: none;
}

.btn-excel-export:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(32, 184, 165, .15) !important;
}

/* Export button container */
.card-header .card-tools .dt-buttons {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
}

@media (max-width: 767.98px) {
    .btn-excel-export {
        min-height: 33px !important;
        padding: 6px 10px !important;
        font-size: 12px !important;
    }
}
/* Bill upload dropzone */
.bill-dropzone {
    display: block;
    width: 100%;
    padding: 22px 14px;
    text-align: center;
    background: var(--pharma-blue-light);
    border: 2px dashed #b9d3e6;
    border-radius: var(--pharma-radius);
    cursor: pointer;
    transition: background-color .2s ease, border-color .2s ease;
}

.bill-dropzone:hover {
    background: #e0eef8;
    border-color: var(--pharma-teal);
}
/* ===== KPI card icon fix: app.css ke END me paste karo (purane small-box rules ke baad) ===== */

/* value/title icon ke neeche na jaye: right side me icon ki jagah chhodo */
.app-main .small-box .inner {
    padding-right: 52px;
}

/* bada value text: icon se takraye nahi, kategi nahi */
.app-main .small-box .inner h3 {
    font-size: clamp(18px, 1.5vw, 25px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* title lamba ho to wrap ho */
.app-main .small-box .inner p {
    white-space: normal;
    overflow-wrap: anywhere;
}

/* icon hamesha upar dikhe, size fix rahe */
.app-main .small-box .small-box-icon {
    z-index: 2;
    flex: 0 0 38px;
    pointer-events: none;
}

@media (max-width: 767.98px) {
    .app-main .small-box .inner { padding-right: 42px; }
}