
@import url("https://fonts.googleapis.com/css2?family=Ubuntu:wght@300;400;500;700&display=swap");

* {
  font-family: "Ubuntu", sans-serif;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --blue: #2a2185;
  --white: #fff;
  --gray: #f5f5f5;
  --black1: #222;
  --black2: #999;
}

body {
  background: #f8faff; 
  min-height: 100vh;
  overflow-x: hidden;
}

.container {
  position: relative;
  width: 100%;
}

.navigation {
  position: fixed;
  width: 300px;
  height: 100%;
  background: var(--blue);
  border-left: 10px solid var(--blue);
  transition: 0.5s;
  overflow: hidden;
  z-index: 1000;
}

.navigation.active {
  width: 80px;
}

.navigation ul {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
}

.navigation ul li {
  position: relative;
  width: 100%;
  list-style: none;
  border-top-left-radius: 30px;
  border-bottom-left-radius: 30px;
}

.navigation ul li:hover,
.navigation ul li.hovered {
  background-color: var(--white);
}

.navigation ul li:nth-child(1) {
  margin-bottom: 40px;
  pointer-events: none;
}

.navigation ul li a {
  position: relative;
  display: flex;
  width: 100%;
  text-decoration: none;
  color: var(--white);
}

.navigation ul li:hover a,
.navigation ul li.hovered a {
  color: var(--blue);
}

.navigation ul li a .icon {
  position: relative;
  display: block;
  min-width: 60px;
  height: 60px;
  line-height: 75px;
  text-align: center;
}

.navigation ul li a .icon ion-icon {
  font-size: 1.75rem;
}

.navigation ul li a .title {
  position: relative;
  display: block;
  padding: 0 10px;
  height: 60px;
  line-height: 60px;
  text-align: start;
  white-space: nowrap;
}


.navigation ul li:hover a::before,
.navigation ul li.hovered a::before {
  content: "";
  position: absolute;
  right: 0;
  top: -50px;
  width: 50px;
  height: 50px;
  background-color: transparent;
  border-radius: 50%;
  box-shadow: 35px 35px 0 10px var(--white);
  pointer-events: none;
}

.navigation ul li:hover a::after,
.navigation ul li.hovered a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -50px;
  width: 50px;
  height: 50px;
  background-color: transparent;
  border-radius: 50%;
  box-shadow: 35px -35px 0 10px var(--white);
  pointer-events: none;
}


.navigation ul li ul.dropdown-menu {
  display: flex;
  flex-direction: column;
  position: relative; 
  background: #1a1452; 
  width: 85%; 
  margin: 0 auto; 
  border-radius: 25px; 
  max-height: 0; 
  overflow: hidden; 
  transition: max-height 0.4s ease-in-out, padding 0.4s ease-in-out; 
}

.navigation ul li.dropdown.active ul.dropdown-menu {
  max-height: 400px;
  padding: 20px 0;
  margin-top: 0; 
}

.navigation ul li.dropdown.active {
  padding-bottom: 15px;
}

.navigation ul li ul.dropdown-menu li {
  border-radius: 0; 
}

.navigation ul li ul.dropdown-menu li:nth-child(1) {
  margin-bottom: 0;
  pointer-events: auto;
}

.navigation ul li ul.dropdown-menu li:hover {
  background-color: transparent; 
}

.navigation ul li ul.dropdown-menu li a {
  height: 45px;
  line-height: 45px;
}

.navigation ul li ul.dropdown-menu li a .title {
  height: 45px;
  line-height: 45px;
  padding-left: 20px;
}

.navigation ul li:hover ul.dropdown-menu li a {
  color: var(--white);
}

.navigation ul li ul.dropdown-menu li:hover a {
  background: rgba(255, 255, 255, 0.1); 
  color: var(--white);
}

.navigation ul li ul.dropdown-menu li a::before,
.navigation ul li ul.dropdown-menu li a::after {
  display: none !important;
}


.main {
  position: absolute;
  width: calc(100% - 300px);
  left: 300px;
  min-height: 100vh;
  transition: 0.5s;
  overflow-x: hidden;
  background: 
      radial-gradient(at 0% 0%, rgb(0, 217, 255) 0px, transparent 50%),
      radial-gradient(at 100% 0%, rgb(0, 255, 110) 0px, transparent 50%),
      radial-gradient(at 100% 100%, rgb(131, 0, 254) 0px, transparent 50%),
      radial-gradient(at 0% 100%, rgb(255, 200, 0) 0px, transparent 50%),
      #f8faff;
}

.main.active {
  width: calc(100% - 80px);
  left: 80px;
}

.topbar {
  width: 100%;
  height: 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 10px;
}

.toggle {
  position: relative;
  width: 60px;
  height: 60px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2.5rem;
  cursor: pointer;
}

.user {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  cursor: pointer;
}

.user img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}


