.icon-btn{
background: none;
font-size: 22px;
border: none;
cursor: pointer;
}

.modal-hidden {
  display: none;
}

* {
margin: 0;
padding: 0;
box-sizing: border-box;
}

:root{
   --bg: #f5f5f5;
  --card-bg: #ffffff;
  --text: #1a1a1a;
  --accent: #4a90e2;
  --due-soon: #ffc107;
  --overdue: #e53935;
  --paid: #43a047;
  --border: #ddd;
}

body{
  font-family: "Segoe UI", sans-serif;
  background-color: var(--bg);
  color: var(--text);
}

#navbar{
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--card-bg);
  border-bottom:1px solid var(--border);
  padding: 16px 24px;
}
.dashboard{
  font-size: 30px;
  font-weight: 600;
}

.icons {
  display: flex;
  gap: 16px;
} 

section:first-of-type{
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 20px;
padding:24px;
max-width: 600px;
margin: 0 auto;
}

#create,
#next-pay,
#bill-due,
#bill-paid{
  
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06 );
  transition: transform 0.15s ease, box-shadow 0.15s ease; 
  
}

#create:hover,
#next-pay:hover,
#bill-due:hover,
#bill-paid:hover{
  transform:translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

#create h3,
#next-pay h3,
#bill-due h3,
#bill-apid h3{
  font-size: 18px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.search-container{
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

#search-input,
#bill-timing{
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
}

table{
  width: 100%;
  border-collapse: collapse;
  background-color: var(--card-bg);
  border-radius: 8px;
  overflow: hidden;
}

th, td{
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

th{
  background-color: var(--bg);
  font-weight: 600;
}

.has-bills{
  background-color: var(--accent);
  color: white;
  font-weight: 600;
}

.due-soon{
  background-color: var(--due-soon);
  color: white;
  font-weight: 600;
}

.overdue{
  background-color: var(--overdue);
  color: white;
  font-weight: 600;
}
.calendar-cell{
  padding: 8px;
  text-align: center;
  border-radius: 4px;
}

.calendar-grid{
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
td button{
  background-color: var(--accent);
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 16px;
 cursor: pointer;
}

td button:hover{
  opacity: 0.85;
}

@media (max-width: 600px){
  section:first-of-type{
    max-width: 280px;
    gap: 12px;
    padding: 12px 16px;
  }

  #create h3,
  #next-pay h3,
  #paid-due h3,
  #bill-paid h3{
    font-size:12px;
  }

  .search-container{
    flex-direction: column;
    align-items: stretch;
  }

  #search-input,
  #bill-timing{
    width: 100%;
  }

  table{
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  th, td {
    padding: 8px 10px;
    font-size: 13px;
  }

  #navbar{
    padding: 12px 16px;
  }

  .dashboard{
    font-size: 20px;
  }
  .modal-hidden{
    display: none;
  }

  #calendar-modal,
  #noti-modal,
  #add-modal,
  #modal,
  #due-modal,
  #paid-modal{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
  }

  #calendar-modal-content,
  #noti-modal-content,
  #add-bill-form,
  #modal-content,
  #due-modal-content,
  #paid-modal-content{
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 24px;
    max-width: 90%;
    width: 400px;
    max-height: 80vh;
    overflow-y: auto;
  }
  #calendar-modal.modal-hidden,
#noti-modal.modal-hidden,
#add-modal.modal-hidden,
#modal.modal-hidden,
#due-modal.modal-hidden,
#paid-modal.modal-hidden {
  display: none;
}
}

