/* ===== RESET ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Arial, sans-serif;
}

/* ===== BODY ===== */
body {
  background: linear-gradient(135deg, #141e30, #243b55);
  color: #fff;
}

/* ===== HEADER ===== */
.app-header,
.header {
  text-align: center;
  padding: 20px;
  background: linear-gradient(135deg, #2563eb, #1e40af);
}
/* ===== MAIN WRAPPER ===== */
.app-wrapper,
.app-container {
  display: flex;
  max-width: 1200px;
  margin: 20px auto;
  gap: 16px;
  padding: 0 10px;
}

/* ===== CHAT CONTAINER ===== */
.chat-container {
  flex: 2;
  background: #fff;
  color: #333;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  height: 75vh;
  padding: 10px;
}

/* ===== CHAT BOX ===== */
.chat-box {
  flex: 1;
  padding: 15px;
  overflow-y: auto;
  border: 1px solid #ccc;
  border-radius: 8px;
}

/* ===== MESSAGES ===== */
.bot,
.bot-msg {
  background: #e3f2fd;
  padding: 10px 14px;
  border-radius: 14px;
  margin-bottom: 8px;
  max-width: 75%;
  align-self: flex-start;
}

.user,
.user-msg {
  background: #c8e6c9;
  padding: 10px 14px;
  border-radius: 14px;
  margin-bottom: 8px;
  max-width: 75%;
  align-self: flex-end;
  text-align: right;
}

/* ===== INPUT AREA ===== */
.input-area {
  display: flex;
  border-top: 1px solid #ddd;
  margin-top: 10px;
}

.input-area input {
  flex: 1;
  padding: 12px;
  border: none;
  outline: none;
}

.input-area button {
  background: #2563eb;
  color: #fff;
  border: none;
  padding: 0 18px;
  cursor: pointer;
}

/* ===== SIDE PANEL ===== */
.side-panel,
.service-panel {
  flex: 1;
  background: #fff;
  color: #333;
  border-radius: 10px;
  padding: 15px;
}

/* ===== SERVICE CARDS ===== */
.service-card {
  background: #f1f5f9;
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: 0.2s;
}

.service-card:hover {
  background: #dbeafe;
}

/* ===== PROFILE & PROGRESS ===== */
.profile-box {
  background: #f9f9f9;
  padding: 8px;
  border-radius: 5px;
  margin-bottom: 8px;
}

.profile-box select {
  width: 100%;
  padding: 5px;
}

.progress-box {
  background: #fff8e1;
  padding: 10px;
  border-radius: 5px;
}

/* ===== OPTION BUTTONS ===== */
.option-btn {
  background: #2563eb;
  color: white;
  border: none;
  padding: 6px 12px;
  margin: 4px;
  border-radius: 6px;
  cursor: pointer;
}

.option-btn:hover {
  background: #1e40af;
}

.other-btn {
  background: #64748b;
}

/* ===== GRID CARDS ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  padding: 25px;
}

.card {
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(12px);
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  position: relative;
}

.card i {
  font-size: 36px;
  margin-bottom: 10px;
}

.hover {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  opacity: 0;
}

.card:hover .hover {
  opacity: 1;
}

/* ===== MODAL ===== */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  justify-content: center;
  align-items: center;
}

.modal-box {
  background: white;
  color: black;
  padding: 20px;
  border-radius: 10px;
  width: 300px;
}

.close {
  float: right;
  cursor: pointer;
}

/* ===== FOOTER ===== */
.app-footer {
  text-align: center;
  font-size: 13px;
  color: #ccc;
  padding: 10px;
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {
  .app-wrapper,
  .app-container {
    flex-direction: column;
  }

  .chat-container {
    height: 85vh;
  }

  .side-panel,
  .service-panel {
    order: -1;
  }
}

#chat-toggle{
  position:fixed;
  bottom:20px;
  right:20px;
  background:#2563eb;
  color:white;
  padding:14px;
  border-radius:50%;
  cursor:pointer;
  font-size:20px;
}
   




#chat-panel{
  position:fixed;
  bottom:80px;
  right:20px;
  width:360px;
  height:500px;
  display:none;
  border-radius:14px;
  overflow:hidden;
  box-shadow:0 10px 40px rgba(0,0,0,.3);
}
#chat-panel iframe{
  width:100%;
  height:100%;
  border:none;
}