.record-form {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.record-form input, .record-form select {
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  outline: none;
  flex: 1; 
}

.record-form button {
  padding: 8px 15px;
  background: var(--blue);
  color: var(--white);
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.record-form button:hover {
  background: #1d1566;
}


.cardBox {
  position: relative;
  width: 100%;
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(4, 1fr); 
  grid-gap: 30px;
}

.cardBox .card {
  position: relative;
  background: var(--white);
  padding: 30px;
  border-radius: 20px;
  display: flex;
  justify-content: space-between;
  cursor: pointer;
  box-shadow: 0 7px 25px rgba(0, 0, 0, 0.08);
}

.cardBox .card .numbers {
  position: relative;
  font-weight: 500;
  font-size: 2.5rem;
  color: var(--blue);
}

.cardBox .card .cardName {
  color: var(--black2);
  font-size: 1.1rem;
  margin-top: 5px;
}

.cardBox .card .iconBx {
  font-size: 3.5rem;
  color: var(--black2);
}

.cardBox .card:hover {
  background: var(--blue);
}

.cardBox .card:hover .numbers,
.cardBox .card:hover .cardName,
.cardBox .card:hover .iconBx {
  color: var(--white);
}


.details {
  position: relative;
  width: 100%;
  padding: 20px;
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-gap: 30px;
}

.details .recentOrders, .recentCustomers {
  position: relative;
  display: block;
  min-height: auto;
  background: var(--white);
  padding: 20px;
  box-shadow: 0 7px 25px rgba(0, 0, 0, 0.08);
  border-radius: 20px;
}

.details .cardHeader, .recentCustomers .cardHeader {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}

.cardHeader h2 {
  font-weight: 600;
  color: var(--blue);
}

.cardHeader .btn {
  position: relative;
  padding: 5px 10px;
  background: var(--blue);
  text-decoration: none;
  color: var(--white);
  border-radius: 6px;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

table thead td {
  font-weight: 600;
}

.details .recentOrders table tr {
  color: var(--black1);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.details .recentOrders table tr:last-child {
  border-bottom: none;
}

.details .recentOrders table tbody tr:hover {
  background: var(--blue);
  color: var(--white);
}

.details .recentOrders table tr td {
  padding: 12px 10px;
}

.recentCustomers table tr td {
  padding: 10px 15px; 
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  vertical-align: middle;
}

.recentCustomers table tr:last-child td {
  border-bottom: none;
}

.recentCustomers .imgBx {
  position: relative;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.recentCustomers .imgBx img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.recentCustomers table tr td h4 {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2rem;
  color: var(--black1);
}

.recentCustomers table tr td h4 span {
  font-size: 12px;
  color: var(--black2);
  display: block;
  margin-top: 2px;
}


.text-center { text-align: center !important; }
.text-left { text-align: left !important; }
.table tr td:last-child { text-align: center; }

.ellipsis {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 250px; 
}

.status {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 14px;
  color: var(--white);
  font-weight: 500;
}

.status.stable { background: #8de02c; }
.status.recovering { background: #1795ce; }
.status.critical { background: #f00; }
.status.discharged { background: #f6ff00; color: var(--black1); }


.status-stable { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.status-critical { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.status-recovering { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.status-discharged { background: #f8fafc; color: #475569; border-color: #e2e8f0; }

.btn-danger {
    background: #e91e63 !important; 
    border: none;
    cursor: pointer;
}

.delete-row-btn {
    background: transparent;
    border: none;
    color: #e91e63;
    font-size: 1.2rem;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.delete-row-btn:hover {
    color: #ff0000;
    transform: scale(1.2);
}


@keyframes slideUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes backgroundDrift {
    from { transform: translate(0, 0) scale(1); }
    to { transform: translate(-300px, 150px) scale(1.3); }
}

.patient-card {
    animation: slideUp 0.4s ease-out forwards;
    opacity: 0;
}

.patient-card .font-medium.text-slate-800 {
    display: block;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    line-height: 1.6;
}

#modal-overlay {
    transition: opacity 0.2s ease-in-out;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
}

#modal-content {
    max-height: 90vh;
    overflow-y: auto;
}

#patient-form textarea {
    min-height: 120px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.hidden { display: none; }


@media (max-width: 991px) {
  .navigation {
    left: -100%; 
    width: 300px;
  }

  .navigation.active {
    left: 0;
    width: 100%; 
  }

  .main {
    width: 100%;
    left: 0;
  }

  .main.active {
    left: 0; 
  }
  


  .cardBox {
    grid-template-columns: repeat(2, 1fr); 
  }


  .details {
    grid-template-columns: 1fr;
  }
}


@media (max-width: 768px) {
  .details table {
    width: 100%;
    min-width: 500px; 
  }

  .recentOrders, .recentCustomers {
    overflow-x: auto; 
    padding: 10px;
    background: var(--white);
    border-radius: 10px;
  }
  
 
  .cardHeader h2 {
    font-size: 1.2rem;
  }
}


@media (max-width: 480px) {
  
  .cardBox {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  .cardBox .card {
    padding: 20px; 
  }

  .cardHeader h2 {
    font-size: 1.1rem;
  }
  

  
  .recentOrders {
    overflow-x: auto;
  }

  table {
    min-width: 400px; 
  }

  .status {
    font-size: 12px;
    padding: 2px 5px;
  }
}