/* ========================================
   VERITY AUDIT - MOBILE CSS
   Version 10.0 - Bottom Navigation Bar
   ======================================== */

/* ========================================
   0. STANDARDIZED MODAL STYLES (ALL SCREENS)
   Based on subscriptions.ejs detailsModal design
   ======================================== */
.modal-content {
  border-radius: 16px;
  border: none;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.modal-header {
  border-bottom: 2px solid #f1f5f9;
  padding: 24px;
  background: white;
}

.modal-title {
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-title i {
  color: #3b82f6;
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  border-top: 1px solid #f1f5f9;
  padding: 20px 24px;
  background: white;
}

.modal-header .btn-close {
  padding: 12px;
  margin: -8px -8px -8px 0;
}

.modal-backdrop.show {
  opacity: 0.5;
}

.modal.fade .modal-dialog {
  transition: transform 0.2s ease-out;
}

.modal.show .modal-dialog {
  transform: none;
}

/* ========================================
   1. HIDE TOP NAVBAR ON MOBILE
   ======================================== */
@media (max-width: 1024px) {
  .desktop-nav {
    display: none !important;
  }
  
  .desktop-footer {
    display: none !important;
  }
}

/* ========================================
   2. BOTTOM NAVIGATION BAR
   ======================================== */
.bottom-nav {
  display: none;
}

@media (max-width: 1024px) {
  .bottom-nav {
    display: flex !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 60px !important;
    background: #ffffff !important;
    border-top: 1px solid #e5e7eb !important;
    z-index: 1000 !important;
    justify-content: space-around !important;
    align-items: center !important;
    padding: 0 4px !important;
    padding-bottom: env(safe-area-inset-bottom, 0px) !important;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.06) !important;
  }
  
  .bottom-nav-item {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 1 !important;
    padding: 6px 4px !important;
    text-decoration: none !important;
    color: #6b7280 !important;
    background: transparent !important;
    border: none !important;
    border-radius: 10px !important;
    transition: all 0.15s ease !important;
    -webkit-tap-highlight-color: transparent !important;
    cursor: pointer !important;
    position: relative !important;
  }
  
  .bottom-nav-item i {
    font-size: 22px !important;
    margin-bottom: 2px !important;
    transition: all 0.15s ease !important;
  }
  
  .bottom-nav-item span {
    font-size: 10px !important;
    font-weight: 500 !important;
    white-space: nowrap !important;
  }
  
  .bottom-nav-item.active {
    color: #3b82f6 !important;
  }
  
  .bottom-nav-item.active i {
    transform: scale(1.1) !important;
  }
  
  .bottom-nav-item:active {
    background: #f3f4f6 !important;
    transform: scale(0.95) !important;
  }
}

/* ========================================
   3. MORE MENU (Bottom Sheet)
   NOTE: These styles are now handled by mobile-nav.ejs
   Keeping minimal defaults here to avoid conflicts
   ======================================== */
.more-menu-overlay,
.more-menu {
  display: none;
  pointer-events: none;
}

@media (max-width: 1024px) {
  /* Only show when explicitly activated via .active class */
  .more-menu-overlay:not(.active),
  .more-menu:not(.active) {
    display: none !important;
    pointer-events: none !important;
  }

  .more-menu-overlay.active {
    display: block !important;
    position: fixed !important;
    inset: 0 !important;
    background: rgba(0, 0, 0, 0.5) !important;
    z-index: 1100 !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }

  .more-menu.active {
    display: block !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    background: #ffffff !important;
    border-radius: 20px 20px 0 0 !important;
    z-index: 1110 !important;
    transform: translateY(0) !important;
    max-height: 70vh !important;
    overflow-y: auto !important;
    padding-bottom: env(safe-area-inset-bottom, 0px) !important;
    box-shadow: 0 -10px 40px rgba(0,0,0,0.15) !important;
    pointer-events: auto !important;
  }
  
  .more-menu-handle {
    width: 36px !important;
    height: 4px !important;
    background: #d1d5db !important;
    border-radius: 2px !important;
    margin: 12px auto 8px !important;
  }
  
  .more-menu-header {
    padding: 8px 20px 14px !important;
    border-bottom: 1px solid #e5e7eb !important;
  }
  
  .more-menu-title {
    font-size: 17px !important;
    font-weight: 600 !important;
    color: #111827 !important;
  }
  
  .more-menu-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 8px !important;
    padding: 16px !important;
  }
  
  .more-menu-item {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    padding: 14px 8px !important;
    border-radius: 14px !important;
    text-decoration: none !important;
    color: #374151 !important;
    transition: all 0.15s ease !important;
    -webkit-tap-highlight-color: transparent !important;
  }
  
  .more-menu-item:active {
    background: #f3f4f6 !important;
    transform: scale(0.95) !important;
  }
  
  .more-menu-item i {
    font-size: 24px !important;
    color: #3b82f6 !important;
    margin-bottom: 6px !important;
  }
  
  .more-menu-item span {
    font-size: 11px !important;
    font-weight: 500 !important;
    text-align: center !important;
  }
  
  .more-menu-list {
    padding: 8px 16px 20px !important;
  }
  
  .more-menu-link {
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
    padding: 14px !important;
    border-radius: 12px !important;
    text-decoration: none !important;
    color: #374151 !important;
    transition: all 0.15s ease !important;
    -webkit-tap-highlight-color: transparent !important;
  }
  
  .more-menu-link:active {
    background: #f3f4f6 !important;
  }
  
  .more-menu-link i {
    font-size: 20px !important;
    color: #6b7280 !important;
    width: 24px !important;
  }
  
  .more-menu-link span {
    font-size: 15px !important;
    font-weight: 500 !important;
  }
  
  .more-menu-link.danger {
    color: #ef4444 !important;
  }
  
  .more-menu-link.danger i {
    color: #ef4444 !important;
  }
  
  .more-menu-divider {
    height: 1px !important;
    background: #e5e7eb !important;
    margin: 8px 16px !important;
  }
}

