:root {
  --green: #058215;
  --green-dark: #046a11;
  --green-light: #07a31a;
  --green-soft: #e8f5ea;
  --green-tint: #c8eacc;
  --ink: #21333e;
  --ink-light: #3b3b3b;
  --muted: #6b7b8a;
  --bg: #f7f9fa;
  --white: #ffffff;
  --line: #e3e8ec;
  --shadow-sm: 0 2px 10px rgba(5, 130, 21, 0.07);
  --shadow-md: 0 10px 30px rgba(5, 130, 21, 0.1);
  --shadow-lg: 0 20px 50px rgba(5, 130, 21, 0.14);
  --radius: 14px;
  --radius-lg: 20px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --footer-dark: #292929;
  --footer-text: rgba(255, 255, 255, 0.65);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: 'Lato', 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--ink-light);
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}

::selection {
  background: var(--green);
  color: #fff;
}

/* ---------- Navbar ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2rem;
  height: 68px;
  background: var(--white);
  border-bottom: 3px solid var(--green);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.4s var(--ease);
}

.brand:hover {
  transform: translateY(-1px);
}

.brand-logo {
  height: 48px;
  width: auto;
}

.brand-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  color: #fff;
  background: var(--green);
  box-shadow: var(--shadow-sm);
}

.brand-icon svg {
  width: 22px;
  height: 22px;
}

.brand-text {
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.brand-text span {
  color: var(--green);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-link {
  color: var(--ink-light);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  transition: all 0.3s var(--ease);
}

.nav-link:hover {
  background: var(--green-soft);
  color: var(--green-dark);
}

.nav-icon-btn {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  color: var(--ink-light);
  background: var(--white);
  border: 1.5px solid var(--line);
  text-decoration: none;
  transition: all 0.4s var(--ease);
}

.nav-icon-btn svg {
  width: 20px;
  height: 20px;
  transition: transform 0.6s var(--ease);
}

.nav-icon-btn:hover {
  color: #fff;
  background: var(--green);
  border-color: var(--green);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.nav-icon-btn:hover svg {
  transform: rotate(90deg);
}

/* ---------- Layout ---------- */
.container {
  max-width: 1040px;
  margin: 2.5rem auto;
  padding: 0 1.25rem;
  animation: fadeUp 0.6s var(--ease) both;
  flex: 1;
  overflow-x: hidden;
}

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

.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
  margin-bottom: 1.5rem;
  overflow: hidden;
  transition: box-shadow 0.4s var(--ease), transform 0.4s var(--ease);
}

/* ---------- Auth ---------- */
.auth-page {
  display: flex;
  justify-content: center;
  padding-top: 3rem;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  position: relative;
  overflow: hidden;
}

.auth-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: linear-gradient(90deg, var(--green-light), var(--green-dark));
}

.auth-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #fff;
  background: var(--green);
  box-shadow: var(--shadow-md);
  animation: pop 0.6s var(--ease) both;
}

.auth-icon svg {
  width: 30px;
  height: 30px;
}

@keyframes pop {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.auth-card h2 {
  margin-bottom: 0.35rem;
  text-align: center;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--ink);
}

.auth-subtitle {
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1.75rem;
}

/* ---------- Forms ---------- */
.form-group {
  margin-bottom: 1.1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.45rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink);
}

.form-group input[type='text'],
.form-group input[type='password'],
.form-group input[type='email'],
.form-group input[type='tel'],
.form-group textarea {
  width: 100%;
  padding: 0.75rem 0.95rem;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: inherit;
  background: var(--white);
  color: var(--ink-light);
  transition: all 0.3s var(--ease);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--green);
  background: #fff;
  box-shadow: 0 0 0 4px var(--green-soft);
}

.form-group textarea {
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 0.85rem;
  resize: vertical;
  line-height: 1.5;
}

.hint {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.hint code {
  background: var(--green-soft);
  color: var(--green-dark);
  padding: 0.12rem 0.45rem;
  border-radius: 5px;
  font-size: 0.85em;
  font-weight: 700;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.4rem;
  border: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease),
    background 0.3s var(--ease);
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--green);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--green-dark);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--white);
  color: var(--ink-light);
  border: 1.5px solid var(--line);
}

