:root {
  color-scheme: light;
  --ink: #172233;
  --muted: #66758a;
  --line: #d9e4ee;
  --panel: #ffffff;
  --soft: #f4f8fb;
  --navy: #18468b;
  --blue: #0070c0;
  --cyan: #00b0f0;
  --teal: #4bacc6;
  --aqua-soft: #e9f6fa;
  --olive: #9bbb59;
  --green: #00b050;
  --red: #c00000;
  --red-soft: #f6e5e5;
  --gold: #c9a64a;
  --gold-soft: #f4e7bd;
  --rose: #93cddd;
  --rose-deep: #0070c0;
  --beige: #eef4e1;
  --beige-deep: #9bbb59;
  --admin-line: #d8e3eb;
  --admin-shadow: 0 16px 38px rgba(24, 70, 139, 0.09);
  --shadow: 0 24px 64px rgba(24, 70, 139, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: Manrope, Arial, sans-serif;
  font-weight: 300;
  background: var(--soft);
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
  overflow-x: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
  background:
    linear-gradient(90deg, rgba(244, 248, 251, 0.95), rgba(233, 246, 250, 0.82)),
    url("assets/admin-login-bg.png") center / cover no-repeat,
    linear-gradient(135deg, #f7fbfd, #e9f6fa 52%, #ffffff);
}

.login-card {
  width: min(920px, 100%);
  min-height: 500px;
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid rgba(147, 205, 221, 0.55);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--admin-shadow);
}

.login-brand {
  position: relative;
  padding: 50px 44px;
  color: #fff;
  background:
    linear-gradient(145deg, rgba(24, 70, 139, 0.98), rgba(0, 112, 192, 0.88)),
    linear-gradient(135deg, #18468b, #4bacc6);
}

.login-brand::after {
  content: "";
  position: absolute;
  right: -54px;
  bottom: 54px;
  width: 150px;
  height: 260px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(147, 205, 221, 0.18);
  transform: rotate(18deg);
}

.brand-mark {
  min-width: 52px;
  width: auto;
  height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.16);
  padding: 0 10px;
  text-align: center;
  line-height: 1.05;
  white-space: normal;
  font-weight: 500;
}

.login-brand h1 {
  margin: 42px 0 16px;
  font-size: clamp(2.1rem, 5vw, 4.2rem);
  line-height: 0.98;
  letter-spacing: 0;
  font-weight: 300;
}

.login-brand p {
  position: relative;
  z-index: 1;
  max-width: 310px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.6;
}

.login-form {
  padding: 64px 56px;
  align-self: center;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.login-form h2,
.section-title h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.1rem);
  letter-spacing: 0;
  font-weight: 300;
}

.accent-line {
  width: 96px;
  height: 6px;
  margin: 14px 0 28px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--navy), var(--cyan), #fff);
}

.login-form p {
  margin: 0 0 28px;
  color: var(--muted);
  line-height: 1.5;
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  color: #42566e;
  font-size: 0.83rem;
  font-weight: 500;
}

.field .required-mark {
  margin-left: 3px;
  color: #c21807;
  font-size: 0.83rem;
  font-weight: 600;
}

.field-error {
  color: #c21807;
  font-size: 0.72rem;
  line-height: 1.25;
}

.field-invalid input,
.field-invalid select,
.field-invalid textarea {
  border-color: #c21807;
}

.field input,
.field select,
.field textarea,
.search-box input,
.whatsapp-share input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
  color: var(--ink);
  outline: none;
  font-weight: 300;
  transition: border 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.field input,
.field select {
  height: 48px;
  padding: 0 14px;
}

.field textarea {
  min-height: 82px;
  padding: 12px 14px;
  resize: vertical;
}

.checkbox-field input {
  width: 20px;
  height: 20px;
  justify-self: start;
  accent-color: var(--blue);
}

.field-hint {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.3;
}

.field.tall-field textarea {
  min-height: 170px;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.search-box input:focus,
.whatsapp-share input:focus {
  border-color: var(--cyan);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(0, 176, 240, 0.15);
}

.readonly-field input {
  color: var(--navy);
  background: #eef6fb;
  font-weight: 600;
}

.form-stack {
  display: grid;
  gap: 16px;
}

.sso-login-btn {
  width: 100%;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid #c9dce9;
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  font-weight: 500;
}

.sso-login-btn:disabled {
  cursor: wait;
  opacity: 0.72;
}

.login-message {
  width: 100%;
  margin: 2px auto 0;
  color: var(--navy);
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.4;
  text-align: center;
}

.auth-loader-card {
  width: min(480px, 100%);
  display: grid;
  justify-items: center;
  gap: 18px;
  padding: 44px 34px;
  border: 1px solid rgba(147, 205, 221, 0.55);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--admin-shadow);
  text-align: center;
}

.auth-loader-card .brand-mark {
  color: var(--navy);
  border-color: rgba(0, 112, 192, 0.18);
  background: #eef6fb;
}

.auth-loader-ring {
  width: 58px;
  height: 58px;
  border: 4px solid rgba(0, 112, 192, 0.12);
  border-top-color: var(--cyan);
  border-right-color: var(--blue);
  border-radius: 50%;
  animation: card-loader-spin 0.8s linear infinite;
}

.auth-loader-card h1 {
  margin: 0;
  color: var(--ink);
  font-size: 1.7rem;
  font-weight: 500;
  line-height: 1.15;
}