/* ========================================
   4. MAIN CONTENT - Adjust for Bottom Nav
   ======================================== */
@media (max-width: 1024px) {
  .main-content,
  main.container-fluid,
  main.container {
    margin-left: 0 !important;
    padding: 12px !important;
    padding-top: 16px !important;
    padding-bottom: 80px !important;
    min-height: 100vh !important;
    width: 100% !important;
    max-width: 100% !important;
    background: #f8fafc !important;
  }
  
  main.mt-4 {
    margin-top: 0 !important;
  }
}

/* ========================================
   5. PAGE HEADER - Clean
   ======================================== */
@media (max-width: 768px) {
  .page-header {
    margin-bottom: 16px !important;
    gap: 12px !important;
  }
  
  .page-title {
    font-size: 22px !important;
    font-weight: 700 !important;
    color: #111827 !important;
    letter-spacing: -0.3px !important;
  }
}

/* ========================================
   6. AUDIT INFO CARD
   ======================================== */
@media (max-width: 768px) {
  .audit-info-card {
    padding: 14px !important;
    margin-bottom: 12px !important;
    border-radius: 14px !important;
    background: #ffffff !important;
    border: none !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06) !important;
  }
  
  .audit-title {
    font-size: 17px !important;
    font-weight: 700 !important;
    color: #111827 !important;
    margin-bottom: 12px !important;
  }
  
  .audit-details {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }
  
  .detail-item {
    background: #f8fafc !important;
    padding: 10px 12px !important;
    border-radius: 10px !important;
    border: none !important;
  }
  
  .detail-label {
    font-size: 10px !important;
    font-weight: 600 !important;
    color: #9ca3af !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    margin-bottom: 2px !important;
  }
  
  .detail-value {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #111827 !important;
  }
}

/* ========================================
   7. WORKFLOW TABS - iOS Style
   ======================================== */
@media (max-width: 768px) {
  .workflow-tabs {
    display: flex !important;
    background: #e5e7eb !important;
    border-radius: 12px !important;
    padding: 3px !important;
    margin-bottom: 12px !important;
    gap: 0 !important;
  }
  
  .workflow-tab {
    flex: 1 !important;
    min-width: 0 !important;
    padding: 10px 8px !important;
    border-radius: 10px !important;
    border: none !important;
    background: transparent !important;
    text-align: center !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
  }
  
  .workflow-tab i {
    font-size: 18px !important;
    display: block !important;
    margin-bottom: 3px !important;
    color: #6b7280 !important;
  }
  
  .workflow-tab h6 {
    font-size: 11px !important;
    font-weight: 600 !important;
    margin: 0 !important;
    color: #6b7280 !important;
    white-space: nowrap !important;
  }
  
  .workflow-tab.active {
    background: #ffffff !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important;
  }
  
  .workflow-tab.active i {
    color: #3b82f6 !important;
  }
  
  .workflow-tab.active h6 {
    color: #3b82f6 !important;
  }
}

/* ========================================
   8. SUB TABS - Pills
   ======================================== */