/* FLOAT CHAT BUTTON */
#chat-fab {
  position: fixed;
  bottom: 22px;
  right: 22px;
  width: 56px;
  height: 56px;
  background: #2563eb;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  cursor: pointer;
  z-index: 1000;
}

/* OVERLAY */
#chat-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 999;
}

/* POPUP */
#chat-popup {
  width: 380px;
  height: 520px;
  background: white;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
}

/* HEADER */
.chat-header {
  background: linear-gradient(135deg,#2563eb,#1e40af);
  color: white;
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-actions button {
  background: transparent;
  border: none;
  color: white;
  font-size: 18px;
  margin-left: 8px;
  cursor: pointer;
}

/* IFRAME */
#chat-iframe {
  flex: 1;
  width: 100%;
  border: none;
}

/* FULL SCREEN MODE */
#chat-popup.fullscreen {
  width: 100vw;
  height: 100vh;
  border-radius: 0;
}

/* MOBILE */
@media (max-width: 768px) {
  #chat-popup {
    width: 100vw;
    height: 100vh;
    border-radius: 0;
  }
}







.bot-msg ul {
  margin-top: 6px;
  padding-left: 18px;
}

.bot-msg li {
  margin-bottom: 4px;
  font-size: 14px;
}

.bot-msg a {
  color: #2563eb;
  text-decoration: underline;
  font-weight: 500;
}





.input-area {
  display: flex;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid #e5e7eb;
  background: #f8fafc;
}

.input-area input {
  flex: 1;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  outline: none;
}

.send-btn {
  background: #2563eb;
  color: #fff;
  border: none;
  padding: 0 16px;
  border-radius: 8px;
  cursor: pointer;
}

.send-btn:hover {
  background: #1e40af;
}

.clear-btn {
  background: transparent;
  color: #dc2626;
  border: 1px solid #dc2626;
  padding: 0 14px;
  border-radius: 8px;
  cursor: pointer;
}

.clear-btn:hover {
  background: #fee2e2;
}

.icon-btn {
  background: #e2e8f0;
  border: none;
  border-radius: 8px;
  padding: 0 12px;
  cursor: pointer;
}




.bot-msg {
  position: relative; /* MOST IMPORTANT */
  background: #e3f2fd;
  padding: 14px;
  border-radius: 12px;
  margin-bottom: 10px;
}

.tts-btn {
  position: absolute;
  top: 10px;
  right: 10px;   /* 👈 GREEN MARK WALI JAGAH */
  background: #ef4444;
  color: white;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 14px;
  cursor: pointer;
  z-index: 5;
}

.tts-btn:hover {
  background: #dc2626;
}



/* 


/* ===== INPUT AREA FIX ===== */

.input-area {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid #e5e7eb;
  background: #ffffff;
}

/* TEXT INPUT */
.input-area input {
  flex: 1;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  outline: none;
  font-size: 14px;
}

/* MIC BUTTON */
.icon-btn {
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 10px;
  width: 44px;
  height: 44px;
  font-size: 18px;
  cursor: pointer;
}

.icon-btn:hover {
  background: #1e40af;
}

/* CLEAR BUTTON (SECONDARY) */
.clear-btn {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 14px;
  cursor: pointer;
}

.clear-btn:hover {
  background: #e5e7eb;
}

/* SEND BUTTON (PRIMARY) */
.send-btn {
  background: #2563eb;
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 14px;
  cursor: pointer;
}

.send-btn:hover {
  background: #1e40af;
}

/* MOBILE OPTIMIZATION */
@media (max-width: 480px) {
  .input-area {
    gap: 6px;
  }

  .clear-btn,
  .send-btn {
    padding: 10px 12px;
    font-size: 13px;
  }
} */
/* ======================================================
   CHAT.HTML INPUT AREA – SAFE SCOPED CSS (NO CONFLICT)
   ====================================================== */