.auth-loader-card p {
  max-width: 340px;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.microsoft-mark {
  width: 18px;
  height: 18px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
}

.microsoft-mark span:nth-child(1) { background: #f25022; }
.microsoft-mark span:nth-child(2) { background: #7fba00; }
.microsoft-mark span:nth-child(3) { background: #00a4ef; }
.microsoft-mark span:nth-child(4) { background: #ffb900; }

.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 0.76rem;
}

.login-divider::before,
.login-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}

.primary-btn,
.secondary-btn,
.ghost-btn,
.danger-btn,
.icon-btn,
.save-contact {
  border: 0;
  border-radius: 8px;
  font-weight: 500;
}

.primary-btn {
  min-height: 48px;
  padding: 0 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--navy), var(--blue));
  box-shadow: 0 12px 22px rgba(24, 70, 139, 0.18);
}

.secondary-btn {
  min-height: 42px;
  padding: 0 15px;
  color: var(--navy);
  border: 1px solid #c9dce9;
  background: #f5fafd;
}

.ghost-btn {
  min-height: 42px;
  padding: 0 15px;
  color: var(--ink);
  border: 1px solid #c9dce9;
  background: #ffffff;
}

.danger-btn {
  min-height: 42px;
  padding: 0 15px;
  color: #fff;
  background: var(--red);
}

.app-shell {
  height: 100vh;
  display: grid;
  grid-template-columns: 264px 1fr;
  overflow: hidden;
  background:
    linear-gradient(145deg, #f7fbfd 0%, #f3f8fb 48%, #edf4f8 100%);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 24px 18px;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(147, 205, 221, 0.14), rgba(255, 255, 255, 0)),
    linear-gradient(180deg, #18468b 0%, #12386f 58%, #0f2e59 100%);
  box-shadow: inset -1px 0 rgba(255, 255, 255, 0.14);
}

.side-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.side-logo .brand-mark {
  flex: 0 0 auto;
  min-width: 44px;
  width: auto;
  height: 44px;
  font-size: 0.74rem;
}

.side-logo strong {
  display: block;
  font-weight: 400;
  line-height: 1.1;
}

.side-logo span {
  color: rgba(227, 244, 249, 0.82);
  font-size: 0.78rem;
  font-weight: 300;
}

.nav-list {
  display: grid;
  gap: 6px;
}

.nav-item {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0;
  border-radius: 8px;
  padding: 0 12px;
  color: rgba(255, 255, 255, 0.78);
  background: transparent;
  text-align: left;
  font-weight: 300;
}

.nav-item.active,
.nav-item:hover {
  color: #0f2e59;
  background: #eef8fb;
  box-shadow: inset 3px 0 var(--cyan);
}

.nav-icon {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  text-align: center;
}

.svg-icon {
  width: 1.1em;
  height: 1.1em;
  display: inline-grid;
  place-items: center;
}

.svg-icon svg {
  width: 100%;
  height: 100%;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.main {
  min-width: 0;
  display: flex;
  height: 100vh;
  overflow-y: auto;
  flex-direction: column;
  padding: 22px 32px 0;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin: -2px 0 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--admin-line);
}

.cards-main {
  padding-top: 16px;
}

.cards-main .topbar {
  margin-bottom: 12px;
  padding-bottom: 8px;
}

.cards-main .section-title .eyebrow {
  margin-bottom: 2px;
}

.cards-main .section-title h2 {
  font-size: clamp(1.65rem, 3vw, 2.35rem);
}

.cards-main .section-title p {
  margin-top: 4px;
  font-size: 0.92rem;
}

.section-title .eyebrow {
  margin-bottom: 4px;
}

.section-title h2 {
  font-size: clamp(1.85rem, 3.4vw, 2.7rem);
}

.section-title p {
  margin: 6px 0 0;
  color: var(--muted);
  font-weight: 300;
}

.top-actions,
.toolbar,
.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.row-actions {
  flex-wrap: nowrap;
  gap: 8px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.metric-card,
.panel,
.dbc-card-preview,
.card-row {
  border: 1px solid var(--admin-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--admin-shadow);
}

.metric-card {
  min-height: 126px;
  padding: 18px 18px 16px;
  position: relative;
  overflow: hidden;
  border-left: 3px solid var(--teal);
}

.metric-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(147, 205, 221, 0.22), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.metric-card span {
  position: relative;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 400;
}

.metric-card strong {
  position: relative;
  display: block;
  margin-top: 12px;
  font-size: 2.35rem;
  font-weight: 300;
  line-height: 1;
}

.metric-card small {
  position: relative;
  display: block;
  margin-top: 12px;
  color: var(--blue);
  font-weight: 400;
}

.dashboard-charts {
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) minmax(280px, 1fr) minmax(280px, 1fr);
  gap: 16px;
  margin-bottom: 18px;
}

.chart-card {
  min-height: 250px;
}

.donut-row {
  min-height: 172px;
  display: grid;
  grid-template-columns: 148px 1fr;
  gap: 18px;
  align-items: center;
}

.donut-chart {
  --active: 0;
  width: 148px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--green) calc(var(--active) * 1%), #dce8c6 0);
  box-shadow: inset 0 0 0 18px #fff, 0 16px 28px rgba(24, 70, 139, 0.12);
  cursor: help;
}

.donut-chart span {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border: 1px solid var(--admin-line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: var(--navy);
  font-size: 1.45rem;
  font-weight: 300;
}

.chart-legend {
  display: grid;
  gap: 12px;
}

.legend-item {
  display: grid;
  grid-template-columns: 12px 1fr auto;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 0.9rem;
  cursor: help;
}

.legend-item strong {
  color: var(--ink);
  font-weight: 400;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #dce8c6;
}

.legend-dot.active {
  background: var(--green);
}

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

.bar-row {
  display: grid;
  gap: 7px;
}

.bar-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.86rem;
}

.bar-label strong {
  color: var(--ink);
  font-weight: 400;
}

.bar-track {
  height: 6px;
  overflow: hidden;
  border-radius: 0;
  background: #e4eef5;
}

.bar-track span {
  display: block;
  height: 100%;
  border-radius: 0;
  background: linear-gradient(90deg, var(--teal), var(--blue));
}

.line-chart-card {
  min-height: 270px;
}

.line-chart-summary {
  display: grid;
  gap: 6px;
  margin-bottom: 8px;
}

.line-chart-summary span {
  color: var(--muted);
  font-size: 0.82rem;
}

.line-chart-summary strong {
  color: var(--ink);
  font-size: 1.85rem;
  font-weight: 400;
  line-height: 1;
}

.line-chart {
  width: 100%;
  height: auto;
  overflow: visible;
}

.line-chart-grid {
  stroke: #d8e5ee;
  stroke-width: 1;
}

.line-chart-series {
  fill: none;
  stroke: var(--series-color);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3.5;
  cursor: help;
}

.line-chart-point {
  fill: var(--series-color);
  cursor: help;
}

.line-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 16px;
  margin-top: 10px;
}

.line-chart-legend span {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: help;
}

.line-chart-legend i {
  width: 11px;
  height: 11px;
  display: inline-block;
  border-radius: 2px;
  background: var(--series-color);
}

.mini-column-chart {
  min-height: 172px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
}

.mini-column {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 8px;
  color: var(--muted);
  text-align: center;
  cursor: help;
}

.mini-column span {
  width: min(30px, 100%);
  min-height: 14px;
  border-radius: 0;
  background: linear-gradient(180deg, var(--cyan), var(--navy));
  box-shadow: 0 12px 20px rgba(24, 70, 139, 0.12);
}

.mini-column strong {
  color: var(--ink);
  font-weight: 400;
}

.mini-column small {
  max-width: 100%;
  overflow: hidden;
  font-size: 0.78rem;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(330px, 0.95fr);
  gap: 16px;
}

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

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

.panel-header h3 {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 400;
}

.directory-panel {
  padding-top: 14px;
}

.cards-main .directory-panel {
  padding: 12px 18px 14px;
}

.directory-panel .panel-header {
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 10px;
  padding-bottom: 10px;
}

.cards-main .directory-panel .panel-header {
  margin-bottom: 8px;
  padding-bottom: 8px;
}

.directory-panel .toolbar {
  flex: 1 1 620px;
  flex-wrap: nowrap;
  justify-content: flex-end;
}

.search-box {
  position: relative;
  flex: 1 1 300px;
}

.directory-panel .search-box {
  max-width: 520px;
}

.directory-panel .toolbar .field {
  flex: 0 0 132px;
  gap: 0;
}

.directory-panel .toolbar select {
  height: 44px;
}

.search-box input {
  height: 44px;
  padding: 0 14px 0 40px;
  background: #fff;
}

.search-box::before {
  content: "⌕";
  position: absolute;
  left: 14px;
  top: 50%;
  color: var(--muted);
  transform: translateY(-50%);
}

.table-wrap {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  display: block;
  overflow-x: auto;
}

.directory-results {
  display: grid;
  gap: 12px;
}

.cards-main .directory-results {
  gap: 8px;
}

.cards-table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.cards-table.full {
  min-width: 1120px;
}

.cards-table.compact {
  min-width: 680px;
}

.cards-table.full th:nth-child(1),
.cards-table.full td:nth-child(1) {
  width: 22%;
}

.cards-table.full th:nth-child(2),
.cards-table.full td:nth-child(2) {
  width: 23%;
}

.cards-table.full th:nth-child(3),
.cards-table.full td:nth-child(3) {
  width: 10%;
}

.cards-table.full th:nth-child(4),
.cards-table.full td:nth-child(4) {
  width: 7%;
}

.cards-table.full th:nth-child(5),
.cards-table.full td:nth-child(5) {
  width: 11%;
}

.cards-table.full th:nth-child(6),
.cards-table.full td:nth-child(6) {
  width: 8%;
}

.cards-table.full th:nth-child(7),
.cards-table.full td:nth-child(7) {
  width: 19%;
}

.cards-table.compact th:nth-child(1),
.cards-table.compact td:nth-child(1) {
  width: 33%;
}

.cards-table.compact th:nth-child(2),
.cards-table.compact td:nth-child(2) {
  width: 34%;
}

.cards-table.compact th:nth-child(3),
.cards-table.compact td:nth-child(3) {
  width: 16%;
}

.cards-table.compact th:nth-child(4),
.cards-table.compact td:nth-child(4) {
  width: 11%;
}

.cards-table.compact th:nth-child(5),
.cards-table.compact td:nth-child(5) {
  width: 6%;
  text-align: center;
}

th,
td {
  min-width: 0;
  padding: 14px 10px;
  border-bottom: 1px solid #e2eaf1;
  text-align: left;
  vertical-align: middle;
  overflow-wrap: anywhere;
}

th {
  color: #3e5874;
  background: #eef6fb;
  font-size: 0.78rem;
  font-weight: 500;
  text-align: center;
  text-transform: uppercase;
}

td {
  color: #223044;
  font-size: 0.92rem;
}

.cards-main .directory-panel th,
.cards-main .directory-panel td {
  padding: 9px;
}

.cards-main .directory-panel td {
  font-size: 0.86rem;
}

.cards-table tbody tr {
  transition: background 0.18s ease;
}

.cards-table tbody tr:hover {
  background: #f7fbfd;
}

.pagination {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding-top: 4px;
}

.cards-main .pagination {
  padding-top: 0;
}

.pagination-summary {
  color: var(--muted);
  font-size: 0.84rem;
}

.pagination-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
  align-items: center;
}

