/* Shared SYNC PH visual language. Page-specific styles remain independent. */
body.sync-app {
    --sync-ink: #101b30;
    --sync-muted: #596c87;
    --sync-border: #dfe7f1;
    --sync-accent: #0d9488;
    --bs-primary: #0d9488;
    --bs-primary-rgb: 13, 148, 136;
    color: var(--sync-ink);
    background: #f7f9fc;
    font-family: 'Cairo', 'Segoe UI', Tahoma, Arial, sans-serif;
    font-size: 14px;
}
.sync-app .sidebar { width: 270px; background: #202b39; border: 0; box-shadow: none; }
.sync-app .sidebar .logo { padding: 25px 18px; text-align: left; border-bottom: 1px solid #ffffff12; }
.sync-app .sync-brand { display: flex; align-items: center; gap: 7px; margin: 0; color: #f8fafc; font-size: 23px; font-weight: 800; letter-spacing: -.7px; }
.sync-brand > i { font-size: 39px; margin-right: 3px; }
.sync-brand > span { color: #deb466; }
.sync-nav-label { color: #8b9aaf; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; padding: 20px 20px 6px; }
.sync-app .sidebar .nav-link { border-radius: 0; margin: 0; padding: 10px 22px; color: #b9c5d5; font-size: 14px; border-left: 3px solid transparent; gap: 12px; }
.sync-app .sidebar .nav-link > i:first-child { width: 17px; text-align: center; opacity: .85; }
.sync-app .sidebar .nav-link:hover { background: #ffffff08; color: #fff; transform: none; }
.sync-app .sidebar .nav-link.active { color: #36c8b7; background: #1f3d46; border-left-color: #14b8a6; }
.sync-app .sidebar .collapse .nav-link { padding-left: 50px; font-size: 13px; }
.sync-app .main-content { margin-left: 270px; padding: 0 24px 32px; min-width: 0; }
.sync-app .top-navbar { min-height: 72px; margin: 0 -24px 24px; padding: 16px 24px; border-bottom: 1px solid var(--sync-border); border-radius: 0; box-shadow: none; gap: 12px; }
.sync-app .sync-page-title { font-size: 14px; font-weight: 600; }
.sync-breadcrumb-label { font-size: 13px; color: var(--sync-muted); }
.sync-breadcrumb-label i { font-size: 9px; }
.sync-app .top-navbar .sync-menu-toggle {
    --bs-btn-color: #53647c;
    --bs-btn-bg: transparent;
    --bs-btn-hover-color: #101b30;
    --bs-btn-hover-bg: #edf2f7;
    --bs-btn-active-color: #101b30;
    --bs-btn-active-bg: #e2e8f0;
    --bs-btn-focus-shadow-rgb: 83, 100, 124;
}
.sync-avatar { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; background: #202b39; color: #deb466; font-size: 13px; font-weight: 700; margin-right: 8px; }
.sync-app .card { border: 1px solid var(--sync-border); border-radius: 15px; background: white; box-shadow: 0 2px 3px #142b4a03; overflow: visible; }
.sync-app .card-header { background: transparent; color: var(--sync-ink); border-bottom: 1px solid #edf1f6; padding: 18px 22px; border-radius: 15px 15px 0 0; }
.sync-app .card-header h5 { font-size: 17px; font-weight: 650; }
.sync-app .card-body { padding: 22px; }
.sync-app .text-muted { color: var(--sync-muted) !important; }
.sync-app .form-control, .sync-app .form-select { border-color: var(--sync-border); border-radius: 9px; font-size: 14px; min-height: 36px; }
.sync-app .form-control:focus, .sync-app .form-select:focus { border-color: #58b8af; box-shadow: 0 0 0 3px #0d948815; }
.sync-app .btn { border-radius: 8px; font-size: 14px; }
.sync-app .btn-sm { font-size: 12px; line-height: 1.35; }
.sync-app .pharmacy-sales-actions { align-items: center; }
.sync-app .pharmacy-sales-actions > .btn { flex: 0 0 auto; height: auto; min-height: 32px; padding: 6px 10px; white-space: nowrap; }
/* Let Bootstrap apply these variables for normal, hover, focus, active and disabled states.
   Avoid background shorthands: they reset the normal background to transparent. */
.sync-app .btn-primary {
    --bs-btn-color: #fff;
    --bs-btn-bg: #0f766e;
    --bs-btn-border-color: #0f766e;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #115e59;
    --bs-btn-hover-border-color: #115e59;
    --bs-btn-focus-shadow-rgb: 13, 148, 136;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #134e4a;
    --bs-btn-active-border-color: #134e4a;
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: #0f766e;
    --bs-btn-disabled-border-color: #0f766e;
}
.sync-app .btn-outline-primary {
    --bs-btn-color: #0f766e;
    --bs-btn-bg: transparent;
    --bs-btn-border-color: #0f766e;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #0f766e;
    --bs-btn-hover-border-color: #0f766e;
    --bs-btn-focus-shadow-rgb: 13, 148, 136;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #115e59;
    --bs-btn-active-border-color: #115e59;
    --bs-btn-disabled-color: #0f766e;
    --bs-btn-disabled-bg: transparent;
    --bs-btn-disabled-border-color: #0f766e;
}
.sync-app .table { --bs-table-color: #334155; --bs-table-striped-bg: #f8fafc; --bs-table-hover-bg: #f0fdfa; --bs-table-border-color: #edf1f6; font-size: 13px; }
.sync-app .table thead th { color: #71839e; background: #f8fafc; font-weight: 600; padding-top: 13px; padding-bottom: 13px; }
.sync-app .nav-tabs { border-color: var(--sync-border); gap: 4px; }
.sync-app .nav-tabs .nav-link { border-radius: 8px 8px 0 0; padding: 12px 18px; }
.sync-app .nav-tabs .nav-link.active { background: #f0fdfa; border-bottom-color: #0d9488; }
.sync-app .dropdown-menu { border: 1px solid var(--sync-border); border-radius: 12px; box-shadow: 0 10px 35px #101b3012; }
/* DataTables export controls: separate soft-colour buttons, including Bootstrap button groups. */
.sync-app .dt-buttons {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 4px 0;
    background: transparent;
    box-shadow: none;
}
.sync-app .dt-buttons :is(.dt-button, .btn) {
    --export-color: #526171;
    --export-bg: rgba(100, 116, 139, .13);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    min-height: 38px;
    padding: 8px 11px;
    margin: 0 !important;
    border: 1px solid transparent;
    border-radius: 10px !important;
    background: var(--export-bg);
    color: var(--export-color);
    box-shadow: none;
    line-height: 1;
    transition: background-color .15s ease, color .15s ease;
}
.sync-app .dt-buttons .buttons-copy { --export-color: #087f95; --export-bg: rgba(23, 162, 184, .14); }
.sync-app .dt-buttons .buttons-excel { --export-color: #187b37; --export-bg: rgba(40, 167, 69, .14); }
.sync-app .dt-buttons .buttons-pdf { --export-color: #be263b; --export-bg: rgba(220, 53, 69, .13); }
.sync-app .dt-buttons .buttons-print { --export-color: #53606b; --export-bg: rgba(108, 117, 125, .15); }
.sync-app .dt-buttons :is(.dt-button, .btn) i { font-size: 17px; color: inherit; opacity: 1; vertical-align: middle; }
.sync-app .dt-buttons :is(.dt-button, .btn):hover:not(:disabled):not(.disabled),
.sync-app .dt-buttons :is(.dt-button, .btn):active:not(:disabled):not(.disabled) {
    background: var(--export-color);
    color: #fff;
    border-color: transparent;
    box-shadow: none;
}
.sync-app .dt-buttons :is(.dt-button, .btn):focus-visible {
    outline: 2px solid var(--export-color);
    outline-offset: 3px;
    box-shadow: none;
}
.sync-app .dt-buttons :is(.dt-button, .btn):disabled,
.sync-app .dt-buttons :is(.dt-button, .btn).disabled { opacity: .45; cursor: not-allowed; }
.sync-dashboard .sync-eyebrow { display: inline-block; color: #08786c; background: #d1fae5; padding: 3px 10px; border-radius: 6px; font-size: 12px; font-weight: 750; letter-spacing: 1px; }
.sync-dashboard h1 { font-size: clamp(24px, 2.2vw, 34px); font-weight: 700; letter-spacing: -1px; margin: 8px 0 4px; }
.sync-dashboard .sync-section-label { font-size: 12px; color: #8ca0bb; letter-spacing: .8px; text-transform: uppercase; font-weight: 700; margin: 28px 0 16px; }
.sync-dashboard .sync-toolbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; background: white; border: 1px solid var(--sync-border); border-radius: 13px; padding: 14px 20px; margin-top: 22px; }
.sync-dashboard .card.text-white { background: white !important; color: var(--sync-ink) !important; }
.sync-dashboard .card.text-white .text-white { color: var(--sync-ink) !important; }
.sync-dashboard .card.text-white .text-white-50 { color: var(--sync-muted) !important; }
.sync-dashboard .card.text-white .fs-1, .sync-dashboard .card.text-white h2 { color: var(--sync-accent); font-size: 36px !important; letter-spacing: -1px; }
.sync-dashboard .card.text-white .text-uppercase { text-transform: none !important; font-size: 14px; color: var(--sync-muted); }
.sync-dashboard .card.text-white .fa-3x, .sync-dashboard .card.text-white .fa-2x { font-size: 22px; color: var(--sync-accent); background: #e6faf4; padding: 12px; border-radius: 12px; opacity: 1 !important; }
.sync-menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
.sync-sidebar-backdrop { display: none; }
@media (max-width: 991.98px) {
    .sync-app .sidebar { transform: translateX(-100%); transition: transform .2s ease; z-index: 1040; }
    .sync-app .main-content { margin-left: 0; padding: 0 16px 24px; }
    .sync-app .top-navbar { margin: 0 -16px 20px; padding: 14px 16px; }
    .sync-menu-toggle { display: inline-flex; }
    .sync-app.sync-nav-open .sidebar { transform: translateX(0); }
    .sync-app.sync-nav-open .sync-sidebar-backdrop { display: block; position: fixed; inset: 0; background: #101b3070; z-index: 1030; border: 0; }
    .sync-app.sync-nav-open { overflow: hidden; }
}
@media (max-width: 575.98px) {
    .sync-breadcrumb-label, .sync-user-name { display: none; }
    .sync-app .main-content > .container-fluid { padding-left: 0; padding-right: 0; }
    .sync-app .card-body { padding: 16px; }
    .sync-app .top-navbar { gap: 5px; }
}
@media (prefers-reduced-motion: reduce) { .sync-app .sidebar, .sync-app .nav-link { transition: none; } }

/* Shared table typography and controls. Keep existing DataTables functionality. */
.sync-app .table { line-height: 1.65; }
.sync-app .table > :not(caption) > * > * { padding: 11px 14px; vertical-align: middle; }
.sync-app .table thead th { color: #52647b; font-size: 12px; }
.sync-app .table-responsive { border-radius: 12px; }
.sync-app .table-responsive > .table { overflow: visible; }
.sync-app .table-responsive > .table > thead > tr > th { position: sticky; top: 0; z-index: 2; }
.sync-app .dataTables_scrollBody thead th { position: static; }
.sync-app .dataTables_wrapper { font-size: 13px; }
.sync-app .dataTables_wrapper .dataTables_length,
.sync-app .dataTables_wrapper .dataTables_filter { margin: 8px 0 14px; color: #52647b; }
.sync-app .dataTables_wrapper label { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.sync-app .dataTables_wrapper .dataTables_filter input { border: 1px solid var(--sync-border); border-radius: 9px; padding: 7px 12px; }
.sync-app .dataTables_wrapper .dataTables_length select { border: 1px solid var(--sync-border); border-radius: 9px; min-height: 36px; }
.sync-app .dataTables_wrapper .dataTables_info { color: #596c87; padding: 14px 0; }
.sync-app .dataTables_empty, .sync-app .dt-empty { padding: 36px 16px !important; color: #596c87; background: #f8fafc; text-align: center; }
.sync-app .page-link { color: #0f766e; border-color: var(--sync-border); }
.sync-app .active > .page-link { background: #0f766e; border-color: #0f766e; color: #fff; }
.sync-app .table .btn-sm { min-height: 30px; padding: 5px 9px; border-radius: 7px; }
.sync-app .table .btn i { font-size: 13px; }
.sync-app h1, .sync-app h2, .sync-app h3 { font-weight: 700; }
.sync-app .sidebar .nav-link[aria-expanded="true"] { color: #7ce0d0; }
.sync-app .sidebar .nav-link:focus-visible { outline: 2px solid #7ce0d0; outline-offset: -3px; }
.sync-app .sync-page-title { line-height: 1.5; }
@media (min-width: 992px) {
    .sync-app.sync-sidebar-collapsed .sidebar { transform: none; width: 72px; }
    .sync-app.sync-sidebar-collapsed .main-content { margin-left: 72px; }
    .sync-app.sync-sidebar-collapsed .sidebar .logo { padding: 22px 16px; }
    .sync-app.sync-sidebar-collapsed .sidebar .sync-brand { font-size: 0; gap: 0; }
    .sync-app.sync-sidebar-collapsed .sidebar .sync-brand > span,
    .sync-app.sync-sidebar-collapsed .sidebar .sidebar-search,
    .sync-app.sync-sidebar-collapsed .sidebar .sync-nav-label { display: none; }
    .sync-app.sync-sidebar-collapsed .sidebar .sync-brand > i { font-size: 36px; margin: 0; }
    .sync-app.sync-sidebar-collapsed .sidebar .nav > .nav-link {
        justify-content: center;
        font-size: 0;
        gap: 0;
        min-height: 46px;
        padding: 12px 0;
    }
    .sync-app.sync-sidebar-collapsed .sidebar .nav > .nav-link > i:first-child { font-size: 18px; width: 24px; }
    .sync-app.sync-sidebar-collapsed .sidebar .nav > .nav-link > :not(i:first-child),
    .sync-app.sync-sidebar-collapsed .sidebar .nav > .nav-link > .fa-chevron-down,
    .sync-app.sync-sidebar-collapsed .sidebar .nav .collapse,
    .sync-app.sync-sidebar-collapsed .sidebar .nav .collapsing { display: none; }
}
@media (max-width: 575.98px) {
    .sync-app .dataTables_wrapper .dataTables_filter { text-align: start; }
    .sync-app .dataTables_wrapper .dt-buttons { margin-bottom: 8px; }
}