.chat-input-area {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid #e5e7eb;
  background: #ffffff;
}

/* CHAT TEXT INPUT */
.chat-input-area input {
  flex: 1;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  outline: none;
  font-size: 14px;
}

/* 🎤 MIC BUTTON */
.chat-icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #2563eb;
  color: #fff;
  border: none;
  font-size: 18px;
  cursor: pointer;
}

.chat-icon-btn:hover {
  background: #1e40af;
}

/* 🧹 CLEAR BUTTON – SECONDARY */
.chat-clear-btn {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 14px;
  cursor: pointer;
}

.chat-clear-btn:hover {
  background: #e5e7eb;
}

/* 🚀 SEND BUTTON – PRIMARY */
.chat-send-btn {
  background: #2563eb;
  color: #ffffff;
  border: none;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 14px;
  cursor: pointer;
}

.chat-send-btn:hover {
  background: #1e40af;
}

/* 📱 MOBILE FIX */
@media (max-width: 480px) {
  .chat-input-area {
    gap: 6px;
  }

  .chat-clear-btn,
  .chat-send-btn {
    padding: 10px 12px;
    font-size: 13px;
  }
}





#micBtn {
  background: #ef4444;
  border: none;
  color: white;
  font-size: 18px;
  padding: 10px;
  border-radius: 50%;
  cursor: pointer;
  margin-right: 6px;
}

#micBtn.listening {
  background: #22c55e;
}



.chat-box {
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}







/* #androidInstallHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
}


.install-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}


.close-btn {
  background: transparent;
  border: none;
  color: white;
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
}

.close-btn:hover {
  opacity: 0.8;
} */

/* ANDROID INSTALL HEADER */
#androidInstallHeader {
  position: sticky;
  top: 0;
  z-index: 9999;
  display: none; /* JS se control hoga */

  background: linear-gradient(90deg, #1e3c72, #2a5298);
  color: #fff;

  padding: 12px 14px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);

  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* App name */
#androidInstallHeader .app-name {
  font-size: 15px;
  font-weight: 600;
}

/* Right side buttons */
.install-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Install button */
.install-btn {
  background: #00e676;
  color: #000;
  padding: 7px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.install-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 3px 10px rgba(0,0,0,0.3);
}

/* Close button */
.close-btn {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  padding: 2px 6px;
}





.option-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 20px;
  padding: 20px;
  max-width: 600px;
  margin: auto;
}

.option-card {
  background: #ffffff;
  border-radius: 14px;
  padding: 26px 16px;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0,0,0,0.15);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.option-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(0,0,0,0.25);
}

.option-card .icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.option-card p {
  font-weight: 600;
  font-size: 15px;
  color: #111;
}


.profile-section {
  display: none;
  transition: all 0.3s ease;
}

 .section-tabs{
  display:flex;
  justify-content:center;
  gap:10px;
  margin:20px;
}

.section-tabs button{
  padding:10px 16px;
  border:none;
  border-radius:8px;
  background:#1e3c72;
  color:#fff;
  cursor:pointer;
}

.hidden{
  display:none;
}



.progress-box {
  background: #fff8e1;
  padding: 10px;
  border-radius: 5px;
}
/* ===== PROGRESS TRACKER (SCROLLABLE) ===== */
.progress-box {
  background: #fff8e1;
  padding: 10px;
  border-radius: 8px;

  max-height: 320px;        /* 🔥 FIXED HEIGHT */
  overflow-y: auto;         /* 🔥 SCROLLER */
  overflow-x: hidden;

  border: 1px solid #fde68a;
}

/* Smooth scrollbar (Chrome / Edge) */
.progress-box::-webkit-scrollbar {
  width: 6px;
}

.progress-box::-webkit-scrollbar-thumb {
  background: #f59e0b;
  border-radius: 6px;
}

.progress-box::-webkit-scrollbar-track {
  background: #fff7ed;
}
#progressList {
  padding-left: 18px;
  font-size: 13px;
}

