/* =====================================================================
   Oriva POS — Modern Admin Theme
   ---------------------------------------------------------------------
   Layered ON TOP of Bootstrap 4 (do not modify vendor CSS). All custom
   classes are prefixed `o-` so they don't collide with Bootstrap.
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --o-primary:        #0077B6;
    --o-primary-dark:   #023E8A;
    --o-primary-light:  #CAE9F5;
    --o-accent:         #00B4D8;

    --o-ink:            #0c2536;
    --o-text:           #2b3a48;
    --o-muted:          #6b7e90;
    --o-border:         #e6ecf2;
    --o-bg:             #f5f8fb;
    --o-card:           #ffffff;
    --o-shadow:         0 2px 12px rgba(0, 80, 120, 0.08);
    --o-shadow-lg:      0 8px 24px rgba(0, 80, 120, 0.12);

    --o-success:        #2ECC71;
    --o-warning:        #F39C12;
    --o-info:           #3498DB;
    --o-danger:         #E74C3C;
    --o-grey:           #95A5A6;

    --o-radius:         12px;
    --o-radius-sm:      8px;
    --o-radius-lg:      16px;

    --o-sidebar-w:      260px;
    --o-sidebar-w-collapsed: 76px;
    --o-topbar-h:       64px;
}

/* ---------- Base ---------- */
body.o-body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    background: var(--o-bg) !important;
    color: var(--o-text);
    -webkit-font-smoothing: antialiased;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}
.o-body, .o-body * { box-sizing: border-box; }
.o-body h1, .o-body h2, .o-body h3, .o-body h4, .o-body h5, .o-body h6 {
    color: var(--o-ink);
    font-weight: 700;
    letter-spacing: -0.2px;
}
.o-body a { color: var(--o-primary); text-decoration: none; }
.o-body a:hover { color: var(--o-primary-dark); }

/* Hide the legacy template's preloader if it leaks through */
.o-body #preloader, .o-body .horizontal-main-wrapper > .mainheader-area,
.o-body .horizontal-main-wrapper > .header-area { display: none !important; }
.o-body .horizontal-main-wrapper { display: contents; }

/* ---------- Layout shell ---------- */
.o-app {
    display: flex;
    min-height: 100vh;
}

