:root {
  --ink: #15252d;
  --muted: #657784;
  --paper: #f5f9fb;
  --surface: #ffffff;
  --line: #d9e7ed;
  --primary: #0ea5dc;
  --primary-dark: #0575a8;
  --accent: #f59e0b;
  --soft: #e8f7fc;
  --danger: #b42318;
  --success: #0f766e;
  --sidebar: #102b3a;
  --shadow: 0 18px 45px rgba(16, 43, 58, 0.12);
  --shadow-soft: 0 10px 28px rgba(16, 43, 58, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, #f7fbfd 0%, #eef7fb 320px, var(--paper) 760px);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

:focus-visible {
  outline: 3px solid rgba(14, 165, 220, 0.28);
  outline-offset: 2px;
}

.top-strip {
  display: flex;
  justify-content: flex-end;
  gap: 24px;
  padding: 8px 6vw;
  background: var(--sidebar);
  color: #fff;
  font-size: 14px;
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 6vw;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 30px rgba(16, 43, 58, 0.06);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 1 1 260px;
  min-width: 0;
  color: var(--primary-dark);
}

.brand-text {
  display: grid;
  gap: 1px;
  min-width: 0;
  line-height: 1.05;
}

.brand-text strong,
.brand-text small {
  display: block;
  color: var(--primary-dark);
  white-space: nowrap;
}

.brand-text strong {
  font-size: 20px;
  font-weight: 900;
}

.brand-text small {
  font-size: 20px;
  font-weight: 900;
}

.brand img {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: contain;
  background: #fff;
  box-shadow: 0 6px 16px rgba(14, 165, 220, 0.18);
}

.nav-links {
  flex: 0 1 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
}

.nav-links a,
.nav-group > button {
  padding: 8px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.nav-links a.active,
.nav-links a:hover,
.nav-group > button:hover,
.nav-group.open > button {
  background: var(--soft);
  color: var(--primary-dark);
}

.nav-group {
  position: relative;
}

.nav-group > button::after {
  content: "▾";
  margin-left: 6px;
  font-size: 11px;
}

.nav-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 20;
  display: none;
  min-width: 220px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 18px 36px rgba(16, 43, 58, 0.14);
}

.nav-group:hover .nav-menu,
.nav-group.open .nav-menu {
  display: grid;
  gap: 4px;
}

.nav-menu a {
  display: block;
  padding: 10px 12px;
}

.donate-link,
.button,
button.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 18px;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: #fff !important;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(245, 158, 11, 0.2);
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.nav-links .donate-link {
  flex: 0 0 auto;
  margin-left: 6px;
  padding-inline: 20px;
  background: #f59e0b;
  color: #ffffff !important;
}

.nav-links .donate-link:hover,
.nav-links .donate-link:focus-visible {
  background: #d97706;
  color: #ffffff !important;
  box-shadow: 0 14px 28px rgba(217, 119, 6, 0.3);
}

.donate-link:hover,
.button:hover,
button.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(245, 158, 11, 0.26);
}

.button:disabled,
button.button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
  box-shadow: none;
}

.button.secondary {
  background: var(--primary);
  box-shadow: 0 10px 22px rgba(14, 165, 220, 0.2);
}

.button.ghost {
  background: transparent;
  color: var(--primary-dark) !important;
  border: 1px solid var(--primary);
  box-shadow: none;
}

