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

:root {
  --bg: #f3f6fc;
  --surface: #ffffff;
  --surface-soft: #f8faff;
  --text: #14213a;
  --muted: #6c7895;
  --line: #dde5f3;
  --line-strong: #ced9ee;
  --brand: #1f6dff;
  --brand-2: #1547ad;
  --brand-dark: #0f1b3f;
  --ok: #198754;
  --danger: #d7354a;
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 12px;
  --shadow-soft: 0 10px 30px rgba(17, 38, 82, 0.08);
  --shadow-strong: 0 16px 42px rgba(23, 54, 114, 0.14);
  --sidebar-w: 280px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: "Manrope", "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 100% 0%, rgba(31, 109, 255, 0.13), transparent 35%),
    radial-gradient(circle at 0% 100%, rgba(21, 71, 173, 0.08), transparent 38%),
    var(--bg);
}

body.with-custom-bg {
  background:
    linear-gradient(rgba(243, 246, 252, 0.9), rgba(243, 246, 252, 0.9)),
    var(--app-bg-image) center/cover fixed no-repeat;
}

h1,
h2,
h3,
strong,
th {
  margin-top: 0;
  letter-spacing: -0.01em;
}

.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-w);
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  padding: 18px 14px;
  color: #fff;
  background:
    radial-gradient(circle at -10% -10%, rgba(105, 156, 255, 0.35), transparent 40%),
    linear-gradient(180deg, #0f1f44 0%, #132a57 55%, #17356e 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 10px 0 30px rgba(12, 21, 45, 0.25);
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding: 12px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.brand strong {
  font-size: 1.05rem;
}

.brand > div > div {
  margin-top: 2px;
  color: rgba(232, 242, 255, 0.85);
}

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, #1f6dff, #27b2ff);
  box-shadow: 0 8px 20px rgba(26, 109, 255, 0.4);
}

.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.2);
}

.menu-list {
  display: grid;
  gap: 8px;
}

.menu-preview-box {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  padding: 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.menu-preview-label {
  color: rgba(232, 242, 255, 0.82);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.menu-item {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
  text-decoration: none;
  color: #e7f0ff;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.06);
  transition: transform 0.18s ease, background 0.18s ease;
}

.menu-item:hover {
  transform: translateX(2px);
  background: rgba(255, 255, 255, 0.12);
}

.menu-item.active {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
  background: linear-gradient(140deg, #2f7bff, #1a5bd6);
  box-shadow: 0 10px 22px rgba(17, 74, 186, 0.5);
}

.menu-item-ghost {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.16);
}

.content-area {
  margin-left: var(--sidebar-w);
  width: calc(100% - var(--sidebar-w));
  min-height: 100vh;
}

.content-area.guest {
  margin-left: 0;
  width: 100%;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(6px);
  max-width: 100%;
}

.topbar-title h1 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
}

.topbar-title {
  min-width: 0;
}

.topbar-title small {
  color: var(--muted);
  font-weight: 600;
}

.page-wrap {
  max-width: 1360px;
  margin: 0 auto;
  padding: 18px;
  width: 100%;
}

.grid {
  display: grid;
  gap: 16px;
}

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

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

.card {
  background: linear-gradient(180deg, var(--surface) 0%, #fbfcff 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 18px;
  box-shadow: var(--shadow-soft);
}

.card h3 {
  font-size: 1.2rem;
  margin-bottom: 12px;
}

.card > h3:first-child,
.card > strong:first-child {
  display: block;
  margin-bottom: 12px;
}

.card p {
  margin: 0 0 10px;
  color: #394a6b;
}

.card-link {
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.card-link:hover {
  transform: translateY(-2px);
  border-color: #b9d0f5;
  box-shadow: var(--shadow-strong);
}

.card img {
  width: 100%;
  border-radius: 14px;
  object-fit: cover;
}

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

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #184ea8;
  background: #eaf2ff;
  border: 1px solid #d7e6ff;
}

.badge.ok {
  color: #115f3e;
  background: #e8f8ef;
  border-color: #cdecd8;
}

.badge.warn {
  color: #a31f36;
  background: #ffedf1;
  border-color: #ffd4dd;
}

.field,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  padding: 11px 12px;
  font: inherit;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

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

.field:focus,
select:focus,
textarea:focus {
  outline: 0;
  border-color: #a8c8ff;
  box-shadow: 0 0 0 3px rgba(31, 109, 255, 0.14);
}

label {
  color: var(--text);
  font-weight: 600;
}

input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--brand);
}