.pagination-btn,
.pagination-page {
  min-height: 34px;
  min-width: 36px;
  padding: 0 11px;
  color: var(--ink);
  border: 1px solid #c9dce9;
  border-radius: 7px;
  background: #fff;
  font-size: 0.82rem;
}

.cards-main .pagination-btn,
.cards-main .pagination-page {
  min-height: 30px;
  min-width: 32px;
  padding: 0 9px;
  font-size: 0.78rem;
}

.pagination-page.active {
  color: #fff;
  border-color: var(--navy);
  background: var(--navy);
}

.pagination-btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.pagination-gap {
  color: var(--muted);
  padding: 0 2px;
}

.person-cell {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.person-cell > div:last-child {
  min-width: 0;
}

.avatar {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  flex: 0 0 64px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--navy), var(--teal));
  font-size: 1.05rem;
  font-weight: 400;
}

.avatar.has-photo {
  overflow: hidden;
  background: #fff;
  box-shadow: 0 8px 16px rgba(24, 70, 139, 0.12);
}

.avatar.has-photo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.status-pill {
  display: inline-flex;
  min-width: 76px;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 6px 9px;
  font-size: 0.76rem;
  font-weight: 500;
}

.cards-main .directory-panel .avatar {
  width: 50px;
  height: 50px;
  flex: 0 0 50px;
  font-size: 0.92rem;
}