.button.ghost:hover {
  background: var(--soft);
  box-shadow: none;
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  font-size: 22px;
  color: var(--primary-dark);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  align-items: center;
  gap: 42px;
  padding: 72px 6vw 56px;
  background:
    radial-gradient(circle at 80% 20%, rgba(14, 165, 220, 0.16), transparent 34%),
    linear-gradient(120deg, #ffffff 0%, #eaf7fc 100%);
}

.hero h1,
.page-hero h1 {
  max-width: 760px;
  margin: 0 0 18px;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.04;
}

.hero p,
.page-hero p {
  max-width: 720px;
  margin: 0 0 26px;
  color: var(--muted);
  font-size: 19px;
}

.hero-media {
  min-height: 420px;
  border: 1px solid rgba(14, 165, 220, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(rgba(20, 46, 42, 0.1), rgba(20, 46, 42, 0.18)),
    url('../images/hero-community.svg') center/cover no-repeat;
  box-shadow: var(--shadow);
  background-color: #fff;
  background-size: cover;
  background-repeat: no-repeat;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  margin: 0 6vw;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.stat {
  padding: 26px;
  background: var(--surface);
}

.stat strong {
  display: block;
  color: var(--primary-dark);
  font-size: 32px;
  line-height: 1;
}

.section,
.page-hero {
  padding: 56px 6vw;
}

.section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.section-title h2,
.page-hero h1 {
  margin-top: 0;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(16, 43, 58, 0.12);
}

.card-body {
  padding: 22px;
}

.card h3 {
  margin: 0 0 10px;
}

.card p,
.meta,
.muted {
  color: var(--muted);
}

.image-band {
  min-height: 190px;
  background:
    linear-gradient(rgba(14, 165, 220, 0.08), rgba(14, 165, 220, 0.08)),
    url('../images/deshik-logo.png') center/96px no-repeat,
    #f8fcfe;
}

.card-image {
  width: 100%;
  height: 210px;
  object-fit: cover;
  background: #f8fcfe;
}

.cta-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 42px 6vw;
  background: linear-gradient(120deg, var(--primary-dark), var(--sidebar));
  color: #fff;
}

.cta-band p {
  max-width: 680px;
  color: #d8efea;
}

.form-panel,
.admin-panel {
  max-width: 920px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.form-panel {
  margin-inline: auto;
}

.login-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 440px;
  align-items: stretch;
  min-height: 100vh;
  background: linear-gradient(135deg, #f7fbf8 0%, #e8f3ee 100%);
}

.login-visual {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  padding: 8vw;
  background:
    linear-gradient(rgba(16, 43, 58, 0.78), rgba(5, 117, 168, 0.72)),
    url('../images/deshik-logo.png') center/360px no-repeat,
    #102b3a;
  color: #fff;
}

.login-mark {
  width: 92px;
  height: 92px;
  margin-bottom: 22px;
  border-radius: 50%;
  object-fit: contain;
  background: #fff;
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.18);
}

.login-visual h1 {
  max-width: 620px;
  margin: 18px 0;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1;
}

.login-visual p {
  max-width: 560px;
  color: #d8efea;
  font-size: 19px;
}

.login-panel {
  align-self: center;
  width: min(100% - 40px, 440px);
  margin: 40px auto;
  box-shadow: 0 28px 80px rgba(29, 49, 45, 0.18);
}

.login-panel h1 {
  margin: 10px 0 22px;
}

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

.form-grid.relaxed {
  gap: 22px 24px;
}

.form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  align-items: start;
  gap: 28px;
  max-width: 1180px;
  margin: 0 auto;
}

.form-panel-wide {
  max-width: none;
  padding: 34px;
}

.form-heading {
  max-width: 720px;
  margin-bottom: 28px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.form-heading h2 {
  margin: 12px 0 8px;
  font-size: 30px;
  line-height: 1.15;
}

.form-heading p {
  margin: 0;
  color: var(--muted);
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 8px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.info-panel {
  position: sticky;
  top: 108px;
  padding: 28px;
  border: 1px solid rgba(14, 165, 220, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(14, 165, 220, 0.08), rgba(255, 255, 255, 0)),
    var(--surface);
  box-shadow: var(--shadow-soft);
}

.info-panel h2 {
  margin: 12px 0 18px;
}

.info-list {
  display: grid;
  gap: 14px;
  margin-bottom: 22px;
}

.info-list p {
  margin: 0;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.info-list p:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.info-list strong,
.info-list span {
  display: block;
}

.info-list strong {
  color: var(--ink);
}

.info-list span {
  color: var(--muted);
}

.sponsor-note {
  margin: -8px 0 24px;
  padding: 14px 16px;
  border: 1px solid rgba(14, 165, 220, 0.18);
  border-radius: 8px;
  background: var(--soft);
  color: var(--primary-dark);
}

.sponsor-note span {
  margin-left: 8px;
  font-weight: 800;
}

.member-directory {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
}

.member-card {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 16px;
  min-height: 190px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.member-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  font-size: 26px;
  font-weight: 900;
}

.member-card h3 {
  margin: 0 0 8px;
  min-height: 52px;
  line-height: 1.2;
}

.member-card p {
  margin: 4px 0;
  color: var(--muted);
}

.directory-filters {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.8fr 0.9fr auto;
  align-items: end;
  gap: 16px;
  margin: 0 0 26px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.directory-filters .field {
  margin-bottom: 0;
}

.directory-filter-actions {
  display: flex;
  gap: 10px;
}

.field {
  display: grid;
  gap: 7px;
  margin-bottom: 16px;
}

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

label {
  font-weight: 800;
}

.toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  font-weight: 800;
}

.toggle-row input {
  width: auto;
  min-height: 0;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 11px 12px;
  border: 1px solid #c9d5cf;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(14, 165, 220, 0.12);
  outline: none;
}

input[readonly],
textarea[readonly] {
  background: #f7fafb;
  color: #455a64;
}

textarea {
  min-height: 130px;
  resize: vertical;
}

.flash {
  margin: 0 6vw 24px;
  padding: 14px 18px;
  border-radius: 6px;
  background: #e8f3ee;
  color: var(--success);
  font-weight: 700;
  border: 1px solid rgba(15, 118, 110, 0.18);
}

.flash.error {
  background: #fee4e2;
  color: var(--danger);
  border-color: #fecdca;
}

.site-footer {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 30px;
  padding: 42px 6vw;
  background: var(--sidebar);
  color: #edf6f1;
}

.site-footer a,
.site-footer span {
  display: block;
  color: #d0ddd9;
  margin-top: 8px;
}

.footer-logo {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  object-fit: contain;
  background: #fff;
  margin-bottom: 14px;
}

.admin-shell {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  min-height: 100vh;
}

.panel-mobile-bar {
  display: none;
}

.panel-backdrop {
  display: none;
}

.admin-sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  min-height: 100vh;
  padding: 24px 18px;
  background:
    linear-gradient(180deg, rgba(14, 165, 220, 0.14), transparent 240px),
    var(--sidebar);
  color: #fff;
}

.admin-sidebar h2 {
  margin: 0 0 24px;
  color: #ffffff;
}

.panel-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  line-height: 1.15;
}

.panel-brand img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: contain;
  background: #fff;
}

.panel-menu-group {
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.panel-group-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin: 0 0 8px;
  padding: 8px 10px;
  border: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.54);
  cursor: pointer;
}

