:root {
  --primary-color: #2c3e50;
  --primary-container: #e8eef5;
  --on-primary-container: #1b2631;
  --accent-color: #2980b9;
  --bg-color: #f8f9fa;
  --surface-color: #ffffff;
  --surface-variant: #f0f3f6;
  --text-main: #2c3e50;
  --text-muted: #7f8c8d;
  --border-color: #e2e8f0;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  display: flex;
  justify-content: center;
  min-height: 100vh;
}

#app-container {
  width: 100%;
  max-width: 600px;
  background-color: var(--surface-color);
  min-height: 100vh;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
}

/* Sign In Screen */
.auth-screen {
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  text-align: center;
}

.auth-logo {
  height: 220px;
  margin-bottom: 16px;
  object-fit: contain;
}

.auth-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 28px;
}

.auth-card {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  width: 100%;
  box-shadow: var(--shadow);
}

.form-group {
  margin-bottom: 16px;
  text-align: left;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-main);
}

.form-control {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
}

.form-control:focus {
  border-color: var(--accent-color);
}

.btn-primary {
  width: 100%;
  padding: 14px;
  background-color: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 12px;
}

.btn-secondary {
  background: transparent;
  color: var(--accent-color);
  border: none;
  font-size: 0.95rem;
  font-weight: 600;
  margin-top: 20px;
  cursor: pointer;
}

/* Top Header */
.header-bar {
  text-align: center;
  padding: 16px 16px 8px;
  position: relative;
  background-color: var(--surface-color);
}

.header-logo {
  height: 146px;
  object-fit: contain;
}

.header-actions {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  gap: 8px;
  align-items: center;
}

.icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-btn svg {
  width: 24px;
  height: 24px;
  fill: var(--primary-color);
}

.sign-out-btn {
  background: none;
  border: none;
  color: var(--accent-color);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.app-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-main);
  margin-top: 4px;
}

.app-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

/* Plan Switcher Tabs */
.tab-row {
  display: flex;
  background-color: var(--surface-variant);
  border-bottom: 1px solid var(--border-color);
}

.tab-btn {
  flex: 1;
  padding: 14px;
  border: none;
  background: none;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 3px solid transparent;
}

.tab-btn.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
  background-color: rgba(255, 255, 255, 0.5);
}

/* Price Banner */
.price-banner {
  background-color: var(--primary-container);
  border-radius: var(--radius-md);
  padding: 16px;
  margin: 16px;
  box-shadow: var(--shadow);
}

.price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.review-btn {
  background-color: var(--primary-color);
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  cursor: pointer;
}

.total-row {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.total-amount {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--on-primary-container);
}

/* Filters */
.filter-section {
  padding: 0 16px 12px;
}

.search-input {
  margin-bottom: 10px;
}

.categories-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.categories-scroll::-webkit-scrollbar {
  display: none;
}

.chip {
  padding: 6px 14px;
  background-color: var(--surface-variant);
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid transparent;
}

.chip.active {
  background-color: var(--primary-container);
  color: var(--primary-color);
  border-color: var(--accent-color);
}

/* Options List */
.options-list {
  padding: 0 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.option-card {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  cursor: pointer;
  transition: background-color 0.2s;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.option-card.selected {
  background-color: #f0f7ff;
  border-color: var(--accent-color);
}

.option-checkbox {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  cursor: pointer;
  accent-color: var(--primary-color);
}

.option-content {
  flex: 1;
}

.option-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 4px;
}

.option-name {
  font-weight: 700;
  font-size: 1rem;
}

.option-price {
  font-weight: 800;
  color: var(--primary-color);
  white-space: nowrap;
}

.option-category {
  display: inline-block;
  font-size: 0.75rem;
  background-color: var(--surface-variant);
  color: var(--text-muted);
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 6px;
}

.option-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.3;
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: flex-end;
  z-index: 1000;
}

.modal-content {
  background: var(--surface-color);
  width: 100%;
  max-width: 600px;
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
  padding: 24px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.modal-title {
  font-size: 1.2rem;
  font-weight: 800;
}

.modal-body {
  overflow-y: auto;
  flex: 1;
  margin-bottom: 16px;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px dashed var(--border-color);
  font-size: 0.95rem;
}

.modal-footer {
  display: flex;
  gap: 12px;
}

.btn-outlined {
  flex: 1;
  padding: 12px;
  background: transparent;
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
  border-radius: var(--radius-sm);
  font-weight: 700;
  cursor: pointer;
}

.hidden {
  display: none !important;
}