.cards-main .directory-panel .person-cell {
  gap: 11px;
}

.cards-main .directory-panel .row-actions {
  gap: 6px;
}

.cards-main .directory-panel .icon-btn {
  width: 34px;
  height: 34px;
}

.status-pill.active {
  color: #0b7137;
  border-color: #b7d998;
  background: #edf7e7;
}

.status-pill.inactive {
  color: #a02727;
  border-color: #e4b9b9;
  background: var(--red-soft);
}

.traffic-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 400;
  white-space: nowrap;
}

.traffic-light {
  width: 14px;
  height: 14px;
  display: inline-block;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.9), 0 8px 16px rgba(50, 32, 49, 0.12);
}

.traffic-status.active .traffic-light {
  background: var(--green);
}

.traffic-status.inactive .traffic-light {
  background: var(--red);
}

.icon-btn {
  width: 38px;
  height: 38px;
  color: var(--ink);
  border: 1px solid #c9dce9;
  background: #f6fbfd;
}

.form-icon-action {
  width: 48px;
  height: 48px;
  color: #fff;
}

.form-icon-action .svg-icon {
  width: 20px;
  height: 20px;
}

.form-icon-action:disabled,
.row-actions .ghost-btn:disabled {
  cursor: wait;
  opacity: 0.62;
}

.save-action {
  background: linear-gradient(135deg, var(--navy), var(--cyan));
  box-shadow: 0 12px 22px rgba(0, 176, 240, 0.18);
}

.save-status {
  min-height: 18px;
  align-self: center;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.3;
}

.save-status.saving {
  color: var(--blue);
  font-weight: 600;
}

.save-status.success {
  color: var(--green);
  font-weight: 600;
}

.save-status.error {
  color: var(--red);
  font-weight: 600;
}

.delete-action {
  color: #fff;
  background: var(--red);
}

.status-toggle {
  position: relative;
  color: #fff;
}

.status-toggle.activate {
  background: var(--green);
}

.status-toggle.deactivate {
  background: var(--red);
}

.status-toggle:hover::after,
.status-toggle:focus-visible::after {
  content: attr(aria-label);
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 5;
  width: max-content;
  max-width: 160px;
  border-radius: 8px;
  padding: 7px 9px;
  color: #fff;
  background: #172233;
  font-size: 0.75rem;
  line-height: 1.2;
  box-shadow: 0 10px 24px rgba(50, 32, 49, 0.18);
  pointer-events: none;
}

.photo-upload-field {
  align-self: start;
}

.photo-upload-control {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fbfdff;
}

.photo-upload-preview {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
  box-shadow: 0 8px 18px rgba(24, 70, 139, 0.12);
}

.photo-upload-control input[type="file"] {
  width: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
}

.photo-upload-control small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.4;
}

.photo-crop-modal {
  position: relative;
  width: min(440px, 100%);
  border-radius: 8px;
  padding: 28px;
  background: #fff;
  box-shadow: var(--shadow);
  text-align: center;
}

.photo-crop-modal h3 {
  margin: 0 0 18px;
  font-size: 1.35rem;
  line-height: 1.2;
}

.photo-crop-frame {
  width: min(320px, 100%);
  margin: 0 auto 18px;
  border-radius: 12px;
  padding: 10px;
  background: #eef6fb;
}

.photo-crop-canvas {
  width: 100%;
  max-width: 320px;
  aspect-ratio: 1;
  display: block;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 10px 24px rgba(24, 70, 139, 0.16);
  cursor: grab;
  touch-action: none;
}

.photo-crop-canvas:active {
  cursor: grabbing;
}

.photo-crop-zoom {
  display: grid;
  gap: 8px;
  margin: 0 auto;
  color: var(--ink);
  text-align: left;
  font-weight: 500;
}

