body{
    background-color: #fce8d5;
    font-family: "Open Sans", sans-serif;
    color: #333333; 
    font-size: 18px; 
    line-height: 1.6; 
}

#title {
  display: flex;
  justify-content: center;
  align-items: center;
}

#title h1 {
  font-size: 2.5rem;   
  margin: 10px 0;
  color: #333333;      
  font-weight: 700;    
}

h1 {
  font-size: 2.5rem;   
}

h2 {
  font-size: 1.8rem;   
  margin-bottom: 10px;
  color: #333333;
  font-weight: 600;
}

.poiret-one-regular {
  font-family: "Poiret One", sans-serif;
  font-weight: 600;
  font-style: normal;
}

.error {
  color: red;
  font-size: 0.8em;
  display: none;
}

#expense-pie-chart{
  height: 300px;
  width: 300px;
  margin: auto;
  display: block;
}

#expense-income-form fieldset{
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.table-wrapper{
  width: 100%;
  overflow-x: auto; 
}

.table-wrapper table{
  width: 100%;
  border-collapse: collapse;
  min-width: 600px; 
}

.table-wrapper th, .table-wrapper td {
  padding: 8px;
  text-align: left;
  font-size: 18px; /* Base font size */
}

input, select {
  font-size: 1rem;   
  padding: 8px;      
}

.card {
  background-color: #fff8f0;
  padding: 20px;
  margin-bottom: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  overflow-x: auto;
}

#footer {
  text-align: center;
  padding: 15px 0;
  font-size: 0.9rem;
  color: #555;
  border-top: 1px solid #ccc; 
  margin-top: 30px;           
}

#footer p {
  margin: 4px 0;
}

#footer a {
  color: #6d6875;
  text-decoration: none;
}

#footer a:hover {
  text-decoration: underline;
}

.social-icons {
  margin-top: 8px;
}

.social-icons a {
  color: #6d6875;
  margin: 0 8px;
  font-size: 1.5rem;
  text-decoration: none;
  transition: color 0.3s;
}

.social-icons a:hover {
  color: #bc6c25; 
}

input, select, button {
  box-sizing: border-box; 
}

button {
  font-size: 1rem;       
  padding: 10px 20px;    
  border-radius: 6px;    
  border: none;
  cursor: pointer;
}

.submit-button {
  background-color: #bc6c25; 
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

.submit-button:hover {
  background-color: #99582a; 
}

.edit-button {
  background-color: #f4a261;
  color: white;
  border: none;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
}

.edit-button:hover {
  background-color: #e59560; 
}

.delete-button {
  background-color: #e76f51; 
  color: white;
  border: none;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
}

.delete-button:hover {
  background-color: #d45d43; 
}

input[type="file"]::file-selector-button {
  background-color: #6d6875; 
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
}

input[type="file"]::file-selector-button:hover {
  background-color: #5b5562; 
}

#export-button {
  background-color: #6d6875; 
  color: white;
}

#export-button:hover {
  background-color: #5b5562;
}

#summary p {
  margin-bottom: 10px;
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 10px;  
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 8px;   
  cursor: pointer;
  font-size: 1rem;
}

.income-amount {
  color: #27ae60;  
  font-weight: 600;
}

.expense-amount {
  color: #e74c3c;  
  font-weight: 600;
}

/* custom radio button */

.custom-radio-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.custom-radio-option {
  display: flex;
  align-items: center;
  justify-content: space-between; 
  padding: 6px 12px; 
  background-color: #fff;
  border: 2px solid #ccc;
  border-radius: 0;
  cursor: pointer;
  transition: border 0.3s, background 0.3s;
  font-size: 0.9rem;
}

.custom-radio-button {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid #999;
  background-color: #fff; 
  transition: background-color 0.3s, border 0.3s;
}

.custom-radio-option input[type="radio"] {
  display: none;
}

.custom-radio-option input[type="radio"]:checked + .custom-radio-button {
  background-color: #bc6c25;
  border: 1.5px solid #bc6c25;
}

.custom-radio-option input[type="radio"]:checked + .custom-radio-button::after {
  display: none;
}

/* MOBILE */

@media (max-width: 600px) {

  body {
    padding: 10px;   
  }

  .card {
    padding: 15px;     
    margin-bottom: 15px; 
    box-shadow: 0 2px 4px rgba(0,0,0,0.05); 
    overflow-x: auto; 
    width: 90%;            
    max-width: 400px;       
    margin-left: auto;      
    margin-right: auto;     
  }

  #expense-income-form {
    display: flex;
    justify-content: center;
    width: 100%;
  }

  #expense-income-form fieldset {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;   
    gap: 12px;
    padding: 0;
  }

  #expense-income-form label {
    width: 100%;
    text-align: center;    
  }

  #expense-income-form input,
  #expense-income-form select,
  #expense-income-form button {
    width: 80%;            
    max-width: 300px;      
    margin: 0 auto;         
  }

  .custom-radio-group {
    width: 80%;
    max-width: 300px;
    margin: 0 auto;
  }

  .custom-radio-option {
    width: 100%;           
  }

  .error {
    text-align: center;    
  }

  .table-wrapper th, .table-wrapper td {
    font-size: 14px;
  }

  #expense-pie-chart {
    width: 100%;
    max-width: 300px;
    height: auto;
    margin: auto;
    display: block;
  }

  button, #export-button {
    width: 100%;   
    margin-top: 8px; 
  }

#expense-income-form .submit-button {
    width: 80%;
    max-width: 300px;
    margin: 0 auto 20px auto;
}


  input, select {
    width: 100%;
  }
}


/* TABLET */

@media (max-width: 1024px) and (min-width: 601px) {

  #expense-income-form fieldset {
    flex-direction: column;
    align-items: center;       
    gap: 8px; 
  }

  #expense-income-form fieldset > * {
    width: 80%;  
    max-width: 400px;
  }

  .table-wrapper th, .table-wrapper td {
    font-size: 16px;
  }

  #expense-pie-chart {
    height: 200px;
    width: 200px;
    margin: auto;
    display: block;
  }
}