.btn {
  border: 1px solid transparent;
  border-radius: 13px;
  padding: 11px 15px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

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

.btn-brand {
  color: #fff;
  background: linear-gradient(140deg, var(--brand), var(--brand-2));
  box-shadow: 0 10px 20px rgba(24, 94, 231, 0.28);
}

.btn-dark {
  color: #fff;
  background: #1a2745;
}

.btn-ok {
  color: #fff;
  background: var(--ok);
}

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

.btn-whatsapp {
  color: #fff;
  background: linear-gradient(140deg, #20b15a, #118a43);
  box-shadow: 0 10px 20px rgba(17, 138, 67, 0.28);
}

.menu-toggle {
  display: none;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 8px 10px;
  background: #fff;
}

.drawer-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 25;
  background: rgba(15, 24, 47, 0.45);
  backdrop-filter: blur(2px);
}

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}

.table th,
.table td {
  padding: 12px 10px;
  border-bottom: 1px solid #e9eef8;
  text-align: left;
  vertical-align: top;
  white-space: normal;
  word-break: break-word;
}

.table th {
  background: #f3f7ff;
  color: #35507f;
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.table tr:last-child td {
  border-bottom: 0;
}

.table tr:nth-child(even) td {
  background: #fcfdff;
}

.table .btn {
  padding: 8px 12px;
  min-height: 38px;
}

.agenda-cards {
  display: grid;
  gap: 12px;
}

.agenda-item-card {
  border: 1px solid #dbe5f6;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  padding: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.agenda-item-main {
  min-width: 0;
}

.agenda-item-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.agenda-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  color: #3b4f72;
  font-size: 0.94rem;
}

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

.btn-icon-only {
  width: 42px;
  height: 42px;
  min-width: 42px;
  min-height: 42px;
  padding: 0;
  border-radius: 12px;
  font-size: 1rem;
}

.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 18px;
}

.login-card {
  width: 100%;
  max-width: 560px;
  color: #fff;
  border-radius: 28px;
  padding: 26px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: linear-gradient(150deg, #0f1b3f 0%, #184ba8 58%, #1f6dff 100%);
  box-shadow: 0 24px 44px rgba(18, 46, 104, 0.36);
}

.login-card p {
  color: rgba(239, 246, 255, 0.92);
}

.login-logo {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.22);
  margin-bottom: 10px;
}

.login-options {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.login-btn {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 14px;
  padding: 14px;
  text-align: left;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

.login-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.login-btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  background: #ffffff;
  color: #17356e;
  border-color: rgba(255, 255, 255, 0.34);
}

.login-btn-google:hover {
  background: #f5f8ff;
}

.google-mark {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  font-weight: 800;
  color: #ffffff;
  background: linear-gradient(135deg, #4285f4, #34a853 55%, #fbbc05 75%, #ea4335);
}

.landing-hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 18px;
  align-items: stretch;
  margin-bottom: 18px;
}

.landing-copy,
.landing-visual {
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 24px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(246,250,255,0.95));
  box-shadow: var(--shadow-soft);
}

.landing-kicker {
  display: inline-block;
  padding: 7px 12px;
  border-radius: 999px;
  background: #e8f1ff;
  color: #1d56bb;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.landing-copy h1 {
  margin: 14px 0 10px;
  font-size: clamp(2rem, 4vw, 3.8rem);
  line-height: 0.95;
}

.landing-copy p {
  max-width: 58ch;
  font-size: 1.02rem;
  color: #3c4d70;
}

.landing-visual {
  display: grid;
  place-items: center;
  min-height: 360px;
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(31, 109, 255, 0.22), transparent 34%),
    linear-gradient(135deg, #f8fbff 0%, #edf4ff 100%);
}