@media (max-width: 768px) {
  .sub-tabs {
    display: flex !important;
    gap: 6px !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 2px 0 8px 0 !important;
    margin: 0 -12px 12px -12px !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
    scrollbar-width: none !important;
  }
  
  .sub-tabs::-webkit-scrollbar {
    display: none !important;
  }
  
  .sub-tab {
    flex: 0 0 auto !important;
    padding: 8px 14px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    white-space: nowrap !important;
    border-radius: 20px !important;
    background: #ffffff !important;
    color: #6b7280 !important;
    border: 1px solid #e5e7eb !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
  }
  
  .sub-tab:active {
    transform: scale(0.97) !important;
  }
  
  .sub-tab.active {
    background: #3b82f6 !important;
    color: #ffffff !important;
    border-color: #3b82f6 !important;
    font-weight: 600 !important;
  }
}

/* ========================================
   9. STATUS TABS
   ======================================== */
@media (max-width: 768px) {
  .status-tab-bar {
    display: flex !important;
    gap: 6px !important;
    overflow-x: auto !important;
    padding: 0 0 8px 0 !important;
    margin-bottom: 12px !important;
    background: transparent !important;
    border: none !important;
  }
  
  .status-tab-bar::-webkit-scrollbar {
    display: none !important;
  }
  
  .status-tab {
    flex: 0 0 auto !important;
    padding: 8px 12px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    white-space: nowrap !important;
    border-radius: 20px !important;
    background: #ffffff !important;
    color: #6b7280 !important;
    border: 1px solid #e5e7eb !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
  }
  
  .status-tab.active {
    background: #3b82f6 !important;
    color: #ffffff !important;
    border-color: #3b82f6 !important;
    font-weight: 600 !important;
  }
  
  .tab-badge {
    padding: 1px 6px !important;
    border-radius: 10px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
  }
  
  .status-tab.active .tab-badge {
    background: rgba(255,255,255,0.2) !important;
    color: #ffffff !important;
  }
  
  .status-tab:not(.active) .tab-badge {
    background: #e5e7eb !important;
    color: #6b7280 !important;
  }
}

/* ========================================
   10. CARDS
   ======================================== */
@media (max-width: 768px) {
  .card,
  .card-modern {
    border-radius: 14px !important;
    border: none !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06) !important;
    margin-bottom: 12px !important;
    padding: 14px !important;
    background: #ffffff !important;
    overflow: hidden !important;
  }
  
  .card-header,
  .card-header-modern {
    padding: 12px 14px !important;
    margin: -14px -14px 12px -14px !important;
    background: #f8fafc !important;
    border-bottom: 1px solid #e5e7eb !important;
  }
  
  .card-title,
  .card-title-modern {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #111827 !important;
  }
}

/* ========================================
   11. STATS GRID
   ======================================== */
@media (max-width: 768px) {
  .stats-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
    margin-bottom: 16px !important;
  }
  
  .stat-card,
  .summary-card {
    padding: 14px !important;
    border-radius: 14px !important;
    background: #ffffff !important;
    border: none !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06) !important;
  }
  
  .stat-icon {
    width: 36px !important;
    height: 36px !important;
    border-radius: 10px !important;
    margin-bottom: 8px !important;
  }
  
  .stat-value {
    font-size: 22px !important;
    font-weight: 700 !important;
    color: #111827 !important;
  }
  
  .stat-label {
    font-size: 11px !important;
    color: #6b7280 !important;
    font-weight: 500 !important;
  }
}