.photo-crop-zoom input {
  width: 100%;
  accent-color: var(--blue);
}

.photo-crop-help {
  margin: 12px 0 20px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

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

.form-grid .wide {
  grid-column: 1 / -1;
}

.form-section-heading {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  color: var(--navy);
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.dbc-card-preview {
  overflow: hidden;
  max-width: 430px;
  margin: 0 auto;
}

.preview-banner {
  height: 150px;
  position: relative;
  background: url("assets/user-card-bg.webp") center top / cover no-repeat var(--navy);
}

.preview-banner strong {
  position: absolute;
  left: 24px;
  top: 28px;
  max-width: 220px;
  color: #fff;
  font-size: 1.45rem;
  line-height: 1.1;
  display: none;
}

.preview-body {
  padding: 0 28px 28px;
  text-align: center;
}

.logo-circle {
  position: relative;
  z-index: 2;
  width: 152px;
  height: 152px;
  display: grid;
  place-items: center;
  margin: -62px auto 22px;
  border: 2px solid var(--gold);
  border-radius: 50%;
  background: #fff;
  color: var(--navy);
  box-shadow: 0 12px 28px rgba(201, 166, 74, 0.2), 0 0 0 4px rgba(244, 231, 189, 0.34);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  overflow: hidden;
}

.logo-circle img {
  width: 96%;
  height: 96%;
  display: block;
  object-fit: contain;
}

.logo-circle.has-photo {
  border-color: var(--gold);
  background: #f8fbfd;
  box-shadow: 0 14px 30px rgba(201, 166, 74, 0.22), 0 0 0 4px rgba(244, 231, 189, 0.36);
}

.logo-circle.has-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.preview-body h3 {
  margin: 0 0 10px;
  font-size: 1.65rem;
  font-weight: 700;
  line-height: 1.14;
}

.preview-body p {
  margin: 0;
  color: #111827;
  font-size: 1.03rem;
  font-weight: 400;
  line-height: 1.55;
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin: 42px 0 30px;
}

.quick-links a,
.quick-links button {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #fff;
  text-decoration: none;
  font-size: 1.25rem;
  font-weight: 600;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.14);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.quick-links a:hover,
.quick-links button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.18);
  filter: saturate(1.04);
}

.quick-links .svg-icon {
  width: 1.08em;
  height: 1.08em;
}

.quick-links .svg-icon svg {
  stroke-width: 2.3;
}