.landing-visual img {
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
}

.landing-placeholder {
  width: 100%;
  min-height: 320px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  color: #1d4db0;
  font-size: clamp(1.8rem, 3vw, 3rem);
  font-weight: 800;
  background:
    radial-gradient(circle at top left, rgba(31, 109, 255, 0.16), transparent 26%),
    linear-gradient(135deg, #f4f8ff 0%, #e7f0ff 100%);
}

.landing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.landing-footer-links {
  margin-top: 18px;
  text-align: right;
}

.landing-secret-link,
.guest-footer-secret a {
  color: rgba(20, 33, 58, 0.42);
  font-size: 0.78rem;
  text-decoration: none;
}

.landing-secret-link:hover,
.guest-footer-secret a:hover {
  color: rgba(20, 33, 58, 0.68);
}

.guest-footer-secret {
  padding: 8px 18px 16px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: rgba(20, 33, 58, 0.32);
  font-size: 0.76rem;
  opacity: 0.8;
}

.landing-card {
  min-height: 170px;
}

.landing-service-card {
  overflow: hidden;
}

.portal-hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 16px;
  margin-bottom: 18px;
}

.portal-hero-copy {
  border: 1px solid #d8e4f8;
  border-radius: 24px;
  padding: 24px;
  background:
    radial-gradient(circle at top right, rgba(31, 109, 255, 0.12), transparent 38%),
    linear-gradient(160deg, #ffffff 0%, #f3f8ff 100%);
  box-shadow: var(--shadow-soft);
}

.portal-kicker {
  display: inline-block;
  padding: 7px 12px;
  border-radius: 999px;
  color: #1146a9;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: #e8f1ff;
}

.portal-hero-copy h1 {
  margin: 14px 0 10px;
  font-size: clamp(2rem, 3.9vw, 3.3rem);
  line-height: 1.05;
}

.portal-hero-copy p {
  margin-bottom: 14px;
  color: #38507a;
  max-width: 62ch;
}

.portal-hero-stats {
  display: grid;
  gap: 10px;
}

.portal-stat-card {
  border: 1px solid #d8e4f8;
  border-radius: 18px;
  padding: 16px;
  background: linear-gradient(160deg, #ffffff 0%, #f4f8ff 100%);
  box-shadow: var(--shadow-soft);
}

.portal-stat-card strong {
  display: block;
  font-size: 1.7rem;
  color: #143d8f;
  margin-bottom: 4px;
}

.portal-stat-card span {
  color: #45608d;
  font-weight: 600;
}

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

.portal-category-card {
  border: 1px solid #dbe6f8;
  border-radius: 18px;
  padding: 16px;
  background: linear-gradient(160deg, #ffffff 0%, #f5f9ff 100%);
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 8px;
}

.portal-category-card strong {
  color: #325283;
}

.portal-category-card p {
  color: #3e5884;
  min-height: 52px;
}

.portal-bottom-note {
  padding: 10px 4px 4px;
  color: #3b5684;
  text-align: center;
}

.coming-soon-wrap {
  display: grid;
  place-items: center;
  min-height: 70vh;
}

.coming-soon-card {
  width: min(760px, 100%);
  border: 1px solid #d7e3f8;
  border-radius: 24px;
  padding: 26px;
  text-align: center;
  background:
    radial-gradient(circle at top, rgba(31, 109, 255, 0.12), transparent 34%),
    linear-gradient(160deg, #ffffff 0%, #f2f7ff 100%);
  box-shadow: var(--shadow-strong);
}

.coming-soon-pill {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
  color: #1946a0;
  background: #e8f1ff;
  text-transform: uppercase;
}

.coming-soon-card h1 {
  margin: 14px 0 10px;
  font-size: clamp(1.8rem, 3.6vw, 2.5rem);
}

.coming-soon-card p {
  color: #3d5682;
  max-width: 58ch;
  margin: 0 auto 14px;
}

.upload-box {
  padding: 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  background: #f7faff;
}

.upload-preview {
  width: 100%;
  height: 210px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #ecf2ff;
  margin-bottom: 10px;
}

.upload-preview-thumb {
  width: 170px !important;
  height: 96px !important;
  display: block;
  object-fit: cover;
  margin: 0 auto 10px;
  border-radius: 10px;
}

.upload-thumb-box {
  width: fit-content;
  padding: 8px;
  border: 1px dashed #c9d9f4;
  border-radius: 12px;
  background: #f7faff;
  margin: 6px auto 10px;
}

.upload-thumb-box .upload-preview-thumb {
  margin: 0;
}

.upload-control.upload-control-wide {
  width: 100%;
}

.upload-box .upload-control {
  width: 100%;
  border: 1px dashed #c9d9f4;
  border-radius: 12px;
  padding: 8px;
  background: #f5f9ff;
}

.upload-box .upload-control input[type="file"].field {
  margin: 0;
}

.upload-box small {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-weight: 600;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-chip {
  border: 1px solid #cfe0ff;
  background: #edf4ff;
  color: #194ba2;
  border-radius: 999px;
  padding: 7px 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 700;
}

.tag-chip.tag-filter {
  cursor: pointer;
}

.tag-chip.tag-filter.active {
  background: linear-gradient(140deg, var(--brand), var(--brand-2));
  color: #fff;
  border-color: transparent;
}

.tag-remove {
  border: 0;
  border-radius: 999px;
  width: 18px;
  height: 18px;
  padding: 0;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 800;
  color: #fff;
  background: #1a4fac;
  cursor: pointer;
}

.market-prof {
  display: flex;
  align-items: center;
  gap: 10px;
}

.market-avatar {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid #cfdbef;
  background: #eef4ff;
}

.service-checklist {
  display: grid;
  gap: 10px;
}

.service-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

.service-remove {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: #eef3ff;
  color: #1f4fb3;
  font-size: 1.15rem;
  font-weight: 900;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.service-remove:hover {
  background: #dce8ff;
}

.day-rows {
  display: grid;
  gap: 10px;
}

.day-row {
  display: grid;
  grid-template-columns: 1fr 180px auto;
  gap: 8px;
  align-items: center;
}

.checkbox-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
}

.service-filters {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 10px;
  padding: 10px;
  border: 1px solid #d9e5f8;
  border-radius: 12px;
  background: linear-gradient(180deg, #f7fbff, #eef4ff);
}

.service-filter-item {
  display: grid;
  gap: 6px;
}

.service-filter-item label {
  font-size: 0.82rem;
  color: #35507f;
  font-weight: 700;
}

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

.service-group-card {
  border: 1px solid #dbe6f7;
  border-radius: 14px;
  background: linear-gradient(180deg, #fafdff, #f3f8ff);
  padding: 12px;
}

.service-group-title {
  font-weight: 800;
  color: #274678;
  margin-bottom: 8px;
}

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

.service-check-item {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-weight: 600;
  color: #193663;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(12, 20, 40, 0.52);
  backdrop-filter: blur(2px);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 81;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal[hidden],
.modal-backdrop[hidden] {
  display: none !important;
}

.modal-card {
  width: min(680px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  border: 1px solid #d8e3f6;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 28px 60px rgba(13, 35, 79, 0.28);
  padding: 18px;
}

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

.prof-modal-form {
  gap: 18px;
}

.prof-modal-top {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(220px, 0.7fr);
  gap: 12px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.modal-close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: #edf3ff;
  color: #1b428f;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.vip-service-summary {
  padding: 14px;
}

.vip-prof-card {
  gap: 12px;
}

.vip-slot-btn {
  min-width: 112px;
}

@media (max-width: 920px) {
  .day-row {
    grid-template-columns: 1fr;
  }

  .checkbox-grid-2 {
    grid-template-columns: 1fr;
  }

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

  .prof-modal-top {
    grid-template-columns: 1fr;
  }

  .service-cards-grid {
    grid-template-columns: 1fr;
  }

  .modal {
    padding: 10px;
  }

  .modal-card {
    max-height: calc(100vh - 20px);
    padding: 14px;
  }
}

.whatsapp-fab {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 80;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(145deg, #16a34a, #0f8f3f);
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 999px;
  padding: 10px 14px 10px 10px;
  box-shadow: 0 12px 28px rgba(22, 163, 74, 0.45);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.whatsapp-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(22, 163, 74, 0.5);
}

.whatsapp-fab-icon {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.22);
  font-weight: 900;
}

.whatsapp-fab-text {
  line-height: 1;
}

/* Auth screens */
.auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
  gap: 26px;
  align-items: center;
  min-height: calc(100vh - 40px);
  padding: 40px 18px;
  max-width: 1200px;
  margin: 0 auto;
}

.auth-hero {
  background:
    radial-gradient(circle at 20% 0%, rgba(31, 109, 255, 0.18), transparent 45%),
    linear-gradient(140deg, #f5f8ff 0%, #e9f1ff 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: var(--shadow-soft);
}

.auth-hero h1 {
  font-size: 2rem;
  margin-bottom: 10px;
}

.auth-hero p {
  color: var(--muted);
}

.auth-hero-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.auth-hero-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 14px;
}

.auth-card {
  background: linear-gradient(180deg, #0f2a63 0%, #11306f 45%, #15438f 100%);
  color: #fff;
  border-radius: 26px;
  padding: 26px;
  box-shadow: 0 18px 44px rgba(15, 38, 90, 0.35);
}

.auth-card h2 {
  margin-bottom: 8px;
}

.auth-card p {
  color: rgba(227, 236, 255, 0.9);
}

.auth-logo {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.15);
}

.auth-form {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 14px 0;
  color: rgba(227, 236, 255, 0.75);
  font-size: 0.85rem;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.18);
}

.auth-links {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.auth-link {
  text-decoration: none;
  color: #dfe9ff;
  font-weight: 600;
  font-size: 0.95rem;
}

.auth-link:hover {
  text-decoration: underline;
}

input[type="file"].field {
  padding: 8px;
  background: #ffffff;
  border-style: solid;
}

input[type="file"].field::file-selector-button {
  border: 0;
  border-radius: 10px;
  padding: 8px 12px;
  margin-right: 10px;
  color: #fff;
  background: linear-gradient(140deg, var(--brand), var(--brand-2));
  font-weight: 700;
  cursor: pointer;
}

.grid.grid-2 > .card,
.grid.grid-3 > .card {
  min-width: 0;
}

.grid > form.grid {
  gap: 12px;
}

@media (max-width: 1180px) {
  :root {
    --sidebar-w: 250px;
  }

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

@media (max-width: 920px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.22s ease;
  }

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

  .content-area {
    margin-left: 0;
    width: 100%;
  }

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

  .drawer-backdrop.show {
    display: block;
  }

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .landing-hero,
  .landing-grid,
  .portal-hero {
    grid-template-columns: 1fr;
  }

  .page-wrap {
    padding: 12px;
  }

  .topbar-title h1 {
    font-size: 1.2rem;
  }

  .card {
    padding: 14px;
    border-radius: 16px;
  }

  .table {
    display: table;
    table-layout: fixed;
    width: 100%;
  }

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

  .agenda-meta-grid {
    grid-template-columns: 1fr;
  }

  .upload-preview {
    height: 170px;
  }

  .portal-categories-grid {
    grid-template-columns: 1fr;
  }

  .auth-shell {
    grid-template-columns: 1fr;
    padding: 26px 16px;
  }

  .auth-hero-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .topbar {
    padding: 10px 12px;
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .btn {
    width: 100%;
  }

  .topbar .btn {
    width: auto;
  }

  .btn-icon-only {
    width: 42px;
    min-width: 42px;
  }

  .topbar .row {
    width: 100%;
    justify-content: flex-end;
  }

  .row {
    gap: 8px;
  }

  .field,
  select,
  textarea {
    padding: 10px 11px;
  }

  .upload-preview {
    height: 150px;
  }

  .whatsapp-fab {
    right: 12px;
    bottom: 12px;
    padding: 10px;
  }

  .whatsapp-fab-text {
    display: none;
  }
}
