@import url("https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800;900&display=swap");
body,
body * {
  font-family: "Cairo", sans-serif !important;
}
.admin-brand-mark,
.identity-preview-logo {
  width: 45px;
  height: 45px;
  background: #fff;
  color: var(--navy);
  border-radius: 15px;
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 800;
  overflow: hidden;
  flex: 0 0 auto;
}
.admin-brand-mark img,
.identity-preview-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.admin-brand-mark.has-logo {
  padding: 3px;
  background: #fff;
}
.identity-media {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 18px;
  background: #f8faf8;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  margin-bottom: 20px;
}
.identity-preview {
  display: flex;
  gap: 14px;
  align-items: center;
  min-width: 0;
}
.identity-preview-logo {
  width: 76px;
  height: 76px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--navy);
  font-size: 30px;
  border-radius: 20px;
}
.identity-preview b,
.identity-preview small {
  display: block;
}
.identity-preview b {
  font-size: 13px;
}
.identity-preview small {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.8;
  margin-top: 3px;
}
.upload-field {
  margin: 0 !important;
  padding: 13px;
  border: 1px dashed #b8c9c1;
  border-radius: 14px;
  background: #fff;
  color: var(--ink) !important;
}
.upload-field > span {
  display: block;
  font-size: 11px;
  font-weight: 700;
}
.upload-field input {
  padding: 7px !important;
  background: #fff !important;
}
.favicon-preview {
  grid-column: 1;
}
.favicon-preview > div:first-child {
  width: 58px;
  height: 58px;
  border-radius: 15px;
  border: 1px solid var(--line);
  background: #fff;
  display: grid;
  place-items: center;
  overflow: hidden;
  font-size: 20px;
  font-weight: 800;
  flex: 0 0 auto;
}
.favicon-preview img {
  width: 100%;
  height: 100%;
  padding: 6px;
  object-fit: contain;
}
.remove-media {
  margin: 0 !important;
  display: flex !important;
  align-items: center;
  gap: 8px;
  color: #9a3939 !important;
}
.remove-media input {
  width: auto !important;
  margin: 0 !important;
}
.login-identity .brand-symbol.has-logo {
  padding: 5px;
  background: #fff;
  overflow: hidden;
}
.login-identity .brand-symbol.has-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
@media (max-width: 760px) {
  .identity-media {
    grid-template-columns: 1fr;
  }
  .favicon-preview {
    grid-column: auto;
  }
}

