.nsra-shell {
  --nsra-ink: #172026;
  --nsra-muted: #66717a;
  --nsra-line: #d9e2e7;
  --nsra-bg: #f6f8f9;
  --nsra-panel: #ffffff;
  --nsra-accent: #0f766e;
  --nsra-accent-2: #2563eb;
  --nsra-danger: #b42318;
  --nsra-ok: #177245;
  color: var(--nsra-ink);
  direction: rtl;
  font-family: Tahoma, Arial, sans-serif;
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px;
  box-sizing: border-box;
}

.nsra-shell * {
  box-sizing: border-box;
}

.nsra-hero,
.nsra-topbar,
.nsra-box {
  background: var(--nsra-panel);
  border: 1px solid var(--nsra-line);
  border-radius: 8px;
}

.nsra-hero,
.nsra-topbar {
  padding: 22px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nsra-hero h2,
.nsra-topbar h2,
.nsra-box h3 {
  margin: 0 0 8px;
  line-height: 1.5;
}

.nsra-hero p,
.nsra-topbar p,
.nsra-box p,
.nsra-muted {
  margin: 0;
  color: var(--nsra-muted);
  line-height: 1.9;
}

.nsra-health {
  border: 1px solid var(--nsra-line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #eef7f5;
  margin-bottom: 12px;
  line-height: 1.8;
}

.nsra-auth-grid,
.nsra-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 14px 0;
}

.nsra-box {
  padding: 18px;
  min-width: 0;
}

.nsra-social-auth {
  margin-bottom: 14px;
}

.nsra-social-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.nsra-social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid var(--nsra-line);
  text-decoration: none;
  font-weight: 700;
  line-height: 1.5;
}

.nsra-social-btn.google {
  background: #ffffff;
  color: var(--nsra-ink);
}

.nsra-social-btn.apple {
  background: #111827;
  color: #ffffff;
  border-color: #111827;
}

.nsra-social-btn.setup-needed {
  cursor: pointer;
  opacity: .85;
}

.nsra-admin-form,
.nsra-admin-user-form {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 10px;
  align-items: end;
}

.nsra-admin-user-form {
  grid-template-columns: 1fr .9fr 1.3fr 1.4fr 1fr .5fr .8fr 1fr auto auto;
  min-width: 1040px;
}

.nsra-admin-user-form input,
.nsra-admin-user-form select {
  min-width: 0;
}

.nsra-danger-btn {
  background: var(--nsra-danger) !important;
  color: #fff !important;
}

.nsra-admin-downloads {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.nsra-admin-downloads a {
  padding: 8px 10px;
  font-size: 13px;
}

.nsra-oauth-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.nsra-oauth-form fieldset {
  border: 1px solid var(--nsra-line);
  border-radius: 8px;
  padding: 12px;
  min-width: 0;
}

.nsra-oauth-form legend {
  padding: 0 8px;
  font-weight: 800;
}

.nsra-oauth-form textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  border: 1px solid var(--nsra-line);
  border-radius: 8px;
  padding: 11px 12px;
  font: inherit;
  background: #fff;
  direction: ltr;
}

.nsra-oauth-form .nsra-code-input {
  direction: ltr;
  unicode-bidi: plaintext;
  text-align: left;
  font-family: Consolas, Menlo, Monaco, "Courier New", monospace;
  letter-spacing: 0;
}

.nsra-oauth-form button {
  grid-column: 1 / -1;
  justify-self: start;
}

.nsra-oauth-warning {
  margin: 10px 0 0;
  color: var(--nsra-danger);
  font-weight: 700;
  line-height: 1.8;
}

.nsra-upload {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 16px;
  align-items: center;
  margin-bottom: 14px;
}

.nsra-shell label {
  display: block;
  margin: 10px 0;
  color: var(--nsra-ink);
  font-weight: 600;
}

.nsra-shell input[type="text"],
.nsra-shell input[type="email"],
.nsra-shell input[type="password"],
.nsra-shell input[type="file"],
.nsra-shell input:not([type]),
.nsra-shell select {
  display: block;
  width: 100%;
  margin-top: 6px;
  border: 1px solid var(--nsra-line);
  border-radius: 8px;
  padding: 11px 12px;
  font: inherit;
  background: #fff;
}

