/* Main Container */
.main-container {
  margin: 0 auto;
}

.main-container .page-title {
  font-size: 28px;
  margin-bottom: 4px;
}

.main-container .page-sub {
  color: #475569;
  margin-bottom: 16px;
}

/* Panels */
.main-container .panel {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 4px 5px 10px 1px rgba(168, 168, 168, 0.49);
}

.main-container .panel h2 {
  font-size: 20px;
  margin-bottom: 12px;
  font-weight: 600;
}

.main-container .panel h3 {
  font-size: 16px;
  margin-bottom: 8px;
  font-weight: 600;
}

/* Bill Input */
.bill-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.currency-symbol {
  position: absolute;
  left: 16px;
  font-size: 32px;
  font-weight: bold;
  color: #1e1e2f;
  pointer-events: none;
}

.bill-input:focus {
  outline: none;
  border-color: #00dfd8;
  box-shadow: 0 0 0 3px rgba(0, 223, 216, 0.1);
}

/* Tip Buttons */
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.tip-btn {
  padding: 16px;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tip-btn:hover {
  border-color: #00dfd8;
  background: #f0fdfc;
}

.tip-btn.active {
  background: #1e1e2f;
  color: #00dfd8;
  border-color: #1e1e2f;
}

/* Tip Slider */
.tip-slider {
  width: 100%;
  height: 8px;
  border-radius: 5px;
  background: #e5e7eb;
  outline: none;
  -webkit-appearance: none;
}

.tip-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #1e1e2f;
  cursor: pointer;
}

.tip-slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #1e1e2f;
  cursor: pointer;
  border: none;
}

/* Form Inputs */
.main-container label {
  font-weight: 600;
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
}

.main-container input,
.main-container select {
  width: 100%;
  padding: 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  font-size: 14px;
}

.main-container input:focus,
.main-container select:focus {
  outline: none;
  border-color: #00dfd8;
  box-shadow: 0 0 0 3px rgba(0, 223, 216, 0.1);
}

#billAmount {
  width: 100%;
  padding: 10px 10px 10px 50px;
  font-size: 32px;
  font-weight: bold;
  border: 2px solid #cbd5e1;
  border-radius: 12px;
  text-align: left;
}
/* Grid Layouts */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

/* Results Panel */
.results-panel {
  background: linear-gradient(135deg, #1e1e2f 0%, #2a2a3f 100%);
  color: #fff;
}

#resultsPanel {
  background: linear-gradient(135deg, #1e1e2f 0%, #2a2a3f 100%);
}
.results-panel h2,
.results-panel h3 {
  color: #00dfd8;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.result-card {
  background: rgba(255, 255, 255, 0.1);
  padding: 16px;
  border-radius: 10px;
  text-align: center;
}

.result-card.highlight {
  background: rgba(0, 223, 216, 0.2);
  border: 2px solid #00dfd8;
}

.result-label {
  font-size: 14px;
  margin-bottom: 8px;
  opacity: 0.8;
}

.result-value {
  font-size: 28px;
  font-weight: bold;
  color: #00dfd8;
}

/* Breakdown */
.breakdown-section {
  background: rgba(255, 255, 255, 0.05);
  padding: 16px;
  border-radius: 10px;
}

.breakdown-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.breakdown-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.breakdown-item.grand-total {
  border-top: 2px solid #00dfd8;
  border-bottom: none;
  padding-top: 12px;
  margin-top: 8px;
  font-size: 18px;
}

.breakdown-item strong {
  color: #00dfd8;
}

/* Split Cards */
.split-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.split-card {
  background: #f8fafc;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  padding: 16px;
}

.split-person {
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 12px;
  color: #1e1e2f;
}

.split-amount,
.split-tip {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.split-label {
  font-size: 14px;
  color: #64748b;
}

.split-value {
  font-weight: 600;
  color: #1e1e2f;
}

/* Tip Guide */
.tip-guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.tip-guide-card {
  background: #f8fafc;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  padding: 16px;
  text-align: center;
  transition: all 0.2s ease;
}

.tip-guide-card:hover {
  border-color: #00dfd8;
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.tip-guide-service {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 8px;
  color: #1e1e2f;
}

.tip-guide-percent {
  font-size: 24px;
  font-weight: bold;
  color: #00dfd8;
  margin-bottom: 8px;
}

.tip-guide-desc {
  font-size: 12px;
  color: #64748b;
}

/* Saved Calculations */
.saved-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.saved-card {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 16px;
}

.saved-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.saved-date {
  font-size: 14px;
  color: #64748b;
}

.saved-delete {
  background: #ef4444;
  color: #fff;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.saved-delete:hover {
  background: #dc2626;
}

.saved-details {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  font-size: 14px;
}

/* Buttons */
.row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.grow {
  flex: 1;
}

.btn {
  background: #1e1e2f;
  color: #00dfd8;
  border: 0;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
}

.btn:hover {
  background: #2a2a3f;
  transform: translateY(-1px);
}

.btn.secondary {
  background: #64748b;
  color: #fff;
}

.btn.ghost {
  background: #e2e8f0;
  color: #111827;
}

.hint {
  color: #64748b;
  font-size: 12px;
  margin-top: 8px;
}

/* Utilities */
.mt-4 {
  margin-top: 16px;
}

/* Responsive */
@media (max-width: 900px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .results-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .grid-4,
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }

  .bill-input {
    font-size: 24px;
    padding: 16px 16px 16px 44px;
  }

  .currency-symbol {
    font-size: 24px;
    left: 12px;
  }

  .tip-btn {
    padding: 12px;
    font-size: 16px;
  }

  .result-value {
    font-size: 22px;
  }

  .tip-guide-grid {
    grid-template-columns: 1fr;
  }

  .saved-details {
    grid-template-columns: 1fr;
  }
}
