/* Daily Adhkar — calm, readable presentation */

.adhkar-body {
  background: #f8faf9;
}

.adhkar-page {
  max-width: 960px;
  margin: 0 auto;
  padding: 16px 12px 48px;
}

.adhkar-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #047857;
  text-decoration: none;
  font-size: 0.95rem;
  margin-bottom: 16px;
}

.adhkar-back-link:hover {
  text-decoration: underline;
}

.adhkar-back-link--icon-only {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  margin-bottom: 0;
  justify-content: center;
  border-radius: 12px;
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
  font-size: 1.2rem;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

.adhkar-back-link--icon-only:hover {
  text-decoration: none;
  background: #d1fae5;
  border-color: #6ee7b7;
}

.adhkar-back-link--icon-only:active {
  transform: scale(0.96);
}

.adhkar-back-link--detail {
  margin-bottom: 16px;
}

.adhkar-detail-nav {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  margin-bottom: 16px;
}

.adhkar-detail-nav__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
  color: #047857;
  text-decoration: none;
  font-size: 1.15rem;
  line-height: 1;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease, opacity 0.15s ease;
}

.adhkar-detail-nav__btn:hover {
  background: #d1fae5;
  border-color: #6ee7b7;
}

.adhkar-detail-nav__btn:active {
  transform: scale(0.96);
}

.adhkar-detail-nav__btn--home {
  justify-self: center;
}

.adhkar-detail-nav__btn--next {
  justify-self: end;
}

.adhkar-detail-nav__btn--disabled {
  opacity: 0.35;
  pointer-events: none;
  cursor: default;
}

.adhkar-page-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.adhkar-page-header .adhkar-page-title {
  flex: 1;
  min-width: 0;
  margin: 0;
  text-align: center;
  font-size: clamp(1.25rem, 4.5vw, 1.75rem);
  line-height: 1.25;
}

.adhkar-page-share-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 12px;
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
  color: #047857;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

.adhkar-page-share-btn:hover {
  background: #d1fae5;
  border-color: #6ee7b7;
}

.adhkar-page-share-btn:active {
  transform: scale(0.96);
}

.adhkar-page-share-btn:focus-visible {
  outline: 2px solid #059669;
  outline-offset: 2px;
}

.adhkar-header {
  text-align: center;
  margin-bottom: 28px;
}

.adhkar-page-title {
  margin: 0 0 8px;
  font-size: 1.75rem;
  color: #134e4a;
  font-weight: 700;
}

.adhkar-page-subtitle {
  margin: 0;
  color: #64748b;
  font-size: 1rem;
}

.adhkar-results {
  margin-top: 4px;
}

.adhkar-results__toolbar {
  display: flex;
  justify-content: stretch;
  align-items: center;
  margin-bottom: 14px;
}

.adhkar-results__filters {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.adhkar-results__category-wrap,
.adhkar-results__search {
  flex: 1 1 0;
  min-width: 0;
  width: auto;
  max-width: none;
}

.adhkar-results__category-select {
  width: 100%;
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #fff;
  color: #0f172a;
  font-size: 16px;
  line-height: 1.2;
  box-sizing: border-box;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #94a3b8 50%), linear-gradient(135deg, #94a3b8 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% - 2px), calc(100% - 12px) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 30px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.adhkar-results__category-select:focus {
  border-color: #059669;
  box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.12);
}

.adhkar-results--admin .adhkar-results__category-select:focus {
  border-color: #0369a1;
  box-shadow: 0 0 0 2px rgba(3, 105, 161, 0.12);
}

.adhkar-category-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.adhkar-category {
  background: #fff;
  border: 1px solid #d1fae5;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.adhkar-results--admin .adhkar-category {
  border-color: #e2e8f0;
}

