html {
   font-family: sans-serif;
   font-size: clamp(16px, 2vw, 20px);
}


body {
  color:#46474b;  
  box-sizing: border-box;
}

input,
textarea,
select {
  font-size: 1rem;   /* inherits global scaling, minimum 16px */
}

h1 {
  color:#0170b9;
  font-size: 1.75em;
  text-align:center;
}

h2 {
    color:#0170b9;
    margin-top: 1.5rem;
}

h3, h4, h5 {
    color:#0170b9;
    margin-top: 1.25rem;
}

.tb-navbar ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
  background-color: #333333;
  display: flex;
}

.tb-navbar ul li a {
  display: block;
  color: white;
  padding: 14px 16px;
  text-decoration: none;
}

tb-navbar ul li a:hover {
  background-color: #111111;
}

.intro {
   text-align:center;
}

.into p {
   font-size:1.25em;
}

.calcButton {
  background-color: #004080;
  color: white;
  border: none;
  padding: 0.75rem 0.75rem;
  margin-top: 0.5rem;
  /*margin-left: 0.5rem;  */
  margin-left: auto;
  margin-right: auto;
  font-size: 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.calcButton:hover {
  background-color: #0066cc;
}

.resultCard {
  margin-left: auto;
  margin-right: auto;
  margin-top: 0.75rem;
  margin-bottom: 0.75rem;  
  background-color: #c6cef7; /* optional: or keep your current color */
  box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.05);
  border-radius: 12px;
  box-sizing: border-box;  
  text-align: left;
  width: 80%vw;
  max-width:600px;
  padding:10px;
}

.resultCard:hover {
  transform: translateY(-3px);
}

.resultCard h3 {
  margin-top: 0;
  color: #0170b9;
}

.controlbar {
    margin-left:auto;
    margin-right:auto;
    margin-top:0.75em;
    padding:0.75rem;
    background-color: #dcf0fc;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    width: 80%vw;
    max-width:600px;
    text-align:center;
    padding:10px;
}

.controlbar img {
    padding:0.25rem;
    margin-bottom: 0.1rem;
 }

.expense-capture {
  margin-left: auto;
  margin-right: auto;
  margin-top: 0.75rem;
  margin-bottom: 0.75rem;  
  background-color: #c6cef7; 
  box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.05);
  border-radius: 12px;
  box-sizing: border-box;  
  text-align: left;
  width: 80%vw;
  max-width:600px;
  padding:10px;
}

.expense-capture:hover {
  transform: translateY(-3px);
}

.expense-capture h3 {
  margin-top: 0;
  color: #0170b9;
}

.onbudget {
  color:black;
}

.overspent {
  color:red;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

li {
  display: flex;
  border-bottom: 1px solid #ccc; /* optional table-like look */
  padding: 4px 0;
}

li span {
  flex-shrink: 0;   /* prevents spans from shrinking smaller */
  overflow: hidden; /* keeps long text from breaking layout */
  text-overflow: ellipsis;
  white-space: nowrap;
}

li .span-id {
  flex-basis: 10%;
}

li .span-name {
  flex-basis: 50%;
  text-align: left;
}

li .span-amount {
  flex-basis: 25%;
  text-align: left;
}

li .span-delete {
  flex-basis: 15%;
  text-align: left;
}

.span-id {
  color:#000005;
}

.span-name {
  color:#000005;
}

.span-amount {
  color:#000005;
}

.capture-expense {
   display:flex;
   flex-direction: column;
}

.capture-expense > div {
  margin:10px;
  text-align: center;
  line-height: 30px;
  font-size: 1rem;
}

.additional-controls {
   display:flex;
}

.additional-controls > div {
  margin:10px;
  text-align: center;
  line-height: 20px;
  font-size: 0.5rem;
  width: 80%vw;
  max-width:600px;
}

.date-field {
   margin-bottom:2.5%;
}

/* Hint text */
.input-hint {
  font-size: 0.875rem; /* slightly smaller */
  color: #555; /* muted but still readable */
  margin-top: 0.4rem;
  line-height: 1.4;
}

.input-budget {
  padding: 12px;
  width:15ch; 
  margin-left: auto;
  margin-right: auto;
  margin-top:4px; 
  margin-bottom: 4px;
  display: block;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
  text-align:center;  
}

.input-budget:focus {
  border: 3px solid #555;
}

.input-duration {
  padding: 12px;
  width:15ch; 
  margin-left:auto;
  margin-right:auto;
  margin-top:2px; 
  margin-bottom: 4px;
  display: block;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
  text-align:center;
}

.input-duration:focus {
  border: 3px solid #555;
}

label {
   display:block;
}

.currency-choice {
   margin-top:2px;
   margin-bottom:2px;
}