/* ---------- Sidebar ---------- */
.o-sidebar {
    width: var(--o-sidebar-w);
    background: #ffffff;
    border-right: 1px solid var(--o-border);
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 1040;
    display: flex; flex-direction: column;
    transition: transform 0.25s ease, width 0.25s ease;
}
.o-sidebar-brand {
    height: var(--o-topbar-h);
    display: flex; align-items: center; gap: 12px;
    padding: 0 20px;
    border-bottom: 1px solid var(--o-border);
    text-decoration: none;
    color: var(--o-ink);
    font-weight: 800; font-size: 22px;
    letter-spacing: -0.5px;
}
.o-sidebar-brand:hover { color: var(--o-ink); }
.o-sidebar-brand .o-brand-mark {
    width: 40px; height: 40px; border-radius: 12px;
    background: linear-gradient(135deg, var(--o-primary) 0%, var(--o-primary-dark) 100%);
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-size: 18px; flex-shrink: 0;
}
.o-sidebar-brand img { max-height: 44px; max-width: 180px; }
.o-sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 16px 12px 24px;
}
.o-sidebar-nav::-webkit-scrollbar { width: 6px; }
.o-sidebar-nav::-webkit-scrollbar-thumb { background: #d8e1ea; border-radius: 999px; }

.o-nav-section {
    font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px;
    color: var(--o-muted);
    padding: 12px 14px 6px;
}
.o-nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px;
    margin: 2px 0;
    color: var(--o-text);
    border-radius: var(--o-radius-sm);
    font-weight: 500; font-size: 14.5px;
    transition: background 0.15s ease, color 0.15s ease;
    cursor: pointer;
    text-decoration: none;
    user-select: none;
}
.o-nav-item:hover {
    background: var(--o-primary-light);
    color: var(--o-primary-dark);
}
.o-nav-item.o-active {
    background: var(--o-primary);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 119, 182, 0.25);
}
.o-nav-item.o-active i { color: #fff; }
.o-nav-item i {
    font-size: 16px; width: 22px; text-align: center;
    color: var(--o-primary);
}
.o-nav-item .o-caret {
    margin-left: auto; transition: transform 0.2s ease;
    font-size: 12px; color: var(--o-muted);
}
.o-nav-group.o-open > .o-nav-item .o-caret { transform: rotate(90deg); }
.o-nav-submenu {
    list-style: none;
    padding: 4px 0 4px 38px;
    margin: 0 0 4px;
    display: none;
    border-left: 2px solid var(--o-border);
    margin-left: 22px;
}
.o-nav-group.o-open .o-nav-submenu { display: block; }
.o-nav-submenu a {
    display: block;
    padding: 8px 12px;
    margin: 1px 0;
    color: var(--o-text);
    font-size: 14px;
    border-radius: var(--o-radius-sm);
    text-decoration: none;
}
.o-nav-submenu a:hover { background: #f0f5fa; color: var(--o-primary-dark); }
.o-nav-submenu a.o-active { color: var(--o-primary); font-weight: 600; }

/* ---------- Main column ---------- */
.o-main {
    flex: 1;
    margin-left: var(--o-sidebar-w);
    min-height: 100vh;
    transition: margin-left 0.25s ease;
}

/* ---------- Topbar ---------- */
.o-topbar {
    height: var(--o-topbar-h);
    background: #ffffff;
    border-bottom: 1px solid var(--o-border);
    display: flex; align-items: center;
    padding: 0 24px;
    position: sticky; top: 0; z-index: 1030;
    gap: 16px;
}
.o-topbar-toggle {
    background: transparent; border: none; cursor: pointer;
    width: 40px; height: 40px; border-radius: var(--o-radius-sm);
    color: var(--o-muted); font-size: 18px;
    display: inline-flex; align-items: center; justify-content: center;
}
.o-topbar-toggle:hover { background: var(--o-primary-light); color: var(--o-primary); }
.o-topbar-title {
    font-size: 18px; font-weight: 700; color: var(--o-ink);
    margin: 0; line-height: 1;
}
.o-topbar-breadcrumb {
    font-size: 12px; color: var(--o-muted);
    margin-top: 4px;
}
.o-topbar-breadcrumb a { color: var(--o-muted); }
.o-topbar-breadcrumb .sep { margin: 0 6px; color: #cbd5dc; }
.o-topbar-spacer { flex: 1; }
.o-topbar-bell {
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--o-bg); color: var(--o-primary);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 16px; position: relative; cursor: pointer;
    text-decoration: none; transition: background 0.15s;
}
.o-topbar-bell:hover { background: var(--o-primary-light); }
.o-topbar-bell .o-bell-count {
    position: absolute; top: 4px; right: 4px;
    background: var(--o-danger); color: #fff;
    font-size: 10px; font-weight: 700;
    min-width: 18px; height: 18px; padding: 0 4px;
    border-radius: 999px;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid #fff;
}
.o-topbar-user {
    display: flex; align-items: center; gap: 10px;
    padding: 6px 12px; border-radius: 999px;
    background: var(--o-bg); cursor: pointer;
    text-decoration: none; color: var(--o-ink);
    transition: background 0.15s;
}
.o-topbar-user:hover { background: var(--o-primary-light); color: var(--o-primary-dark); }
.o-topbar-user img, .o-topbar-user .o-avatar-placeholder {
    width: 32px; height: 32px; border-radius: 50%;
    object-fit: cover;
    background: linear-gradient(135deg, var(--o-primary) 0%, var(--o-primary-dark) 100%);
    color: #fff; display: inline-flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 13px;
}
.o-topbar-user .o-user-name { font-size: 14px; font-weight: 600; }

/* ---------- Page content ---------- */
.o-content {
    padding: 28px 32px 60px;
    max-width: 1480px;
}
.o-page-header {
    display: flex; align-items: flex-start; justify-content: space-between;
    margin-bottom: 24px; gap: 20px; flex-wrap: wrap;
}
.o-page-title { font-size: 24px; margin: 0; }
.o-page-subtitle { color: var(--o-muted); font-size: 14px; margin-top: 4px; }
.o-page-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Cards ---------- */
.o-body .card {
    background: var(--o-card);
    border: 0 !important;
    border-radius: var(--o-radius);
    box-shadow: var(--o-shadow);
    overflow: hidden;
}
.o-body .card-header {
    background: transparent !important;
    border-bottom: 1px solid var(--o-border) !important;
    padding: 18px 22px;
}
.o-body .card-header h2,
.o-body .card-header h3,
.o-body .card-header h4 { margin: 0; font-size: 17px; font-weight: 700; }
.o-body .card-header small { color: var(--o-muted); }
.o-body .card-body { padding: 22px; }

/* ---------- Stat cards (dashboard) ---------- */
.o-stat {
    background: var(--o-card);
    border-radius: var(--o-radius);
    box-shadow: var(--o-shadow);
    padding: 22px;
    display: flex; gap: 16px; align-items: center;
    height: 100%;
    position: relative; overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.o-stat:hover { transform: translateY(-2px); box-shadow: var(--o-shadow-lg); }
.o-stat .o-stat-icon {
    width: 56px; height: 56px; border-radius: var(--o-radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
    background: var(--o-primary-light);
    color: var(--o-primary);
    flex-shrink: 0;
}
.o-stat .o-stat-label {
    font-size: 13px; color: var(--o-muted); margin-bottom: 4px;
    text-transform: uppercase; letter-spacing: 0.4px; font-weight: 600;
}
.o-stat .o-stat-value {
    font-size: 28px; font-weight: 800; color: var(--o-ink); line-height: 1.1;
}
.o-stat.o-stat-success .o-stat-icon { background: rgba(46, 204, 113, 0.12); color: var(--o-success); }
.o-stat.o-stat-warning .o-stat-icon { background: rgba(243, 156, 18, 0.12); color: var(--o-warning); }
.o-stat.o-stat-danger  .o-stat-icon { background: rgba(231, 76, 60, 0.12); color: var(--o-danger); }
.o-stat.o-stat-info    .o-stat-icon { background: rgba(52, 152, 219, 0.12); color: var(--o-info); }

/* Force the legacy "seo-fact sbg1..sbg4" cards to also use the modern look */
.o-body .seo-fact { background: transparent !important; border: 0 !important; }
.o-body .seo-fact .p-4 { padding: 0 !important; }
.o-body .seo-fact h2 { font-size: 28px !important; color: var(--o-ink); margin: 0; }
.o-body .seo-fact .seofct-icon { font-size: 13px; color: var(--o-muted); text-transform: uppercase; letter-spacing: 0.4px; }
.o-body .seo-fact canvas { display: none; }

/* ---------- Buttons ---------- */
.o-body .btn {
    border-radius: var(--o-radius);
    font-weight: 600;
    padding: 9px 18px;
    border: 0;
    transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
    font-size: 14px;
}
.o-body .btn:active { transform: translateY(1px); }
.o-body .btn-primary {
    background: var(--o-primary) !important;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(0, 119, 182, 0.25);
}
.o-body .btn-primary:hover { background: var(--o-primary-dark) !important; }
.o-body .btn-danger {
    background: var(--o-danger) !important;
    color: #fff !important;
}
.o-body .btn-success { background: var(--o-success) !important; color: #fff !important; }
.o-body .btn-warning { background: var(--o-warning) !important; color: #fff !important; }
.o-body .btn-secondary, .o-body .btn-outline-secondary {
    background: transparent !important;
    color: var(--o-muted) !important;
    border: 1px solid var(--o-border) !important;
}
.o-body .btn-outline-primary {
    background: transparent !important;
    color: var(--o-primary) !important;
    border: 1.5px solid var(--o-primary) !important;
}
.o-body .btn-outline-primary:hover {
    background: var(--o-primary) !important;
    color: #fff !important;
}
.o-body .btn-outline-danger {
    background: transparent !important;
    color: var(--o-danger) !important;
    border: 1.5px solid var(--o-danger) !important;
}
.o-body .btn-sm { padding: 6px 12px; font-size: 13px; }
.o-body .btn-icon {
    width: 34px; height: 34px; padding: 0;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: var(--o-radius-sm);
    background: var(--o-bg);
    color: var(--o-muted);
    border: 0;
    cursor: pointer;
}
.o-body .btn-icon:hover { background: var(--o-primary-light); color: var(--o-primary); }
.o-body .btn-icon.o-danger:hover { background: rgba(231,76,60,0.1); color: var(--o-danger); }

/* ---------- Forms ---------- */
.o-body .form-control,
.o-body select.form-control,
.o-body textarea.form-control {
    border: 1px solid var(--o-border) !important;
    border-radius: var(--o-radius-sm) !important;
    background: #fff !important;
    padding: 10px 14px !important;
    height: auto !important;
    font-size: 14.5px !important;
    color: var(--o-text) !important;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.o-body .form-control:focus {
    border-color: var(--o-primary) !important;
    box-shadow: 0 0 0 3px rgba(0, 119, 182, 0.12) !important;
    outline: 0 !important;
}
.o-body label { font-weight: 500; font-size: 13.5px; color: var(--o-text); margin-bottom: 6px; }
.o-body .form-row { margin-right: -8px; margin-left: -8px; }
.o-body .form-row > .form-group { padding: 0 8px; }

/* ---------- Tables ---------- */
.o-body .table {
    color: var(--o-text);
    margin: 0;
}
.o-body .table-bordered { border: 0 !important; }
.o-body .table thead.text-white tr,
.o-body .table thead tr {
    background: #f3f7fb !important;
}
.o-body .table thead th {
    background: #f3f7fb !important;
    color: var(--o-muted) !important;
    border: 0 !important;
    border-bottom: 1px solid var(--o-border) !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 14px 16px !important;
}
.o-body .table tbody td {
    border: 0 !important;
    border-bottom: 1px solid var(--o-border) !important;
    padding: 14px 16px !important;
    vertical-align: middle;
    font-size: 14.5px;
}
.o-body .table-striped tbody tr:nth-of-type(even),
.o-body .table tbody tr:nth-of-type(even) { background: #fbfdfe; }
.o-body .table tbody tr:hover { background: var(--o-primary-light) !important; transition: background 0.1s; }
.o-body .table.table-borderless td, .o-body .table.table-borderless th { border: 0 !important; }
.o-body .single-table .table-responsive { border: 0; }

/* DataTables search/length */
.o-body div.dataTables_wrapper div.dataTables_filter input,
.o-body div.dataTables_wrapper div.dataTables_length select {
    border: 1px solid var(--o-border);
    border-radius: var(--o-radius-sm);
    padding: 6px 10px;
}
.o-body div.dataTables_wrapper { padding: 8px 0; }

/* ---------- Badges ---------- */
.o-body .badge {
    border-radius: 999px;
    padding: 5px 12px;
    font-weight: 600;
    font-size: 11.5px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}
.o-body .badge-success, .o-body .o-badge-delivered { background: rgba(46,204,113,0.15) !important; color: var(--o-success) !important; }
.o-body .badge-warning, .o-body .o-badge-pending   { background: rgba(243,156,18,0.15) !important; color: var(--o-warning) !important; }
.o-body .badge-info,    .o-body .o-badge-returned  { background: rgba(52,152,219,0.15) !important; color: var(--o-info) !important; }
.o-body .badge-secondary, .o-body .o-badge-adjusted { background: rgba(149,165,166,0.18) !important; color: var(--o-grey) !important; }
.o-body .badge-danger { background: rgba(231,76,60,0.15) !important; color: var(--o-danger) !important; }

/* ---------- Alerts ---------- */
.o-body .alert {
    border: 0;
    border-radius: var(--o-radius);
    padding: 14px 18px;
    font-size: 14.5px;
}
.o-body .alert-success { background: rgba(46,204,113,0.1); color: #1e8449; }
.o-body .alert-danger  { background: rgba(231,76,60,0.1); color: #b03a2e; }
.o-body .alert-info    { background: rgba(52,152,219,0.1); color: #1f618d; }

/* ---------- Modal polish ---------- */
.o-body .modal-content {
    border: 0;
    border-radius: var(--o-radius-lg);
    box-shadow: var(--o-shadow-lg);
    overflow: hidden;
}
.o-body .modal-header {
    border-bottom: 1px solid var(--o-border);
    padding: 18px 24px;
    background: #fff !important;
    color: var(--o-ink) !important;
}
.o-body .modal-header h5 { color: var(--o-ink) !important; font-weight: 700; }
.o-body .modal-body { padding: 22px 24px; }
.o-body .modal-footer { padding: 16px 24px; border-top: 1px solid var(--o-border); }

/* ---------- Pagination ---------- */
.o-body .pagination .page-item .page-link {
    border: 0; color: var(--o-text); border-radius: var(--o-radius-sm);
    margin: 0 2px;
    background: transparent;
}
.o-body .pagination .page-item.active .page-link {
    background: var(--o-primary); color: #fff;
}

/* ---------- Backdrop / mobile overlay ---------- */
.o-overlay {
    position: fixed; inset: 0; z-index: 1035;
    background: rgba(12, 37, 54, 0.4);
    backdrop-filter: blur(2px);
    display: none;
}
body.o-sidebar-open .o-overlay { display: block; }

/* ---------- Collapsed (desktop) ---------- */
body.o-sidebar-collapsed .o-sidebar { width: var(--o-sidebar-w-collapsed); }
body.o-sidebar-collapsed .o-sidebar .o-sidebar-brand span,
body.o-sidebar-collapsed .o-sidebar .o-nav-item span,
body.o-sidebar-collapsed .o-sidebar .o-nav-section,
body.o-sidebar-collapsed .o-sidebar .o-nav-submenu,
body.o-sidebar-collapsed .o-sidebar .o-caret { display: none; }
body.o-sidebar-collapsed .o-sidebar .o-nav-item { justify-content: center; padding: 10px; }
body.o-sidebar-collapsed .o-main { margin-left: var(--o-sidebar-w-collapsed); }

/* ---------- Mobile (≤ 991px) ---------- */
@media (max-width: 991.98px) {
    .o-sidebar { transform: translateX(-100%); }
    .o-main { margin-left: 0 !important; }
    body.o-sidebar-open .o-sidebar { transform: translateX(0); box-shadow: var(--o-shadow-lg); }
    .o-content { padding: 18px 18px 40px; }
    .o-topbar { padding: 0 14px; }
    .o-topbar-title { font-size: 15px; }
    .o-stat .o-stat-value { font-size: 22px; }
}

@media (max-width: 575.98px) {
    .o-topbar-user .o-user-name { display: none; }
    .o-page-header { flex-direction: column; align-items: stretch; }
}

/* =====================================================================
   ORIVA — Mobile-first refinements
   Heavily phones-first since the team works mostly on mobile devices.
   ===================================================================== */

/* Stop the sidebar collapse-to-mini state on phones — we always want the
   slide-in drawer on touch devices regardless of saved preference. */
@media (max-width: 991.98px) {
    body.o-sidebar-collapsed .o-sidebar { width: var(--o-sidebar-w); }
    body.o-sidebar-collapsed .o-sidebar .o-sidebar-brand span,
    body.o-sidebar-collapsed .o-sidebar .o-nav-item span,
    body.o-sidebar-collapsed .o-sidebar .o-nav-section,
    body.o-sidebar-collapsed .o-sidebar .o-nav-submenu,
    body.o-sidebar-collapsed .o-sidebar .o-caret { display: revert; }
    body.o-sidebar-collapsed .o-sidebar .o-nav-item { justify-content: flex-start; padding: 10px 14px; }
    body.o-sidebar-collapsed .o-main { margin-left: 0; }
}

/* Slightly larger tap targets across the board */
@media (max-width: 991.98px) {
    .o-body .btn        { padding: 11px 18px; font-size: 14.5px; min-height: 42px; }
    .o-body .btn-sm     { padding: 8px 12px; font-size: 13px; min-height: 36px; }
    .o-body .form-control { font-size: 16px !important; padding: 11px 14px !important; }
    .o-body .o-nav-item { padding: 12px 14px; font-size: 15px; }
    .o-body .o-nav-submenu a { padding: 10px 12px; font-size: 14px; }
    .o-topbar-toggle { width: 44px; height: 44px; }
    .o-topbar-bell, .o-topbar-user img, .o-topbar-user .o-avatar-placeholder {
        width: 38px; height: 38px;
    }
}

/* Phones (<= 575px) — tighten everything, stack horizontals, scroll tables */
@media (max-width: 575.98px) {
    /* Topbar */
    .o-topbar { padding: 0 12px; gap: 8px; }
    .o-topbar-title { font-size: 15px; }
    .o-topbar-breadcrumb { display: none; } /* save vertical space */

    /* Page content padding */
    .o-content { padding: 14px 12px 60px; }

    /* Cards take full width with reduced padding */
    .o-body .card-header { padding: 14px 16px; }
    .o-body .card-body   { padding: 16px; }

    /* Stat cards stack one per row, slightly smaller */
    .o-stat { padding: 16px; gap: 12px; }
    .o-stat .o-stat-icon { width: 46px; height: 46px; font-size: 18px; }
    .o-stat .o-stat-value { font-size: 22px; }
    .o-stat .o-stat-label { font-size: 11px; }

    /* Forms — every form-row column becomes full width */
    .o-body .form-row > [class*='col-'] { flex: 0 0 100%; max-width: 100%; }

    /* Page header (Add button on its own row) */
    .o-page-header { flex-direction: column; align-items: stretch; gap: 10px; }
    .o-page-actions { flex-wrap: wrap; }
    .o-page-actions .btn { flex: 1; }

    /* Tables — let them scroll horizontally, smaller text */
    .o-body .single-table .table-responsive,
    .o-body .table-responsive {
        margin-left: -16px; margin-right: -16px;
        width: calc(100% + 32px);
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .o-body .table thead th { padding: 10px 12px !important; font-size: 11px !important; white-space: nowrap; }
    .o-body .table tbody td { padding: 11px 12px !important; font-size: 13.5px !important; white-space: nowrap; }

    /* Action button cell — stack, full width */
    .o-body .table td .btn { padding: 6px 10px; font-size: 12.5px; min-height: 32px; }

    /* DataTables filter / length — full width, stack vertically */
    .o-body .dataTables_wrapper .dataTables_filter,
    .o-body .dataTables_wrapper .dataTables_length { float: none; text-align: left; margin-bottom: 8px; }
    .o-body .dataTables_wrapper .dataTables_filter input { width: 100%; margin-left: 0; margin-top: 4px; }

    /* Modals — full-screen feel on phones */
    .o-body .modal-dialog { margin: 0; max-width: 100%; }
    .o-body .modal.show .modal-dialog { transform: none; }
    .o-body .modal-content { border-radius: 0; min-height: 100vh; }
    .o-body .modal-header { padding: 14px 16px; }
    .o-body .modal-body   { padding: 16px; }
    .o-body .modal-footer { padding: 12px 16px; }
    /* modal action buttons stack to full width */
    .o-body .modal-footer .btn { width: 100%; margin: 4px 0 !important; }

    /* Bottle deliveries / inventory etc. filter row collapse */
    .o-body form.form-row { flex-direction: column; }

    /* Recovery snapshot grid: stack stat tiles */
    .o-body .row > .col-md-3, .o-body .row > .col-lg-3 { flex: 0 0 100%; max-width: 100%; }
}

/* Tablet portrait (<=768px) — finer adjustments */
@media (max-width: 767.98px) {
    .o-content { padding: 18px 16px 60px; }
    .o-page-title { font-size: 20px; }
    /* Bottle / recovery inline button rows wrap nicely */
    .o-body .text-right { text-align: left !important; }
}

/* Make sure the page never causes horizontal scroll on phones */
html, body { overflow-x: hidden; }
.o-body .container { width: 100%; max-width: 100%; }