.btn-secondary:hover {
  border-color: var(--green);
  color: var(--green-dark);
  transform: translateY(-2px);
}

.btn-success {
  background: var(--green);
  color: #fff;
  box-shadow: 0 2px 10px rgba(5, 130, 21, 0.2);
}

.btn-success:hover {
  background: var(--green-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(5, 130, 21, 0.25);
}

.btn-danger {
  background: #fff;
  color: #e03131;
  border: 1.5px solid #ffd3d3;
}

.btn-danger:hover {
  background: #e03131;
  color: #fff;
  transform: translateY(-2px);
}

.btn-sm {
  padding: 0.45rem 0.95rem;
  font-size: 0.85rem;
}

.btn-lg {
  padding: 0.9rem 2.2rem;
  font-size: 1.05rem;
}

.btn svg {
  width: 18px;
  height: 18px;
}

.btn-block {
  width: 100%;
  justify-content: center;
}

/* ---------- Alerts ---------- */
.alert {
  padding: 0.85rem 1.1rem;
  border-radius: 10px;
  margin-bottom: 1.1rem;
  font-size: 0.9rem;
  animation: shake 0.4s var(--ease);
}

.alert-error {
  background: #fff0f0;
  color: #c92a2a;
  border: 1px solid #ffd3d3;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* ---------- Admin header ---------- */
.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.admin-header h2 {
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.admin-header .subtitle {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 400;
  margin-top: 0.2rem;
}

.admin-actions {
  display: flex;
  gap: 0.6rem;
}

/* ---------- Template cards ---------- */
.template-list {
  display: grid;
  gap: 1.25rem;
}

.template-card {
  position: relative;
  border-left: 4px solid transparent;
  animation: fadeUp 0.5s var(--ease) both;
}

.template-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.template-card.active {
  border-left-color: var(--green);
  background: linear-gradient(180deg, var(--green-soft) 0%, #fff 55%);
}

.template-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.1rem;
}

.template-info h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ink);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.75rem;
  border-radius: 30px;
  font-size: 0.78rem;
  font-weight: 700;
}

.badge::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.badge-active {
  background: var(--green-soft);
  color: var(--green);
}

.badge-active::before {
  animation: pulse 1.6s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(5, 130, 21, 0.45); }
  70% { box-shadow: 0 0 0 6px rgba(5, 130, 21, 0); }
  100% { box-shadow: 0 0 0 0 rgba(5, 130, 21, 0); }
}

.badge-inactive {
  background: #f1f3f5;
  color: #868e96;
}

.template-preview {
  border: 1.5px dashed var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  min-height: 100px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #fafbfc;
}

.template-preview > * {
  max-width: 100%;
}

.template-preview img {
  max-width: 100%;
  height: auto;
}

.template-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.form-actions {
  display: flex;
  gap: 0.6rem;
  margin-top: 1.5rem;
}

/* ---------- Empty state ---------- */
.empty-state {
  text-align: center;
  padding: 3.5rem 2rem;
}

.empty-state .empty-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 1.25rem;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: var(--green);
  background: var(--green-soft);
}

.empty-state .empty-icon svg {
  width: 34px;
  height: 34px;
}

.empty-state h3 {
  font-size: 1.2rem;
  margin-bottom: 0.4rem;
  color: var(--ink);
}

.empty-state p {
  color: var(--muted);
}

/* ---------- Client page ---------- */
.client-page {
  text-align: center;
}

.client-hero {
  margin-bottom: 2rem;
}

