/* * dashboard.responsive.css * Shared responsive styles for all role dashboards. * Mobile : max-width 767px * Tablet : 768px – 1023px * Desktop : 1024px+ */ /* ════════════════════════════════════════════════ GLOBAL — fill iframe / parent container always ════════════════════════════════════════════════ */ html { width: 100%; min-width: 0; box-sizing: border-box; } body { width: 100%; min-width: 0; margin: 0; padding: 0; box-sizing: border-box; } .shell, .shell-switcher { width: 100%; min-width: 0; box-sizing: border-box; } /* ════════════════════════════════════════════════ DESKTOP — fixed viewport, no scroll ════════════════════════════════════════════════ */ @media (min-width: 1024px) { html, body { height: 100%; overflow: hidden; } .shell { height: 100vh; display: grid; grid-template-rows: 52px 1fr; } .shell-switcher { height: 100vh; display: grid; grid-template-rows: 52px 40px 1fr; } .main { overflow: hidden; height: 100%; } .views { height: 100%; overflow: hidden; } .view { height: 100%; } .panel { height: 100%; } } /* ════════════════════════════════════════════════ TABLET — 768–1023px ════════════════════════════════════════════════ */ @media (min-width: 768px) and (max-width: 1023px) { html, body { overflow-y: auto; height: auto; font-size: 14px; } .shell, .shell-switcher { height: auto; min-height: 100vh; display: flex; flex-direction: column; } .topbar { padding: 0 16px; } .divider-v { display: none; } .user-name { font-size: 13px; } .main { display: grid !important; grid-template-columns: 1fr 1fr !important; grid-template-rows: auto !important; overflow: visible !important; height: auto !important; padding: 12px; gap: 12px; } .span2 { grid-column: 1 / 3 !important; } .span3 { grid-column: 1 / 3 !important; } .driver-grid, .install-grid, .jobs-grid, .metrics-grid, .teams-grid, .overdue-grid { display: grid !important; grid-template-columns: 1fr 1fr !important; grid-template-rows: auto !important; height: auto !important; overflow: visible !important; padding: 12px; gap: 12px; } .panel { min-height: 260px; height: auto; } .chart-wrap { min-height: 200px; position: relative; } canvas { position: absolute; inset: 0; } .tbl-wrap { max-height: 280px; } .team-scroll { max-height: 280px; } .views { height: auto; overflow: visible; } .view { height: auto; display: none; } .view.active { display: block; } .switcher { position: sticky; top: 0; z-index: 10; overflow-x: auto; scrollbar-width: none; } .switcher::-webkit-scrollbar { display: none; } .tab-panels { height: auto; min-height: 400px; } .tab-panel { position: relative; height: auto; min-height: 360px; } .stat-card { min-height: 60px; flex: none; } .big-stat-num { font-size: 52px; } /* Responsive tables */ tbody td { font-size: 13px; } thead th { font-size: 11px; } } /* ════════════════════════════════════════════════ MOBILE — max 767px ════════════════════════════════════════════════ */ @media (max-width: 767px) { html { overflow-y: auto; overflow-x: hidden; height: auto; font-size: 20px; /* browser base — rem units scale from this */ } body { overflow-y: auto; overflow-x: hidden; height: auto; font-size: 20px; } /* ── SHELL ── */ .shell, .shell-switcher { height: auto; min-height: 100dvh; display: flex; flex-direction: column; overflow-x: hidden; width: 100%; } /* ── TOPBAR ── */ .topbar { padding: 0 14px; min-height: 56px; flex-shrink: 0; position: sticky; top: 0; z-index: 20; width: 100%; } .page-title { font-size: 20px; letter-spacing: 1px; } .divider-v { display: none; } .role-badge { display: none; } .user-name { display: none; } .logo-mark { width: 30px; height: 30px; } .btn-logout, .btn-refresh { padding: 8px 14px; font-size: 20px; gap: 5px; } /* ── SWITCHER ── */ .switcher { position: sticky; top: 56px; z-index: 10; flex-shrink: 0; width: 100%; max-width: 100vw; overflow-x: auto; overflow-y: visible; -webkit-overflow-scrolling: touch; scrollbar-width: none; -ms-overflow-style: none; display: flex; flex-wrap: nowrap; box-sizing: border-box; min-height: 48px; } .switcher::-webkit-scrollbar { display: none; } .switcher-btn { padding: 0 18px; font-size: 20px; height: 48px; flex-shrink: 0; white-space: nowrap; min-width: max-content; } .sw-count { font-size: 20px; height: 20px; min-width: 20px; padding: 0 5px; } /* ── GRIDS ── */ .main, .driver-grid, .install-grid, .jobs-grid, .metrics-grid, .teams-grid, .overdue-grid { display: flex !important; flex-direction: column !important; height: auto !important; overflow: visible !important; padding: 12px !important; gap: 12px !important; width: 100% !important; box-sizing: border-box !important; } .span2, .span3 { grid-column: unset !important; } /* ── PANELS ── */ .panel { min-height: 0; height: auto; flex-shrink: 0; width: 100%; } .panel-head { padding: 12px 14px; } .panel-body { padding: 14px; } .panel-label { font-size: 20px !important; letter-spacing: 1px; } .panel-body-flush { flex: 1; overflow: hidden; display: flex; flex-direction: column; } /* ── CHARTS ── */ .panel-chart { min-height: 280px; } .chart-wrap { min-height: 220px; position: relative; } canvas { position: absolute; inset: 0; } /* ── TABLES ── */ .tbl-wrap { max-height: 400px; overflow-y: auto; overflow-x: auto; -webkit-overflow-scrolling: touch; } .team-scroll { max-height: 400px; overflow-y: auto; } table { min-width: 360px; width: 100%; } tbody td { padding: 11px 12px; font-size: 20px; color: inherit; } thead th { padding: 9px 12px; font-size: 20px; } .dispatch-tbl { min-width: 480px; } /* ── VIEWS ── */ .views { height: auto; overflow: visible; } .view { height: auto; display: none; } .view.active { display: block; } /* ── DEV TABS ── */ .tab-bar { overflow-x: auto; scrollbar-width: none; padding: 0 10px; } .tab-bar::-webkit-scrollbar { display: none; } .tab-btn { padding: 0 16px; font-size: 20px; flex-shrink: 0; height: 44px; white-space: nowrap; } .tab-panels { height: auto; } .tab-panel { position: relative; height: auto; } .tab-panel.active { display: flex; flex-direction: column; } /* ── SEARCH ── */ .search-bar { padding: 10px 12px; } .search-input { font-size: 20px; padding: 10px 12px; } .toolbar { padding: 10px 12px; gap: 8px; } .filter-select { font-size: 20px; padding: 8px 10px; } /* ── STAT CARDS ── */ .stat-grid { gap: 10px; } .stat-card { padding: 14px 16px; flex: none; min-height: 70px; } .stat-card-label { font-size: 20px; } .stat-card-sub { font-size: 20px; } .stat-card-value { font-size: 40px; } /* ── KPI CARDS ── */ .kpi-val { font-size: 40px; } .kpi-lbl { font-size: 20px; } .kpi-sub { font-size: 20px; } /* ── TIME CARDS ── */ .time-cards { gap: 8px; } .time-card { padding: 12px 14px; } .time-card-name { font-size: 20px; } .time-card-value { font-size: 30px; } /* ── BIG STAT ── */ .big-stat-num { font-size: 72px; } .big-stat-sub { font-size: 20px; } /* ── BADGES & PILLS ── */ .badge { font-size: 20px; padding: 3px 10px; } .type-pill { font-size: 20px; padding: 3px 9px; } .days-badge { font-size: 20px; padding: 3px 9px; } .qty-badge { font-size: 20px; height: 24px; min-width: 28px; } .pill-repair { font-size: 20px; } /* ── MISC TEXT ── */ .td-muted { font-size: 20px; } .td-mono { font-size: 20px; } .td-clip { max-width: 130px; } /* ── TEAM SECTIONS ── */ .team-section { padding: 12px 14px; } .team-section-name { font-size: 20px; margin-bottom: 10px; } .team-open-count { font-size: 32px; } .bar-label { font-size: 20px; width: 52px; } .bar-track { height: 8px; } .bar-count { font-size: 20px; width: 24px; } .team-done-note { font-size: 20px; margin-top: 5px; } /* ── MEMBERS ── */ .member-row { padding: 10px 12px; gap: 10px; } .member-name { font-size: 20px; } .member-avatar { width: 36px; height: 36px; font-size: 20px; } /* ── WATER CARDS ── */ .water-list { padding: 10px 12px; gap: 8px; } .water-card { padding: 10px 12px; } .water-name { font-size: 20px; } .water-addr { font-size: 20px; } .water-badge { font-size: 20px; padding: 3px 9px; } /* ── TRANSACTIONS ── */ .trans-item { padding: 11px 14px; gap: 10px; } .trans-name { font-size: 24px !important; } .trans-meta { font-size: 22px !important; } .trans-badge { font-size: 20px; padding: 3px 8px; } /* ── WORKSHOP / STOCK ── */ .stat-tile { padding: 12px 14px; gap: 10px; } .stat-num { font-size: 32px; } .stat-lbl { font-size: 20px; } .stat-icon { width: 34px; height: 34px; } .btn-in, .btn-out { font-size: 20px; padding: 6px 12px; } .qty { font-size: 20px; height: 26px; min-width: 30px; } /* ── DISPATCH ── */ .panel-low, .panel-book { min-height: 320px; } /* ── HIDE NON-ESSENTIAL COLUMNS ── */ .hide-mobile { display: none !important; } } /* ════════════════════════════════════════════════ SMALL PHONE — max 400px ════════════════════════════════════════════════ */ @media (max-width: 400px) { html, body { font-size: 20px; } .page-title { font-size: 20px; } .logo-mark { width: 26px; height: 26px; } .topbar-left { gap: 8px; } .switcher-btn { padding: 0 14px; font-size: 20px; } .stat-card-value { font-size: 34px; } .big-stat-num { font-size: 60px; } .panel-chart { min-height: 250px; } .chart-wrap { min-height: 200px; } tbody td { font-size: 20px; } }