   /* =========================================
           1. BASE SETTINGS
           ========================================= */
   html {
       font-size: 16px;
       /* 1rem = 16px baseline */
   }

   :root {
       --app-bg: #ffffff;
       --desktop-bg: #202124;
       --primary-color: #3b82f6;
       --primary-color: #8BA49A;
       --text-color: #202124;
       --text-muted: #666666;
       --border-color: #e0e0e0;
       --sidebar-width: 15.625rem;
       /* 250px */

       /* UI Dimensions in REM */
       --header-height: 3.75rem;
       /* 60px */
       --footer-height: 3.75rem;
       /* 60px */
       --spacing-sm: 0.5rem;
       /* 8px */
       --spacing-md: 1rem;
       /* 16px */
       --spacing-lg: 1.5rem;
       /* 24px */
       --spacing-xl: 2rem;
       /* 32px */
       --radius-md: 0.75rem;
       /* 12px */
       --radius-lg: 1.5rem;
       /* 24px */
   }

   * {
       box-sizing: border-box;
       margin: 0;
       padding: 0;
       -webkit-tap-highlight-color: transparent;
       -webkit-font-smoothing: antialiased;
       -moz-osx-font-smoothing: grayscale;
   }

   /* =========================================
           2. DEFAULT STATE (MOBILE < 768px)
           ========================================= */
   body {
       background-color: var(--app-bg);
       font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
       color: var(--text-color);
       height: 100dvh;
       width: 100vw;
       overflow: hidden;
       display: block;
       touch-action: manipulation;
       font-size: 1rem;
   }

   .app-container {
       background-color: var(--app-bg);
       height: 100%;
       width: 100%;
       position: relative;
       display: flex;
       flex-direction: column;
       max-width: none;
       box-shadow: none;
       border-radius: 0;
       border: none;
   }

   .app-layout {
       display: flex;
       flex-direction: column;
       height: 100%;
       width: 100%;
   }

   .app-sidebar {
       display: none;
       /* Hidden on mobile */
   }

   .app-main {
       flex: 1;
       display: flex;
       flex-direction: column;
       overflow: hidden;
   }

   /* =========================================
           3. TABLET (768px - 1436px)
              Covers: iPad Mini, iPad, iPad Air, iPad Pro
           ========================================= */
   @media (min-width: 768px) and (max-width: 1436px) {
       body {
           background-color: var(--app-bg);
       }

       .app-container {
           max-width: 100%;
           box-shadow: none;
           border-radius: 0;
           border: none;
       }

       /* Larger touch targets for tablet */
       .btn {
           min-height: 3.5rem;
           /* 56px */
           font-size: 1.125rem;
       }

       .app-content {
           padding: var(--spacing-lg);
       }

       h1 {
           font-size: 2rem;
       }

       .card {
           padding: var(--spacing-lg);
       }
   }

   /* =========================================
           4. TABLET LANDSCAPE (768px - 1436px)
              Sidebar layout for wider tablet views
           ========================================= */
   @media (min-width: 1024px) and (max-width: 1436px) and (orientation: landscape) {

       /* Enable sidebar layout for tablet landscape */
       .app-layout {
           flex-direction: row;
       }

       .app-sidebar {
           display: flex;
           flex-direction: column;
           width: var(--sidebar-width);
           background: #f8f9fa;
           border-right: 1px solid var(--border-color);
           padding: var(--spacing-lg);
           flex-shrink: 0;
       }

       .app-main {
           flex: 1;
       }

       /* Hide bottom nav in landscape, use sidebar instead */
       .app-footer {
           display: none;
       }

       /* Sidebar navigation items */
       .sidebar-nav {
           display: flex;
           flex-direction: column;
           gap: var(--spacing-sm);
       }

       .sidebar-item {
           padding: var(--spacing-md);
           border-radius: var(--radius-md);
           cursor: pointer;
           font-weight: 500;
           display: flex;
           align-items: center;
           gap: var(--spacing-sm);
           transition: background 0.2s;
       }

       .sidebar-item:hover {
           background: #e9ecef;

       }

       .sidebar-item.active {
           background: var(--primary-color);
           color: white;
       }

       .app-content {
           padding: var(--spacing-xl);
           max-width: 50rem;
           /* Constrain content width for readability */
           margin: 0 auto;
           width: 100%;
       }

       h1 {
           font-size: 2.25rem;
       }

       .btn {
           min-height: 3.5rem;
           font-size: 1.125rem;
       }
   }

   /* =========================================
           5. DESKTOP MOCKUP MODE (≥ 1437px)
              iPad Pro 12.9" landscape is 1366px, so desktop starts after
           ========================================= */
   @media (min-width: 1437px) {
       body {
           background-color: var(--desktop-bg);
           display: flex;
           justify-content: center;
           align-items: center;
           overflow: auto;
           padding: var(--spacing-lg);
           min-height: 100vh;
       }

       .app-container {
           /* Layout constraints remain in PX for mockup */
           width: 414px;
           height: 850px;
           max-height: 90vh;

           box-shadow: 0 1.25rem 3.125rem rgba(0, 0, 0, 0.5);
           border-radius: var(--radius-lg);
           border: 0.5rem solid #111;
           overflow: hidden;
       }

       .app-layout {
           flex-direction: column;
       }

       .app-sidebar {
           display: none;
       }

       .app-footer {
           display: flex;
       }

       .app-content {
           padding: var(--spacing-md);
       }

       h1 {
           font-size: 1.75rem;
       }

       .btn {
           min-height: 3rem;
           font-size: 1rem;
       }
   }

   /* =========================================
           6. APP INTERNAL COMPONENTS
           ========================================= */
   .app-header {
       height: var(--header-height);
       display: flex;
       align-items: center;
       padding: 0 var(--spacing-md);
       background: #fff;
       border-bottom: 1px solid var(--border-color);
       font-weight: 700;
       font-size: 1.25rem;
       z-index: 10;
       padding-top: max(var(--spacing-md), env(safe-area-inset-top));
       height: calc(var(--header-height) + env(safe-area-inset-top));
       flex-shrink: 0;
   }

   .app-content {
       flex: 1;
       overflow-y: auto;
       -webkit-overflow-scrolling: touch;
       overscroll-behavior-y: none;
       padding: var(--spacing-md);
       scrollbar-width: none;
   }

   .app-content::-webkit-scrollbar {
       display: none;
   }

   .app-footer {
       height: var(--footer-height);
       display: flex;
       justify-content: space-around;
       align-items: center;
       background: #fff;
       border-top: 1px solid var(--border-color);
       padding-bottom: env(safe-area-inset-bottom);
       height: calc(var(--footer-height) + env(safe-area-inset-bottom));
       flex-shrink: 0;
       font-size: 1.5rem;
   }

   /* Card Component */
   .card {
       background: #f8f9fa;
       border: 1px solid var(--border-color);
       border-radius: var(--radius-md);
       padding: var(--spacing-md);
       margin-bottom: var(--spacing-md);
       box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.05);
   }

   /* Button Component */
   .btn {
       background-color: var(--primary-color);
       color: white;
       border: none;
       padding: 0.875rem 1.25rem;
       min-height: 3rem;
       /* 48px touch target */
       border-radius: var(--radius-md);
       font-weight: 600;
       font-size: 1rem;
       width: 100%;
       cursor: pointer;
       user-select: none;
       -webkit-user-select: none;
       transition: background 0.2s, transform 0.1s;
       display: flex;
       align-items: center;
       justify-content: center;
   }

   .btn:active {
       background-color: #2563eb;
       background-color: #cbded3;
       transform: scale(0.98);
   }

   /* Typography Scale */
   h1 {
       font-size: 1.75rem;
       margin-bottom: var(--spacing-sm);
       line-height: 1.2;
   }

   h3 {
       font-size: 1.25rem;
       margin-bottom: var(--spacing-sm);
   }

   p {
       font-size: 1rem;
       line-height: 1.5;
       color: var(--text-muted);
       margin-bottom: var(--spacing-md);
   }

   small {
       font-size: 0.875rem;
       color: #999;
   }

   /* Form Inputs */
   input[type="text"],
   textarea {
       width: 100%;
       padding: 0.875rem;
       font-size: 1rem;
       border: 1px solid var(--border-color);
       border-radius: var(--radius-md);
       margin-bottom: var(--spacing-md);
       background: #fff;
       font-family: inherit;
   }

   input:focus,
   textarea:focus {
       outline: 2px solid var(--primary-color);
       border-color: transparent;
   }

   /* Tablet-specific sidebar styles (only visible in tablet landscape) */
   .sidebar-logo {
       font-size: 1.5rem;
       font-weight: 700;
       margin-bottom: var(--spacing-xl);
       color: var(--primary-color);
   }

   .sidebar-section {
       margin-top: var(--spacing-lg);
   }

   .sidebar-section-title {
       font-size: 0.75rem;
       text-transform: uppercase;
       color: var(--text-muted);
       margin-bottom: var(--spacing-sm);
       font-weight: 600;
       letter-spacing: 0.05em;
   }

   /* =========================================
           7. DEVICE REFERENCE (For Testing)
           ========================================= */
   /*
        iPad Device Resolutions (CSS Pixels):
        - iPad Mini: 768 x 1024 (portrait)
        - iPad 10.2": 810 x 1080 (portrait)
        - iPad Air: 820 x 1180 (portrait)
        - iPad Pro 11": 834 x 1194 (portrait) / 1194 x 834 (landscape)
        - iPad Pro 12.9": 1024 x 1366 (portrait) / 1366 x 1024 (landscape)
        
        Breakpoints Used:
        - Mobile: < 768px
        - Tablet: 768px - 1436px (covers all iPads)
        - Desktop: ≥ 1437px (iPad Pro 12.9" landscape max is 1366px)
        */
