/* Pharmacy MS — tweaks on top of the admin template */
:root { --ph-primary: #1b5a90; --ph-green: #22b573; --ph-red: #e63c3c; --ph-orange: #f39c12; --ph-muted: #6c757d; }

body { background: #f5f7fb; }
.header .header-left .logo .brand-text { font-size: 18px; font-weight: 700; color: #fff; white-space: nowrap; line-height: 60px; }
.header .header-left .logo img { max-height: 44px; width: auto; }
.mini-sidebar .header .header-left .logo .brand-text { display: none; }
.pos-btn { border-radius: 20px; padding: 4px 14px; font-weight: 600; }
.page-header { margin-bottom: 1.25rem; }
.page-header .page-title { font-size: 22px; margin-bottom: 4px; }
.page-actions .btn { margin-left: 6px; margin-top: 6px; }
.card { border: 0; border-radius: 10px; box-shadow: 0 1px 3px rgba(16, 24, 40, .08); }
.card-header { background: #fff; border-bottom: 1px solid #eef0f4; border-radius: 10px 10px 0 0 !important; }
.card-title { font-weight: 600; }

/* stat tiles */
.stat-card { display: flex; align-items: center; padding: 18px 20px; }
.stat-card .stat-icon { width: 52px; height: 52px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 22px; margin-right: 16px; flex-shrink: 0; }
.stat-card .stat-label { color: var(--ph-muted); font-size: 13px; margin-bottom: 2px; }
.stat-card .stat-value { font-size: 21px; font-weight: 700; margin: 0; color: #1e293b; line-height: 1.2; }
.stat-card .stat-sub { font-size: 12px; color: var(--ph-muted); }
a.stat-link { color: inherit; display: block; }
a.stat-link:hover .card { box-shadow: 0 4px 14px rgba(16, 24, 40, .12); }
.bg-soft-primary { background: #e7f0f9; color: var(--ph-primary); }
.bg-soft-success { background: #e3f7ee; color: #179a5f; }
.bg-soft-danger { background: #fde8e8; color: #d03030; }
.bg-soft-warning { background: #fef3e2; color: #d4850a; }
.bg-soft-info { background: #e5f6fd; color: #0f8bbf; }
.bg-soft-purple { background: #efe9fb; color: #6f42c1; }

/* tables */
.table thead th { border-top: 0; border-bottom: 1px solid #eef0f4; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: #64748b; font-weight: 600; white-space: nowrap; }
.table td { vertical-align: middle; }
.table-hover tbody tr:hover { background: #f8fafc; }
.table .actions .btn { margin: 1px; }
.text-money { white-space: nowrap; }
.empty-state { padding: 40px 10px; text-align: center; color: var(--ph-muted); }
.empty-state i { font-size: 34px; display: block; margin-bottom: 8px; opacity: .6; }

/* status badges */
.badge-status { padding: 5px 9px; border-radius: 12px; font-weight: 600; font-size: 11px; }
.badge-soft-success { background: #e3f7ee; color: #179a5f; }
.badge-soft-danger { background: #fde8e8; color: #d03030; }
.badge-soft-warning { background: #fef3e2; color: #c47a06; }
.badge-soft-info { background: #e5f6fd; color: #0f8bbf; }
.badge-soft-secondary { background: #eef0f4; color: #475569; }

.thumb { width: 38px; height: 38px; object-fit: cover; border-radius: 8px; background: #eef0f4; display: inline-flex; align-items: center; justify-content: center; color: #94a3b8; }

/* filters */
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.filter-bar .form-control, .filter-bar .btn { height: 38px; }
.filter-bar .search-input { min-width: 240px; flex: 1 1 240px; }
.filter-bar select.form-control { flex: 0 1 190px; }

/* pagination */
.pagination-wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-top: 16px; }
.pagination-wrap .pagination { margin: 0; }
.pagination-wrap .small { color: var(--ph-muted); }

/* notification dropdown */
.noti-dropdown .badge { position: absolute; top: 12px; right: 4px; font-size: 10px; min-width: 18px; }
.notifications .notification-list li a { padding: 10px 14px; }
.notifications .noti-details { font-size: 13px; color: #334155; }
.notifications .noti-title { font-weight: 600; }
.noti-unread { background: #f3f8fe; }

/* point of sale */
.pos-search { height: 48px; font-size: 16px; border-radius: 10px; }
.pos-products { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; max-height: calc(100vh - 290px); overflow-y: auto; padding: 2px; }
.pos-product { border: 1px solid #e5e9f0; border-radius: 10px; padding: 12px; background: #fff; cursor: pointer; text-align: left; transition: all .12s; width: 100%; }
.pos-product:hover { border-color: var(--ph-primary); box-shadow: 0 3px 10px rgba(27, 90, 144, .15); }
.pos-product .name { font-weight: 600; font-size: 14px; color: #1e293b; line-height: 1.25; margin-bottom: 4px; }
.pos-product .meta { font-size: 11px; color: var(--ph-muted); }
.pos-product .price { font-weight: 700; color: var(--ph-primary); font-size: 15px; margin-top: 6px; }
.pos-cart .table td { padding: 8px 6px; }
.pos-cart .qty-input { width: 64px; text-align: center; height: 32px; padding: 2px; }
.pos-total { font-size: 26px; font-weight: 800; color: var(--ph-primary); }
.pos-summary .row-line { display: flex; justify-content: space-between; padding: 4px 0; }

/* misc */
.confirm-icon { width: 64px; height: 64px; border-radius: 50%; background: #fde8e8; color: #d03030; display: inline-flex; align-items: center; justify-content: center; font-size: 28px; }
.permission-group { border: 1px solid #eef0f4; border-radius: 10px; padding: 14px; height: 100%; }
.permission-group h6 { font-weight: 700; margin-bottom: 10px; }
.custom-control-label { cursor: pointer; }
.login-wrapper .loginbox .login-left { background: linear-gradient(160deg, #1b5a90, #22b573); }
.select2-container .select2-selection--single { height: 38px; border-color: #ced4da; }
.select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 36px; }
.select2-container--default .select2-selection--single .select2-selection__arrow { height: 36px; }
@media (max-width: 767px) { .pos-products { max-height: none; } .page-actions { margin-top: 8px; } }
@media print { .header, .sidebar, .page-header, .no-print { display: none !important; } .page-wrapper { margin: 0; padding: 0; } }

/* compact tables and header fixes */
.table { font-size: 13.5px; }
.table td, .table th { padding: .6rem .55rem; }
.table-sm td, .table-sm th { padding: .45rem .5rem; }
.table td small { font-size: 11.5px; }
.header .header-left .logo .brand-text { color: var(--ph-primary); }
.header .user-menu .pos-btn { line-height: 1.5; height: auto; padding: 6px 16px; color: #fff; margin-top: 0; }
.header .user-menu > li.d-md-flex { height: 60px; }
.report-summary .h5 { font-size: 1.05rem; white-space: nowrap; }
.stat-card .stat-value { white-space: nowrap; }
body { font-size: 14px; }
.header .user-menu.nav > li > a.pos-btn { line-height: 1.5; height: auto; padding: 6px 16px; color: #fff; border-radius: 20px; }
.header .user-menu.nav > li > a.pos-btn:hover { background: #1b5a90; }
.brand-icon { width: 84px; height: 84px; border-radius: 22px; background: rgba(255,255,255,.18); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 40px; }
.header .logo-small .brand-mini { color: var(--ph-primary); font-size: 24px; line-height: 60px; }
.header .user-menu.nav > li > a.pos-btn i { line-height: 1; font-size: 14px; color: #fff; }
@media (max-width: 991.98px) { .user-menu.nav > li.noti-dropdown > a > span.badge { display: block !important; } }
.cart-items { max-height: 330px; overflow-y: auto; }
.cart-item { border-bottom: 1px solid #eef0f4; padding: 9px 0; font-size: 13.5px; }
.cart-item:last-child { border-bottom: 0; }