@media (max-width: 380px) {
  .stats-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ========================================
   12. SEARCH & FILTER
   ======================================== */
@media (max-width: 768px) {
  .search-filter-section {
    padding: 12px !important;
    border-radius: 14px !important;
    margin-bottom: 12px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    background: #ffffff !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06) !important;
  }
  
  .search-input {
    background: #f8fafc !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 10px !important;
    padding: 10px 14px 10px 40px !important;
    font-size: 15px !important;
  }
  
  .search-input:focus {
    border-color: #3b82f6 !important;
    background: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
  }
  
  .filter-select {
    border-radius: 10px !important;
    border: 1px solid #e5e7eb !important;
    background: #f8fafc !important;
  }
}

/* ========================================
   13. TABLES
   ======================================== */
@media (max-width: 1024px) {
  .table-responsive {
    margin: 0 -14px !important;
    padding: 0 14px !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
  
  table th {
    font-size: 11px !important;
    font-weight: 600 !important;
    color: #6b7280 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.3px !important;
    padding: 10px 12px !important;
    background: #f8fafc !important;
    white-space: nowrap !important;
  }
  
  table td {
    padding: 10px 12px !important;
    font-size: 13px !important;
    color: #374151 !important;
  }
}

/* ========================================
   14. BUTTONS
   ======================================== */
@media (max-width: 768px) {
  .btn {
    padding: 10px 16px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    border-radius: 10px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    min-height: 44px !important;
    transition: all 0.15s ease !important;
  }
  
  .btn:active {
    transform: scale(0.97) !important;
  }
  
  .btn-sm {
    padding: 8px 12px !important;
    font-size: 13px !important;
    min-height: 36px !important;
  }
  
  .btn-primary {
    background: #3b82f6 !important;
    border-color: #3b82f6 !important;
    color: #ffffff !important;
  }
  
  .btn-success {
    background: #22c55e !important;
    border-color: #22c55e !important;
  }
  
  .btn-danger {
    background: #ef4444 !important;
    border-color: #ef4444 !important;
  }
  
  .btn-warning {
    background: #f59e0b !important;
    border-color: #f59e0b !important;
  }
}

/* ========================================
   15. FORMS
   ======================================== */
@media (max-width: 768px) {
  .form-control,
  .form-select,
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="number"],
  input[type="date"],
  textarea,
  select {
    padding: 11px 14px !important;
    font-size: 16px !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 10px !important;
    background: #ffffff !important;
    -webkit-appearance: none !important;
  }
  
  .form-control:focus,
  input:focus,
  select:focus,
  textarea:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
    outline: none !important;
  }
  
  .form-label {
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #374151 !important;
    margin-bottom: 6px !important;
  }
}

/* ========================================
   16. MODALS - Bottom Sheet
   ======================================== */
@media (max-width: 768px) {
  .modal {
    z-index: 1200 !important;
  }

  .modal-backdrop {
    z-index: 1190 !important;
  }

  .modal-dialog {
    margin: 20px auto !important;
    max-width: calc(100% - 40px) !important;
    position: relative !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
  }

  .modal-content {
    border-radius: 16px !important;
    border: none !important;
    max-height: 75vh !important;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2) !important;
    background: #fff !important;
  }

  .modal-header {
    padding: 16px 20px !important;
    border-bottom: 1px solid #e5e7eb !important;
    position: relative !important;
    border-radius: 16px 16px 0 0 !important;
    background: #fff !important;
  }

  .modal-header::before {
    display: none !important;
  }

  .modal-title {
    font-size: 17px !important;
    font-weight: 600 !important;
  }

  .modal-body {
    padding: 16px 20px !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    max-height: 50vh !important;
    background: #fff !important;
  }

  .modal-footer {
    padding: 12px 20px 16px !important;
    border-top: 1px solid #e5e7eb !important;
    gap: 10px !important;
    background: #fff !important;
  }

  .modal-footer .btn {
    flex: 1 !important;
    padding: 12px !important;
    border-radius: 10px !important;
  }
}

/* ========================================
   17. BADGES
   ======================================== */
@media (max-width: 768px) {
  .badge {
    padding: 4px 8px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
  }
  
  .badge-success, .bg-success {
    background: #dcfce7 !important;
    color: #166534 !important;
  }
  
  .badge-warning, .bg-warning {
    background: #fef3c7 !important;
    color: #92400e !important;
  }
  
  .badge-danger, .bg-danger {
    background: #fee2e2 !important;
    color: #991b1b !important;
  }
  
  .badge-info, .bg-info,
  .badge-primary, .bg-primary {
    background: #dbeafe !important;
    color: #1e40af !important;
  }
}

/* ========================================
   18. QUICK ACTIONS
   ======================================== */
@media (max-width: 768px) {
  .quick-actions {
    padding: 14px !important;
    border-radius: 14px !important;
    margin-bottom: 12px !important;
    background: #ffffff !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06) !important;
  }
  
  .section-title {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #111827 !important;
    margin-bottom: 12px !important;
  }
  
  .action-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 8px !important;
  }
  
  .action-btn {
    padding: 12px 8px !important;
    border-radius: 12px !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    flex-direction: column !important;
    text-align: center !important;
    gap: 6px !important;
    background: #f9fafb !important;
    border: none !important;
    color: #374151 !important;
  }
  
  .action-btn i {
    font-size: 20px !important;
    color: #3b82f6 !important;
  }
  
  .action-btn:active {
    background: #f3f4f6 !important;
    transform: scale(0.97) !important;
  }
}