.client-hero h2 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.client-hero .eyebrow {
  display: inline-block;
  color: var(--green-dark);
  background: var(--green-soft);
  padding: 0.3rem 0.9rem;
  border-radius: 30px;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.client-hero p {
  color: var(--muted);
  margin-top: 0.4rem;
}

.template-display {
  max-width: 640px;
  margin: 0 auto 2rem;
  padding: 2.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.template-display > * {
  max-width: 100%;
  transition: transform 0.5s var(--ease);
}

.template-display img {
  max-width: 100%;
  height: auto;
}

.template-display:hover > * {
  transform: scale(1.02);
}

.upload-section {
  max-width: 440px;
  margin: 0 auto;
}

.upload-section h3 {
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.file-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.75rem 1.2rem;
  background: var(--white);
  border-radius: var(--radius);
  cursor: pointer;
  border: 2px dashed var(--green-light);
  color: var(--green-dark);
  font-weight: 600;
  transition: all 0.35s var(--ease);
}

.file-label:hover {
  background: var(--green-soft);
  border-color: var(--green);
  transform: translateY(-2px);
}

.file-label .upload-glyph {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--green-soft);
  color: var(--green-dark);
  transition: transform 0.35s var(--ease);
}

.file-label:hover .upload-glyph {
  transform: translateY(-3px);
}

.file-label .upload-glyph svg {
  width: 22px;
  height: 22px;
}

.file-label input[type='file'],
.upload-section input[type='file'],
input[type='file'] {
  display: none;
}

.file-name {
  margin-top: 0.6rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.actions-section {
  max-width: 440px;
  margin: 1.5rem auto 0;
  animation: fadeUp 0.5s var(--ease) both;
}

.success-msg {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--green);
  font-weight: 700;
  margin-bottom: 1rem;
}

.success-msg::before {
  content: '\2713';
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-size: 0.7rem;
}

.no-template {
  text-align: center;
  padding: 3.5rem 2rem;
  max-width: 520px;
  margin: 2rem auto;
}

.no-template h2 {
  margin-bottom: 0.5rem;
  color: var(--ink);
}

.no-template p {
  color: var(--muted);
}

/* ---------- Fields builder (admin) ---------- */
.fields-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.3rem;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr 130px 42px;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.5rem;
  animation: fadeUp 0.3s var(--ease) both;
}

.field-input {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  font-size: 0.88rem;
  font-family: inherit;
  background: var(--white);
  color: var(--ink-light);
  transition: border-color 0.3s var(--ease);
}

.field-input:focus {
  outline: none;
  border-color: var(--green);
}

.field-remove {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  padding: 0;
  font-size: 1.1rem;
  border-radius: 8px;
}

.detected-placeholders {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
  padding: 0.6rem 0.8rem;
  background: var(--green-soft);
  border-radius: 8px;
}

.detect-label {
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 600;
}

.placeholder-tag {
  display: inline-block;
  background: var(--green-tint);
  color: var(--green-dark);
  font-family: 'Consolas', monospace;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 5px;
}

/* ---------- Client form ---------- */
.client-form-card {
  max-width: 540px;
  margin: 0 auto 1.5rem;
  text-align: left;
}

.client-form-card .form-group input[type='text'],
.client-form-card .form-group input[type='email'],
.client-form-card .form-group input[type='tel'] {
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--footer-dark);
  color: var(--footer-text);
  margin-top: auto;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1.3fr;
  gap: 2.5rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem 2rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-brand-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.25rem;
}

.footer-brand-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--green);
  color: #fff;
}

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

.footer-logo {
  height: 50px;
  width: auto;
  filter: brightness(0) invert(1);
}

.footer-tagline {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--footer-text);
}

.footer-social {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.5rem;
}

.footer-social a {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255,255,255,0.08);
  color: var(--footer-text);
  text-decoration: none;
  transition: all 0.3s var(--ease);
}

.footer-social a:hover {
  background: var(--green);
  color: #fff;
  transform: translateY(-2px);
}

.footer-social a svg {
  width: 18px;
  height: 18px;
}

.footer-col h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1rem;
  position: relative;
  padding-bottom: 0.6rem;
}

.footer-col h4::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 30px;
  height: 3px;
  background: var(--green);
  border-radius: 2px;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 0.5rem;
}

.footer-col ul li a {
  color: var(--footer-text);
  text-decoration: none;
  font-size: 0.88rem;
  transition: color 0.3s, padding-left 0.3s;
}

.footer-col ul li a:hover {
  color: #fff;
  padding-left: 4px;
}

.footer-col .contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
  font-size: 0.88rem;
  line-height: 1.5;
}

.footer-col .contact-item svg {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  flex-shrink: 0;
  color: var(--green-light);
}

.footer-bottom {
  background: var(--green);
  text-align: center;
  padding: 0.85rem 2rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
}

.footer-bottom a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ---------- Responsive: Tablet (max 900px) ---------- */
@media (max-width: 900px) {
  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .template-display {
    padding: 1.5rem;
  }

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

  .admin-actions {
    width: 100%;
  }

  .admin-actions .btn {
    flex: 1;
    justify-content: center;
  }
}