.adhkar-category__toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: none;
  background: linear-gradient(135deg, #ecfdf5 0%, #f0fdfa 100%);
  color: #134e4a;
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.adhkar-results--admin .adhkar-category__toggle {
  background: linear-gradient(135deg, #f0f9ff 0%, #f8fafc 100%);
  color: #0f172a;
}

.adhkar-category__title {
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.35;
}

.adhkar-category__badge {
  flex-shrink: 0;
  min-width: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: #047857;
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
}

.adhkar-results--admin .adhkar-category__badge {
  color: #0369a1;
}

.adhkar-category__chevron {
  flex-shrink: 0;
  color: #059669;
  font-size: 0.85rem;
  transition: transform 0.18s ease;
}

.adhkar-results--admin .adhkar-category__chevron {
  color: #0369a1;
}

.adhkar-category--collapsed .adhkar-category__chevron {
  transform: rotate(-90deg);
}

.adhkar-category__body {
  padding: 14px;
  border-top: 1px solid rgba(209, 250, 229, 0.8);
}

.adhkar-results--admin .adhkar-category__body {
  border-top-color: #e2e8f0;
}

.adhkar-category--collapsed .adhkar-category__body {
  display: none;
}

.adhkar-category__items--admin {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.adhkar-category__items.adhkar-grid {
  width: 100%;
}

.adhkar-results__search {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #fff;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.adhkar-results__search:focus-within {
  border-color: #059669;
  box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.12);
}

.adhkar-results--admin .adhkar-results__search:focus-within {
  border-color: #0369a1;
  box-shadow: 0 0 0 2px rgba(3, 105, 161, 0.12);
}

.adhkar-results__search-icon {
  color: #94a3b8;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.adhkar-results__search-input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  padding: 7px 0;
  font-size: 16px;
  line-height: 1.2;
  color: #0f172a;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.adhkar-results__search-input::placeholder {
  color: #94a3b8;
}

.adhkar-results__search-input::-webkit-search-cancel-button {
  -webkit-appearance: none;
}

.adhkar-results__no-match {
  margin: 0;
  text-align: center;
  color: #64748b;
  padding: 24px 16px;
  font-size: 0.95rem;
}

.adhkar-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (min-width: 900px) {
  .adhkar-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
  }
}

@media (max-width: 520px) {
  .adhkar-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
}

.adhkar-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border: 1px solid #d1fae5;
  border-radius: 14px;
  padding: 14px 10px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.adhkar-card:hover,
.adhkar-card:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(5, 150, 105, 0.12);
  border-color: #6ee7b7;
  outline: none;
}

.adhkar-card__icon-wrap {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  background: #ecfdf5;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.adhkar-icon-slot {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.adhkar-icon-slot--fa {
  background: #ecfdf5;
}

.adhkar-fa-icon {
  color: #059669;
  line-height: 1;
}

.adhkar-icon-slot--card .adhkar-fa-icon {
  font-size: 2rem;
}

.adhkar-icon-slot--detail .adhkar-fa-icon,
.adhkar-detail-icon-wrap .adhkar-icon-slot--detail .adhkar-fa-icon {
  font-size: 2.75rem;
}

.adhkar-icon-slot--admin .adhkar-fa-icon,
.adhkar-admin-card__icon.adhkar-icon-slot--fa .adhkar-fa-icon {
  font-size: 1.5rem;
}

.adhkar-admin-card .adhkar-icon-slot--admin,
.adhkar-admin-card .adhkar-icon-slot.adhkar-icon-slot--fa {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  flex-shrink: 0;
  background: #ecfdf5;
}

.adhkar-card__icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.adhkar-card__label {
  font-size: 0.85rem;
  text-align: center;
  color: #134e4a;
  line-height: 1.35;
  font-weight: 600;
}

.adhkar-empty {
  text-align: center;
  color: #64748b;
  padding: 48px 16px;
  font-size: 1.05rem;
}

.adhkar-error {
  color: #b91c1c;
  text-align: center;
  padding: 16px;
}

.hidden {
  display: none !important;
}

/* Detail page */
.adhkar-detail-page {
  max-width: 720px;
}

.adhkar-detail {
  background: #fff;
  border: 1px solid #d1fae5;
  border-radius: 16px;
  padding: 24px 20px 32px;
}

.adhkar-detail-icon-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.adhkar-detail-icon-wrap .adhkar-icon-slot--detail {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 3px solid #a7f3d0;
  background: #ecfdf5;
}

.adhkar-detail-icon {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #a7f3d0;
}

.adhkar-detail-title {
  text-align: center;
  margin: 0 0 24px;
  font-size: 1.5rem;
  color: #134e4a;
}

.adhkar-detail-section {
  margin-bottom: 24px;
}

.adhkar-detail-heading {
  margin: 0 0 10px;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #047857;
  font-weight: 700;
}

.adhkar-arabic-text {
  font-family: "Amiri", "Traditional Arabic", "Segoe UI", serif;
  font-size: 1.45rem;
  line-height: 2;
  color: #1e293b;
  white-space: pre-wrap;
  text-align: right;
  padding: 16px;
  background: #f0fdf4;
  border-radius: 12px;
  border: 1px solid #bbf7d0;
}

