:root {
  --bg: #f4efe6;
  --bg-2: #ebe2d3;
  --surface: #fffdf8;
  --ink: #1d1a15;
  --muted: #6b6256;
  --accent: #0f766e;
  --accent-2: #14532d;
  --warn: #b45309;
  --radius: 16px;
  --shadow: 0 12px 30px rgba(29, 26, 21, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 10%, #fff5d8 0%, transparent 35%),
    radial-gradient(circle at 90% 0%, #d9f8ef 0%, transparent 30%),
    linear-gradient(180deg, var(--bg), var(--bg-2));
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(255, 253, 248, 0.85);
  border-bottom: 1px solid rgba(29, 26, 21, 0.08);
  backdrop-filter: blur(8px);
}

.menu-btn,
.close-btn {
  border: 0;
  background: #efe4d2;
  color: var(--ink);
  width: 40px;
  height: 40px;
  border-radius: 10px;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.brand {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.2px;
}

.container {
  width: min(980px, 92%);
  margin: 18px auto 28px;
  display: grid;
  gap: 16px;
}

.hero {
  background: linear-gradient(140deg, #184e4a, #356859);
  color: #f8fff8;
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  animation: riseIn 380ms ease-out;
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.12em;
  opacity: 0.88;
  font-size: 0.75rem;
}

.hero h2 {
  margin: 8px 0;
  font-family: "Merriweather", serif;
  font-size: 1.45rem;
}

.current-time {
  margin: 8px 0 0;
  font-size: 2rem;
  font-weight: 800;
}

.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  animation: riseIn 500ms ease-out;
  min-width: 0;
}

.card h3,
.card h2 {
  margin-top: 0;
}

.highlight {
  border: 1px solid rgba(15, 118, 110, 0.3);
}

.next-prayer {
  margin: 4px 0;
  font-size: 1.25rem;
  font-weight: 700;
}

.countdown {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--accent);
}

.status-message {
  margin-top: 10px;
  color: var(--muted);
}

.alerts p {
  margin: 10px 0;
  padding: 10px;
  border-radius: 10px;
  background: #faf5ea;
}

.zawal-card {
  padding: 10px 12px;
  justify-self: start;
}

.zawal-card h3 {
  margin: 0 0 6px;
  font-size: 0.9rem;
}

.zawal-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 22px;
}

.zawal-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 0.72rem;
  font-weight: 700;
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
}

.timings-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.prayer-grid .timing-item {
  align-items: center;
}

.prayer-grid .name {
  text-transform: uppercase;
}

.timing-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(29, 26, 21, 0.09);
  border-radius: 12px;
}

.timing-item .name {
  font-weight: 700;
}

.warning {
  color: var(--warn);
}

.note p {
  margin: 7px 0;
}

.simple-page {
  padding-top: 10px;
}

.bug-form {
  display: grid;
  gap: 8px;
}

.bug-form input,
.bug-form textarea {
  width: 100%;
  border: 1px solid rgba(29, 26, 21, 0.22);
  border-radius: 10px;
  padding: 10px;
  font: inherit;
}

.bug-form button {
  border: 0;
  border-radius: 12px;
  padding: 11px 16px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.calendar-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.month-select {
  border: 1px solid rgba(29, 26, 21, 0.2);
  border-radius: 10px;
  padding: 8px 10px;
  font: inherit;
  background: #fff;
}

.calendar-table-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.calendar-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
  font-size: 0.9rem;
}

.calendar-table th,
.calendar-table td {
  border: 1px solid rgba(29, 26, 21, 0.14);
  padding: 8px 10px;
  text-align: left;
  white-space: nowrap;
}

.calendar-table thead th {
  background: #f6efe2;
  font-weight: 800;
}

.sidenav {
  position: fixed;
  top: 0;
  left: -270px;
  width: 260px;
  height: 100vh;
  background: #1f2e2b;
  color: #ebf6ef;
  z-index: 30;
  transition: left 240ms ease;
  padding: 14px;
}

.sidenav.open {
  left: 0;
}

.sidenav-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sidenav h2 {
  margin: 0;
  font-size: 1rem;
}

.sidenav nav {
  display: grid;
  margin-top: 20px;
}

.sidenav a {
  color: #e9f5f1;
  text-decoration: none;
  padding: 10px 8px;
  border-radius: 8px;
}

.sidenav a.active,
.sidenav a:hover {
  background: rgba(233, 245, 241, 0.16);
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(7, 11, 11, 0.45);
  z-index: 25;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
}

.overlay.show {
  opacity: 1;
  pointer-events: auto;
}

@media (min-width: 768px) {
  .menu-btn {
    display: none;
  }

  .sidenav {
    left: 0;
    width: 220px;
  }

  .overlay {
    display: none;
  }

  .topbar {
    padding-left: 240px;
  }

  .container {
    margin-left: max(240px, calc((100vw - 980px) / 2 + 220px));
    width: min(980px, calc(100vw - 280px));
  }

  .timings-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@keyframes riseIn {
  from {
    transform: translateY(12px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