.nsra-shell button,
.nsra-downloads a,
.nsra-link {
  appearance: none;
  border: 0;
  border-radius: 8px;
  background: var(--nsra-accent);
  color: #fff;
  padding: 11px 16px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
}

.nsra-shell button:hover,
.nsra-downloads a:hover,
.nsra-link:hover {
  filter: brightness(.96);
}

.nsra-ghost {
  background: #eef2f4 !important;
  color: var(--nsra-ink) !important;
}

.nsra-link {
  background: var(--nsra-accent-2);
  margin-top: 10px;
}

.nsra-notice {
  min-height: 0;
  margin: 12px 0;
  padding: 0;
}

.nsra-notice.info,
.nsra-notice.success,
.nsra-notice.error {
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--nsra-line);
  line-height: 1.8;
}

.nsra-notice.info {
  background: #eff6ff;
}

.nsra-notice.success {
  background: #ecfdf3;
  color: var(--nsra-ok);
}

.nsra-notice.error {
  background: #fff1f0;
  color: var(--nsra-danger);
}

.nsra-dashboard {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0;
}

.nsra-card {
  background: #fff;
  border: 1px solid var(--nsra-line);
  border-radius: 8px;
  padding: 16px;
}

.nsra-card span {
  display: block;
  color: var(--nsra-muted);
  margin-bottom: 8px;
}

.nsra-card strong {
  font-size: 1.3rem;
}

.nsra-downloads {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 12px 0;
}

.nsra-downloads a:nth-child(2) {
  background: var(--nsra-accent-2);
}

.nsra-bars {
  display: grid;
  gap: 10px;
}

.nsra-bar-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(120px, 2fr) minmax(80px, auto);
  gap: 10px;
  align-items: center;
  font-size: .92rem;
}

.nsra-bar-row div {
  height: 10px;
  background: #edf2f5;
  border-radius: 999px;
  overflow: hidden;
}

.nsra-bar-row b {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--nsra-accent), var(--nsra-accent-2));
}

.nsra-bar-row em {
  font-style: normal;
  direction: ltr;
  text-align: left;
}

.nsra-line {
  width: 100%;
  height: auto;
  color: var(--nsra-accent-2);
  background: #f7fafc;
  border: 1px solid var(--nsra-line);
  border-radius: 8px;
}

.nsra-months {
  display: flex;
  justify-content: space-between;
  gap: 4px;
  color: var(--nsra-muted);
  font-size: .78rem;
  direction: ltr;
  margin-top: 8px;
}

.nsra-table-wrap {
  overflow-x: auto;
}

.nsra-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

.nsra-table th,
.nsra-table td {
  border-bottom: 1px solid var(--nsra-line);
  padding: 10px;
  text-align: right;
  vertical-align: top;
  line-height: 1.7;
}

.nsra-table th {
  background: #f7fafc;
  font-weight: 800;
}

.nsra-job {
  width: 100%;
  background: #fff !important;
  color: var(--nsra-ink) !important;
  border: 1px solid var(--nsra-line) !important;
  margin: 8px 0;
  justify-content: space-between !important;
  gap: 12px;
}

.nsra-job small {
  color: var(--nsra-muted);
  font-weight: 400;
}

.nsra-pre {
  white-space: pre-wrap;
  background: #f7fafc;
  border: 1px solid var(--nsra-line);
  border-radius: 8px;
  padding: 12px;
  min-height: 0;
  margin-top: 12px;
  direction: rtl;
  font-family: Tahoma, Arial, sans-serif;
}

@media (max-width: 860px) {
  .nsra-auth-grid,
  .nsra-grid,
  .nsra-upload,
  .nsra-dashboard {
    grid-template-columns: 1fr;
  }

  .nsra-hero,
  .nsra-topbar {
    display: block;
  }

  .nsra-ghost {
    margin-top: 12px;
  }

  .nsra-bar-row {
    grid-template-columns: 1fr;
  }

  .nsra-admin-form {
    grid-template-columns: 1fr;
  }

  .nsra-oauth-form {
    grid-template-columns: 1fr;
  }
}