.adhkar-detail-text {
  white-space: pre-wrap;
  line-height: 1.7;
  color: #334155;
  font-size: 1rem;
}

.adhkar-audio-player {
  width: 100%;
  max-width: 100%;
}

.adhkar-detail-share {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid #e2e8f0;
}

.adhkar-share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #dcfce7;
  color: #128c7e;
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease;
  box-shadow: 0 2px 8px rgba(18, 140, 126, 0.15);
}

.adhkar-share-btn:hover {
  background: #bbf7d0;
  box-shadow: 0 4px 12px rgba(18, 140, 126, 0.22);
}

.adhkar-share-btn:active {
  transform: scale(0.94);
  background: #a7f3d0;
}

.adhkar-share-btn:focus-visible {
  outline: 2px solid #059669;
  outline-offset: 3px;
}

.adhkar-share-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #64748b;
  letter-spacing: 0.01em;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Admin */
.adhkar-admin-body {
  background: #f4f7f6;
}

.adhkar-admin-page {
  max-width: 760px;
  padding-bottom: calc(48px + env(safe-area-inset-bottom, 0px));
}

.adhkar-admin-back {
  display: inline-block;
  margin-bottom: 12px;
}

.adhkar-admin-header {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  gap: 12px 14px;
  align-items: start;
  margin-bottom: 20px;
  padding: 18px 16px;
  background: linear-gradient(135deg, #ecfdf5 0%, #f0fdfa 100%);
  border: 1px solid #bbf7d0;
  border-radius: 16px;
}

.adhkar-admin-header--form {
  grid-template-columns: auto 1fr;
}

.adhkar-admin-header__icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #059669;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}

.adhkar-admin-header__title {
  margin: 0 0 4px;
  font-size: 1.35rem;
  font-weight: 700;
  color: #134e4a;
  line-height: 1.25;
}

.adhkar-admin-header__sub {
  margin: 0;
  font-size: 0.9rem;
  color: #64748b;
  line-height: 1.45;
}

.adhkar-admin-header__add {
  grid-column: 1 / -1;
  width: 100%;
  justify-content: center;
}

@media (min-width: 560px) {
  .adhkar-admin-header {
    grid-template-columns: auto 1fr auto;
    grid-template-rows: auto;
    align-items: center;
  }

  .adhkar-admin-header__add {
    grid-column: auto;
    width: auto;
  }
}

.adhkar-admin-toolbar {
  margin-bottom: 16px;
}

.adhkar-admin-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.adhkar-admin-card {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 0 14px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px 14px 10px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.adhkar-admin-card__icon-wrap {
  grid-row: 1 / 3;
  align-self: start;
}

.adhkar-admin-card .adhkar-admin-card__icon,
.adhkar-admin-card .adhkar-icon-slot {
  width: 64px;
  height: 64px;
  border-radius: 12px;
}

.adhkar-admin-card__body {
  min-width: 0;
}

.adhkar-admin-card__icon {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  background: #ecfdf5;
}

.adhkar-admin-card__icon--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 1.35rem;
  background: #f1f5f9;
}

.adhkar-admin-card__title {
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
  word-break: break-word;
}

.adhkar-admin-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 0.82rem;
  color: #64748b;
}

.adhkar-admin-card__sort {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 6px;
  background: #f1f5f9;
  font-weight: 600;
  color: #475569;
}

.adhkar-admin-card__category {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 2px 8px;
  border-radius: 6px;
  background: #ecfdf5;
  font-weight: 600;
  color: #047857;
  line-height: 1.3;
  word-break: break-word;
}

.adhkar-admin-card__updated {
  margin: 8px 0 6px;
  font-size: 0.78rem;
  color: #94a3b8;
}

.adhkar-admin-card__actions-row {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 8px;
  width: 100%;
}