/* ---------- Responsive: Mobile (max 640px) ---------- */
@media (max-width: 640px) {
  .navbar {
    padding: 0 0.75rem;
    height: 56px;
  }

  .brand-logo {
    height: 34px;
  }

  .nav-link {
    font-size: 0.85rem;
    padding: 0.4rem 0.6rem;
  }

  .nav-icon-btn {
    width: 36px;
    height: 36px;
  }

  .nav-icon-btn svg {
    width: 17px;
    height: 17px;
  }

  .container {
    margin: 1.25rem auto;
    padding: 0 0.75rem;
  }

  .card {
    padding: 1.25rem;
    border-radius: var(--radius);
  }

  /* Auth */
  .auth-page {
    padding-top: 1.5rem;
  }

  .auth-card {
    max-width: 100%;
  }

  .auth-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
  }

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

  .auth-card h2 {
    font-size: 1.25rem;
  }

  /* Client page */
  .client-hero {
    margin-bottom: 1.25rem;
  }

  .client-hero h2 {
    font-size: 1.4rem;
  }

  .client-hero .eyebrow {
    font-size: 0.72rem;
    padding: 0.25rem 0.7rem;
  }

  .client-hero p {
    font-size: 0.88rem;
  }

  .template-display {
    padding: 1rem;
    margin-bottom: 1.25rem;
    border-radius: var(--radius);
  }

  .template-display > div {
    width: 100% !important;
    max-width: 100% !important;
  }

  .template-display img {
    width: 100% !important;
  }

  .client-form-card {
    max-width: 100%;
    margin-bottom: 1rem;
  }

  .client-form-card h3 {
    font-size: 1rem;
  }

  .form-group input[type='text'],
  .form-group input[type='password'],
  .form-group input[type='email'],
  .form-group input[type='tel'],
  .form-group textarea {
    padding: 0.65rem 0.8rem;
    font-size: 0.9rem;
  }

  .file-label {
    padding: 1.25rem 1rem;
  }

  .actions-section {
    max-width: 100%;
  }

  .btn-lg {
    padding: 0.8rem 1.6rem;
    font-size: 0.95rem;
    width: 100%;
    justify-content: center;
  }

  /* Admin */
  .admin-header h2 {
    font-size: 1.35rem;
  }

  .admin-actions {
    flex-direction: column;
    width: 100%;
  }

  .admin-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .template-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .template-info h3 {
    font-size: 1.05rem;
  }

  .template-preview {
    padding: 0.75rem;
  }

  .template-actions {
    flex-direction: column;
  }

  .template-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .template-actions form {
    width: 100%;
    display: block !important;
  }

  .template-actions form .btn {
    width: 100%;
    justify-content: center;
  }

  /* Fields builder */
  .fields-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .fields-header .btn {
    width: 100%;
    justify-content: center;
  }

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

  .field-row .field-type {
    grid-column: 1;
  }

  .field-row .field-remove {
    grid-column: 2;
    justify-self: end;
  }

  .form-actions {
    flex-direction: column;
  }

  .form-actions .btn {
    width: 100%;
    justify-content: center;
  }

  /* Footer */
  .footer-top {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 2rem 1rem 1.5rem;
  }

  .footer-logo {
    height: 40px;
  }

  .footer-social {
    justify-content: flex-start;
  }

  .footer-bottom {
    padding: 0.75rem 1rem;
    font-size: 0.78rem;
  }
}

/* ---------- Responsive: Small mobile (max 380px) ---------- */
@media (max-width: 380px) {
  .navbar {
    padding: 0 0.5rem;
  }

  .brand-logo {
    height: 28px;
  }

  .nav-link {
    display: none;
  }

  .container {
    padding: 0 0.5rem;
  }

  .card {
    padding: 1rem;
    border-radius: 12px;
  }

  .client-hero h2 {
    font-size: 1.2rem;
  }

  .template-display {
    padding: 0.5rem;
  }

  .field-row {
    grid-template-columns: 1fr 42px;
  }

  .field-row .field-label {
    grid-column: 1;
  }

  .field-row .field-type {
    grid-column: 1;
  }
}