.region-settings {
  margin-top: 18px;
}
.khatma-control-grid {
  grid-template-columns: 0.9fr 1.1fr;
  align-items: start;
}
.whatsapp-admin {
  position: relative;
}
.wa-status {
  padding: 5px 9px;
  border-radius: 99px;
  background: #f3e9d6;
  color: #8b6427 !important;
  font-size: 8px !important;
  font-weight: 800;
}
.wa-status.ready {
  background: #dff0e6;
  color: #2d6b50 !important;
}
.wa-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.wa-summary > div {
  padding: 13px;
  border-radius: 13px;
  background: #f7f9f6;
  text-align: center;
}
.wa-summary small,
.wa-summary strong {
  display: block;
}
.wa-summary small {
  color: var(--muted);
  font-size: 8px;
}
.wa-summary strong {
  font-size: 15px;
}
.wa-share {
  min-height: 49px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 15px;
  border-radius: 12px;
  background: #176b4b;
  color: #fff;
  text-decoration: none;
  font-size: 10px;
  font-weight: 800;
}
.wa-share i {
  font-style: normal;
}
.wa-explain,
.template-hint,
.cron-details p {
  color: var(--muted);
  font-size: 8px;
  line-height: 1.9;
}
.wa-settings {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.wa-enable {
  margin-bottom: 13px !important;
}
.wa-settings > .admin-primary {
  margin-top: 12px;
}
.send-now-form {
  display: inline-block;
  margin: 12px 8px 0 0;
}
.send-now-form button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.cron-details {
  margin-top: 15px;
  padding: 12px;
  border-radius: 12px;
  background: #f7f9f6;
}
.cron-details summary {
  cursor: pointer;
  font-size: 9px;
  font-weight: 800;
}
.cron-details code {
  display: block;
  direction: ltr;
  padding: 9px;
  overflow: auto;
  border-radius: 8px;
  background: #102f2a;
  color: #d7e7e1;
  font-size: 8px;
  white-space: nowrap;
}
.wa-message-preview {
  margin: 14px 0;
  padding: 12px 14px;
  border: 1px solid #dce6e1;
  border-radius: 12px;
  background: #f8faf8;
}
.wa-message-preview summary {
  cursor: pointer;
  color: #224f45;
  font-size: 9px;
  font-weight: 800;
}
.wa-message-preview pre {
  margin: 13px 0;
  padding: 14px;
  border-radius: 10px;
  background: #fff;
  color: #344b45;
  font:
    500 9px/2 "Cairo",
    sans-serif;
  white-space: pre-wrap;
  word-break: break-word;
}
.wa-message-preview button {
  min-height: 38px;
  padding: 8px 13px;
  border: 0;
  border-radius: 9px;
  background: #244f45;
  color: #fff;
  cursor: pointer;
  font-size: 8px;
  font-weight: 800;
}
.reminder-log {
  margin-top: 18px;
}
.log-status {
  display: inline-block;
  padding: 3px 7px;
  border-radius: 99px;
  background: #f7e0e0;
  color: #993c3c;
  font-size: 8px;
}
.log-status.sent {
  background: #deeee5;
  color: #28654a;
}

@media (max-width: 1050px) {
  .khatma-control-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 600px) {
  .wa-summary {
    grid-template-columns: 1fr;
  }
}
:root {
  --navy: #123e38;
  --navy2: #0d7667;
  --green: #0d7667;
  --mint: #e3f0ec;
  --sand: #f6efe3;
  --gold: #f0a84b;
  --bg: #fbfaf5;
  --card: #fffdf8;
  --ink: #152b27;
  --muted: #6f7d78;
  --line: #e7ddd0;
  --danger: #a63b3b;
  --shadow: 0 18px 48px rgba(18, 62, 56, 0.08);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: "Cairo", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
}
button,
input,
select,
textarea {
  font: inherit;
}
.admin-body {
  padding-right: 260px;
}
.admin-sidebar {
  position: fixed;
  z-index: 50;
  right: 0;
  top: 0;
  bottom: 0;
  width: 260px;
  background: linear-gradient(180deg, #123e38, #0f352f);
  color: #fff;
  padding: 26px 18px;
  display: flex;
  flex-direction: column;
}
.admin-brand {
  display: flex;
  gap: 12px;
  align-items: center;
  color: #fff;
  text-decoration: none;
  padding: 0 8px 25px;
  border-bottom: 1px solid #ffffff14;
}
.admin-brand > span,
.brand-symbol {
  width: 45px;
  height: 45px;
  background: #fff;
  color: var(--navy);
  border-radius: 15px;
  display: grid;
  place-items: center;
  font: 800 22px "Noto Kufi Arabic";
}
.admin-brand b {
  display: block;
  font: 700 18px "Noto Kufi Arabic";
}
.admin-brand small {
  color: #a9c0b9;
  font-size: 10px;
}
.admin-sidebar nav {
  display: grid;
  gap: 5px;
  margin-top: 25px;
}
.admin-sidebar nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 13px;
  color: #b8cbc5;
  text-decoration: none;
  border-radius: 12px;
  font-size: 13px;
}
.admin-sidebar nav a:hover,
.admin-sidebar nav a.active {
  background: #ffffff10;
  color: #fff;
}
.admin-sidebar nav a.active {
  box-shadow: inset -3px 0 var(--gold);
}
.admin-sidebar nav i {
  font-style: normal;
  width: 24px;
  text-align: center;
}
.sidebar-foot {
  margin-top: auto;
  display: grid;
  gap: 5px;
  border-top: 1px solid #ffffff14;
  padding-top: 15px;
}
.sidebar-foot a {
  color: #a9c0b9;
  text-decoration: none;
  font-size: 11px;
  padding: 6px 10px;
}
.admin-main {
  padding: 0 34px 70px;
  max-width: 1500px;
  margin: auto;
}
.admin-top {
  height: 94px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
}
.admin-top > div:first-of-type {
  margin-left: auto;
}
.admin-top span,
.card-head span {
  color: var(--muted);
  font-size: 10px;
}
.admin-top h1 {
  font: 700 24px "Noto Kufi Arabic";
  margin: 0;
}
.admin-user {
  display: flex;
  align-items: center;
  gap: 9px;
}
.admin-user > span {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background: var(--mint);
  color: var(--green);
  display: grid;
  place-items: center;
  font-weight: 800;
}
.admin-user b {
  display: block;
  font-size: 11px;
}
.admin-user small {
  display: block;
  font-size: 9px;
  color: var(--muted);
}
#adminMenu {
  display: none;
  border: 0;
  background: transparent;
  font-size: 22px;
}
.welcome-panel {
  background: linear-gradient(125deg, var(--navy), #285c50);
  border-radius: 24px;
  color: #fff;
  padding: 30px 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  overflow: hidden;
  position: relative;
}
.welcome-panel:after {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  border: 1px solid #ffffff12;
  left: -50px;
  top: -120px;
  box-shadow:
    0 0 0 38px #ffffff08,
    0 0 0 76px #ffffff05;
}
.welcome-panel > * {
  position: relative;
  z-index: 1;
}
.welcome-panel span {
  font-size: 10px;
  color: #c4d5d0;
}
.welcome-panel h2 {
  font: 700 24px "Noto Kufi Arabic";
  margin: 4px 0;
}
.welcome-panel p {
  margin: 0;
  color: #c4d5d0;
  font-size: 12px;
}
.welcome-panel a {
  background: #fff;
  color: var(--navy);
  text-decoration: none;
  border-radius: 12px;
  padding: 10px 16px;
  font-size: 11px;
  font-weight: 700;
}
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 13px;
  margin-bottom: 18px;
}
.metric-grid article {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px;
  display: flex;
  gap: 14px;
  align-items: center;
}
.metric-icon {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: var(--mint);
  display: grid;
  place-items: center;
  color: var(--green);
}
.metric-grid small,
.metric-grid em {
  display: block;
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
}
.metric-grid strong {
  display: block;
  font-size: 25px;
  line-height: 1.4;
}
.admin-two {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 16px;
}
.admin-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 22px;
  box-shadow: 0 7px 25px transparent;
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.card-head h3 {
  font: 700 17px "Noto Kufi Arabic";
  margin: 2px 0;
}
.card-head a {
  font-size: 10px;
  color: var(--green);
}
.table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
}
th {
  font-size: 9px;
  color: var(--muted);
  font-weight: 500;
  background: #f8faf8;
}
th,
td {
  padding: 11px;
  text-align: right;
  border-bottom: 1px solid var(--line);
}
td {
  font-size: 11px;
}
td small {
  display: block;
  color: var(--muted);
  font-size: 8px;
}
.plan-visual {
  display: grid;
  grid-template-columns: auto 1fr auto auto 1fr;
  align-items: center;
  gap: 8px;
  text-align: center;
  margin: 30px 0;
}
.plan-visual span {
  color: var(--muted);
  font-size: 9px;
}
.plan-visual strong {
  font-size: 37px;
}
.plan-visual i {
  font-style: normal;
  color: var(--gold);
}
.admin-progress {
  height: 6px;
  background: var(--line);
  border-radius: 99px;
  overflow: hidden;
}
.admin-progress i {
  height: 100%;
  display: block;
  background: var(--green);
}
.admin-card > p {
  font-size: 10px;
  color: var(--muted);
}
.admin-primary,
.admin-secondary {
  border: 0;
  background: var(--navy);
  color: #fff;
  border-radius: 11px;
  padding: 10px 16px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
.admin-secondary {
  background: var(--mint);
  color: var(--green);
}
.settings-form label {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin: 13px 0;
}
.settings-form input,
.settings-form textarea,
.settings-form select,
.field-grid input,
.field-grid textarea,
.compact-form input,
.compact-form textarea,
.compact-form select,
.station-form input {
  width: 100%;
  margin-top: 5px;
  border: 1px solid var(--line);
  background: #fafbf9;
  border-radius: 10px;
  padding: 10px;
  color: var(--ink);
  outline: 0;
}
.settings-form input:focus,
.settings-form textarea:focus,
.field-grid input:focus,
.field-grid textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px #2d6b5d12;
}
.settings-form label small {
  display: block;
  margin-top: 4px;
}
.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 14px;
}
.field-grid .full {
  grid-column: 1/3;
}
.feature-box {
  background: #f8faf8;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 15px;
  margin-top: 18px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.feature-box h4 {
  width: 100%;
  margin: 0;
  font: 600 12px "Noto Kufi Arabic";
}
.toggle {
  display: flex !important;
  align-items: center;
  gap: 8px;
  margin: 0 !important;
  color: var(--ink) !important;
}
.toggle input {
  display: none;
}
.toggle span {
  width: 35px;
  height: 20px;
  border-radius: 99px;
  background: #bdc9c4;
  position: relative;
}
.toggle span:after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  top: 3px;
  right: 3px;
  transition: 0.2s;
}
.toggle input:checked + span {
  background: var(--green);
}
.toggle input:checked + span:after {
  transform: translateX(-15px);
}
.calculated-plan {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 20px;
}
.calculated-plan > div {
  background: #f8faf8;
  border-radius: 14px;
  padding: 16px;
  text-align: center;
}
.calculated-plan small {
  display: block;
  color: var(--muted);
  font-size: 9px;
}
.calculated-plan strong {
  font-size: 18px;
}
.count-chip {
  background: var(--mint);
  color: var(--green);
  font-size: 9px;
  padding: 6px 10px;
  border-radius: 99px;
}
.inline-form {
  margin: 0;
}
.inline-form select {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px;
  background: #fff;
}
.icon-danger,
.manage-list button,
.row-actions button {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 10px;
}
.icon-danger,
.danger-text {
  color: var(--danger) !important;
}
.locked {
  color: var(--muted);
  font-size: 9px;
}
.compact-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: #f8faf8;
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 15px;
}
.compact-form textarea,
.compact-form .admin-primary {
  grid-column: 1/3;
}
.manage-list {
  display: grid;
  gap: 7px;
  max-height: 520px;
  overflow: auto;
}
.manage-list article {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.manage-list article > div:last-child {
  display: flex;
}
.manage-list span {
  color: var(--muted);
  font-size: 8px;
}
.manage-list b {
  display: block;
  font-size: 11px;
}
.manage-list p {
  font-size: 11px;
  margin: 3px 0;
  line-height: 1.8;
}
.disabled-row {
  opacity: 0.5;
}
.content-admin {
  grid-template-columns: 1fr 1fr;
}
.surah-admin-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 7px;
}
.surah-toggle button {
  width: 100%;
  border: 1px solid var(--line);
  background: #f8faf8;
  border-radius: 12px;
  padding: 10px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  text-align: right;
  cursor: pointer;
}
.surah-toggle span {
  color: var(--muted);
  font-size: 9px;
}
.surah-toggle b {
  font-size: 10px;
}
.surah-toggle i {
  font-style: normal;
  font-size: 8px;
  color: var(--muted);
}
.surah-toggle.enabled button {
  background: var(--mint);
  border-color: #b9d5c8;
}
.station-form {
  display: grid;
  grid-template-columns: 1fr 0.45fr 1.5fr 0.35fr auto auto;
  gap: 8px;
  align-items: center;
  background: #f8faf8;
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 15px;
}
.station-form .toggle {
  white-space: nowrap;
}
.station-admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.station-admin-grid article {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
}
.station-letter {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--mint);
  display: grid;
  place-items: center;
  color: var(--green);
  font-weight: 700;
}
.station-admin-grid span,
.station-admin-grid small {
  display: block;
  color: var(--muted);
  font-size: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 240px;
}
.station-admin-grid h4 {
  margin: 1px 0;
  font-size: 11px;
}
.row-actions {
  display: flex;
}
.admin-alert {
  padding: 11px 15px;
  border-radius: 12px;
  margin-bottom: 15px;
  font-size: 11px;
}
.admin-alert.success {
  background: #dff2e8;
  color: #276247;
}
.admin-alert.danger {
  background: #fae2e2;
  color: #912e2e;
}
.admin-login {
  min-height: 100vh;
  background: linear-gradient(115deg, var(--navy) 0 48%, var(--bg) 48%);
  display: grid;
  place-items: center;
}
.admin-login main {
  width: min(1000px, 90%);
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 100px;
  align-items: center;
}
.login-identity {
  color: #fff;
  display: flex;
  align-items: center;
  gap: 18px;
}
.login-identity .brand-symbol {
  width: 70px;
  height: 70px;
  font-size: 34px;
}
.login-identity span {
  font-size: 11px;
  color: #b9cec7;
}
.login-identity h1 {
  font: 800 42px "Noto Kufi Arabic";
  margin: 0;
}
.login-identity p {
  color: #b9cec7;
}
.admin-login-card {
  background: #fff;
  border-radius: 24px;
  padding: 32px;
  box-shadow: var(--shadow);
}
.login-label {
  font-size: 9px;
  color: var(--gold);
}
.admin-login-card h2 {
  font: 700 22px "Noto Kufi Arabic";
  margin: 5px 0;
}
.admin-login-card p {
  font-size: 11px;
  color: var(--muted);
}
.admin-login-card label {
  font-size: 10px;
  color: var(--muted);
}
.admin-login-card input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 11px;
  margin: 6px 0 13px;
}
.admin-login-card .admin-primary {
  width: 100%;
}
.admin-login-card > a {
  display: block;
  text-align: center;
  color: var(--muted);
  font-size: 10px;
  margin-top: 12px;
}
@media (max-width: 1050px) {
  .metric-grid {
    grid-template-columns: 1fr 1fr;
  }
  .admin-two,
  .content-admin {
    grid-template-columns: 1fr;
  }
  .station-form {
    grid-template-columns: 1fr 1fr;
  }
  .station-form .admin-primary {
    grid-column: 1/3;
  }
}
@media (max-width: 760px) {
  .admin-body {
    padding-right: 0;
  }
  .admin-sidebar {
    transform: translateX(105%);
    transition: 0.25s;
  }
  .admin-sidebar.open {
    transform: none;
  }
  .admin-main {
    padding: 0 4% 50px;
  }
  .admin-top {
    height: 75px;
  }
  .admin-top h1 {
    font-size: 18px;
  }
  #adminMenu {
    display: block;
  }
  .admin-user > div {
    display: none;
  }
  .metric-grid {
    grid-template-columns: 1fr;
  }
  .field-grid {
    grid-template-columns: 1fr;
  }
  .field-grid .full {
    grid-column: auto;
  }
  .calculated-plan {
    grid-template-columns: 1fr;
  }
  .station-admin-grid,
  .surah-admin-grid {
    grid-template-columns: 1fr;
  }
  .admin-login {
    background: var(--bg);
  }
  .admin-login main {
    grid-template-columns: 1fr;
    gap: 25px;
  }
  .login-identity {
    color: var(--ink);
  }
  .login-identity p,
  .login-identity > div > span {
    color: var(--muted);
  }
}