.panel-group-toggle span {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.panel-group-toggle::after {
  content: "▾";
  color: rgba(255, 255, 255, 0.7);
  font-size: 11px;
  transition: transform 150ms ease;
}

.panel-menu-group.open .panel-group-toggle::after {
  transform: rotate(180deg);
}

.panel-group-links {
  display: none;
}

.panel-menu-group.open .panel-group-links {
  display: block;
}

.admin-sidebar a {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
  padding: 11px 12px;
  border-radius: 6px;
  color: #d0ddd9;
}

.nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: #9ee5ff;
  font-size: 14px;
  font-weight: 900;
}

.admin-sidebar a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.admin-content {
  min-width: 0;
  padding: 32px;
}

.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.admin-topbar > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 24px 0;
}

.dashboard-stat-card {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.dashboard-stat-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 8px;
  background: var(--soft);
  color: var(--primary-dark);
  font-size: 22px;
  font-weight: 900;
}

.dashboard-stat-card strong {
  display: block;
  margin: 3px 0;
  color: var(--ink);
  font-size: 25px;
  line-height: 1.2;
}

.dashboard-stat-card small {
  display: block;
  color: var(--muted);
  font-weight: 700;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-bottom: 24px;
}

.dashboard-grid .card:nth-child(5) {
  grid-column: 1 / -1;
}

.dashboard-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.dashboard-row:last-child {
  border-bottom: 0;
}

.dashboard-row strong {
  white-space: nowrap;
}

.mini-list {
  display: grid;
  gap: 14px;
}

.mini-list div {
  padding-bottom: 13px;
  border-bottom: 1px solid var(--line);
}

.mini-list div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.mini-list strong,
.mini-list span {
  display: block;
}

.mini-list span {
  color: var(--muted);
  font-size: 14px;
}

.profile-panel {
  max-width: 760px;
}

.referral-links-panel {
  display: grid;
  gap: 18px;
  margin-top: 24px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.referral-links-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.referral-links-heading h2 {
  margin: 8px 0 0;
}

.referral-links-heading p {
  max-width: 460px;
  margin: 0;
}

.referral-link-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.referral-link-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fcfe;
}

