*{
  margin:0;
  padding:0;
  box-sizing:border-box;
  font-family:'Poppins',sans-serif;
}

body{
  min-height:100vh;

  background:
    linear-gradient(
      135deg,
      #d9ecff 0%,
      #edf6ff 50%,
      #f7fbff 100%
    );

  color:#2f4f6b;

  overflow-x:hidden;
}

/* =========================
   GLOBAL
========================= */

.container{
  width:100%;
  min-height:100vh;

  padding:24px;
}

.center-screen{
  display:flex;
  justify-content:center;
  align-items:center;
}

/* =========================
   DASHBOARD
========================= */

.dashboard-wrapper{
  width:100%;
  max-width:720px;
}

.dashboard-header{
  text-align:center;

  margin-bottom:36px;
}

.dashboard-title{
  font-size:38px;
  font-weight:700;

  color:#4f84b6;
}

.dashboard-subtitle{
  margin-top:8px;

  font-size:15px;

  color:#89a8c2;
}

/* GRID */

.dashboard-grid{
  display:grid;

  grid-template-columns:1fr 1fr;

  gap:22px;
}

/* CARD */

.dashboard-card{
  position:relative;

  height:180px;

  border-radius:34px;

  padding:24px;

  color:white;

  cursor:pointer;

  overflow:hidden;

  transition:0.35s ease;

  box-shadow:
    0 15px 35px rgba(0,0,0,0.10);

  display:flex;
  flex-direction:column;
  justify-content:space-between;
}

.dashboard-card:hover{
  transform:
    translateY(-6px)
    scale(1.02);
}

/* ICON */

.dashboard-icon{
  font-size:42px;
}

/* PNG ICON */

.dashboard-image-icon{
  width:48px;
  height:48px;

  object-fit:contain;

  filter:
    brightness(0)
    invert(1);

  opacity:0.95;
}

/* TEXT */

.dashboard-text{
  font-size:18px;
  font-weight:600;

  line-height:1.4;
}

/* NUMBER */

.dashboard-number{
  position:absolute;

  right:20px;
  bottom:16px;

  font-size:40px;
  font-weight:700;

  opacity:0.35;

  color:white;
}

/* COLORS */

.blue-card{
  background:
    linear-gradient(
      135deg,
      #76a9d8,
      #9cc7eb
    );
}

.purple-card{
  background:
    linear-gradient(
      135deg,
      #9b8cff,
      #c6bfff
    );
}

.green-card{
  background:
    linear-gradient(
      135deg,
      #69c6b3,
      #9ee2d4
    );
}

.orange-card{
  background:
    linear-gradient(
      135deg,
      #ffb36a,
      #ffd2a6
    );
}

/* =========================
   FORM PASIEN
========================= */

.patient-form-box{
  width:100%;
  max-width:540px;

  padding:42px 34px;

  border-radius:34px;

  background:rgba(255,255,255,0.72);

  backdrop-filter:blur(18px);

  -webkit-backdrop-filter:blur(18px);

  box-shadow:
    0 20px 50px rgba(0,0,0,0.08),
    inset 0 1px 0 rgba(255,255,255,0.5);

  border:1px solid rgba(255,255,255,0.4);
}

.title{
  text-align:center;

  font-size:34px;
  font-weight:700;

  color:#4f84b6;

  margin-bottom:10px;
}

.subtitle{
  text-align:center;

  font-size:15px;

  color:#7b9bb7;

  margin-bottom:28px;
}

#patientForm{
  display:flex;
  flex-direction:column;

  gap:18px;
}

.input-group{
  display:flex;
  flex-direction:column;

  gap:8px;
}

.input-label{
  font-size:14px;
  font-weight:500;

  color:#5d7d99;

  padding-left:4px;
}

#patientForm input,
#patientForm select{
  width:100%;

  padding:18px 20px;

  border:none;

  border-radius:18px;

  background:#f4f9ff;

  font-size:15px;

  color:#35506b;

  outline:none;

  transition:0.25s ease;

  box-shadow:
    inset 0 2px 5px rgba(0,0,0,0.03);
}

#patientForm input::placeholder{
  color:#9ab1c7;
}

