/* RESET & BASE STYLES */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  outline: none;
  background: none;
}

/* LAYOUT */

/* MAIN CONTENT */
.main-content {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem;
}

.content-wrapper {
  width: 100%;
  max-width: 1200px;
}

/* PAGE TITLE */
.page-title {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

/* QUICK ACTIONS */
.quick-actions .action-right svg {
  stroke: #FFFFFF;
}

.quick-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .quick-actions {
    grid-template-columns: repeat(2, 1fr);
  }
}

.action-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #181A1E;
  border: 1px solid #2D2F34;
  border-radius: 6px;
  padding: 1rem;
  transition: border-color 0.2s ease;
}

@media (hover: hover) {
  .action-card:hover {
    border-color: #3B82F6;
  }
}

.action-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.icon-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
}

.action-label {
  font-size: 0.95rem;
  font-weight: 500;
  color: #FFFFFF;
}

.action-right svg {
  width: 20px;
  height: 20px;
  color: #B0B0B0;
}

/* WEEK CARD STYLES */
.week-card {
  background-color: #181A1E;
  border: 1px solid #2D2F34;
  border-radius: 6px;
  padding: 1rem;
  margin-bottom: 2rem;
}

.week-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

#weekHeading {
  font-size: 1.1rem;
  font-weight: 500;
  color: #FFFFFF;
}

.arrow-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #FFFFFF;
  cursor: pointer;
}

@media (hover: hover) {
  .arrow-btn:hover {
    color: #3B82F6;
  }
}

/* TRANSACTIONS GRID */
.transactions-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .transactions-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.transactions-column h2 {
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

.transaction-card {
  background-color: #181A1E;
  border: 1px solid #2D2F34;
  border-radius: 6px;
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  position: relative;
}

.transaction-left {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.transaction-left h4 {
  font-size: 0.95rem;
  font-weight: 500;
}

.transaction-left p {
  font-size: 0.8rem;
  color: #A3A3A3;
}

.transaction-date {
  font-size: 0.8rem;
  color: #CCCCCC;
}

.transaction-right-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.transaction-amount {
  font-weight: 500;
}

.negative {
  color: #F87171;
}

.positive {
  color: #34D399;
}

.transaction-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.icon-btn {
  cursor: pointer;
  color: #9CA3AF;
  transition: color 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  height: auto;
}

@media (hover: hover) {
  .icon-btn:hover {
    color: #FFFFFF;
  }
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

/* MEAL PLANNING */
.meal-planning {
  margin-top: 2rem;
  width: 100%;
}

.meal-planning h2 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.meal-card {
  background-color: #181A1E;
  border: 1px solid #2D2F34;
  border-radius: 6px;
  padding: 1rem;
  margin-bottom: 1rem;
  position: relative;
}

.meal-title {
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.meal-category,
.meal-description {
  font-size: 0.9rem;
  color: #A3A3A3;
  margin-bottom: 0.5rem;
  white-space: pre-wrap;
}

.btn-meal {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: #2D6FE4;
  color: #FFFFFF;
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: background 0.2s ease;
  margin-top: 0.5rem;
}

@media (hover: hover) {
  .btn-meal:hover {
    background-color: #1043B1;
  }
}

.btn-deduction {
  background-color: #eb5245 !important;
  color: #FFFFFF !important;
  transition: background 0.2s ease;
}

@media (hover: hover) {
  .btn-deduction:hover {
    background-color: #dc2626 !important;
  }
}

.meal-actions {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.meal-actions .icon-btn {
  background-color: #2D2F34;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  transition: background-color 0.2s ease, color 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  height: auto;
}

@media (hover: hover) {
  .meal-actions .icon-btn:hover {
    background-color: #3A3D42;
    color: #FFFFFF;
  }
}

#btnAddMealPlan {
  background-color: #1043B1;
  color: #FFFFFF;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  border: none;
  font-size: 0.9rem;
  cursor: pointer;
  margin-top: 1rem;
  transition: background 0.2s ease;
}

@media (hover: hover) {
  #btnAddMealPlan:hover {
    background-color: #2D6FE4;
  }
}



/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 100;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.6);
}

.modal-content {
  background-color: #181A1E;
  margin: 10% auto;
  padding: 20px;
  border: 1px solid #2D2F34;
  border-radius: 6px;
  width: 90%;
  max-width: 600px;
}

.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.close:hover,
.close:focus {
  color: #fff;
  text-decoration: none;
}

/* ICONS*/
svg.icon {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .main-content {
    padding: 60px 1rem 1rem;
  }

  .page-title {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    line-height: 1.3;
  }

  .quick-actions {
    gap: 0.75rem;
  }

  .action-card {
    padding: 0.75rem;
  }

  .action-label {
    font-size: 1rem;
    line-height: 1.4;
  }

  .week-card {
    padding: 0.75rem;
    margin-bottom: 1.5rem;
  }

  #weekHeading {
    font-size: 1.1rem;
    line-height: 1.4;
  }

  .transactions-column h2 {
    font-size: 1.1rem;
    line-height: 1.4;
  }

  .transaction-card {
    padding: 0.75rem;
    margin-bottom: 0.75rem;
  }

  .transaction-left h4 {
    font-size: 1rem;
    line-height: 1.4;
  }

  .transaction-left p {
    font-size: 0.9rem;
    line-height: 1.5;
  }

  .transaction-date {
    font-size: 0.9rem;
    line-height: 1.5;
  }

  .transaction-amount {
    font-size: 1rem;
    line-height: 1.4;
  }

  .meal-planning h2 {
    font-size: 1.1rem;
    text-align: left;
    align-self: flex-start;
    width: 100%;
    padding-left: 1rem;
    /* Match container padding */
    margin-left: -1rem;
    line-height: 1.4;
  }

  .meal-card {
    padding: 0.75rem;
  }

  .meal-title {
    font-size: 1rem;
    line-height: 1.4;
  }

  .meal-category,
  .meal-description {
    font-size: 0.95rem;
    line-height: 1.5;
  }

  .btn-meal {
    font-size: 0.95rem;
    padding: 0.5rem 0.9rem;
  }

  .modal-content {
    width: 95%;
    margin: 5% auto;
    padding: 1rem;
  }
}