:root {
  --bg: #FFF8E7;        /* ivory */
  --card: #ffffff;
  --primary: #7A1F1F;   /* maroon - headings & primary buttons */
  --primary-dark: #5C1717;
  --saffron: #FF9933;   /* saffron - highlights, active/focus states */
  --accent: #C99000;    /* gold - fine details, borders, dividers */
  --temple-red: #8B0000; /* dark temple red - the priest-side CTA */
  --temple-red-dark: #6B0000;
  --text: #2A1414;
  --muted: #8C7355;
  --border: #EAD9B5;
  --success: #2e7d46;
  --danger: #C1272D;
  --radius: 12px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, "Noto Sans Telugu", sans-serif;
  background: var(--bg);
  color: var(--text);
  padding-bottom: 24px;
}

header.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
}

header.topbar h1 {
  font-size: 18px;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-nav {
  display: flex;
  flex: 1;
  justify-content: space-evenly;
  align-items: center;
  margin-left: 16px;
}

.icon-nav span {
  cursor: pointer;
  font-size: 26px;
  line-height: 1;
  padding: 8px;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
}

.icon-nav span:hover, .icon-nav span:active { background: var(--border); }

.back-link {
  color: var(--text);
  text-decoration: none;
  font-size: 20px;
  margin-right: 4px;
}

main {
  max-width: 640px;
  margin: 0 auto;
  padding: 16px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}

.card:hover { border-color: var(--accent); }

label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-top: 12px;
  margin-bottom: 4px;
}

input, select, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  background: #fff;
  color: var(--text);
  font-family: inherit;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--saffron);
  box-shadow: 0 0 0 2px rgba(255, 153, 51, 0.25);
}

textarea { min-height: 70px; resize: vertical; }

button, .btn {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  width: 100%;
  margin-top: 16px;
}

button:hover, .btn:hover { background: var(--primary-dark); }

button.secondary {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
}

button.danger { background: var(--danger); }
button.small { width: auto; padding: 8px 14px; font-size: 13px; margin-top: 8px; }

button.temple {
  background: var(--temple-red);
  border: 1px solid var(--temple-red);
}
button.temple:hover { background: var(--temple-red-dark); }

.row { display: flex; gap: 10px; }
.row > * { flex: 1; }

.muted { color: var(--muted); font-size: 13px; }
.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eaf5ec;
  color: var(--success);
}
.badge.pending { background: #FFF1DE; color: var(--saffron); }
.badge.warn { background: #fdecea; color: var(--danger); }

.tabs { display: flex; border-bottom: 1px solid var(--border); margin-bottom: 12px; }
.tabs .tab {
  flex: 1; text-align: center; padding: 10px; cursor: pointer;
  color: var(--muted); border-bottom: 2px solid transparent; font-weight: 600; font-size: 14px;
}
.tabs .tab.active { color: var(--primary); border-bottom-color: var(--saffron); }

.priest-card { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.priest-card .name { font-weight: 700; font-size: 16px; }
.price-line { display: flex; justify-content: space-between; padding: 4px 0; font-size: 14px; }
.price-line.total { font-weight: 700; font-size: 16px; border-top: 1px solid var(--border); margin-top: 8px; padding-top: 10px; }

.lang-toggle { display: flex; gap: 4px; }
.lang-toggle button {
  width: auto; margin: 0; padding: 4px 10px; font-size: 12px;
  background: transparent; color: var(--muted); border: 1px solid var(--border);
}
.lang-toggle button.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); }

a.link { color: var(--accent); }

.footer-note { text-align: center; font-size: 12px; color: var(--muted); margin-top: 20px; }

.view { display: none; }
.view.active { display: block; }