#patientForm input:focus,
#patientForm select:focus{
  background:white;

  transform:translateY(-1px);

  box-shadow:
    0 0 0 4px rgba(126,174,217,0.18),
    0 10px 25px rgba(0,0,0,0.06);
}

/* =========================
   HALAMAN CERITA
========================= */

.story-wrapper{
  width:100%;

  display:flex;
  flex-direction:column;
  align-items:center;

  gap:26px;
}

/* BAR INFO PASIEN */

.patient-info-card{
  width:100%;
  max-width:900px;

  padding:14px 20px;

  border-radius:24px;

  background:rgba(255,255,255,0.72);

  backdrop-filter:blur(16px);

  box-shadow:
    0 10px 25px rgba(0,0,0,0.06);

  display:flex;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;

  gap:12px;
}

.patient-info-title{
  display:none;
}

.patient-info-item{
  display:flex;
  align-items:center;

  gap:6px;

  padding:8px 12px;

  border-radius:14px;

  background:#f5faff;

  font-size:13px;
}

.patient-info-item span{
  color:#7d9ab5;

  font-size:12px;
}

.patient-info-item strong{
  color:#3d6285;

  font-size:13px;
  font-weight:600;
}

/* =========================
   HALAMAN CERITA
========================= */

.story-wrapper{
  width:100%;

  display:flex;
  flex-direction:column;
  align-items:center;

  gap:26px;
}

/* BAR INFO PASIEN */

.patient-info-card{
  width:100%;
  max-width:900px;

  padding:14px 20px;

  border-radius:24px;

  background:rgba(255,255,255,0.72);

  backdrop-filter:blur(16px);

  box-shadow:
    0 10px 25px rgba(0,0,0,0.06);

  display:flex;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;

  gap:12px;
}

.patient-info-title{
  display:none;
}

.patient-info-item{
  display:flex;
  align-items:center;

  gap:6px;

  padding:8px 12px;

  border-radius:14px;

  background:#f5faff;

  font-size:13px;
}

.patient-info-item span{
  color:#7d9ab5;

  font-size:12px;
}

.patient-info-item strong{
  color:#3d6285;

  font-size:13px;
  font-weight:600;
}

/* =========================
   BUTTON
========================= */

.emotion-button,
.stop-button{
  width:30%;

  border:none;

  padding:18px;

  border-radius:20px;

  background:
    linear-gradient(
      145deg,
      #77a9d7,
      #9cc6eb
    );

  color:white;

  font-size:17px;
  font-weight:600;

  cursor:pointer;

  transition:0.3s ease;

  box-shadow:
    0 14px 30px rgba(106,156,205,0.28);
}

.emotion-button:hover,
.stop-button:hover{
  transform:translateY(-3px);

  box-shadow:
    0 18px 35px rgba(106,156,205,0.35);
}

/* =========================
   BUTTON BACK
========================= */

.back-button{
  border:none;

  padding:14px 24px;

  border-radius:18px;

  background:white;

  color:#5f95ca;

  font-size:15px;
  font-weight:600;

  cursor:pointer;

  transition:0.3s ease;

  box-shadow:
    0 10px 25px rgba(0,0,0,0.08);
}

.back-button:hover{
  transform:translateY(-2px);

  background:#f5faff;
}

/* =========================
   HALAMAN MULAI CERITA
========================= */

.start-button{
  width:240px;
  height:240px;

  border:none;

  border-radius:50%;

  background:
    linear-gradient(
      145deg,
      #7eaed9,
      #9dc5e8
    );

  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;

  gap:14px;

  color:white;

  font-size:24px;
  font-weight:600;

  cursor:pointer;

  box-shadow:
    0 25px 50px rgba(0,0,0,0.12);

  transition:0.4s ease;
}

.start-button:hover{
  transform:scale(1.05);
}

.start-button.hide{
  opacity:0;

  transform:scale(0.5);
}

.mic-icon{
  font-size:62px;
}

/* =========================
   HALAMAN REKAMAN
========================= */

.record-page{
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;

  gap:30px;
}

.wave-container{
  display:flex;
  align-items:center;

  gap:8px;

  height:120px;
}

.wave{
  width:10px;
  height:40px;

  border-radius:999px;

  background:#6ea6d8;

  animation:waveAnimation 1s infinite ease-in-out;
}

