:root {
      --bg-color: #F2F2F7; 
      --card-bg: rgba(255, 255, 255, 0.75); 
      --glass-border: 1px solid rgba(255, 255, 255, 0.8);
      --primary: #007AFF; 
      --primary-dark: #0056b3;
      --text-main: #1C1C1E; 
      --text-muted: #8E8E93;
      --danger: #FF3B30; 
      --success: #34C759; 
      --warning: #FF9500; 
      --radius: 24px;
      --shadow-soft: 0 10px 40px rgba(0, 0, 0, 0.05);
    }
    
    * { box-sizing: border-box; margin: 0; padding: 0; font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif; }
    
    body { 
      background: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
      color: var(--text-main); 
      -webkit-font-smoothing: antialiased; 
      overflow-x: hidden; 
      touch-action: manipulation; 
      background-attachment: fixed;
    }
    
    #app-container { 
      width: 100%; max-width: 800px; margin: 0 auto; min-height: 100vh; position: relative; padding-bottom: 80px;
    }

    .glass { 
      background: var(--card-bg); backdrop-filter: blur(24px) saturate(180%); -webkit-backdrop-filter: blur(24px) saturate(180%); 
      border: var(--glass-border); border-radius: var(--radius); box-shadow: var(--shadow-soft); 
    }

    .view { display: none; padding: 24px; animation: fadeSlideIn 0.4s cubic-bezier(0.2, 0.8, 0.2, 1); }
    .view.active { display: block; }
    @keyframes fadeSlideIn { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }

    h1 { font-size: clamp(28px, 6vw, 36px); font-weight: 800; margin-bottom: 8px; text-align: center; letter-spacing: -0.5px;}
    p.subtitle { color: var(--text-muted); font-size: clamp(14px, 4vw, 16px); margin-bottom: 32px; text-align: center; }
    
    @keyframes floatLogo { 0% { transform: translateY(0px); } 50% { transform: translateY(-10px); } 100% { transform: translateY(0px); } }
    
    .brand-logo { 
      width: 120px; height: 120px; 
      background: transparent; /* Background dibikin transparan/putih */
      border-radius: 28px; 
      margin: 60px auto 20px; 
      display: flex; align-items: center; justify-content: center; flex-direction: column;
      animation: floatLogo 4s ease-in-out infinite;
      color: #8B4513; /* 🌟 Berubah jadi warna coklat */
      font-weight: 800; font-size: 20px; letter-spacing: 0.5px;
    }
    /* Tambahan CSS khusus untuk gambar logonya */
    .brand-logo img {
      width: 64px; 
      height: 64px;
      margin-bottom: 6px;
      border-radius: 16px;
    }

    .input-group { margin-bottom: 16px; position: relative; display: flex; align-items: center; width: 100%; flex-wrap: wrap;}
    .input-group input, .input-group textarea, .custom-input, select.custom-input { 
      width: 100%; padding: 18px 20px; border-radius: 18px; border: 1px solid rgba(0,0,0,0.06); 
      background: rgba(255,255,255,0.9); font-size: 16px; outline: none; transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); 
      font-family: inherit; color: var(--text-main); font-weight: 500;
    }
    .input-group input:focus, .input-group textarea:focus, .custom-input:focus { background: #ffffff; box-shadow: 0 0 0 3px rgba(0,122,255,0.15); border-color: var(--primary); transform: translateY(-2px);}
    .icon-btn { position: absolute; right: 16px; background: none; border: none; color: var(--text-muted); cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; z-index: 10;}
    
    button { font-family: inherit; }
    button.btn-primary { width: 100%; padding: 18px; background: var(--primary); color: white; border: none; border-radius: 18px; font-size: 17px; font-weight: 700; cursor: pointer; box-shadow: 0 8px 20px rgba(0,122,255,0.3); margin-top: 8px; transition: all 0.2s; letter-spacing: 0.5px;}
    button.btn-primary:active { transform: scale(0.95); opacity: 0.9; box-shadow: 0 4px 10px rgba(0,122,255,0.2); }
    button.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }
    
    button.btn-secondary { width: 100%; padding: 18px; background: rgba(0,0,0,0.05); color: var(--text-main); border: none; border-radius: 18px; font-size: 17px; font-weight: 700; cursor: pointer; margin-top: 8px; transition: 0.2s; }
    button.btn-secondary:active { transform: scale(0.95); background: rgba(0,0,0,0.1);}
    
    button.btn-danger { width: 100%; padding: 18px; background: rgba(255,59,48,0.1); color: var(--danger); border: none; border-radius: 18px; font-size: 17px; font-weight: 700; cursor: pointer; margin-top: 8px; transition: 0.2s; }
    button.btn-danger:active { transform: scale(0.95); background: rgba(255,59,48,0.2);}
    
    .link-text { color: var(--primary); font-size: 14px; font-weight: 600; text-align: center; display: block; margin-top: 20px; cursor: pointer; transition: 0.2s;}

    .dash-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; padding-top: 10px;}
  /* 🌟 DESAIN KOTAK PROFIL PREMIUM 🌟 */
    .profile-pic { 
      width: 48px; height: 48px; /* Ukuran disesuaikan agar pas di dalam kotak */
      border-radius: 50%; object-fit: cover; 
      border: 2px solid white; 
      box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    }
    .menu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 24px;}
    .menu-card { padding: 24px 16px; text-align: center; cursor: pointer; transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px solid rgba(0,0,0,0.02);}
    .menu-card:active { transform: scale(0.94); background: rgba(255,255,255,0.95);}

    .btn-ios-nav { position: relative; z-index: 100; background: rgba(255,255,255,0.9); backdrop-filter: blur(10px); border: 1px solid rgba(0, 0, 0, 0.05); border-radius: 16px; width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: 0.3s ease; color: var(--primary); box-shadow: 0 4px 12px rgba(0,0,0,0.05); }
    .btn-ios-nav:active { transform: scale(0.85); background: #f0f0f5; }

    .btn-logout-icon { color: var(--danger); background: rgba(255, 59, 48, 0.1); border: 1px solid rgba(255, 59, 48, 0.2); position: relative; z-index: 100; backdrop-filter: blur(10px); border-radius: 16px; width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: 0.3s ease; box-shadow: 0 4px 12px rgba(255,59,48,0.1); }
    .btn-logout-icon:active { transform: scale(0.85); background: rgba(255, 59, 48, 0.2); }

    @keyframes spinSync { 100% { transform: rotate(360deg); } }
    .is-syncing { background: rgba(255, 149, 0, 0.1); border-color: rgba(255, 149, 0, 0.3); pointer-events: none;}
    .is-syncing svg { animation: spinSync 1s linear infinite; stroke: var(--warning); }
    
    .sync-badge { position:absolute; top:-4px; right:-4px; background:var(--danger); color:white; font-size:10px; font-weight:bold; padding:2px 6px; border-radius:10px; border:2px solid white; display:none; }
    .sync-badge.show { display:block; }

    #toast { position: fixed; top: -100px; left: 50%; transform: translateX(-50%); background: rgba(25, 25, 27, 0.85); backdrop-filter: blur(20px); color: white; padding: 16px 24px; border-radius: 30px; box-shadow: 0 10px 40px rgba(0,0,0,0.2); font-weight: 600; z-index: 9999; transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1); text-align: center; width: 90%; max-width: 400px; font-size: 14px;}
    #toast.show { top: 40px; } 
    #toast.error { background: rgba(255, 59, 48, 0.9); } 
    #toast.success { background: rgba(52, 199, 89, 0.9); }
    #toast.warning { background: rgba(255, 149, 0, 0.9); }

    .modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); backdrop-filter: blur(8px); align-items: center; justify-content: center; opacity: 0; transition: 0.3s; z-index: 2000; overflow-y:auto; padding: 20px 0;}
    .modal-overlay.active { display: flex; opacity: 1; }
    .modal-content { width: 92%; max-width: 440px; padding: 32px 24px; transform: scale(0.9); transition: 0.4s cubic-bezier(0.2, 0.8, 0.2, 1); max-height: 85vh; overflow-y: auto;}
    .modal-overlay.active .modal-content { transform: scale(1); }
    
    #action-modal { z-index: 6000; }
    #modal-expedisi { z-index: 7500 !important; }
    
    .loader { display: none; width: 24px; height: 24px; border: 3px solid rgba(255,255,255,0.3); border-radius: 50%; border-top-color: white; animation: spin 1s infinite; margin: 0 auto; }
    .loader.dark { border-color: rgba(0,0,0,0.1); border-top-color: var(--primary); }
    @keyframes spin { to { transform: rotate(360deg); } }

    .input-label { width: 100%; font-size: 13px; font-weight: 700; color: var(--text-muted); margin-bottom: 8px; padding-left: 8px; display:block; text-align:left; text-transform: uppercase; letter-spacing: 0.5px;}
    .scan-wrapper { position: relative; width: 100%; display: flex; align-items: center; }
    .scan-wrapper input { padding-right: 70px; width: 100%; }
    .scan-btn { position: absolute; right: 8px; width: 44px; height: 44px; background: rgba(0,122,255,0.1); color: var(--primary); border: none; border-radius: 14px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: 0.2s; z-index: 100;}
    .scan-btn:active { transform: scale(0.9); background: rgba(0,122,255,0.2);}
    
    #scanner-modal { z-index: 8000 !important; }
    #scanner-modal .modal-content { 
      padding: 0; background: #000; width: 100%; height: 100%; max-width: 100%; 
      border-radius: 0; position: relative; overflow: hidden; display: flex; flex-direction: column;
    }

    #staff-profile-modal { z-index: 9000 !important; }
    #image-viewer { z-index: 9999 !important; }
    
    #reader { width: 100%; height: 100vh; position: absolute; top:0; left:0; z-index: 1; display: flex; align-items: center; justify-content: center; background: #000; overflow: hidden; }

    /* --- REVISI CSS SCANNER AGAR TIDAK ZOOM --- */
    #reader { width: 100%; height: 100vh; position: absolute; top:0; left:0; z-index: 1; background: #000; overflow: hidden; display: block; }
    #reader video { width: 100% !important; height: 100% !important; object-fit: cover !important; position: absolute !important; top: 0 !important; left: 0 !important; transform: none !important; background: #000; }
    #qr-shaded-region { display: none !important; }
    #qr-shaded-region { display: none !important; } 
    
    .scanner-ui-overlay { position: absolute; top:0; left:0; width:100%; height:100%; pointer-events:none; display:flex; flex-direction:column; justify-content:space-between; z-index: 10; }
    
    .scanner-header { display:flex; justify-content:space-between; align-items:flex-start; pointer-events:auto; padding: 40px 24px 20px 24px; background: linear-gradient(to bottom, rgba(0,0,0,0.6) 0%, transparent 100%); }
    
    .scanner-footer { pointer-events:auto; text-align:center; display:flex; flex-direction:column; gap:12px; padding: 20px 24px 40px 24px; background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%); }
    
    .scan-helper-text { color: white; font-weight: 700; font-size: 15px; text-shadow: 0 2px 8px rgba(0,0,0,0.8); margin-bottom: 8px; }
    
    .flash-btn, .close-scan-btn { background: rgba(0,0,0,0.5); backdrop-filter:blur(10px); color:white; border:2px solid rgba(255,255,255,0.2); border-radius:50%; width:48px; height:48px; display:flex; align-items:center; justify-content:center; cursor:pointer; font-size:20px; transition:0.3s; }
    .flash-btn.on { background: #FFD60A; color: black; border-color: #FFD60A; box-shadow: 0 0 20px rgba(255,214,10,0.5); }
    
    .scan-counter-badge { background: rgba(52, 199, 89, 0.9); backdrop-filter: blur(10px); color: white; padding: 12px 20px; border-radius: 24px; font-weight: 800; font-size: 15px; display: none; box-shadow: 0 4px 15px rgba(0,0,0,0.3); border: 2px solid rgba(255,255,255,0.2); transition: transform 0.2s;}
    
    .scan-frame { border: none; width: 100%; height: 60vh; margin: auto; position:relative; display: flex; align-items: center; justify-content: center; }
    .scan-frame-inner { position:relative; width:65vw; height:65vw; max-width: 300px; max-height: 300px; z-index: 2; }
    
    /* 4 Sudut Pembidik ala Supermarket */
    .scan-frame-inner::before {
        content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
        background:
            linear-gradient(to right, var(--success) 4px, transparent 4px) 0 0,
            linear-gradient(to bottom, var(--success) 4px, transparent 4px) 0 0,
            linear-gradient(to left, var(--success) 4px, transparent 4px) 100% 0,
            linear-gradient(to bottom, var(--success) 4px, transparent 4px) 100% 0,
            linear-gradient(to right, var(--success) 4px, transparent 4px) 0 100%,
            linear-gradient(to top, var(--success) 4px, transparent 4px) 0 100%,
            linear-gradient(to left, var(--success) 4px, transparent 4px) 100% 100%,
            linear-gradient(to top, var(--success) 4px, transparent 4px) 100% 100%;
        background-repeat: no-repeat; background-size: 35px 35px; border-radius: 12px;
    }

    /* Titik Fokus Merah Berdenyut */
    .scan-frame-inner::after {
        content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
        width: 6px; height: 6px; background-color: var(--danger); border-radius: 50%;
        box-shadow: 0 0 10px rgba(255, 59, 48, 0.8);
        animation: pulse-focus 1.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    }

    @keyframes pulse-focus { 0% { box-shadow: 0 0 0 0 rgba(255, 59, 48, 0.7); } 70% { box-shadow: 0 0 0 15px rgba(255, 59, 48, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 59, 48, 0); } }
    
    .scan-line { width:100%; left:0; height:3px; background:var(--success); position:absolute; top:50%; box-shadow: 0 0 15px var(--success), 0 0 30px var(--success); border-radius: 3px; animation: scanLineAnim 2.5s infinite ease-in-out;}
    @keyframes scanLineAnim { 0% { top: 10%; opacity:0; } 10% { opacity:1; } 90% { opacity:1; } 100% { top: 90%; opacity:0; } }
    
    .btn-scan-action { margin:0; width:100%; padding: 18px; font-size: 17px; font-weight: 800; border-radius: 20px; text-align: center; cursor: pointer; transition: transform 0.2s; }
    .btn-scan-action:active { transform: scale(0.95); }
    .btn-scan-action.done-btn { background: var(--success); color: white; box-shadow: 0 8px 24px rgba(52,199,89,0.4); border: none; }
    .btn-scan-action.manual-btn { background: rgba(0,0,0,0.5); backdrop-filter:blur(10px); color: white; border:1px solid rgba(255,255,255,0.3); }

    button#btn-done-scan[style*="display: block"] { display: block !important; }
    div#scan-counter-badge[style*="display: block"] { display: inline-block !important; }
    
    .img-upload-box { position: relative; width: 100%; height: 120px; border: 2px dashed rgba(0,0,0,0.1); border-radius: 20px; display: flex; align-items: center; justify-content: center; flex-direction: column; overflow: hidden; cursor: pointer; background: rgba(255,255,255,0.5); transition: all 0.2s ease; gap: 8px;}
    .img-upload-box:active { background: rgba(0,122,255,0.05); transform: scale(0.97); border-color: rgba(0,122,255,0.3);}
    .img-upload-box input[type="file"] { position: absolute; top:0; left:0; width:100%; height:100%; opacity: 0; cursor: pointer; z-index: 10;}
    .img-preview { position: absolute; top:0; left:0; width:100%; height:100%; object-fit: cover; display: none; z-index: 2;}
    .img-upload-box span { font-size: 13px; color: var(--text-main); font-weight: 600; z-index: 1;}
    
    .img-grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); gap: 12px; margin-bottom: 20px; width: 100%;}
    .img-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; width: 100%;}

    .list-item-select { display: flex; align-items: center; gap: 16px; padding: 16px; border-bottom: 1px solid rgba(0,0,0,0.05); font-size: 15px; font-weight: 600; cursor: pointer; transition: 0.2s;}
    
    #sig-canvas { border: 1px solid rgba(0,0,0,0.1); border-radius: 20px; background-color: #ffffff; width: 100%; height: 180px; touch-action: none; margin-bottom: 8px; box-shadow: inset 0 2px 10px rgba(0,0,0,0.02);}

    .card-list { display: flex; flex-direction: column; gap: 16px; width: 100%; padding-bottom: 30px;}
    .hist-card { background: rgba(255, 255, 255, 0.85); border-radius: 24px; padding: 20px; display: flex; gap: 16px; align-items: center; box-shadow: 0 4px 20px rgba(0,0,0,0.04); cursor: pointer; transition: all 0.3s ease; border: 1px solid rgba(255,255,255,0.8); backdrop-filter: blur(16px);}
    .hist-card:active { transform: scale(0.96); box-shadow: 0 2px 10px rgba(0,0,0,0.04); }
    .hist-img-wrapper { position: relative; width: 85px; height: 85px; border-radius: 18px; flex-shrink: 0; overflow: hidden; background: #f0f0f5; display:flex; align-items:center; justify-content:center; border: 1px solid rgba(0,0,0,0.05);}
    .hist-img { width: 100%; height: 100%; object-fit: cover; }
    .hist-type-icon { position: absolute; bottom: 4px; right: 4px; background: rgba(255,255,255,0.95); padding: 6px; border-radius: 12px; font-size: 14px; box-shadow: 0 4px 10px rgba(0,0,0,0.15); }
    .hist-info { flex: 1; overflow: hidden; display: flex; flex-direction: column; justify-content: center;}
    .hist-title { font-weight: 800; font-size: 16px; color: var(--text-main); margin-bottom: 4px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
    .hist-sub { font-size: 14px; font-weight: 600; color: var(--primary); margin-bottom: 8px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden;}
    .hist-badge { font-size: 11px; font-weight: 800; padding: 6px 12px; border-radius: 12px; text-transform: uppercase; color: white; position:absolute; top: 20px; right: 20px; box-shadow: 0 4px 10px rgba(0,0,0,0.1);}

    .filter-tabs { display: flex; gap: 8px; margin-bottom: 20px; background: rgba(0,0,0,0.04); padding: 6px; border-radius: 20px; overflow-x: auto; scrollbar-width: none;}
    .filter-tabs::-webkit-scrollbar { display: none; }
    .tab-btn { flex: 1; padding: 12px 16px; border: none; background: transparent; border-radius: 16px; font-weight: 700; color: var(--text-muted); cursor: pointer; transition: 0.3s; white-space: nowrap; font-size: 14px;}
    .tab-btn.active { background: white; color: var(--primary); box-shadow: 0 4px 12px rgba(0,0,0,0.05); }

    .bulk-action-bar { display: none; gap: 12px; margin-bottom: 20px; animation: fadeSlideIn 0.3s ease; }
    .bulk-action-bar.active { display: flex; }
    .bulk-btn { flex: 1; padding: 12px; border-radius: 16px; font-weight: 700; font-size: 14px; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; transition: 0.2s;}
    .bulk-btn:active { transform: scale(0.95); }
    .bulk-btn.approve { background: rgba(52, 199, 89, 0.15); color: var(--success); }
    .bulk-btn.reject { background: rgba(255, 59, 48, 0.15); color: var(--danger); }

    #image-viewer { z-index: 7000; flex-direction: column; background: rgba(0,0,0,0.95); backdrop-filter: blur(20px); }
    #image-viewer img { 
      max-width: 95%; max-height: 80vh; object-fit: contain; 
      border-radius: 16px; transition: transform 0.3s ease; 
      position:relative; z-index: 5001;
      user-select: none; 
      -webkit-user-drag: none; 
    }
    .viewer-controls { display: flex; gap: 24px; margin-top: 24px; position: relative; z-index: 5010; }
    .viewer-btn { background: rgba(255,255,255,0.15); color: white; border: none; width: 56px; height: 56px; border-radius: 50%; font-size: 24px; cursor: pointer; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(10px); z-index: 5011; transition: 0.2s;}
    
    #upload-queue { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 10px; z-index: 9999; pointer-events: none; }
    .upload-task { background: rgba(255,255,255,0.95); backdrop-filter: blur(20px); border: 1px solid rgba(0,0,0,0.05); border-radius: 20px; padding: 16px 20px; display: flex; align-items: center; gap: 12px; box-shadow: 0 10px 40px rgba(0,0,0,0.15); font-size: 14px; font-weight: 600; color: var(--text-main); pointer-events: auto; animation: slideInRight 0.4s cubic-bezier(0.2, 0.8, 0.2, 1); }
    @keyframes slideInRight { from { transform: translateX(120%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
    .upload-task.done { border-left: 5px solid var(--success); }
    .upload-task.error { border-left: 5px solid var(--danger); }

    .icon-action-btn { flex: 1; background: white; border: 1px solid rgba(0,0,0,0.05); border-radius: 16px; padding: 14px 6px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; cursor: pointer; transition: 0.2s; color: var(--text-main); font-size: 12px; font-weight: 700; box-shadow: 0 4px 12px rgba(0,0,0,0.03);}
    .icon-action-btn:active { transform: scale(0.92); }
    .icon-action-btn.danger { color: var(--danger); background: rgba(255,59,48,0.05); border-color: rgba(255,59,48,0.1);}
    .icon-action-btn.warning { color: var(--warning); background: rgba(255,149,0,0.05); border-color: rgba(255,149,0,0.1);}
    
    .profile-info { 
      display: flex; align-items: center; gap: 12px; cursor: pointer; 
      padding: 6px 16px 6px 6px; /* Padding kiri lebih kecil agar foto membaur */
      border-radius: 28px; /* Sudut melingkar kapsul */
      transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); 
      background: rgba(255, 255, 255, 0.85); 
      backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
      border: 1px solid rgba(255, 255, 255, 0.9);
      box-shadow: 0 10px 30px rgba(0,0,0,0.05); /* Bayangan super lembut */
    }
    .profile-info:active { 
      transform: scale(0.95); 
      background: #ffffff; 
      box-shadow: 0 4px 12px rgba(0,0,0,0.02); 
    }
    
    .profile-edit-pic-wrapper { position: relative; width: 100px; height: 100px; border-radius: 50%; margin: 0 auto 20px; border: 3px solid var(--primary); overflow: hidden; display: flex; align-items: center; justify-content: center; background: #f0f0f5; box-shadow: 0 8px 24px rgba(0,122,255,0.25); }
    .profile-edit-pic-wrapper img { width: 100%; height: 100%; object-fit: cover; position: relative; z-index: 2; }
    
    .profile-detail-text { font-size: 15px; margin-bottom: 12px; display: flex; justify-content: space-between; border-bottom: 1px solid rgba(0,0,0,0.05); padding-bottom: 12px; }
    .profile-detail-text span { color: var(--text-muted); font-weight: 600; }
    .profile-detail-text b { color: var(--text-main); font-weight: 700;}

    .log-item { background: rgba(255,255,255,0.8); padding: 18px; border-radius: 20px; margin-bottom: 16px; border: 1px solid rgba(0,0,0,0.03); display: flex; justify-content: space-between; align-items: center; cursor: pointer; transition: 0.2s; box-shadow: 0 4px 12px rgba(0,0,0,0.02);}
    .log-item:active { transform: scale(0.96); background: white;}
    .log-item-left { display: flex; flex-direction: column; gap: 6px; }
    .log-item-title { font-weight: 800; font-size: 16px; color: var(--primary);}
    .log-item-meta { font-size: 13px; color: var(--text-muted); font-weight: 600; display:flex; align-items:center; gap:6px;}
    .log-pic { width:24px; height:24px; border-radius:50%; object-fit:cover; border:1px solid rgba(0,0,0,0.1);}

    .stat-box { cursor: pointer; transition: transform 0.2s; padding: 10px; border-radius: 16px; background: transparent;}
    .stat-box:active { transform: scale(0.9); background: rgba(0,0,0,0.03);}

/* --- CSS UNTUK CHAT HISTORY iOS & PENDING BANNER --- */
    @keyframes pulse-warn { 0% { box-shadow: 0 0 0 0 rgba(255, 149, 0, 0.4); } 70% { box-shadow: 0 0 0 10px rgba(255, 149, 0, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 149, 0, 0); } }
    .pending-banner { background: rgba(255,149,0,0.1); border: 1px solid rgba(255,149,0,0.3); border-radius: 16px; padding: 12px 16px; display: flex; align-items: center; gap: 12px; margin-top: 12px; cursor: pointer; animation: pulse-warn 2s infinite; transition: 0.3s; }
    .pending-banner:active { transform: scale(0.97); }
    
    .chat-wrap { display: flex; flex-direction: column; gap: 14px; margin-top: 12px; background: rgba(0,0,0,0.02); padding: 16px; border-radius: 20px; border: 1px solid rgba(0,0,0,0.05); max-height: 300px; overflow-y: auto;}
    .chat-row { display: flex; gap: 10px; align-items: flex-end; width: 100%; animation: fadeSlideIn 0.3s ease; }
    .chat-row.admin { flex-direction: row-reverse; }
    .chat-ava { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 1px solid rgba(0,0,0,0.1); background: white; }
    .chat-bubble { max-width: 80%; padding: 12px 16px; font-size: 13px; font-weight: 600; box-shadow: 0 4px 10px rgba(0,0,0,0.04); position: relative; line-height: 1.4; word-break: break-word;}
    .chat-bubble.staff { background: white; color: var(--text-main); border-radius: 20px 20px 20px 4px; border: 1px solid rgba(0,0,0,0.04); }
    .chat-bubble.admin { background: var(--primary); color: white; border-radius: 20px 20px 4px 20px; }
    .chat-meta { font-size: 10px; font-weight: 800; margin-bottom: 6px; display: block; text-transform: uppercase; letter-spacing: 0.5px; }
    .chat-bubble.staff .chat-meta { color: var(--text-muted); }
    .chat-bubble.admin .chat-meta { color: rgba(255,255,255,0.8); text-align: right; }
    
/* =========================================
       ✨ COOL SPLASH SCREEN PWA ✨
       ========================================= */
    #splash-screen {
      position: fixed; top: 0; left: 0; width: 100%; height: 100%;
      background: #FFFFFF; /* Ubah background jadi Putih */
      z-index: 999999; display: flex; flex-direction: column;
      align-items: center; justify-content: center;
      transition: opacity 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0.6s;
    }
    
    #splash-screen.hidden { opacity: 0; visibility: hidden; pointer-events: none; }

    .splash-content { display: flex; flex-direction: column; align-items: center; animation: splashFloat 3s ease-in-out infinite; }
    
    .splash-logo-box {
      width: 100px; height: 100px; background: transparent;
      display: flex; align-items: center; justify-content: center;
      margin-bottom: 20px; 
    }
    .splash-logo-box img { width: 80px; height: 80px; border-radius: 20px; }

    .splash-title { color: #8B4513; font-size: 28px; font-weight: 800; letter-spacing: 1px; margin-bottom: 8px; } /* 🌟 Berubah jadi warna coklat */ /* Warna judul jadi biru */
    .splash-subtitle { color: var(--text-muted); font-size: 14px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; } /* Warna sub jadi abu-abu */

    /* Animasi Loading Bar disesuaikan untuk background putih */
    .splash-loader-bar { width: 150px; height: 4px; background: rgba(0, 0, 0, 0.1); border-radius: 4px; margin-top: 40px; overflow: hidden; position: relative; }
    .splash-loader-bar::after { content: ''; position: absolute; top: 0; left: 0; height: 100%; width: 40%; background: var(--primary); border-radius: 4px; animation: loadingSlide 1.5s cubic-bezier(0.4, 0, 0.2, 1) infinite; }

    @keyframes splashFloat { 0% { transform: translateY(0px); } 50% { transform: translateY(-10px); } 100% { transform: translateY(0px); } }
    @keyframes loadingSlide { 0% { transform: translateX(-100%); } 100% { transform: translateX(300%); } }
 /* --- CSS MENU BANTUAN MODERN iOS --- */
    .help-section-card { 
      background: rgba(255, 255, 255, 0.95); 
      border-radius: 20px; 
      padding: 20px; 
      border: 1px solid rgba(0,0,0,0.04); 
      box-shadow: 0 10px 30px rgba(0,0,0,0.04); 
      transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1); 
    }
    .help-section-card:active { transform: scale(0.97); }
    
    .help-section-header { 
      display: flex; align-items: center; gap: 14px; 
      margin-bottom: 14px; padding-bottom: 14px; 
      border-bottom: 1px dashed rgba(0,0,0,0.08); 
    }
    
    .help-icon-box { 
      width: 44px; height: 44px; border-radius: 14px; 
      display: flex; align-items: center; justify-content: center; 
      font-size: 22px; flex-shrink: 0; box-shadow: inset 0 2px 4px rgba(255,255,255,0.5);
    }
    
    .help-section-title { font-weight: 800; font-size: 17px; color: var(--text-main); letter-spacing: -0.3px; }
    
    .help-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
    .help-list li { 
      font-size: 13.5px; color: var(--text-muted); line-height: 1.5; 
      padding-left: 24px; position: relative; font-weight: 500;
    }
    .help-list li b { color: var(--text-main); font-weight: 700; }
    .help-list li::before { content: '✨'; position: absolute; left: 0; top: 1px; font-size: 14px; }
    .help-list.security li::before { content: '🔒'; color: var(--success); }

    .help-list li::before { content: '✨'; position: absolute; left: 0; top: 1px; font-size: 14px; }
    .help-list.security li::before { content: '🔒'; color: var(--success); }

    /* --- CSS TAMBAHAN UNTUK KOTAK RINCIAN CHAT --- */
    .chat-change-box {
        margin-top: 10px;
        padding: 10px 12px;
        background: rgba(0,0,0,0.04);
        border-radius: 12px;
        font-size: 11.5px;
        color: var(--text-main);
        line-height: 1.6;
        border: 1px dashed rgba(0,0,0,0.08);
    }
    .chat-change-box b { 
        color: var(--primary); 
        font-weight: 800;
    }
    .chat-bubble.admin .chat-change-box {
        background: rgba(255,255,255,0.15);
        color: white;
        border-color: rgba(255,255,255,0.2);
    }
    .chat-title-badge {
        display: inline-block;
        font-weight: 800;
        margin-bottom: 6px;
        font-size: 13px;
    }
    .chat-thumb {
        width: 40px; height: 40px; border-radius: 8px; object-fit: cover; cursor: zoom-in; 
        border: 1px solid rgba(0,0,0,0.1); vertical-align: middle; margin-right: 6px; display: inline-block;
        box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    }
    .chat-new-img {
        display: inline-block; padding: 6px 10px; background: rgba(0,122,255,0.1); 
        border-radius: 8px; font-size: 11px; font-weight: 800; color: var(--primary); 
        vertical-align: middle; border: 1px dashed rgba(0,122,255,0.3);
    }
   /* (Kode-kode CSS kamu yang lama ada di atas sini...) */

    .chat-bubble.admin .chat-new-img { 
        background: rgba(255,255,255,0.2); color: white; border-color: rgba(255,255,255,0.4);
    }


    /* =========================================
       ✨ KUMPULAN ANIMASI ICON PREMIUM iOS ✨
       ========================================= */

    /* 1. Animasi Mengambang (Float) untuk Icon Menu Utama (Dashboard & Admin) */
    @keyframes subtleFloat {
      0%, 100% { transform: translateY(0px) scale(1); }
      50% { transform: translateY(-6px) scale(1.05); }
    }
    /* Menargetkan emoji/icon pertama di dalam menu-card */
    .menu-card div:first-child {
      display: inline-block; /* Wajib agar emoji bisa di-transform */
      animation: subtleFloat 3.5s ease-in-out infinite;
      filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1));
    }

    /* 2. Efek Pantul (Spring) saat Tombol Navigasi Atas Ditekan (Back, Sync, Logout) */
    .btn-ios-nav svg, .btn-logout-icon svg {
      transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }
    .btn-ios-nav:active svg {
      transform: scale(0.6) rotate(-15deg);
    }
    .btn-logout-icon:active svg {
      transform: scale(0.6) translateX(5px);
    }

    /* 3. Efek Goyang (Wobble) untuk Tombol Aksi di Modal (Edit, Hapus, Return) */
    @keyframes wobblePop {
      0%, 100% { transform: rotate(0deg) scale(1); }
      25% { transform: rotate(-15deg) scale(1.2); }
      75% { transform: rotate(15deg) scale(1.2); }
    }
    .icon-action-btn svg {
      transition: transform 0.2s ease;
    }
    .icon-action-btn:active svg {
      animation: wobblePop 0.4s ease-in-out;
      color: inherit;
    }

    /* 4. Efek Zoom-in untuk Angka Statistik di Dashboard */
    .stat-box div:first-child {
      transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
      display: inline-block;
    }
    .stat-box:active div:first-child {
      transform: scale(1.3) translateY(-2px);
    }

    /* 5. Animasi Berdenyut (Pulse) untuk Icon di Box Upload Foto */
    @keyframes pulseUpload {
      0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(0,122,255,0.4); }
      70% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(0,122,255,0); }
      100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(0,122,255,0); }
    }
    .img-upload-box .icon {
      border-radius: 50%;
      animation: pulseUpload 2.5s infinite;
    }
    .img-upload-box:active .icon {
      animation: none;
      transform: scale(0.8);
    }

    /* 6. Animasi Mulus untuk Icon Bantuan (💡, 🚀, 🛡️, dll) */
    .help-icon-box {
      transition: transform 0.3s ease, background 0.3s ease;
    }
    .help-section-card:active .help-icon-box {
      transform: scale(1.2) rotate(10deg);
    }


    /* =========================================
       ✨ TAMBAHAN ANIMASI FORM & DETAIL ✨
       ========================================= */

    /* 7. Animasi Tombol Scanner di Form (Efek bidik & putar) */
    .scan-btn svg {
      transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }
    .scan-btn:active svg {
      transform: scale(0.65) rotate(20deg);
    }

    /* 8. Animasi Icon Mata (Show/Hide Password) */
    .icon-btn svg {
      transition: transform 0.2s ease, opacity 0.2s ease;
    }
    .icon-btn:active svg {
      transform: scale(0.7);
      opacity: 0.6;
    }

    /* 9. Animasi Icon Besar di Pop-up Konfirmasi (🤔, ⚠️, 🗑️, dll) */
    @keyframes popBounce {
      0% { transform: scale(0.3) translateY(20px); opacity: 0; }
      50% { transform: scale(1.2) translateY(-5px); opacity: 1; }
      100% { transform: scale(1) translateY(0); opacity: 1; }
    }
    #action-icon {
      display: inline-block;
      animation: popBounce 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    }

    /* 10. Animasi Detak Jantung untuk Icon Status (✅/⏳/❌/🔄) di Rincian Data */
    @keyframes statusHeartbeat {
      0%, 100% { transform: scale(1); filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1)); }
      25% { transform: scale(1.2) rotate(5deg); filter: drop-shadow(0 8px 12px rgba(0,0,0,0.2)); }
      50% { transform: scale(1); filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1)); }
      75% { transform: scale(1.2) rotate(-5deg); filter: drop-shadow(0 8px 12px rgba(0,0,0,0.2)); }
    }
    #univ-input-box span[style*="font-size:32px"] {
      display: inline-block;
      animation: statusHeartbeat 2.5s infinite ease-in-out;
    }

    /* 11. Animasi Ikon Kotak/Truk (📦/🧾) Pop-in di Rincian Data */
    @keyframes popInRotate {
      0% { transform: scale(0) rotate(-30deg); opacity: 0; }
      100% { transform: scale(1) rotate(0deg); opacity: 1; }
    }
    #univ-input-box div[style*="48px"][style*="rgba"] {
      animation: popInRotate 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    }

    /* 12. Animasi Icon di List Log & Ikon Kecil di History Card */
    .log-item-title span, .hist-type-icon {
      display: inline-block;
      transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }
    .log-item:active .log-item-title span,
    .hist-card:active .hist-type-icon {
      transform: scale(1.4) rotate(15deg);
    }

    /* 13. Efek Putar Panah (▾) di Fitur Buka/Tutup Rincian Foto Packing */
    details summary .acc-arrow {
      display: inline-block;
      transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
    }
    details[open] summary .acc-arrow {
      transform: rotate(180deg) !important;
      color: var(--primary) !important;
    }

    /* --- CSS BOT CHAT MODERN (iMessage / Telegram Style) --- */
    .bot-chat-container { background: #F4F5F7; display: flex; flex-direction: column; height: 100%; border-radius: 0 0 24px 24px; overflow: hidden; }
    .bot-header { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: white; padding: 16px 20px; display: flex; align-items: center; gap: 14px; border-radius: 24px 24px 0 0; flex-shrink: 0; box-shadow: 0 4px 15px rgba(0,0,0,0.1); z-index: 10;}
    .bot-avatar { font-size: 26px; background: rgba(255,255,255,0.2); border-radius: 50%; width: 46px; height: 46px; display: flex; justify-content: center; align-items: center; box-shadow: 0 2px 10px rgba(0,0,0,0.1); border: 2px solid rgba(255,255,255,0.4);}
    .bot-msg-area { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 14px; background-color: #EFEFF4; background-image: radial-gradient(rgba(0,0,0,0.06) 1px, transparent 1px); background-size: 20px 20px; }
    .bot-bubble { max-width: 85%; padding: 12px 16px; border-radius: 18px; font-size: 14.5px; line-height: 1.5; position: relative; box-shadow: 0 2px 8px rgba(0,0,0,0.04); font-weight: 500; word-wrap: break-word; animation: fadeSlideIn 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);}
    .bot-bubble.received { background: #ffffff; color: var(--text-main); align-self: flex-start; border-top-left-radius: 4px; border: 1px solid rgba(0,0,0,0.02); }
    .bot-bubble.sent { background: linear-gradient(135deg, #007AFF, #0062CC); color: white; align-self: flex-end; border-top-right-radius: 4px; box-shadow: 0 4px 12px rgba(0,122,255,0.25); }
    .bot-bubble.sent .bot-time { color: rgba(255,255,255,0.8); }
    .bot-time { font-size: 10px; color: var(--text-muted); text-align: right; margin-top: 6px; display: block; font-weight: 700;}
    .bot-input-area { background: #ffffff; padding: 12px 16px; display: flex; gap: 12px; align-items: center; flex-shrink: 0; padding-bottom: calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid rgba(0,0,0,0.05);}
    .bot-input-box { flex:1; border: 1px solid rgba(0,0,0,0.1); padding: 14px 18px; border-radius: 24px; font-size: 14.5px; background: #f9f9f9; outline:none; transition: 0.3s; color: var(--text-main); font-weight: 500; }
    .bot-input-box:focus { background: #fff; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,122,255,0.1); }
    /* CSS Sugesti Chatbot Rapi */
    .bot-suggestions-wrapper { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
    .bot-quick-reply { display: inline-flex; align-items: center; justify-content: center; background: rgba(0,122,255,0.08); color: var(--primary-dark); padding: 8px 14px; border-radius: 20px; font-size: 12.5px; font-weight: 700; border: 1px solid rgba(0,122,255,0.15); cursor: pointer; transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1); margin: 0; box-shadow: 0 2px 4px rgba(0,122,255,0.05);}
    .bot-quick-reply:active { transform: scale(0.95); background: rgba(0,122,255,0.15); box-shadow: none;}
    .bot-send-btn { background: var(--primary); color: white; border: none; width: 46px; height: 46px; border-radius: 50%; display: flex; justify-content: center; align-items: center; cursor: pointer; flex-shrink: 0; box-shadow: 0 4px 12px rgba(0,122,255,0.3); transition: transform 0.2s; }
    .bot-send-btn:active { transform: scale(0.9); }
    
  

#stat-staff-filter::-webkit-scrollbar { display: none; }
#hist-staff-filter::-webkit-scrollbar { display: none; }
#log-staff-filter::-webkit-scrollbar { display: none; }


           details > summary::-webkit-details-marker { display: none; }
           .ios-list-row { display: flex; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid rgba(0,0,0,0.04); align-items: center; }
           .ios-list-row:last-child { border-bottom: none; }
           .ios-label { font-size: 13px; color: var(--text-muted); font-weight: 600; }
           .ios-value { font-size: 14px; color: var(--text-main); font-weight: 700; text-align: right; max-width: 60%; word-break: break-word; }
           .ios-img-label { position: absolute; bottom: 8px; left: 8px; background: rgba(255,255,255,0.85); color: var(--text-main); font-size: 11px; padding: 4px 10px; border-radius: 12px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); font-weight: 800; z-index: 10; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
