* { box-sizing: border-box; }
body {
  margin: 0;
  background: #f5f7fb;
  color: #1f2937;
  font-family: Tahoma, Arial, sans-serif;
}
header {
  background: #111827;
  color: white;
  padding: 16px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
header span {
  display: block;
  color: #cbd5e1;
  font-size: 12px;
  margin-top: 4px;
}
nav a {
  color: white;
  margin-right: 14px;
  text-decoration: none;
  font-size: 14px;
}
main { padding: 28px; }
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.card {
  background: white;
  padding: 22px;
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .08);
  margin-bottom: 18px;
}
.login-card {
  max-width: 420px;
  margin: 60px auto;
}
h1, h2 { margin-top: 0; }
input, select, button {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  margin: 4px;
}
button {
  background: #2563eb;
  color: white;
  border: 0;
  cursor: pointer;
}
button.danger { background: #dc2626; }
button.small {
  padding: 6px 10px;
  font-size: 12px;
}
.inline-form, .record-form, .node-form {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}
.record-form input[name=value] { min-width: 280px; }
.node-form input { min-width: 190px; }
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
}
th, td {
  border-bottom: 1px solid #e5e7eb;
  padding: 10px;
  text-align: right;
  vertical-align: top;
}
th { background: #f8fafc; }
code {
  background: #f1f5f9;
  padding: 3px 6px;
  border-radius: 6px;
  direction: ltr;
  display: inline-block;
}
.alert {
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 16px;
}
.alert.success { background: #dcfce7; }
.alert.danger { background: #fee2e2; }
.alert.warning { background: #fef3c7; }
.status.success { color: #16a34a; font-weight: bold; }
.status.failed { color: #dc2626; font-weight: bold; }
.status.never { color: #64748b; }
.btn-link {
  background: #e0ecff;
  color: #1d4ed8;
  padding: 7px 10px;
  border-radius: 10px;
  text-decoration: none;
}
.hint {
  background: #eff6ff;
  padding: 10px 12px;
  border-radius: 10px;
  color: #1e40af;
}
@media (max-width: 900px) {
  .grid { grid-template-columns: 1fr; }
  header { display: block; }
  nav { margin-top: 12px; }
}

/* Fix long DNS values, especially TXT/SPF/DKIM records */
table {
  table-layout: fixed;
}

td, th {
  word-break: break-word;
  overflow-wrap: anywhere;
}

td code {
  max-width: 100%;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  direction: ltr;
  text-align: left;
  display: inline-block;
}

.record-value {
  max-width: 100%;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  direction: ltr;
  text-align: left;
}

/* =========================
   Modern Login Page
========================= */

body.login-page {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: #0f172a;
}

.login-main {
  min-height: 100vh;
  padding: 0;
  position: relative;
}

.login-bg {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}

.login-bg-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center center;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 1.5s ease, transform 7s ease;
}

.login-bg-slide.active {
  opacity: 1;
  transform: scale(1);
}

.login-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(2,6,23,.82), rgba(15,23,42,.55)),
    linear-gradient(180deg, rgba(37,99,235,.18), rgba(0,0,0,.25));
  z-index: 2;
  backdrop-filter: blur(2px);
}

.login-shell {
  position: relative;
  z-index: 5;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding: 48px;
}

.login-brand {
  flex: 1;
  color: #fff;
  max-width: 620px;
}

.login-badge {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.14);
  color: #fff;
  font-size: 13px;
  margin-bottom: 20px;
  border: 1px solid rgba(255,255,255,.18);
  backdrop-filter: blur(8px);
}

.login-brand h1 {
  margin: 0 0 16px 0;
  font-size: 48px;
  line-height: 1.2;
  color: #fff;
  text-shadow: 0 8px 30px rgba(0,0,0,.35);
}

.login-brand p {
  font-size: 18px;
  line-height: 2;
  color: rgba(255,255,255,.9);
  margin: 0;
  max-width: 560px;
}

.modern-login-card {
  width: 100%;
  max-width: 440px;
  margin: 0;
  padding: 28px;
  border-radius: 24px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.2);
  box-shadow: 0 20px 60px rgba(0,0,0,.28);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.login-card-top {
  margin-bottom: 20px;
}

.login-card-top h2 {
  margin: 0 0 8px 0;
  color: #fff;
  font-size: 28px;
}

.login-card-top span {
  color: rgba(255,255,255,.82);
  font-size: 14px;
}

.modern-login-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modern-login-form label {
  color: #fff;
  font-size: 14px;
  margin-top: 6px;
}

.input-wrap {
  width: 100%;
}

.modern-login-form input {
  width: 100%;
  margin: 0;
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.88);
  color: #111827;
  padding: 14px 16px;
  border-radius: 14px;
  font-size: 15px;
  outline: none;
  transition: .2s ease;
}

.modern-login-form input:focus {
  border-color: rgba(37,99,235,.9);
  box-shadow: 0 0 0 4px rgba(59,130,246,.18);
  background: #fff;
}

.login-btn {
  width: 100%;
  margin-top: 14px;
  padding: 14px 18px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
  box-shadow: 0 12px 24px rgba(37,99,235,.28);
}

.login-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 28px rgba(37,99,235,.35);
}

.login-footer-note {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,.18);
  color: rgba(255,255,255,.78);
  font-size: 13px;
  text-align: center;
}