#progressList li {
  margin-bottom: 6px;
  line-height: 1.4;
}






.side-btn {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
}

.nagrik-btn {
    background: linear-gradient(135deg, #00c6ff, #0072ff);
    color: white;
    border: none;
    padding: 12px 20px;
    font-size: 14px;
    border-radius: 25px 0 0 25px; /* left side rounded */
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

/* Hover effect */
.nagrik-btn:hover {
    background: linear-gradient(135deg, #0072ff, #00c6ff);
    padding-right: 25px;
    box-shadow: -4px 4px 12px rgba(0,0,0,0.2);
}



/* 
.top-right-btn {
    position: absolute;
    top: 20px;
    right: 20px;
}

.nagrik-btn {
    background: linear-gradient(135deg, #00c6ff, #0072ff);
    color: white;
    border: none;
    padding: 10px 18px;
    font-size: 14px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

/* Hover effect */
.nagrik-btn:hover {
    background: linear-gradient(135deg, #0072ff, #00c6ff);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
} 









.document-upload-btn-wrapper {
    width: 100%;

    display: flex;

    justify-content: center;

    padding: 20px 30px 25px;

    background: #17283f;
    align-items: center;
}

.document-upload-btn {
    border: none;

    background: linear-gradient(
        135deg,
        #2563eb,
        #1d4ed8
    );



    color: white;

    padding: 14px 24px;

    border-radius: 10px;

    font-size: 15px;

    font-weight: 600;

    cursor: pointer;

    display: flex;

    align-items: center;

    gap: 9px;

    box-shadow:
        0 6px 18px
        rgba(37, 99, 235, 0.30);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.document-upload-btn:hover {
    background: linear-gradient(
        135deg,
        #1d4ed8,
        #1e40af
    );

    transform: translateY(-2px);

    box-shadow:
        0 9px 24px
        rgba(37, 99, 235, 0.40);
}

.document-upload-btn:active {
    transform: translateY(0);
}

.upload-icon {
    font-size: 18px;
}




@media (max-width: 600px) {

    .document-upload-btn-wrapper {
        justify-content: center;

        padding:
            18px 15px 22px;
    }

    .document-upload-btn {
        width: 100%;

        max-width: 340px;

        justify-content: center;
    }
}











/* =========================================
   HEADER USER PROFILE
========================================= */

.header-user {
    width: auto !important;
    min-width: auto !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-start !important;

    gap: 9px;

    padding: 5px 10px 5px 5px;

    background: transparent !important;

    border: none !important;
    border-radius: 30px;

    cursor: pointer;

    color: #ffffff;

    transition: all 0.25s ease;

    box-sizing: border-box;
}


/* Hover */

.header-user:hover {
    background: rgba(255, 255, 255, 0.12) !important;
}


/* =========================================
   AVATAR
========================================= */

.header-avatar {
    width: 42px !important;
    height: 42px !important;

    min-width: 42px;
    min-height: 42px;

    border-radius: 50%;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative;

    background: linear-gradient(
        135deg,
        #2563eb,
        #60a5fa
    );

    color: #ffffff;

    font-size: 18px;

    font-weight: 700;

    border: 2px solid rgba(255, 255, 255, 0.9);

    box-shadow:
        0 3px 10px rgba(0, 0, 0, 0.18);

    overflow: hidden;

    flex-shrink: 0;
}


/* Profile photo */

.header-avatar img {
    width: 100%;
    height: 100%;

    object-fit: cover;

    border-radius: 50%;
}


/* =========================================
   USER NAME
========================================= */

.header-user-name {
    display: block !important;

    width: auto !important;

    max-width: 150px;

    color: #ffffff;

    font-size: 14px;

    font-weight: 600;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
}


/* =========================================
   MOBILE
========================================= */

@media (max-width: 600px) {

    .header-user {
        padding: 3px;
    }

    .header-user-name {
        display: none !important;
    }

    .header-avatar {
        width: 38px !important;
        height: 38px !important;

        min-width: 38px;
        min-height: 38px;
    }

}