.apt-prayer-times {
  --apt-bg: #f7f4fb;
  --apt-surface: #ffffff;
  --apt-surface-soft: #faf7fd;
  --apt-primary: #734ac6;
  --apt-primary-dark: #5d34b4;
  --apt-primary-soft: #efe7ff;
  --apt-gold: #c79b3b;
  --apt-gold-soft: #f8f1df;
  --apt-berry: #8a2f67;
  --apt-text: #232136;
  --apt-muted: #6b7280;
  --apt-border: #e8def8;
  --apt-shadow: 0 12px 28px rgba(79, 38, 138, 0.08);
  background: linear-gradient(180deg, rgba(248,244,252,.98), rgba(255,255,255,.99));
  border: 1px solid var(--apt-border);
  border-radius: 22px;
  padding: 20px;
  box-shadow: var(--apt-shadow);
  color: var(--apt-text);
}
.apt-topbar-wrap { display:grid; gap:10px; }
.apt-topbar {
  display:flex; justify-content:space-between; align-items:center; gap:16px;
  padding: 0;
}
.apt-current-location-line { display:flex; align-items:center; gap:8px; flex-wrap:wrap; color:var(--apt-text); font-weight:600; }
.apt-current-location-line .apt-loc-icon { color: var(--apt-berry); }
.apt-current-location-text { font-size:15px; }
.apt-current-coords { color: var(--apt-muted); font-size:12px; font-weight:500; }
.apt-topbar-actions { display:flex; align-items:center; gap:10px; }
.apt-location-select-wrap { min-width: 270px; margin:0; }
.apt-field-group { margin:0; }
.apt-field-group label { display:block; color:var(--apt-muted); font-size:13px; margin-bottom:8px; }
.apt-location-select-wrap select, .apt-field-group select {
  width:100%; height:44px; border:1px solid var(--apt-border); border-radius:12px; padding:0 14px; background:#fff; color:var(--apt-text);
}
.apt-settings-toggle {
  width: 44px; height: 44px; border-radius: 12px; border:1px solid var(--apt-border); background:#fff;
  color:var(--apt-primary-dark); cursor:pointer; font-size:18px; box-shadow: var(--apt-shadow);
}
.apt-location-btn, .apt-refresh-btn, .apt-view-btn.is-active {
  background: linear-gradient(135deg, var(--apt-primary), var(--apt-primary-dark));
  color:#fff; border:none; border-radius:12px; font-weight:700;
}
.apt-location-btn, .apt-refresh-btn { padding:12px 18px; cursor:pointer; box-shadow:0 8px 20px rgba(91,46,169,.18); }
.apt-settings-panel {
  background: rgba(255,255,255,.9); border:1px solid var(--apt-border); border-radius:18px; padding:16px;
}
.apt-settings-grid { display:grid; grid-template-columns: 1.7fr 1.2fr; gap:16px; align-items:end; }
.apt-radio-group { display:flex; gap:16px; align-items:center; flex-wrap:wrap; min-height:44px; }
.apt-radio-group label { margin:0; color:var(--apt-text); font-size:15px; }
.apt-settings-actions { margin-top:14px; display:flex; justify-content:flex-end; }
.apt-status { min-height: 22px; margin: 4px 0 8px; color: var(--apt-muted); font-size: 14px; }
.apt-status.is-error { color: #c0392b; font-weight: 600; }
.apt-hero {
  background: linear-gradient(135deg, #7a50ca 0%, #6a41bf 55%, #6038b7 100%);
  color:#fff; border-radius:18px; padding:22px 22px 16px; text-align:center; border:1px solid rgba(199, 155, 59, 0.24); box-shadow:0 14px 30px rgba(94,54,180,.22); margin:6px 0 12px;
}
.apt-hero-label { opacity:.92; font-size:14px; }
.apt-hero-name { font-size:24px; font-weight:800; margin-top:6px; }
.apt-hero-time { font-size:18px; font-weight:700; margin-top:4px; }
.apt-hero-countdown { display:inline-block; margin-top:12px; padding:10px 16px; border-radius:999px; background:rgba(255,255,255,.16); border:1px solid rgba(255,255,255,.12); font-weight:700; }
.apt-hero-summary { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin-top:16px; }
.apt-hero-summary-item { background:rgba(255,255,255,.10); border:1px solid rgba(255,255,255,.16); border-radius:14px; padding:12px 10px; box-shadow: inset 0 1px 0 rgba(255,255,255,.06); }
.apt-hero-summary-item span { display:block; font-size:12px; opacity:.88; }
.apt-hero-summary-item strong { display:block; margin-top:6px; font-size:18px; color:#fff; }
.apt-daily-nav {
  display:grid; grid-template-columns: 48px 1fr 48px; align-items:center; gap:8px; margin:0 0 10px;
}
.apt-day-nav, .apt-month-nav { width:42px; height:42px; border-radius:12px; border:1px solid var(--apt-border); background:#fff; cursor:pointer; font-size:24px; color:var(--apt-primary-dark); }
.apt-daily-nav .apt-day-prev { justify-self:start; }
.apt-daily-nav .apt-day-next { justify-self:end; }
.apt-day-center { text-align:center; }
.apt-day-title { font-weight:800; font-size:18px; color:var(--apt-text); }
.apt-day-subtitle { color:var(--apt-muted); font-size:14px; margin-top:4px; }
.apt-view-switch { display:flex; justify-content:center; gap:10px; margin: 0 0 14px; }
.apt-view-btn { border:1px solid var(--apt-border); background:#fff; color:var(--apt-primary-dark); border-radius:12px; padding:10px 16px; font-weight:700; cursor:pointer; }
.apt-view-btn.is-active { background: linear-gradient(135deg, var(--apt-gold), #b8871f); }
.apt-view { display:none; }
.apt-view.is-active { display:block; }
.apt-card {
  background:#fff;
  border:1px solid var(--apt-border);
  border-radius:18px;
  padding:18px;
  box-shadow:0 4px 16px rgba(116, 76, 192, 0.05);
  min-height:96px;
}
.apt-cards { display:grid; grid-template-columns:repeat(6, 1fr); gap:12px; }
.apt-card-head { display:flex; justify-content:space-between; align-items:center; gap:8px; }
.apt-card-time { display:block; margin-top:10px; font-size:18px; font-weight:700; color:var(--apt-text); }
.apt-badge-next { background:var(--apt-berry); color:#fff; border-radius:999px; padding:4px 9px; font-size:11px; font-weight:700; }
.apt-card.is-next { border-color: rgba(138, 47, 103, 0.42); box-shadow: 0 0 0 3px rgba(138, 47, 103, 0.10); background: linear-gradient(180deg, #fff, #fcf4fa); }
.apt-card.is-current { border-color: rgba(199, 156, 59, 0.55); box-shadow: 0 0 0 3px rgba(199, 156, 59, 0.16); background: linear-gradient(180deg, #fff, #fdf8ee); }
.apt-monthly-header { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:12px; }
.apt-month-title { font-weight:800; font-size:18px; color:var(--apt-primary-dark); }
.apt-monthly-table-wrap { overflow:auto; border:1px solid var(--apt-border); border-radius:16px; background:#fff; }
.apt-monthly-table { width:100%; border-collapse:collapse; min-width:760px; }
.apt-monthly-table th, .apt-monthly-table td { padding:12px 10px; border-bottom:1px solid #f0e8fb; text-align:left; font-size:14px; }
.apt-monthly-table th { background:#faf7fd; color:var(--apt-primary-dark); position:sticky; top:0; }
.apt-monthly-table tr:nth-child(even) td { background:#fcfbfe; }

@media (max-width: 980px) {
  .apt-topbar { flex-direction:column; align-items:stretch; }
  .apt-topbar-actions { width:100%; }
  .apt-location-select-wrap { min-width:0; flex:1; }
  .apt-settings-grid, .apt-hero-summary { grid-template-columns:1fr; }
  .apt-cards { grid-template-columns:repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .apt-prayer-times { padding:14px; border-radius:18px; }
  .apt-topbar-actions { gap:8px; flex-wrap:wrap; }
  .apt-location-btn { width:100%; }
  .apt-cards, .apt-hero-summary { grid-template-columns:1fr; }
  .apt-daily-nav { grid-template-columns: 40px 1fr 40px; }
}

.apt-daily-nav { margin-top: 4px; }
.apt-day-nav, .apt-month-nav { display:inline-flex; align-items:center; justify-content:center; line-height:1; }
.apt-day-center { min-height: 44px; display:flex; flex-direction:column; justify-content:center; }


/* final polish */
.apt-day-nav, .apt-month-nav { transition: all .18s ease; }
.apt-day-nav:hover, .apt-month-nav:hover, .apt-settings-toggle:hover { transform: translateY(-1px); }
.apt-hero-summary-item strong { letter-spacing: .01em; }