.phone-link {
  background: linear-gradient(145deg, #24c466, var(--green));
}

.whatsapp-link {
  background: linear-gradient(145deg, #56d588, #198a51);
}

.map-link {
  background: linear-gradient(145deg, var(--cyan), var(--blue));
}

.email-link {
  background: linear-gradient(145deg, #d76464, var(--red));
}

.web-link {
  background: linear-gradient(145deg, #727272, #393939);
}

.share-link {
  background: linear-gradient(145deg, #214f9a, var(--navy));
}

.address {
  width: 100%;
  min-width: 0;
  height: 3.66rem;
  margin: 0 auto 24px;
  max-width: 500px;
  font-size: 0.94rem;
  font-weight: 500;
  line-height: 1.3;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
}

.display-phone {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 auto 0;
  color: #071325;
  text-decoration: none;
  font-size: 0.96rem;
  font-weight: 500;
}

.display-phone-icon {
  width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 18px;
  color: #071325;
}

.display-phone-icon .svg-icon {
  width: 18px;
  height: 18px;
}

.extn {
  display: flex;
  justify-content: center;
  gap: 12px;
  align-items: center;
  margin-top: 22px;
  margin-bottom: 28px;
  font-size: 1.02rem;
  font-weight: 500;
}

.extn-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, var(--cyan), var(--blue));
  box-shadow: 0 12px 26px rgba(0, 112, 192, 0.2);
}

.extn-icon .svg-icon {
  width: 20px;
  height: 20px;
}

.whatsapp-share {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) 58px;
  max-width: 360px;
  margin: 0 auto 24px;
  overflow: hidden;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 16px 34px rgba(12, 20, 35, 0.12);
}

.whatsapp-share > span,
.whatsapp-share input,
.whatsapp-share button {
  height: 44px;
  border: 0;
  border-radius: 0;
}

.whatsapp-share > span {
  display: grid;
  place-items: center;
  background: #fff;
  color: var(--ink);
  font-size: 0.96rem;
  font-weight: 500;
}

.whatsapp-share input {
  padding: 0 14px;
  color: var(--ink);
  background: #fff;
  font-size: 0.94rem;
}

.whatsapp-share button {
  color: #071b13;
  background: #2fb34c;
  font-weight: 600;
}

.whatsapp-share button {
  color: #fff;
}

.whatsapp-share button .svg-icon {
  width: 24px;
  height: 24px;
}

.whatsapp-share button .svg-icon svg {
  fill: currentColor;
  stroke: none;
}

.share-button-mark {
  display: grid;
  place-items: center;
  color: #fff;
  line-height: 1;
}

.public-loading-card {
  min-height: 100svh;
  display: grid;
  place-items: center;
}

.card-loader {
  display: inline-grid;
  justify-items: center;
  gap: 12px;
  color: var(--blue);
  font-size: 0.84rem;
  font-weight: 600;
}

.card-loader-ring {
  width: 38px;
  height: 38px;
  border: 3px solid rgba(0, 112, 192, 0.16);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: card-loader-spin 0.8s linear infinite;
}

@keyframes card-loader-spin {
  to {
    transform: rotate(360deg);
  }
}

.inactive-card {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: clamp(28px, 6vw, 72px) 22px;
  box-sizing: border-box;
}

.inactive-card-panel {
  width: min(100%, 560px);
  text-align: center;
}

.inactive-card-panel img {
  width: min(220px, 54vw);
  height: auto;
  margin: 0 auto 28px;
  display: block;
}

.inactive-kicker {
  margin: 0 0 16px;
  color: var(--blue);
  font-size: clamp(1rem, 2.8vw, 1.3rem);
  font-weight: 600;
}

.inactive-card h1 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(2rem, 6.8vw, 3.8rem);
  line-height: 1.08;
}

.inactive-card-copy {
  margin: 24px auto 0;
  max-width: 520px;
  color: #32445b;
  font-size: clamp(1rem, 2.7vw, 1.2rem);
  line-height: 1.55;
}

.inactive-card-copy a {
  color: var(--blue);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.save-contact {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 166px;
  padding: 0 14px;
  color: #fff;
  background: #041638;
  border-radius: 4px;
  box-shadow: 0 10px 24px rgba(4, 22, 56, 0.14);
  text-decoration: none;
  font-size: 0.76rem;
  font-weight: 600;
}

.save-contact .svg-icon {
  width: 12px;
  height: 12px;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 28px auto 0;
}

.social-link {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.social-link .svg-icon {
  width: 24px;
  height: 24px;
}

.facebook-social {
  background: var(--navy);
}

.youtube-social {
  background: var(--red);
}

.x-social {
  background: #393939;
}

.instagram-social {
  background: linear-gradient(145deg, var(--teal), var(--blue));
}

.linkedin-social {
  background: var(--blue);
}

.pinterest-social {
  background: #c0504d;
}

.public-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 430px) minmax(0, 1fr);
  background: #d6dde4;
}

.public-card {
  position: relative;
  grid-column: 2;
  width: 100%;
  max-width: 100vw;
  min-height: 100vh;
  background: #fff;
  box-shadow: 0 0 32px rgba(0, 0, 0, 0.08);
}

.public-card .preview-banner {
  height: 232px;
  background-position: center top;
}

.public-card .logo-circle {
  width: 168px;
  height: 168px;
  margin-top: -96px;
}

.public-card .preview-body {
  min-height: calc(100svh - 232px - 64px);
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
  padding-bottom: 84px;
}

.public-card .preview-body h3 {
  max-width: min(100%, 560px);
  font-size: clamp(1.3rem, 4.9vw, 1.56rem);
  font-weight: 750;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.public-card .preview-body p {
  font-size: 0.94rem;
  line-height: 1.42;
}

.public-card .whatsapp-share {
  display: grid;
}

.public-card .save-contact {
  margin-top: 0;
}

.floating-save-contact {
  position: fixed;
  right: clamp(18px, 3vw, 42px);
  bottom: 28px;
  z-index: 18;
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 1px;
  border-radius: 50%;
  color: #fff;
  background: #020817;
  box-shadow: 0 16px 34px rgba(2, 8, 23, 0.26);
  text-align: center;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.08;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px) scale(0.94);
  transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.floating-save-contact.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.floating-save-contact:hover,
.floating-save-contact:focus-visible {
  box-shadow: 0 18px 38px rgba(2, 8, 23, 0.32);
}

.card-action-bar {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 15;
  width: min(430px, 100vw);
  height: 64px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  border-top: 1px solid var(--admin-line);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 -12px 28px rgba(15, 23, 42, 0.12);
  transform: translateX(-50%);
  backdrop-filter: blur(12px);
}

.shared-card-sections {
  padding-bottom: 78px;
  background: #d6dde4;
}

.shared-section {
  margin-top: 12px;
  overflow: hidden;
  background: #fff;
}

.shared-section-title {
  margin: 0;
  padding: 14px 22px;
  color: #fff;
  background: var(--navy);
  text-align: center;
  font-size: 1.12rem;
  font-weight: 500;
  letter-spacing: 0;
}

.other-links-list {
  display: grid;
  gap: 8px;
  justify-items: center;
  padding: 42px 16px 24px;
}

.other-link {
  width: min(100%, 388px);
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 8px;
  padding: 7px 14px;
  color: #fff;
  background: var(--navy);
  text-decoration: none;
  box-shadow: 0 12px 32px rgba(24, 70, 139, 0.18);
}

.other-link span:last-child {
  font-size: 0.95rem;
  font-weight: 500;
}

.link-badge {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  flex: 0 0 30px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  color: #fff;
  background: #0f2e59;
}

.link-badge .svg-icon {
  width: 18px;
  height: 18px;
}

.about-copy {
  margin: 0;
  padding: 34px 20px;
  color: #05070b;
  font-size: 0.86rem;
  font-weight: 500;
  line-height: 1.8;
  text-align: justify;
}

.video-list {
  display: grid;
  gap: 28px;
  padding: 36px 16px;
}

.youtube-frame,
.youtube-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 2px solid #0b0f18;
  border-radius: 8px;
  background: #0b0f18;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.16);
}

.youtube-frame {
  display: block;
}

.youtube-placeholder {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  color: #fff;
  text-align: center;
}

.play-badge {
  width: 72px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #ff2b12;
  font-size: 1.7rem;
}

.youtube-placeholder strong {
  max-width: 85%;
  font-size: 1.05rem;
}

.youtube-placeholder small {
  color: rgba(255, 255, 255, 0.7);
}

.card-footer {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 28px 18px 10px;
  color: #4b5c6d;
  background: #eef4e1;
}

.view-count {
  border-radius: 999px;
  padding: 8px 22px;
  color: #fff;
  background: var(--navy);
  font-weight: 400;
}

.admin-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 10px 18px;
  align-items: center;
  margin-top: auto;
  padding: 16px 20px;
  border: 1px solid #d5e5bd;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  color: #4b5c6d;
  background: #eef4e1;
  font-size: 0.84rem;
  font-weight: 300;
}