.adhkar-admin-card__action {
  flex: 1 1 0;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 34px;
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  border: 1px solid transparent;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.adhkar-admin-card__action i {
  font-size: 0.85rem;
  flex-shrink: 0;
}

.adhkar-admin-card__action--view {
  color: #0369a1;
  background: #f0f9ff;
  border-color: #bae6fd;
}

.adhkar-admin-card__action--view:active {
  background: #e0f2fe;
}

.adhkar-admin-card__action--edit {
  color: #059669;
  background: #ecfdf5;
  border-color: #bbf7d0;
}

.adhkar-admin-card__action--edit:active {
  background: #d1fae5;
}

button.adhkar-admin-card__action {
  margin: 0;
  font-family: inherit;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.adhkar-admin-card__action--deactivate {
  color: #b91c1c;
  background: #fef2f2;
  border-color: #fecaca;
}

.adhkar-admin-card__action--deactivate:active {
  background: #fee2e2;
}

.adhkar-admin-card__action--deactivate:focus-visible {
  outline: 2px solid #fca5a5;
  outline-offset: 2px;
}

.adhkar-admin-empty {
  text-align: center;
  padding: 40px 20px;
  background: #fff;
  border: 1px dashed #cbd5e1;
  border-radius: 16px;
  color: #64748b;
}

.adhkar-admin-empty__icon {
  font-size: 2.5rem;
  color: #94a3b8;
  margin-bottom: 12px;
}

.adhkar-admin-empty__title {
  margin: 0 0 8px;
  font-size: 1.1rem;
  font-weight: 700;
  color: #334155;
}

.adhkar-admin-empty__text {
  margin: 0 0 16px;
  font-size: 0.95rem;
}

.adhkar-fab {
  display: none;
  position: fixed;
  right: max(16px, env(safe-area-inset-right, 16px));
  bottom: max(20px, env(safe-area-inset-bottom, 20px));
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #059669;
  color: #fff;
  border: none;
  box-shadow: 0 4px 16px rgba(5, 150, 105, 0.4);
  font-size: 1.25rem;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  z-index: 40;
  -webkit-tap-highlight-color: transparent;
}

.adhkar-fab:active {
  transform: scale(0.96);
}

@media (max-width: 559px) {
  .adhkar-admin-header__add {
    display: none;
  }

  .adhkar-fab--add {
    display: flex;
  }
}

.adhkar-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.adhkar-badge--active {
  background: #dcfce7;
  color: #166534;
}

.adhkar-badge--inactive {
  background: #f1f5f9;
  color: #64748b;
}

.adhkar-admin-form {
  max-width: 100%;
}

/* Form sections */
.adhkar-form-section {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 18px 16px;
  margin-bottom: 14px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.adhkar-form-section__title {
  margin: 0 0 6px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #134e4a;
  display: flex;
  align-items: center;
  gap: 8px;
}

.adhkar-form-section__title i {
  color: #059669;
  font-size: 0.95rem;
}

.adhkar-form-section__hint {
  margin: 0 0 14px;
  font-size: 0.85rem;
  color: #64748b;
  line-height: 1.45;
}

.adhkar-form-section__hint a {
  color: #059669;
}

.adhkar-field {
  margin-bottom: 14px;
}

.adhkar-field:last-child {
  margin-bottom: 0;
}

.adhkar-field-label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
  color: #334155;
}

.adhkar-input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-size: 16px;
  line-height: 1.4;
  color: #0f172a;
  background: #fff;
  -webkit-appearance: none;
  appearance: none;
}

.adhkar-input:focus {
  outline: none;
  border-color: #059669;
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15);
}

.adhkar-select {
  background-image: linear-gradient(45deg, transparent 50%, #94a3b8 50%), linear-gradient(135deg, #94a3b8 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% - 2px), calc(100% - 12px) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 34px;
}

.adhkar-field--full {
  grid-column: 1 / -1;
}

.adhkar-optional {
  font-weight: 400;
  color: #94a3b8;
  font-size: 0.85em;
}

.adhkar-required {
  color: #dc2626;
}

/* Segmented icon type picker (iPhone-friendly) */
.adhkar-segment-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.adhkar-segment {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 96px;
  padding: 14px 10px;
  border: 2px solid #e2e8f0;
  border-radius: 14px;
  background: #f8fafc;
  cursor: pointer;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.adhkar-segment input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.adhkar-segment:has(input:checked) {
  border-color: #059669;
  background: #ecfdf5;
  box-shadow: 0 0 0 1px #059669;
}

.adhkar-segment__icon {
  font-size: 1.5rem;
  color: #059669;
  line-height: 1;
}

.adhkar-segment__title {
  font-weight: 700;
  font-size: 0.92rem;
  color: #134e4a;
}

.adhkar-segment__hint {
  font-size: 0.78rem;
  color: #64748b;
}

/* File picker */
.adhkar-file-input {
  position: absolute;
  width: 0.1px;
  height: 0.1px;
  opacity: 0;
  overflow: hidden;
  z-index: -1;
}

.adhkar-file-picker {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.adhkar-file-picker__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 18px;
  border: 2px dashed #94a3b8;
  border-radius: 12px;
  background: #f8fafc;
  color: #334155;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  width: 100%;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.adhkar-file-picker__btn:active {
  background: #ecfdf5;
  border-color: #059669;
}

.adhkar-file-picker__btn--secondary {
  border-style: solid;
  border-color: #cbd5e1;
  background: #fff;
}

.adhkar-file-picker__meta {
  margin: 0;
  font-size: 0.82rem;
  color: #64748b;
  word-break: break-all;
}

.adhkar-icon-preview-box {
  margin-top: 14px;
  padding: 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  text-align: center;
}

.adhkar-icon-preview-box img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #bbf7d0;
}

.adhkar-icon-preview-box--fa {
  display: flex;
  justify-content: center;
}

.adhkar-icon-preview-box .adhkar-icon-slot {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 2px solid #bbf7d0;
}

/* FA input & chips */
.adhkar-fa-input-wrap {
  display: flex;
  align-items: stretch;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  margin-bottom: 10px;
}

.adhkar-fa-input-wrap:focus-within {
  border-color: #059669;
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15);
}