body.login-page .alert {
  position: relative;
  z-index: 6;
  width: min(92%, 440px);
  margin: 18px auto 0 auto;
  border: 1px solid rgba(255,255,255,.16);
  backdrop-filter: blur(10px);
}

body.login-page .alert.success { background: rgba(34,197,94,.18); color: #fff; }
body.login-page .alert.danger { background: rgba(239,68,68,.18); color: #fff; }
body.login-page .alert.warning { background: rgba(245,158,11,.18); color: #fff; }

@media (max-width: 1100px) {
  .login-shell {
    gap: 24px;
    padding: 30px;
  }

  .login-brand h1 {
    font-size: 38px;
  }

  .login-brand p {
    font-size: 16px;
  }
}

@media (max-width: 860px) {
  .login-shell {
    flex-direction: column;
    justify-content: center;
    text-align: center;
    padding: 22px;
  }

  .login-brand {
    max-width: 100%;
  }

  .login-brand h1 {
    font-size: 32px;
  }

  .login-brand p {
    font-size: 15px;
    max-width: 100%;
  }

  .modern-login-card {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .login-shell {
    padding: 16px;
  }

  .modern-login-card {
    padding: 18px;
    border-radius: 18px;
  }

  .login-brand h1 {
    font-size: 26px;
  }

  .login-card-top h2 {
    font-size: 22px;
  }

  .modern-login-form input {
    padding: 12px 14px;
    font-size: 14px;
  }

  .login-btn {
    padding: 13px 16px;
    font-size: 14px;
  }
}

/* =========================
   MayaHost Green Luxury Login
========================= */

body.login-page {
  background: #02140d;
}

.login-bg-slide {
  filter: saturate(1.08) contrast(1.05);
}

.login-overlay {
  background:
    radial-gradient(circle at 18% 22%, rgba(34,197,94,.35), transparent 34%),
    radial-gradient(circle at 82% 76%, rgba(16,185,129,.25), transparent 30%),
    linear-gradient(135deg, rgba(2,20,13,.92), rgba(6,78,59,.66)),
    linear-gradient(180deg, rgba(0,0,0,.18), rgba(0,0,0,.45));
  backdrop-filter: blur(2.5px);
}

.login-shell {
  animation: loginFadeUp .85s ease both;
}

@keyframes loginFadeUp {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-logo-wrap {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
}

.login-logo {
  width: 72px;
  height: 72px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  font-size: 38px;
  font-weight: 900;
  color: #052e16;
  background:
    linear-gradient(135deg, #bbf7d0, #22c55e 48%, #16a34a);
  box-shadow:
    0 18px 42px rgba(34,197,94,.32),
    inset 0 1px 0 rgba(255,255,255,.65);
  border: 1px solid rgba(255,255,255,.35);
}

.login-badge {
  background: rgba(34,197,94,.16);
  color: #dcfce7;
  border: 1px solid rgba(134,239,172,.28);
  box-shadow: 0 10px 28px rgba(0,0,0,.18);
}

.login-brand h1 {
  background: linear-gradient(135deg, #ffffff, #dcfce7, #86efac);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: none;
}

.login-brand p {
  color: rgba(236,253,245,.92);
}

.login-features {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.login-features span {
  padding: 9px 13px;
  border-radius: 999px;
  background: rgba(6,95,70,.42);
  color: #d1fae5;
  border: 1px solid rgba(110,231,183,.22);
  backdrop-filter: blur(8px);
  font-size: 13px;
}

.modern-login-card {
  background:
    linear-gradient(180deg, rgba(255,255,255,.18), rgba(255,255,255,.10));
  border: 1px solid rgba(187,247,208,.24);
  box-shadow:
    0 24px 80px rgba(0,0,0,.36),
    0 0 0 1px rgba(34,197,94,.08),
    inset 0 1px 0 rgba(255,255,255,.28);
  animation: cardPop .9s .12s ease both;
}

@keyframes cardPop {
  from {
    opacity: 0;
    transform: translateY(18px) scale(.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.mini-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 13px;
  border-radius: 999px;
  color: #052e16;
  background: linear-gradient(135deg, #dcfce7, #22c55e);
  font-weight: 800;
  font-size: 13px;
  margin-bottom: 14px;
  box-shadow: 0 10px 24px rgba(34,197,94,.24);
}

.login-card-top h2 {
  color: #f0fdf4;
}

.login-card-top span {
  color: rgba(220,252,231,.82);
}

.icon-input {
  position: relative;
}

.input-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  opacity: .78;
  font-size: 16px;
}

.modern-login-form input {
  padding-right: 46px;
  background: rgba(240,253,244,.92);
  border: 1px solid rgba(187,247,208,.34);
}

.modern-login-form input:focus {
  border-color: rgba(34,197,94,.95);
  box-shadow:
    0 0 0 4px rgba(34,197,94,.18),
    0 10px 26px rgba(0,0,0,.12);
  background: #fff;
}

.password-wrap input {
  padding-left: 74px;
}

.show-pass-btn {
  position: absolute;
  left: 7px;
  top: 50%;
  transform: translateY(-50%);
  margin: 0;
  padding: 7px 10px;
  border-radius: 10px;
  background: rgba(22,163,74,.12);
  color: #166534;
  border: 1px solid rgba(22,163,74,.22);
  font-size: 12px;
  box-shadow: none;
  z-index: 3;
}

.show-pass-btn:hover {
  background: rgba(22,163,74,.20);
}

.login-btn {
  background: linear-gradient(135deg, #22c55e, #16a34a, #15803d);
  color: #f0fdf4;
  box-shadow:
    0 16px 30px rgba(22,163,74,.34),
    inset 0 1px 0 rgba(255,255,255,.25);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.login-btn:hover {
  transform: translateY(-2px);
  box-shadow:
    0 20px 36px rgba(22,163,74,.44),
    inset 0 1px 0 rgba(255,255,255,.25);
}

.login-btn strong {
  font-size: 18px;
  transform: translateY(-1px);
}

.login-footer-note {
  border-top: 1px solid rgba(187,247,208,.18);
  color: rgba(220,252,231,.78);
}

body.login-page .alert {
  box-shadow: 0 14px 36px rgba(0,0,0,.22);
}

body.login-page .alert.success {
  background: rgba(22,163,74,.22);
  color: #ecfdf5;
}

body.login-page .alert.danger {
  background: rgba(239,68,68,.22);
  color: #fff;
}

body.login-page .alert.warning {
  background: rgba(245,158,11,.22);
  color: #fff;
}

@media (max-width: 860px) {
  .login-logo-wrap {
    justify-content: center;
    flex-direction: column;
    gap: 12px;
  }

  .login-logo {
    width: 64px;
    height: 64px;
    border-radius: 21px;
    font-size: 32px;
  }

  .login-features {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .login-logo {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    font-size: 29px;
  }

  .login-features span {
    font-size: 12px;
    padding: 8px 11px;
  }

  .password-wrap input {
    padding-left: 68px;
  }

  .show-pass-btn {
    font-size: 11px;
    padding: 6px 8px;
  }
}

/* =========================
   MayaHost Green Dashboard Theme
========================= */

header {
  background: linear-gradient(135deg, #052e16, #064e3b);
  box-shadow: 0 10px 28px rgba(5,46,22,.18);
}

button {
  background: #16a34a;
}

button:hover {
  filter: brightness(.96);
}

button.danger {
  background: #dc2626;
}

.btn-link {
  background: #dcfce7;
  color: #166534;
}

.alert.success {
  background: #dcfce7;
  color: #14532d;
}

.alert.warning {
  background: #fef3c7;
  color: #78350f;
}

.alert.danger {
  background: #fee2e2;
  color: #7f1d1d;
}

.card {
  border: 1px solid rgba(22,163,74,.08);
}

input:focus,
select:focus {
  outline: none;
  border-color: #22c55e;
  box-shadow: 0 0 0 3px rgba(34,197,94,.13);
}

.status.success {
  color: #16a34a;
}

/* =========================
   Persian RTL + Beautiful Font
========================= */

@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700;800;900&display=swap');

html,
body,
input,
select,
button,
textarea {
  font-family: "Vazirmatn", "IRANSans", "IranYekan", "Tahoma", "Arial", sans-serif !important;
}

body.login-page {
  direction: rtl;
  text-align: right;
}

.login-shell,
.login-brand,
.modern-login-card,
.login-card-top,
.modern-login-form,
.login-footer-note {
  direction: rtl;
  text-align: right;
}

.login-logo-wrap {
  direction: rtl;
  text-align: right;
}

.login-brand p {
  text-align: right;
}

.login-features {
  justify-content: flex-start;
}

.modern-login-form label {
  text-align: right;
}

.modern-login-form input {
  direction: rtl;
  text-align: right;
}

.modern-login-form input[name="username"],
.modern-login-form input[name="password"] {
  direction: ltr;
  text-align: left;
}

.modern-login-form input::placeholder {
  direction: rtl;
  text-align: right;
}

.icon-input .input-icon {
  right: 14px;
  left: auto;
}

.modern-login-form input {
  padding-right: 46px;
  padding-left: 16px;
}

.password-wrap input {
  padding-right: 46px;
  padding-left: 78px;
}

.show-pass-btn {
  left: 7px;
  right: auto;
}

.login-btn {
  direction: rtl;
}

.login-btn strong {
  transform: rotate(180deg) translateY(1px);
}

.login-footer-note {
  text-align: center;
}

/* Mobile RTL alignment */
@media (max-width: 860px) {
  .login-shell,
  .login-brand,
  .modern-login-card,
  .login-card-top {
    text-align: center;
  }

  .login-brand p {
    text-align: center;
  }

  .login-features {
    justify-content: center;
  }
}

/* =========================
   Persian RTL + Beautiful Font
========================= */

@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700;800;900&display=swap');

html,
body,
input,
select,
button,
textarea {
  font-family: "Vazirmatn", "IRANSans", "IranYekan", "Tahoma", "Arial", sans-serif !important;
}

body.login-page {
  direction: rtl;
  text-align: right;
}

.login-shell,
.login-brand,
.modern-login-card,
.login-card-top,
.modern-login-form,
.login-footer-note {
  direction: rtl;
  text-align: right;
}

.login-logo-wrap {
  direction: rtl;
  text-align: right;
}

.login-brand p {
  text-align: right;
}

.login-features {
  justify-content: flex-start;
}

.modern-login-form label {
  text-align: right;
}

.modern-login-form input {
  direction: rtl;
  text-align: right;
}

.modern-login-form input[name="username"],
.modern-login-form input[name="password"] {
  direction: ltr;
  text-align: left;
}

.modern-login-form input::placeholder {
  direction: rtl;
  text-align: right;
}

.icon-input .input-icon {
  right: 14px;
  left: auto;
}

.modern-login-form input {
  padding-right: 46px;
  padding-left: 16px;
}

.password-wrap input {
  padding-right: 46px;
  padding-left: 78px;
}

.show-pass-btn {
  left: 7px;
  right: auto;
}

.login-btn {
  direction: rtl;
}

.login-btn strong {
  transform: rotate(180deg) translateY(1px);
}

.login-footer-note {
  text-align: center;
}

/* Mobile RTL alignment */
@media (max-width: 860px) {
  .login-shell,
  .login-brand,
  .modern-login-card,
  .login-card-top {
    text-align: center;
  }

  .login-brand p {
    text-align: center;
  }

  .login-features {
    justify-content: center;
  }
}

/* =========================
   Edit Record + Actions
========================= */

.actions-cell {
  white-space: nowrap;
}

.small-link {
  display: inline-block;
  padding: 6px 10px;
  font-size: 12px;
  margin-left: 6px;
}

.edit-record-form {
  align-items: end;
}

.edit-record-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: #334155;
}

.edit-record-form .wide-field {
  min-width: 320px;
  flex: 1;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
}

/* =========================
   Import Zone File
========================= */

.page-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.import-zone-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.import-zone-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #334155;
  font-size: 14px;
}

.import-zone-form textarea {
  min-height: 420px;
  width: 100%;
  resize: vertical;
  direction: ltr;
  text-align: left;
  font-family: Consolas, Monaco, "Courier New", monospace;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  padding: 14px;
  line-height: 1.7;
  background: #f8fafc;
}

.import-zone-form textarea:focus {
  outline: none;
  border-color: #22c55e;
  box-shadow: 0 0 0 3px rgba(34,197,94,.13);
  background: #fff;
}

/* =========================
   SSL Page
========================= */

.title-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ssl-form {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.ssl-form label {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #14532d;
  padding: 10px 14px;
  border-radius: 12px;
}

/* =========================
   SSL Queue Logs
========================= */

.ssl-job-log {
  direction: ltr;
  text-align: left;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  background: #020617;
  color: #bbf7d0;
  border-radius: 14px;
  padding: 14px;
  max-height: 320px;
  overflow-y: auto;
  font-family: Consolas, Monaco, "Courier New", monospace;
  font-size: 12px;
  line-height: 1.7;
}

.status.queued {
  color: #ca8a04;
  font-weight: bold;
}

.status.running {
  color: #2563eb;
  font-weight: bold;
}

.status.failed {
  color: #dc2626;
  font-weight: bold;
}

.status.success {
  color: #16a34a;
  font-weight: bold;
}

/* =========================
   SSL Queue Logs
========================= */

.ssl-job-log {
  direction: ltr;
  text-align: left;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  background: #020617;
  color: #bbf7d0;
  border-radius: 14px;
  padding: 14px;
  max-height: 320px;
  overflow-y: auto;
  font-family: Consolas, Monaco, "Courier New", monospace;
  font-size: 12px;
  line-height: 1.7;
}

.status.queued {
  color: #ca8a04;
  font-weight: bold;
}

.status.running {
  color: #2563eb;
  font-weight: bold;
}

.status.failed {
  color: #dc2626;
  font-weight: bold;
}

.status.success {
  color: #16a34a;
  font-weight: bold;
}

/* =========================
   SSL File Viewer
========================= */

.ssl-file-card {
  overflow: hidden;
}

.ssl-file-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.ssl-file-header h2 {
  margin: 0;
  direction: ltr;
  text-align: left;
}

.ssl-file-textarea {
  width: 100%;
  min-height: 260px;
  resize: vertical;
  direction: ltr;
  text-align: left;
  white-space: pre;
  overflow: auto;
  border: 1px solid #bbf7d0;
  border-radius: 14px;
  padding: 14px;
  background: #020617;
  color: #bbf7d0;
  font-family: Consolas, Monaco, "Courier New", monospace;
  font-size: 12px;
  line-height: 1.7;
}

.ssl-file-textarea:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(34,197,94,.18);
}

@media (max-width: 700px) {
  .ssl-file-header {
    flex-direction: column;
    align-items: stretch;
  }

  .ssl-file-header button {
    width: 100%;
  }
}
