diff --git a/reports-app/frontend/src/assets/css/layout/navigation.css b/reports-app/frontend/src/assets/css/layout/navigation.css index e4ae99b..17f2481 100644 --- a/reports-app/frontend/src/assets/css/layout/navigation.css +++ b/reports-app/frontend/src/assets/css/layout/navigation.css @@ -86,6 +86,9 @@ transition: transform var(--transition-normal); z-index: var(--z-modal); overflow-y: auto; + /* Flex container for profile section at bottom */ + display: flex; + flex-direction: column; } .slide-menu.open { diff --git a/reports-app/frontend/src/assets/css/mobile.css b/reports-app/frontend/src/assets/css/mobile.css index c0a7aef..8ef6dec 100644 --- a/reports-app/frontend/src/assets/css/mobile.css +++ b/reports-app/frontend/src/assets/css/mobile.css @@ -693,3 +693,401 @@ min-height: 44px; /* Touch-friendly height */ } } + +/* ============================================ + Mobile Compact Toolbar + Ultra-compact header for mobile views + - Filter toggle (funnel icon) + - Actions dropdown menu + - Single compact total display + ============================================ */ + +/* Mobile Toolbar - compact single line (~50px) */ +.mobile-toolbar { + display: flex; + align-items: center; + gap: var(--space-sm, 0.5rem); + padding: var(--space-sm, 0.5rem) var(--space-md, 1rem); + background: var(--surface-card, #ffffff); + border: 1px solid var(--surface-border, #e2e8f0); + border-radius: var(--border-radius, 6px); + margin-bottom: var(--space-md, 1rem); + min-height: 50px; + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05); +} + +/* Filter toggle button - colored when filters are active */ +.mobile-toolbar .filter-active { + color: var(--primary-color, #2563eb) !important; + background: rgba(37, 99, 235, 0.1) !important; +} + +.mobile-toolbar .filter-active:hover { + background: rgba(37, 99, 235, 0.2) !important; +} + +/* Actions button - compact */ +.mobile-toolbar .p-button-outlined { + padding: 0.5rem 0.75rem; + font-size: 0.875rem; +} + +/* Compact total display - pushed to right */ +.mobile-toolbar .mobile-total { + margin-left: auto; + display: flex; + align-items: center; + gap: var(--space-xs, 0.25rem); + font-size: var(--text-sm, 0.875rem); + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + max-width: 50%; +} + +.mobile-toolbar .total-label { + color: var(--text-color-secondary, #64748b); + font-weight: 500; +} + +.mobile-toolbar .total-value { + font-weight: var(--font-semibold, 600); + color: var(--text-color, #1e293b); + font-variant-numeric: tabular-nums; +} + +/* Color classes for positive/negative values */ +.mobile-toolbar .total-value.incasari { + color: var(--green-600, #16a34a); +} + +.mobile-toolbar .total-value.plati { + color: var(--red-600, #dc2626); +} + +/* Mobile-only visibility - show toolbar only on mobile */ +@media (min-width: 769px) { + .mobile-toolbar { + display: none !important; + } +} + +/* Extra compact on very small screens */ +@media (max-width: 400px) { + .mobile-toolbar { + padding: var(--space-xs, 0.25rem) var(--space-sm, 0.5rem); + gap: var(--space-xs, 0.25rem); + } + + .mobile-toolbar .mobile-total { + font-size: var(--text-xs, 0.75rem); + } + + .mobile-toolbar .p-button-outlined { + padding: 0.375rem 0.5rem; + font-size: 0.8125rem; + } + + /* Hide label on very small screens, show only icon */ + .mobile-toolbar .p-button-outlined .p-button-label { + display: none; + } + + .mobile-toolbar .p-button-outlined .p-button-icon { + margin-right: 0; + } +} + +/* Filters card - more compact when visible on mobile */ +@media (max-width: 768px) { + .filters-card { + margin-bottom: var(--space-sm, 0.5rem); + } + + .filters-card .p-card-body { + padding: var(--space-sm, 0.5rem); + } + + .filters-card .form-row { + gap: var(--space-sm, 0.5rem); + } + + .filters-card .form-group { + margin-bottom: var(--space-xs, 0.25rem); + } + + .filters-card .form-label { + font-size: var(--text-sm, 0.875rem); + margin-bottom: var(--space-xs, 0.25rem); + } +} + +/* ============================================ + Mobile Data Cards + Compact card layout for table data on mobile + ============================================ */ + +.mobile-card-list { + display: flex; + flex-direction: column; + gap: 0.5rem; +} + +.mobile-data-card { + background: var(--surface-card, #ffffff); + border: 1px solid var(--surface-border, #e2e8f0); + border-radius: 8px; + padding: 0.75rem 1rem; +} + +.mobile-data-card .card-header { + font-weight: 600; + font-size: 0.9375rem; + color: var(--text-color, #1e293b); + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +.mobile-data-card .card-row { + display: flex; + justify-content: space-between; + align-items: center; + font-size: 0.875rem; + color: var(--text-color-secondary, #64748b); + margin-top: 0.25rem; +} + +.mobile-data-card .card-meta { + font-size: 0.8125rem; +} + +.mobile-data-card .card-amount { + font-weight: 600; + font-variant-numeric: tabular-nums; + font-size: 0.9375rem; +} + +.mobile-data-card .card-amount.positive { + color: var(--green-600, #16a34a); +} + +.mobile-data-card .card-amount.negative { + color: var(--red-600, #dc2626); +} + +/* Mobile empty state */ +.mobile-empty { + display: flex; + flex-direction: column; + align-items: center; + padding: 2rem; + color: var(--text-color-secondary); +} + +.mobile-empty i { + font-size: 2rem; + margin-bottom: 0.5rem; +} + +/* ============================================ + Mobile Responsive Totals + Unified grid layout for totals on mobile + Supports 1, 2, or 4 totals uniformly + ============================================ */ + +.mobile-totals-grid { + display: grid; + grid-template-columns: 1fr 1fr; + gap: 0.375rem 1rem; + padding: 0.5rem 0.75rem; + background: var(--surface-ground, #f8fafc); + border-radius: 6px; + font-size: 0.8125rem; + width: 100%; +} + +/* Single total - center it */ +.mobile-totals-grid.single-total { + grid-template-columns: 1fr; + justify-items: center; +} + +/* Two totals - side by side */ +.mobile-totals-grid.two-totals { + grid-template-columns: 1fr 1fr; +} + +.mobile-totals-grid .total-item { + display: flex; + justify-content: space-between; + align-items: center; + gap: 0.5rem; +} + +.mobile-totals-grid .total-label { + color: var(--text-color-secondary, #64748b); + font-size: 0.75rem; + white-space: nowrap; +} + +.mobile-totals-grid .total-value { + font-weight: 600; + font-variant-numeric: tabular-nums; + font-size: 0.875rem; +} + +.mobile-totals-grid .total-value.incasari, +.mobile-totals-grid .total-value.positive { + color: var(--green-600, #16a34a); +} + +.mobile-totals-grid .total-value.plati, +.mobile-totals-grid .total-value.negative { + color: var(--red-600, #dc2626); +} + +/* Backward compatibility - stack totals (deprecated, use grid) */ +.mobile-totals-stack { + display: flex; + flex-direction: column; + gap: 0.125rem; + font-size: 0.75rem; + margin-left: auto; +} + +.mobile-totals-stack .total-row { + display: flex; + gap: 0.5rem; +} + +.mobile-totals-stack .total-label { + color: var(--text-color-secondary, #64748b); +} + +.mobile-totals-stack .total-value { + font-weight: 600; + font-variant-numeric: tabular-nums; +} + +/* ============================================ + Mobile Toolbar v2 - Two-Row Layout + Row 1: Icon-only action buttons + Row 2: Totals display + ============================================ */ + +.mobile-toolbar-container { + display: flex; + flex-direction: column; + gap: var(--space-sm, 0.5rem); + padding: var(--space-sm, 0.5rem) var(--space-md, 1rem); + background: var(--surface-card, #ffffff); + border: 1px solid var(--surface-border, #e2e8f0); + border-radius: var(--border-radius, 6px); + margin-bottom: var(--space-md, 1rem); + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05); +} + +/* Row 1: Icon-only action buttons */ +.mobile-toolbar-buttons { + display: flex; + justify-content: space-around; + align-items: center; + gap: var(--space-xs, 0.25rem); +} + +/* Icon-only buttons - no labels */ +.mobile-toolbar-buttons .p-button { + padding: var(--space-sm, 0.5rem); + min-width: 44px; + min-height: 44px; + justify-content: center; +} + +.mobile-toolbar-buttons .p-button .p-button-label { + display: none !important; +} + +.mobile-toolbar-buttons .p-button .p-button-icon { + margin-right: 0 !important; + font-size: 1.125rem; +} + +/* Filter active state */ +.mobile-toolbar-buttons .filter-active { + color: var(--primary-color, #2563eb) !important; + background: rgba(37, 99, 235, 0.1) !important; + border-color: var(--primary-color, #2563eb) !important; +} + +.mobile-toolbar-buttons .filter-active:hover { + background: rgba(37, 99, 235, 0.2) !important; +} + +/* Row 2: Totals display */ +.mobile-toolbar-totals { + display: flex; + justify-content: center; + align-items: center; + padding-top: var(--space-xs, 0.25rem); + border-top: 1px solid var(--surface-border, #e2e8f0); +} + +/* Center the totals grid/stack in row 2 */ +.mobile-toolbar-totals .mobile-totals-grid, +.mobile-toolbar-totals .mobile-totals-stack, +.mobile-toolbar-totals .mobile-total { + margin-left: 0; + width: auto; +} + +/* Hide on desktop */ +@media (min-width: 769px) { + .mobile-toolbar-container { + display: none !important; + } +} + +/* Extra compact on very small screens */ +@media (max-width: 400px) { + .mobile-toolbar-container { + padding: var(--space-xs, 0.25rem) var(--space-sm, 0.5rem); + gap: var(--space-xs, 0.25rem); + } + + .mobile-toolbar-buttons .p-button { + padding: var(--space-xs, 0.25rem); + min-width: 40px; + min-height: 40px; + } + + .mobile-toolbar-buttons .p-button .p-button-icon { + font-size: 1rem; + } +} + +/* ============================================ + Hamburger Menu Profile Section + Profile options at bottom of slide menu + ============================================ */ + +.menu-profile { + margin-top: auto; + border-top: 1px solid var(--color-border, #e2e8f0); + padding-top: var(--space-md, 1rem); +} + +.menu-profile .profile-info { + display: flex; + align-items: center; + gap: var(--space-sm, 0.5rem); + padding: var(--space-sm, 0.5rem) var(--space-md, 1rem); + font-weight: 600; + color: var(--color-text, #1e293b); + font-size: var(--text-sm, 0.875rem); +} + +.menu-profile .profile-info .pi-user { + font-size: 1.25rem; + color: var(--color-primary, #2563eb); +} diff --git a/reports-app/frontend/src/components/dashboard/CompanySelectorMini.vue b/reports-app/frontend/src/components/dashboard/CompanySelectorMini.vue index 5b6b998..3984cf4 100644 --- a/reports-app/frontend/src/components/dashboard/CompanySelectorMini.vue +++ b/reports-app/frontend/src/components/dashboard/CompanySelectorMini.vue @@ -497,18 +497,55 @@ export default { /* Mobile adjustments */ @media (max-width: 768px) { .company-selector-mini { - max-width: none; - width: 100%; + max-width: 200px; + width: auto; } .company-trigger { min-width: auto; + max-width: 200px; + padding: var(--space-xs) var(--space-sm); + } + + .company-info { + max-width: 140px; + } + + .company-name { + font-size: var(--text-xs); + max-width: 140px; + } + + .company-code { + font-size: 10px; } .company-dropdown-panel { - left: -16px; - right: -16px; - width: calc(100% + 32px); + position: fixed; + left: 8px; + right: 8px; + top: 60px; + width: auto; + max-height: 70vh; + } +} + +/* Extra small screens */ +@media (max-width: 400px) { + .company-selector-mini { + max-width: 160px; + } + + .company-trigger { + max-width: 160px; + } + + .company-info { + max-width: 110px; + } + + .company-name { + max-width: 110px; } } diff --git a/reports-app/frontend/src/components/dashboard/PeriodSelectorMini.vue b/reports-app/frontend/src/components/dashboard/PeriodSelectorMini.vue index c3e6d15..81555e8 100644 --- a/reports-app/frontend/src/components/dashboard/PeriodSelectorMini.vue +++ b/reports-app/frontend/src/components/dashboard/PeriodSelectorMini.vue @@ -349,18 +349,36 @@ export default { /* Mobile adjustments */ @media (max-width: 768px) { .period-selector-mini { - max-width: none; - width: 100%; + max-width: 140px; + width: auto; } .period-trigger { min-width: auto; + padding: var(--space-xs) var(--space-sm); + } + + .period-info { + flex-direction: row; + align-items: center; + gap: var(--space-xs); + } + + .period-label { + display: none; + } + + .period-name { + font-size: var(--text-xs); } .period-dropdown-panel { - left: -16px; - right: -16px; - width: calc(100% + 32px); + position: fixed; + left: 8px; + right: 8px; + top: 60px; + width: auto; + max-height: 70vh; } } diff --git a/reports-app/frontend/src/components/layout/DashboardHeader.vue b/reports-app/frontend/src/components/layout/DashboardHeader.vue index 57bdd0b..cd786db 100644 --- a/reports-app/frontend/src/components/layout/DashboardHeader.vue +++ b/reports-app/frontend/src/components/layout/DashboardHeader.vue @@ -29,7 +29,7 @@ v-model="selectedCompany" @company-changed="onCompanyChanged" /> -
+
{{ @@ -311,5 +311,10 @@ export default { .user-dropdown-item { padding: var(--space-sm); } + + /* Hide profile menu on mobile - use hamburger menu instead */ + .mobile-hide { + display: none !important; + } } diff --git a/reports-app/frontend/src/components/layout/HamburgerMenu.vue b/reports-app/frontend/src/components/layout/HamburgerMenu.vue index 1ccb5cf..4521be2 100644 --- a/reports-app/frontend/src/components/layout/HamburgerMenu.vue +++ b/reports-app/frontend/src/components/layout/HamburgerMenu.vue @@ -75,6 +75,16 @@ Statistici cache + +
+ + + @@ -93,6 +109,10 @@