.cards-main .admin-footer {
  gap: 6px 14px;
  padding: 6px 14px;
  font-size: 0.78rem;
}

.admin-footer span:last-child {
  text-align: right;
}

.admin-footer span:first-child {
  color: var(--navy);
  font-weight: 500;
}

.admin-footer-copy {
  color: var(--ink);
  font-weight: 500;
  text-align: center;
  white-space: nowrap;
}

.shared-admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 18px;
}

.shared-content-form {
  display: grid;
  gap: 18px;
}

.shared-content-form .panel p {
  margin: -4px 0 14px;
  color: var(--muted);
  line-height: 1.5;
}

.shared-preview-shell {
  max-height: 720px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.card-action-bar a,
.card-action-bar button {
  min-width: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 5px;
  border: 0;
  color: #071325;
  background: transparent;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 600;
  overflow: hidden;
  padding: 0;
  white-space: nowrap;
}

.card-action-bar .svg-icon {
  width: 24px;
  height: 24px;
}

.card-action-bar a:focus-visible,
.card-action-bar button:focus-visible {
  outline: 3px solid rgba(0, 176, 240, 0.34);
  outline-offset: -3px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(10, 17, 30, 0.46);
}

.qr-modal,
.confirm-modal,
.card-modal {
  position: relative;
  width: min(360px, 100%);
  border-radius: 8px;
  padding: 28px;
  background: #fff;
  box-shadow: var(--shadow);
  text-align: center;
}

.qr-modal {
  width: min(430px, 100%);
  border-radius: 16px;
  padding: 34px 34px 56px;
}

.qr-modal h3,
.confirm-modal h3,
.card-modal h3 {
  margin: 0 0 18px;
  font-size: 1.45rem;
  line-height: 1.2;
}

.qr-modal h3 {
  margin-bottom: 26px;
  font-size: 1.18rem;
  font-weight: 700;
}

.card-modal {
  max-height: calc(100vh - 44px);
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--teal) #eef6fb;
  text-align: left;
}

.card-modal::-webkit-scrollbar {
  width: 8px;
}

.card-modal::-webkit-scrollbar-track {
  margin-block: 18px;
  border-radius: 999px;
  background: #eef6fb;
}

.card-modal::-webkit-scrollbar-thumb {
  border: clamp(110px, 26vh, 230px) 2px;
  border-style: solid;
  border-color: transparent #eef6fb;
  border-radius: 999px;
  background: var(--teal);
  background-clip: padding-box;
}

.card-modal::-webkit-scrollbar-thumb:hover {
  background: var(--blue);
}

.card-modal.edit-modal {
  width: min(980px, 100%);
}

.card-modal.preview-modal {
  width: min(430px, 100%);
  max-height: none;
  overflow: visible;
  padding: 0;
  background: transparent;
  box-shadow: none;
  scrollbar-width: none;
}

.card-modal.preview-modal::-webkit-scrollbar {
  display: none;
}

.card-modal > .eyebrow,
.card-modal > h3 {
  text-align: center;
}

.modal-title-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  margin: 0 auto 12px;
  border-radius: 50%;
  color: var(--navy);
  background: #eef6fb;
}

.modal-title-icon .svg-icon {
  width: 26px;
  height: 26px;
}

.card-modal-body {
  min-width: 0;
}