.referral-link-card h3 {
  margin: 8px 0 4px;
}

.referral-link-card p {
  margin: 0;
}

.referral-link-card input {
  font-size: 14px;
}

.copy-share-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: center;
}

.copy-share-row .button {
  min-height: 44px;
  padding-inline: 14px;
  white-space: nowrap;
}

.copy-share-status {
  min-height: 20px;
  color: var(--success);
  font-size: 13px;
  font-weight: 800;
}

.cms-editor {
  display: grid;
  gap: 22px;
  max-width: 1120px;
}

.cms-section {
  max-width: none;
  box-shadow: 0 8px 24px rgba(29, 49, 45, 0.06);
}

.cms-section h2 {
  margin-top: 0;
}

.cms-preview {
  display: flex;
  align-items: center;
  min-height: 96px;
  padding: 16px;
  border: 1px dashed #b7c7c0;
  border-radius: 8px;
  background: #f8fbf9;
}

.cms-preview img {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  object-fit: contain;
  background: #fff;
}

.cms-savebar {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  gap: 12px;
  padding: 16px 0;
  background: linear-gradient(rgba(251, 250, 247, 0), var(--paper) 35%);
}

.mini-form {
  min-width: 240px;
}

.mini-form textarea {
  min-height: 80px;
}

.id-card-page {
  background: #edf3f7;
}

.id-card-actions {
  max-width: 890px;
  margin: 0 auto 20px;
}

.id-card-preview {
  width: min(890px, calc(100vw - 32px));
  height: auto;
  aspect-ratio: 89 / 51;
  margin: 0 auto;
}

.id-card {
  position: relative;
  width: 890px;
  height: 510px;
  transform-origin: top left;
  overflow: hidden;
  border: 1px solid #cfe3eb;
  border-radius: 8px;
  background: #ffffff;
  color: #102b3a;
  box-shadow: 0 22px 60px rgba(16, 43, 58, 0.18);
  isolation: isolate;
}

.id-card.id-card-exporting {
  box-shadow: none;
}

.id-card-watermark {
  position: absolute;
  right: 258px;
  bottom: 62px;
  z-index: -1;
  width: 250px;
  opacity: 0.055;
}