.adhkar-fa-input-prefix {
  display: flex;
  align-items: center;
  padding: 0 12px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 0.9rem;
  font-weight: 600;
  border-right: 1px solid #e2e8f0;
}

.adhkar-fa-input {
  flex: 1;
  border: none;
  padding: 12px 14px;
  font-size: 16px;
  min-width: 0;
  outline: none;
  font-family: inherit;
}

.adhkar-fa-chips {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

@media (min-width: 400px) {
  .adhkar-fa-chips {
    grid-template-columns: repeat(3, 1fr);
  }
}

.adhkar-fa-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 64px;
  padding: 8px 4px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  color: #334155;
  font-size: 0.72rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.adhkar-fa-chip i {
  font-size: 1.25rem;
  color: #059669;
}

.adhkar-fa-chip:active,
.adhkar-fa-chip.adhkar-fa-chip--selected {
  border-color: #059669;
  background: #ecfdf5;
}

.adhkar-settings-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

@media (min-width: 480px) {
  .adhkar-settings-grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.adhkar-yesno-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}

.adhkar-yesno-option {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  color: #334155;
  text-align: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.adhkar-yesno-option input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.adhkar-yesno-option:has(input[value="true"]:checked) {
  border-color: #16a34a;
  background: #f0fdf4;
  color: #15803d;
}

.adhkar-yesno-option:has(input[value="false"]:checked) {
  border-color: #dc2626;
  background: #fef2f2;
  color: #b91c1c;
}

.adhkar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  text-decoration: none;
  border: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  box-sizing: border-box;
}

.adhkar-btn--primary {
  background: #059669;
  color: #fff;
}

.adhkar-btn--primary:active {
  background: #047857;
}

.adhkar-btn--ghost {
  background: #fff;
  color: #475569;
  border: 1px solid #cbd5e1;
}

.adhkar-form-actions {
  display: flex;
  flex-direction: column-reverse;
  gap: 10px;
  margin-top: 8px;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.adhkar-form-actions .adhkar-btn {
  width: 100%;
}

@media (min-width: 480px) {
  .adhkar-form-actions {
    flex-direction: row;
    justify-content: flex-end;
  }

  .adhkar-form-actions .adhkar-btn {
    width: auto;
    min-width: 120px;
  }
}

.adhkar-char-count {
  font-size: 0.8rem;
  color: #64748b;
  text-align: right;
  margin-top: 4px;
}

.adhkar-char-count--warn {
  color: #b45309;
}

.adhkar-arabic-input {
  font-family: "Amiri", "Traditional Arabic", "Segoe UI", serif;
  font-size: 1.15rem;
  line-height: 1.8;
}

.adhkar-audio-existing {
  margin-top: 12px;
  padding: 12px;
  background: #f8fafc;
  border-radius: 10px;
}

.adhkar-icon-preview {
  margin-top: 10px;
}

.adhkar-icon-preview img {
  max-width: 120px;
  max-height: 120px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}

@media (max-width: 600px) {
  .adhkar-admin-page {
    padding-left: 10px;
    padding-right: 10px;
  }

  .adhkar-form-section {
    padding: 16px 14px;
  }

  .adhkar-segment-group {
    gap: 8px;
  }

  .adhkar-segment {
    min-height: 88px;
  }

  .adhkar-fa-chips {
    grid-template-columns: repeat(2, 1fr);
  }

  .adhkar-detail {
    padding: 18px 14px 24px;
  }

  .adhkar-arabic-text {
    font-size: 1.25rem;
  }
}