.card-modal-body > .panel {
  border: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.card-modal-body > .dbc-card-preview {
  margin: 0 auto;
}

.preview-modal .modal-close {
  top: 8px;
  right: 8px;
  z-index: 2;
  background: rgba(238, 246, 251, 0.94);
}

.preview-modal .card-modal-body > .dbc-card-preview {
  width: 100%;
  max-width: none;
  min-height: calc(100vh - 44px);
}

.confirm-modal p:not(.eyebrow) {
  margin: 0 0 22px;
  color: var(--muted);
  line-height: 1.55;
}

.confirm-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.confirm-activate-btn {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  color: #fff;
  background: var(--green);
  font-weight: 600;
}

.qr-image {
  width: min(250px, 100%);
  height: auto;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: #fff;
}

.qr-url {
  margin: 18px 0 22px;
  color: var(--ink);
  font-size: 0.82rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.qr-card-name {
  display: grid;
  gap: 5px;
  margin: 0 0 24px;
  color: var(--ink);
  font-size: 1.08rem;
  line-height: 1.2;
}

.qr-tabs {
  display: inline-grid;
  grid-template-columns: repeat(2, 1fr);
  margin-bottom: 22px;
}

.qr-tabs button {
  min-width: 78px;
  min-height: 32px;
  border: 0;
  border-radius: 0;
  color: var(--ink);
  background: #d4d2d2;
  font-weight: 400;
}

.qr-tabs button.active {
  color: #fff;
  background: var(--green);
}

.qr-download-btn {
  min-width: 180px;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 4px;
  color: #fff;
  background: var(--navy);
  box-shadow: 0 10px 22px rgba(24, 70, 139, 0.18);
  font-weight: 600;
  text-decoration: none;
}

.qr-download-btn .svg-icon {
  width: 18px;
  height: 18px;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 4;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  color: var(--ink);
  background: #eef6fb;
  font-size: 1.4rem;
  line-height: 1;
}

.qr-modal .modal-close {
  top: 12px;
  right: 12px;
  color: var(--red);
  background: transparent;
  font-size: 1.7rem;
  font-weight: 300;
}

.empty-state {
  padding: 30px;
  border: 1px dashed #aacddb;
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 20;
  min-width: 260px;
  border-radius: 8px;
  padding: 14px 16px;
  color: #fff;
  background: var(--navy);
  box-shadow: var(--shadow);
  font-weight: 500;
}

.save-popup {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 60;
  min-width: 150px;
  border-radius: 8px;
  padding: 16px 24px;
  color: #fff;
  background: var(--blue);
  box-shadow: 0 18px 42px rgba(0, 112, 192, 0.24);
  text-align: center;
  font-weight: 600;
  transform: translate(-50%, -50%);
}

@media (max-width: 1060px) {
  .app-shell {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .main {
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .nav-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .metric-grid,
  .dashboard-charts,
  .content-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .views-chart-card {
    grid-column: 1 / -1;
  }

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

  .content-grid .panel:first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .floating-save-contact {
    right: 18px;
    bottom: 82px;
  }

  .admin-footer {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .admin-footer span:last-child {
    text-align: center;
  }

  .admin-footer-copy {
    white-space: normal;
  }

  .login-shell,
  .main {
    padding: 16px;
  }

  .login-card {
    grid-template-columns: 1fr;
  }

  .login-brand {
    min-height: 250px;
  }

  .login-form {
    padding: 34px 26px;
  }

  .topbar,
  .panel-header {
    align-items: stretch;
    flex-direction: column;
  }

  .metric-grid,
  .dashboard-charts,
  .content-grid,
  .form-grid,
  .public-shell {
    grid-template-columns: 1fr;
  }

  .views-chart-card {
    grid-column: auto;
  }

  .donut-row {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .public-card {
    grid-column: 1;
  }

  .shared-preview-shell {
    max-height: none;
  }

  .public-card .preview-banner {
    height: 216px;
  }

.public-card .logo-circle {
    width: 158px;
    height: 158px;
    margin-top: -88px;
  }

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

  .toolbar,
  .top-actions {
    width: 100%;
  }

  .directory-panel .toolbar {
    flex-wrap: wrap;
  }

  .directory-panel .search-box {
    max-width: none;
  }

  .toolbar button,
  .top-actions button {
    flex: 1 1 140px;
  }

  .quick-links {
    gap: 10px;
  }

  .whatsapp-share {
    grid-template-columns: 58px minmax(0, 1fr) 52px;
  }

  .public-card .save-contact {
    min-width: 156px;
    min-height: 32px;
    padding: 0 12px;
    font-size: 0.72rem;
  }
}

@media (max-width: 430px) {
  .photo-upload-control {
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 14px;
    padding: 12px;
  }

  .photo-upload-preview {
    width: 96px;
    height: 96px;
  }

  .photo-crop-modal {
    padding: 24px 18px;
  }

  .preview-body {
    padding-left: 18px;
    padding-right: 18px;
  }

  .public-card .preview-body h3 {
    margin-bottom: 12px;
    font-size: clamp(1.2rem, 6.2vw, 1.4rem);
    font-weight: 750;
    line-height: 1.14;
  }

  .public-card .preview-banner {
    height: 224px;
  }

  .public-card .logo-circle {
    width: 156px;
    height: 156px;
    margin-top: -94px;
    margin-bottom: 44px;
    border-width: 2px;
    font-size: 1rem;
  }

  .public-card .preview-body {
    min-height: calc(100svh - 224px - 64px);
    padding-left: 26px;
    padding-right: 26px;
    padding-bottom: 80px;
  }

  .public-card .preview-body p {
    font-size: 0.86rem;
    line-height: 1.32;
    overflow-wrap: anywhere;
  }

  .address {
    height: 3.15rem;
    font-size: 0.86rem;
    line-height: 1.22;
    margin-bottom: 16px;
    overflow-wrap: anywhere;
  }

  .other-links-list {
    padding-top: 42px;
  }

  .other-link {
    width: min(100%, 360px);
    min-height: 44px;
  }

  .other-link span:last-child {
    font-size: 0.95rem;
  }

  .extn {
    gap: 10px;
    margin-top: 14px;
    margin-bottom: 24px;
    font-size: 0.96rem;
  }

  .display-phone {
    gap: 7px;
    font-size: 0.9rem;
  }

  .display-phone-icon {
    width: 16px;
    height: 16px;
    flex-basis: 16px;
  }

  .display-phone-icon .svg-icon {
    width: 16px;
    height: 16px;
  }

  .extn-icon {
    width: 46px;
    height: 46px;
  }

  .public-card .whatsapp-share {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) 52px;
    max-width: 302px;
    margin-bottom: 20px;
  }

  .quick-links a,
  .quick-links button {
    width: 46px;
    height: 46px;
  }

  .quick-links {
    gap: 14px;
    margin: 32px 0 32px;
  }

  .save-contact {
    min-width: 150px;
    min-height: 32px;
    padding: 0 12px;
    font-size: 0.7rem;
  }

  .save-contact {
    margin-top: 4px;
  }

  .social-links {
    gap: 8px;
    margin-top: 22px;
  }

  .social-link {
    width: 40px;
    height: 40px;
  }

  .card-action-bar a,
  .card-action-bar button {
    font-size: 0.72rem;
  }
}