.id-card-top {
  position: relative;
  display: block;
  height: 108px;
  padding: 20px 30px;
  background: linear-gradient(120deg, #0ea5dc, #102b3a);
  color: #ffffff;
}

.id-card-brand {
  position: absolute;
  top: 20px;
  left: 30px;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 650px;
  height: 68px;
  min-width: 0;
}

.id-card-brand > div {
  position: relative;
  display: block;
  min-width: 0;
  width: 570px;
  height: 58px;
}

.id-card-brand img {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  border: 2px solid rgba(255, 255, 255, 0.75);
  border-radius: 50%;
  object-fit: contain;
  background: #fff;
}

.id-card-brand strong {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  overflow: hidden;
  width: 570px;
  height: 28px;
  color: #ffffff;
  font-size: 20px;
  line-height: 28px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.id-card-brand strong,
.id-card-brand span,
.id-card-member h1,
.id-card-meta span,
.id-card-foot span {
  letter-spacing: 0;
}

.id-card-brand span {
  position: absolute;
  top: 36px;
  left: 0;
  display: block;
  width: 260px;
  height: 18px;
  margin: 0;
  padding: 0;
  background: transparent;
  color: #d8f4ff;
  font-size: 11px;
  line-height: 18px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
  white-space: nowrap;
}

.id-card-status {
  position: absolute;
  top: 38px;
  right: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 82px;
  height: 30px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 12px;
  line-height: 30px;
  font-weight: 900;
  text-align: center;
}

.id-card-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 176px;
  gap: 24px;
  height: 352px;
  padding: 20px 30px 14px;
}

.id-card-member {
  min-width: 0;
}

.id-card-member > span {
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.id-card-member h1 {
  display: -webkit-box;
  min-height: 78px;
  max-height: 78px;
  margin: 5px 0 10px;
  overflow: hidden;
  color: #102b3a;
  font-size: 30px;
  line-height: 1.18;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.id-card-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.id-card-meta p {
  margin: 0;
  min-height: 58px;
  padding: 9px 10px;
  border: 1px solid #dcecf2;
  border-radius: 6px;
  background: #f7fbfd;
}

.id-card-meta strong,
.id-card-meta span {
  display: block;
}

.id-card-meta strong {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}

.id-card-meta span {
  overflow: hidden;
  color: #102b3a;
  font-size: 13px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.id-card-qr-grid {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 10px;
  align-content: stretch;
}

.id-card-qr-grid > div {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 7px;
  min-width: 0;
  padding: 10px 8px;
  border: 1px solid #dcecf2;
  border-radius: 6px;
  background: #ffffff;
}

.id-card-qr-grid canvas,
.id-card-qr-grid img {
  width: 78px !important;
  height: 78px !important;
}

.id-card-qr-grid strong {
  color: #102b3a;
  font-size: 10px;
  line-height: 1.15;
  text-align: center;
  text-transform: uppercase;
}

.id-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 50px;
  padding: 0 30px;
  background: #102b3a;
  color: #d8f4ff;
  font-size: 12px;
  font-weight: 800;
}

.id-card-foot span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: #eef8fc;
  color: #23404b;
  font-size: 13px;
  text-transform: uppercase;
}

tbody tr:hover {
  background: #f8fcfe;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.badge {
  display: inline-block;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 800;
}

@media (max-width: 900px) {
  .hero,
  .grid,
  .grid.two,
  .stats,
  .dashboard-stats,
  .dashboard-grid,
  .site-footer,
  .admin-shell,
  .login-page {
    grid-template-columns: 1fr;
  }

  .login-visual {
    min-height: auto;
    padding: 48px 6vw;
  }

  .hero-media {
    min-height: 320px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 18px 6vw;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 32px rgba(16, 43, 58, 0.12);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links .donate-link {
    width: 100%;
    margin-left: 0;
    margin-top: 6px;
  }

  .nav-group {
    width: 100%;
  }

  .nav-group > button {
    width: 100%;
    text-align: left;
  }

  .nav-menu {
    position: static;
    display: grid;
    min-width: 0;
    margin: 4px 0 8px;
    padding: 6px 0 6px 14px;
    border: 0;
    border-left: 3px solid var(--soft);
    border-radius: 0;
    box-shadow: none;
  }

  .nav-group:not(.open) .nav-menu {
    display: none;
  }

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

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

  .member-directory {
    grid-template-columns: 1fr;
  }

  .directory-filters {
    grid-template-columns: 1fr;
  }

  .referral-links-panel {
    padding: 18px;
  }

  .referral-links-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .referral-link-grid {
    grid-template-columns: 1fr;
  }

  .copy-share-row {
    grid-template-columns: 1fr 1fr;
  }

  .directory-filter-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .form-panel-wide {
    padding: 24px;
  }

  .info-panel {
    position: static;
  }

  .cta-band {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-sidebar {
    position: static;
    min-height: auto;
  }

  .admin-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .panel-mobile-bar {
    position: sticky;
    top: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 6vw;
    background: var(--sidebar);
    color: #fff;
    box-shadow: 0 10px 24px rgba(16, 43, 58, 0.18);
  }

  .panel-mobile-bar span {
    font-weight: 900;
  }

  .panel-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 22px;
    cursor: pointer;
  }

  .admin-shell {
    display: block;
  }

  .admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 80;
    width: min(86vw, 320px);
    height: 100vh;
    min-height: 100vh;
    overflow-y: auto;
    transform: translateX(-105%);
    transition: transform 180ms ease;
    box-shadow: 18px 0 40px rgba(16, 43, 58, 0.26);
  }

  .admin-sidebar.open {
    transform: translateX(0);
  }

  .panel-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 70;
    background: rgba(8, 24, 32, 0.48);
  }

  body.panel-menu-open .panel-backdrop {
    display: block;
  }

  .admin-content {
    padding: 22px 6vw 32px;
  }

  .brand {
    min-width: 0;
    flex-basis: auto;
  }

  .brand img {
    width: 42px;
    height: 42px;
  }

  .brand-text strong {
    font-size: 16px;
  }

  .brand-text small {
    font-size: 16px;
  }

  .id-card-preview {
    width: min(890px, calc(100vw - 24px));
  }
}