@media (max-width: 380px) {
  .action-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* ========================================
   19. TASK ITEMS
   ======================================== */
@media (max-width: 768px) {
  .task-section {
    padding: 14px !important;
    border-radius: 14px !important;
    margin-bottom: 12px !important;
    background: #ffffff !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06) !important;
  }
  
  .task-item {
    padding: 12px !important;
    border-radius: 12px !important;
    background: #f9fafb !important;
    border: none !important;
    margin-bottom: 8px !important;
  }
  
  .task-item:active {
    background: #f3f4f6 !important;
  }
  
  .task-title {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #111827 !important;
  }
  
  .task-meta {
    font-size: 12px !important;
    color: #6b7280 !important;
  }
}

/* ========================================
   20. EMPTY STATE
   ======================================== */
@media (max-width: 768px) {
  .empty-state {
    padding: 32px 16px !important;
    text-align: center !important;
  }
  
  .empty-icon {
    font-size: 40px !important;
    color: #d1d5db !important;
    margin-bottom: 12px !important;
  }
  
  .empty-text {
    font-size: 14px !important;
    color: #9ca3af !important;
  }
}

/* ========================================
   21. NOTIFICATIONS - Above bottom nav
   ======================================== */
@media (max-width: 768px) {
  .notification-container {
    top: auto !important;
    bottom: 76px !important;
    left: 12px !important;
    right: 12px !important;
    max-width: none !important;
  }
  
  .notification {
    padding: 12px 16px !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15) !important;
  }
}

/* ========================================
   22. HELP BUTTON - Above bottom nav
   ======================================== */
@media (max-width: 768px) {
  .help-btn,
  #helpChatbotBtn,
  [id*="helpBtn"] {
    bottom: 76px !important;
    right: 12px !important;
    width: 48px !important;
    height: 48px !important;
    border-radius: 24px !important;
    font-size: 20px !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3) !important;
  }
}

/* ========================================
   23. ALERTS
   ======================================== */
@media (max-width: 768px) {
  .alert {
    padding: 12px 14px !important;
    border-radius: 10px !important;
    font-size: 13px !important;
    border: none !important;
    margin-bottom: 12px !important;
  }
}

/* ========================================
   24. DROPDOWNS
   ======================================== */
@media (max-width: 768px) {
  .dropdown-menu {
    border-radius: 14px !important;
    border: none !important;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15) !important;
    padding: 6px !important;
  }
  
  .dropdown-item {
    padding: 11px 14px !important;
    font-size: 14px !important;
    border-radius: 10px !important;
  }
  
  .dropdown-item:active {
    background: #f3f4f6 !important;
  }
}

/* ========================================
   25. BREADCRUMB
   ======================================== */
@media (max-width: 768px) {
  .breadcrumb-custom {
    padding: 10px 12px !important;
    border-radius: 10px !important;
    font-size: 12px !important;
    margin-bottom: 12px !important;
    background: #ffffff !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06) !important;
  }
}

/* ========================================
   26. PWA SAFE AREAS
   ======================================== */
@media (display-mode: standalone) {
  .main-content,
  main.container-fluid,
  main.container {
    padding-top: calc(16px + env(safe-area-inset-top, 0px)) !important;
    padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)) !important;
  }
  
  .bottom-nav {
    height: calc(60px + env(safe-area-inset-bottom, 0px)) !important;
  }
}

/* ========================================
   27. TOUCH OPTIMIZATION
   ======================================== */
@media (pointer: coarse) {
  * {
    -webkit-tap-highlight-color: transparent !important;
  }
  
  .btn,
  .nav-item,
  .workflow-tab,
  .sub-tab,
  .status-tab,
  .task-item,
  .action-btn,
  .dropdown-item,
  .bottom-nav-item,
  .more-menu-item,
  .more-menu-link {
    min-height: 44px !important;
  }
}

/* ========================================
   28. LANDSCAPE
   ======================================== */
@media (max-width: 900px) and (orientation: landscape) {
  .main-content,
  main.container-fluid,
  main.container {
    padding-bottom: 70px !important;
  }
  
  .bottom-nav {
    height: 52px !important;
  }
  
  .bottom-nav-item i {
    font-size: 20px !important;
  }
  
  .bottom-nav-item span {
    font-size: 9px !important;
  }
  
  .more-menu {
    max-height: 80vh !important;
  }
}

/* ========================================
   29. REDUCED MOTION
   ======================================== */
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}

/* ========================================
   30. PRINT
   ======================================== */
@media print {
  .bottom-nav,
  .more-menu,
  .more-menu-overlay,
  .help-btn,
  .notification-container {
    display: none !important;
  }
  
  .main-content,
  main {
    margin: 0 !important;
    padding: 0 !important;
  }
}