.wave:nth-child(2){animation-delay:0.1s;}
.wave:nth-child(3){animation-delay:0.2s;}
.wave:nth-child(4){animation-delay:0.3s;}
.wave:nth-child(5){animation-delay:0.4s;}
.wave:nth-child(6){animation-delay:0.5s;}
.wave:nth-child(7){animation-delay:0.6s;}
.wave:nth-child(8){animation-delay:0.7s;}
.wave:nth-child(9){animation-delay:0.8s;}
.wave:nth-child(10){animation-delay:0.9s;}
.wave:nth-child(11){animation-delay:1s;}
.wave:nth-child(12){animation-delay:1.1s;}

@keyframes waveAnimation{

  0%,100%{
    height:40px;
  }

  50%{
    height:100px;
  }

}

.timer-box{
  width:100%;
  max-width:500px;
}

.progress-bar{
  width:100%;
  height:14px;

  background:#d4e7f8;

  border-radius:999px;

  overflow:hidden;
}

.progress{
  width:0%;
  height:100%;

  background:#5d95c9;

  border-radius:999px;

  transition:0.3s ease;
}

#timer{
  margin-top:12px;

  text-align:center;

  font-size:20px;
  font-weight:500;
}

/* =========================
   HALAMAN HASIL TEKS
========================= */

.text-page{
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;

  gap:18px;
}

.text-result-box{
  width:100%;
  max-width:720px;

  height:260px;

  overflow-y:scroll;
  overflow-x:hidden;

  padding:28px;

  border-radius:28px;

  background:rgba(255,255,255,0.75);

  backdrop-filter:blur(12px);

  box-shadow:
    0 10px 30px rgba(0,0,0,0.08);

  line-height:1.9;

  font-size:16px;

  word-wrap:break-word;

  scrollbar-width:thin;

  scrollbar-color:#84b3df transparent;
}

/* SCROLLBAR */

.text-result-box::-webkit-scrollbar{
  width:10px;
}

.text-result-box::-webkit-scrollbar-track{
  background:transparent;
}

.text-result-box::-webkit-scrollbar-thumb{
  background:#84b3df;

  border-radius:999px;
}

.text-result-box::-webkit-scrollbar-thumb:hover{
  background:#6ea6d8;
}

.patient-info-card{
  width:100%;
  max-width:1100px;

  margin:20px auto;

  display:flex;
  flex-direction:row;   /* 🔥 dari column → row */
  flex-wrap:nowrap;     /* 🔥 larang turun */
  justify-content:space-between;
  align-items:center;

  gap:12px;
}

.patient-info-item{
  display:flex;

  flex-shrink:0;        /* 🔥 jangan mengecil lalu turun */

  gap:6px;

  padding:8px 12px;

  border-radius:14px;

  background:#f5faff;

  white-space:nowrap;
}





/* =========================
   HALAMAN EMOSI
========================= */

.empty-emotion-box{
  width:100%;
  max-width:500px;

  margin-top: -100px;

  padding:60px 24px;

  border-radius:30px;

  background:rgba(255,255,255,0.75);

  text-align:center;

  box-shadow:
    0 10px 30px rgba(0,0,0,0.08);
}

/* =========================
   RESPONSIVE
========================= */

@media(max-width:768px){

  .dashboard-grid{
    grid-template-columns:1fr;
  }

  .dashboard-card{
    height:150px;
  }

  .dashboard-title{
    font-size:30px;
  }

  .dashboard-text{
    font-size:16px;
  }

  .patient-form-box{
    padding:32px 22px;
  }

  .title{
    font-size:28px;
  }

  .subtitle{
    font-size:14px;
  }

  .patient-info-card{
    padding:22px;
  }

  .patient-info-item{
    flex-direction:column;
    align-items:flex-start;

    gap:6px;
  }

  .start-button{
    width:190px;
    height:190px;

    font-size:20px;
  }

  .mic-icon{
    font-size:50px;
  }

  .wave-container{
    gap:5px;
  }

  .wave{
    width:7px;
  }

  .text-result-box{
    height:220px;

    padding:22px;
  }

  .emotion-button,
  .stop-button,
  .back-button{
    width:100%;
  }

}