:root {
  --bg-page: #ffffff;
  --bg-section: #ffffff;
  --bg-section-alt: #f9fafb;
  --border-subtle: #e5e7eb;
  --border-strong: #d1d5db;
  --accent: #2563eb;
  --accent-strong: #1d4ed8;
  --text-main: #111827;
  --text-muted: #6b7280;
  --text-soft: #6b7280;
  --text-strong: #0f172a;
  --surface-radius-lg: 1.5rem;
  --surface-radius-md: 1rem;
  --surface-radius-sm: 0.75rem;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.08);
  --shadow-subtle: 0 1px 2px rgba(15, 23, 42, 0.06);
}

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

html,
body {
  height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg-page);
  color: var(--text-main);
}

/* Generic */

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

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

.container {
  width: min(1120px, 100% - 2.5rem);
  margin-inline: auto;
}

.portal-section {
  padding-block: 0.75rem 1.5rem;
  min-height: calc(100vh - 64px);
  display: flex;
}

.portal-section .container {
  width: min(1320px, 100% - 1rem);
  display: flex;
  flex-direction: column;
}

/* Header & Navigation */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--border-subtle);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 0.85rem;
  gap: 1.75rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-badge {
  display: none;
}

.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  object-fit: cover;
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.35);
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.brand-name {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text-strong);
  letter-spacing: 0.02em;
}

.brand-city {
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.16em;
}

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

.nav-list {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  list-style: none;
  font-size: 0.92rem;
}

.nav-list a {
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color 0.16s ease, transform 0.16s ease;
}

.nav-list a:hover {
  color: var(--text-strong);
  transform: translateY(-1px);
}

.nav-cta {
  margin-left: 0.75rem;
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: #ffffff;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: #111827;
  border-radius: 999px;
  transition: transform 0.18s ease, opacity 0.18s ease, translate 0.18s ease;
}

.nav-toggle span + span {
  margin-top: 4px;
}

.nav-toggle.open span:nth-child(1) {
  transform: rotate(45deg);
  translate: 0 6px;
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  transform: rotate(-45deg);
  translate: 0 -6px;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-inline: 1.4rem;
  padding-block: 0.65rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease,
    box-shadow 0.16s ease, transform 0.16s ease;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #f9fafb;
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.35);
  border-color: rgba(37, 99, 235, 0.4);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--accent-strong), #1e40af);
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.4);
}

.btn-danger {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  color: #fef2f2;
  box-shadow: 0 10px 25px rgba(185, 28, 28, 0.35);
  border-color: rgba(220, 38, 38, 0.6);
}

.btn-danger:hover {
  background: linear-gradient(135deg, #b91c1c, #991b1b);
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(185, 28, 28, 0.45);
}

.btn-outline {
  background: #ffffff;
  border-color: var(--border-subtle);
  color: var(--text-main);
}

.btn-outline:hover {
  background: #eff6ff;
  border-color: rgba(37, 99, 235, 0.6);
  color: var(--text-strong);
}

.btn-ghost {
  background: transparent;
  border-color: var(--border-subtle);
  color: var(--text-muted);
}

.btn-ghost:hover {
  background: #f9fafb;
  color: var(--text-strong);
  border-color: var(--border-strong);
}

/* Hero */

.hero {
  position: relative;
  min-height: 72vh;
  display: flex;
  align-items: stretch;
  color: #f9fafb;
  isolation: isolate;
}

.hero-slides {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: -2;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.1s ease;
}

.hero-slide.is-active {
  opacity: 1;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform-origin: center;
  transform: scale(1.08);
}

.hero-slide.is-active img {
  animation: heroZoom 12s ease-out forwards;
}

@keyframes heroZoom {
  from {
    transform: scale(1.08);
  }
  to {
    transform: scale(1.0);
  }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    rgba(15, 23, 42, 0.85) 0%,
    rgba(15, 23, 42, 0.55) 40%,
    transparent 100%
  );
  z-index: -1;
}

.hero-content {
  padding-block: 3.3rem 4rem;
  max-width: 640px;
}

.eyebrow {
  font-size: 0.83rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #bfdbfe;
  margin-bottom: 1.2rem;
}

.hero h1 {
  font-size: clamp(2.3rem, 2.9vw + 1.6rem, 3rem);
  line-height: 1.05;
  margin-bottom: 1rem;
  letter-spacing: 0.01em;
}

.hero h1 span {
  display: block;
  color: #fde68a;
}

.hero-subtitle {
  font-size: 0.98rem;
  max-width: 35rem;
  color: #e5e7eb;
  line-height: 1.7;
  margin-bottom: 1.7rem;
}

.hero-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.8rem;
}

.hero-metrics span {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.7);
  color: #e5e7eb;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

/* Sections */

.section {
  padding-block: 3.5rem;
}

.section-light {
  background: var(--bg-section);
}

.section-dark {
  background: var(--bg-section-alt);
}

.section-muted {
  background: var(--bg-section);
}

.section-heading {
  max-width: 680px;
  margin-inline: auto;
  margin-bottom: 2.4rem;
  text-align: center;
}

.section-heading h2 {
  font-size: 1.75rem;
  margin-bottom: 0.65rem;
  color: var(--text-strong);
}

.section-heading p {
  color: var(--text-soft);
  font-size: 0.98rem;
}

.section-kicker {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: #2563eb;
  margin-bottom: 0.6rem;
}

.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 2.4rem;
  align-items: center;
}

.section-content p {
  font-size: 0.98rem;
  line-height: 1.7;
  color: var(--text-main);
  margin-bottom: 0.9rem;
}

.section-content p:last-of-type {
  margin-bottom: 1.1rem;
}

.section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.2rem;
}

/* Pills */

.pill-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.4rem 0 0.4rem;
  padding: 0;
}

.pill-list li {
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: #eff6ff;
  color: #1f2937;
}

/* Image + Stat */

.section-media {
  display: grid;
  grid-template-rows: auto auto;
  gap: 0.9rem;
  align-content: flex-start;
}

.image-card {
  border-radius: var(--surface-radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-soft);
  background: #ffffff;
}

.image-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stat-card {
  align-self: flex-start;
  justify-self: flex-start;
  padding: 0.8rem 1.1rem;
  border-radius: 999px;
  background: #111827;
  border: 1px solid rgba(15, 23, 42, 0.1);
  box-shadow: var(--shadow-subtle);
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
}

.stat-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: #bfdbfe;
}

.stat-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: #e5e7eb;
}

/* Mission / Vision */

.mission-vision {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  min-height: 440px;
  background: #fef3c7;
  box-shadow: var(--shadow-soft);
  margin-inline: 0;
}

.mission-vision-image {
  position: relative;
  overflow: hidden;
}

.mission-vision-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mission-vision-content {
  padding: 3rem 3.25rem;
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.55rem;
  color: #111827;
}

.mission-vision-content .section-kicker {
  color: #1f2937;
  margin-bottom: 0.2rem;
}

.mission-vision-content h2 {
  font-size: 1.6rem;
  margin-top: 0.2rem;
  margin-bottom: 0.25rem;
  color: #111827;
}

.mission-vision-content p {
  font-size: 0.98rem;
  line-height: 1.7;
  color: #111827;
}

.mission-vision-actions {
  margin-top: 0.9rem;
}

/* Cards (Services) */

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

.card {
  position: relative;
  border-radius: var(--surface-radius-md);
  padding: 1rem 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  box-shadow: var(--shadow-soft);
  background: transparent;
  overflow: hidden;
  z-index: 0;
}

.card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: conic-gradient(
    from 0deg,
    #2563eb,
    #22c55e,
    #eab308,
    #ef4444,
    #6366f1,
    #2563eb
  );
  opacity: 0.85;
  animation: cardBorderSpin 8s linear infinite;
  z-index: -2;
}

.card::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: calc(var(--surface-radius-md) - 1px);
  background: #ffffff;
  z-index: -1;
}

@keyframes cardBorderSpin {
  to {
    transform: rotate(360deg);
  }
}

.card-image {
  border-radius: calc(var(--surface-radius-md) - 0.25rem);
  overflow: hidden;
  margin-bottom: 0.45rem;
}

.card-image img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-strong);
}

.card p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-soft);
}

.card-actions {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.card-link {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.4rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #f9fafb;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 600;
  border: none;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.45);
  animation: cardCtaGlow 1.8s ease-in-out infinite alternate;
}

.card-more-photos {
  padding-inline: 1.1rem;
  padding-block: 0.45rem;
  font-size: 0.78rem;
}

.card-gallery {
  display: none;
  margin-top: 0.75rem;
  padding-top: 0.65rem;
  border-top: 1px dashed var(--border-subtle);
}

.card-gallery.is-open {
  display: block;
}

.card-gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.card-gallery img {
  width: 100%;
  height: 90px;
  border-radius: 0.6rem;
  object-fit: cover;
  border: 1px solid var(--border-subtle);
}

.card-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.6);
}

@keyframes cardCtaGlow {
  from {
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.45);
  }
  to {
    box-shadow: 0 16px 32px rgba(37, 99, 235, 0.75);
  }
}

/* Gallery */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
}

.gallery-item {
  border-radius: var(--surface-radius-md);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.gallery-item img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

/* Why Us */

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

.feature {
  padding: 1.1rem 1.1rem 1.2rem;
  border-radius: var(--surface-radius-md);
  border: 1px solid var(--border-subtle);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.feature h3 {
  font-size: 0.98rem;
  margin-bottom: 0.4rem;
  color: var(--text-strong);
}

.feature p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-soft);
}

/* Contact */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 2.2rem;
  align-items: flex-start;
}

.contact-items {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem;
  margin: 1.1rem 0 1.5rem;
}

.contact-item h3 {
  font-size: 0.95rem;
  margin-bottom: 0.3rem;
  color: var(--text-strong);
}

.contact-item p {
  font-size: 0.9rem;
  color: var(--text-main);
  line-height: 1.6;
}

.contact-item a {
  color: #2563eb;
}

.contact-form-card {
  background: #ffffff;
  border-radius: var(--surface-radius-lg);
  padding: 1.5rem 1.6rem 1.6rem;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-soft);
}

.contact-form-card h3 {
  font-size: 1rem;
  margin-bottom: 0.9rem;
  color: var(--text-strong);
}

.contact-form {
  display: grid;
  gap: 0.8rem;
}

.contact-form label {
  display: grid;
  gap: 0.25rem;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.contact-form input,
.contact-form textarea {
  border-radius: 0.7rem;
  border: 1px solid var(--border-subtle);
  background: #f9fafb;
  padding: 0.55rem 0.75rem;
  font: inherit;
  color: var(--text-main);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: rgba(37, 99, 235, 0.9);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.6);
}

.contact-form textarea {
  resize: vertical;
  min-height: 120px;
}

.form-note {
  font-size: 0.78rem;
  color: var(--text-soft);
  margin-top: 0.35rem;
}

.contact-map {
  margin-top: 1.75rem;
}

.contact-map iframe {
  width: 100%;
  min-height: 260px;
  border: 0;
  border-radius: var(--surface-radius-lg);
  box-shadow: var(--shadow-soft);
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--border-subtle);
  background: #ffffff;
}

.footer-inner {
  padding-block: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.82rem;
  color: var(--text-soft);
}

.back-to-top {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: #2563eb;
}

/* Floating WhatsApp */

.whatsapp-float {
  position: fixed;
  left: 1.25rem;
  bottom: 1.25rem;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  z-index: 60;
}

.whatsapp-float::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(37, 211, 102, 0) 0%,
    rgba(37, 211, 102, 0.75) 55%,
    rgba(37, 211, 102, 0) 85%
  );
  opacity: 0;
  transform: scale(0.9);
  animation: whatsappPulse 2.4s ease-out infinite;
}

.whatsapp-float img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  position: relative;
  z-index: 1;
}

@keyframes whatsappPulse {
  0% {
    opacity: 0;
    transform: scale(0.9);
  }
  50% {
    opacity: 0.9;
    transform: scale(1.25);
  }
  100% {
    opacity: 0;
    transform: scale(1.35);
  }
}

/* Scroll reveal */

.reveal-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal-on-scroll.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */

@media (max-width: 960px) {
  .header-inner {
    padding-block: 0.7rem;
  }

  .nav-list {
    position: absolute;
    inset: 100% 0 auto;
    background: #ffffff;
    padding: 0.6rem 1.1rem 0.8rem;
    display: none;
    flex-direction: column;
    gap: 0.4rem;
    border-bottom: 1px solid var(--border-subtle);
  }

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

  .nav-cta {
    display: none;
  }

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

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

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

  .mission-vision-content {
    padding: 2.4rem 1.8rem 2.7rem;
  }

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

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

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

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

  .contact-map {
    margin-top: 1.4rem;
  }

  .contact-map iframe {
    min-height: 220px;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(100% - 1.9rem, 640px);
  }

  .hero {
    min-height: 72vh;
  }

  .hero-content {
    padding-block: 2.7rem 3rem;
  }

  .hero-metrics {
    flex-direction: column;
    align-items: flex-start;
  }

  .mission-vision-content {
    padding-inline: 1.5rem;
  }

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

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

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

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .whatsapp-float {
    left: 0.85rem;
    bottom: 0.85rem;
    width: 52px;
    height: 52px;
  }
}

/* Portal (Login + Chat) */

.portal-heading {
  text-align: center;
  margin-top: 2rem;
  margin-bottom: 1.5rem;
}

.portal-heading h1 {
  font-size: 1.9rem;
  margin-bottom: 0.4rem;
  color: var(--text-strong);
}

.portal-heading p {
  font-size: 0.96rem;
  color: var(--text-soft);
}

.portal-card {
  margin-top: 1.5rem;
  border-radius: var(--surface-radius-lg);
  border: 1px solid var(--border-subtle);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  padding: 1.6rem 1.8rem 1.9rem;
}

#adminSection .portal-card.portal-layout,
#coworkerSection .portal-card {
  flex: 1 1 auto;
}

.portal-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.75fr);
  gap: 1.8rem;
  min-height: 70vh;
}

.portal-column--sidebar {
  border-right: 1px solid var(--border-subtle);
  padding-right: 1.4rem;
}

.portal-column--chat {
  display: flex;
  flex-direction: column;
}

.portal-column--chat .chat-panel,
#coworkerSection .chat-panel {
  flex: 1 1 auto;
}

.hidden {
  display: none !important;
}

/* Login form */

.portal-login-form {
  max-width: 420px;
  margin-inline: auto;
  display: grid;
  gap: 0.85rem;
}

.portal-login-form label {
  display: grid;
  gap: 0.25rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.portal-login-form input,
.portal-login-form select {
  border-radius: 0.7rem;
  border: 1px solid var(--border-subtle);
  background: #f9fafb;
  padding: 0.55rem 0.75rem;
  font: inherit;
  color: var(--text-main);
}

.portal-login-form input:focus,
.portal-login-form select:focus {
  outline: none;
  border-color: rgba(37, 99, 235, 0.9);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.5);
}

.portal-login-actions {
  margin-top: 0.6rem;
  display: flex;
  justify-content: flex-end;
}

.form-error {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: #b91c1c;
}

/* Simple form (create coworker) */

.simple-form {
  display: grid;
  gap: 0.7rem;
  margin-top: 0.7rem;
}

.simple-form label {
  display: grid;
  gap: 0.25rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.simple-form input {
  border-radius: 0.7rem;
  border: 1px solid var(--border-subtle);
  background: #f9fafb;
  padding: 0.5rem 0.75rem;
  font: inherit;
  color: var(--text-main);
}

.simple-form input:focus {
  outline: none;
  border-color: rgba(37, 99, 235, 0.9);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.5);
}

/* Coworker list */

.coworker-list {
  list-style: none;
  margin: 0.9rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}

.coworker-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.65rem 0.75rem;
  border-radius: 0.85rem;
  border: 1px solid var(--border-subtle);
  background: #f9fafb;
}

.material-panel {
  margin-top: 0.4rem;
  padding: 0.7rem 0.75rem 0.8rem;
  border-radius: 0.9rem;
  border: 1px solid var(--border-subtle);
  background: #f9fafb;
  min-height: 200px;
  max-height: 400px;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.material-worker-buttons {
  margin-top: 0.4rem;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.4rem;
}

.material-worker-button {
  width: 100%;
  font-size: 0.78rem;
  padding-inline: 0.4rem;
  padding-block: 0.35rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.material-panel-summary {
  font-size: 0.8rem;
  color: var(--text-soft);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.material-panel-summary strong {
  color: var(--text-strong);
}

.material-panel-rows {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.5rem;
}

.material-panel-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.material-panel-row input[type="number"] {
  flex: 1 1 auto;
  border-radius: 0.7rem;
  border: 1px solid var(--border-subtle);
  background: #ffffff;
  padding: 0.4rem 0.6rem;
  font: inherit;
  font-size: 0.8rem;
  color: var(--text-main);
}

.material-panel-row input[type="number"]:focus {
  outline: none;
  border-color: rgba(37, 99, 235, 0.9);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.5);
}

.material-panel-row button {
  font-size: 0.78rem;
  padding-inline: 0.8rem;
  padding-block: 0.35rem;
}

.coworker-list-meta {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.coworker-list-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-strong);
}

.coworker-list-phone {
  font-size: 0.8rem;
  color: var(--text-soft);
}

.coworker-unread-badge {
  margin-top: 0.2rem;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding-inline: 0.35rem;
  border-radius: 999px;
  background: #16a34a;
  color: #f9fafb;
  font-size: 0.72rem;
  font-weight: 600;
}

.coworker-list-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.3rem;
}

.coworker-see-button,
.coworker-history-button {
  font-size: 0.78rem;
  padding-inline: 0.9rem;
  padding-block: 0.4rem;
}

/* Chat */

.chat-panel {
  display: flex;
  flex-direction: column;
  min-height: 540px;
}

.chat-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.7rem;
}

.chat-panel-header h2 {
  font-size: 1.05rem;
  color: var(--text-strong);
}

.chat-panel-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chat-date-filter {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-size: 0.78rem;
  color: var(--text-soft);
}

.chat-date-input {
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: #f9fafb;
  padding: 0.2rem 0.6rem;
  font: inherit;
  font-size: 0.78rem;
  color: var(--text-main);
}

.chat-date-input:focus {
  outline: none;
  border-color: rgba(37, 99, 235, 0.9);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.5);
}

.chat-date-clear {
  font-size: 0.78rem;
  padding-inline: 0.8rem;
  padding-block: 0.3rem;
}

.chat-panel-subtitle {
  font-size: 0.8rem;
  color: var(--text-soft);
}

.chat-messages {
  flex: 1 1 auto;
  border-radius: 1rem;
  border: 1px solid var(--border-subtle);
  background: #f9fafb;
  padding: 0.85rem 0.8rem;
  overflow-y: auto;
  min-height: 480px;
  max-height: 480px;
}

.chat-message {
  max-width: 100%;
  margin-bottom: 0.7rem;
  padding: 0.55rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.9rem;
  line-height: 1.5;
  box-shadow: var(--shadow-subtle);
}

.chat-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.chat-badge--attendance {
  background: #dcfce7;
  color: #166534;
}

.chat-badge--work {
  background: #fee2e2;
  color: #b91c1c;
}

.chat-message--mine {
  margin-left: auto;
  background: #bfdbfe;
  color: #111827;
  border-radius: 1rem 1rem 0.3rem 1rem;
}

.chat-message--theirs {
  margin-right: auto;
  background: #ffffff;
  color: var(--text-main);
  border-radius: 1rem 1rem 1rem 0.3rem;
}

.chat-message-text {
  white-space: pre-wrap;
  word-wrap: break-word;
}

.chat-meta {
  margin-top: 0.25rem;
  font-size: 0.72rem;
  color: var(--text-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
}

.chat-ticks {
  font-size: 0.8rem;
  display: inline-flex;
  align-items: center;
  gap: 0.05rem;
}

.chat-ticks--unseen {
  color: #6b7280;
}

.chat-ticks--seen {
  color: #16a34a;
}

.chat-image {
  margin-top: 0.4rem;
  border-radius: 0.6rem;
  max-height: 160px;
  object-fit: cover;
}

.chat-audio {
  margin-top: 0.4rem;
  width: 100%;
}

.chat-location {
  margin-top: 0.4rem;
  font-size: 0.8rem;
  color: var(--text-soft);
}

.chat-input {
  margin-top: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.chat-input textarea {
  min-height: 72px;
  resize: vertical;
  border-radius: 0.8rem;
  border: 1px solid var(--border-subtle);
  background: #f9fafb;
  padding: 0.6rem 0.75rem;
  font: inherit;
  color: var(--text-main);
}

.chat-input textarea:focus {
  outline: none;
  border-color: rgba(37, 99, 235, 0.9);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.5);
}

.chat-input-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.chat-inline-file {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.chat-inline-file input[type="file"] {
  font-size: 0.8rem;
}

.chat-inline-button {
  font-size: 0.8rem;
}

.chat-location-input {
  border-radius: 0.7rem;
  border: 1px solid var(--border-subtle);
  background: #f9fafb;
  padding: 0.5rem 0.75rem;
  font: inherit;
  color: var(--text-main);
}

.chat-location-input:focus {
  outline: none;
  border-color: rgba(37, 99, 235, 0.9);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.5);
}

/* Compact coworker input bar (bottom, WhatsApp style) */

.chat-input--compact {
  margin-top: 0.6rem;
}

.chat-input-bar {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: #f9fafb;
}

.chat-textarea {
  flex: 1 1 auto;
  min-height: 36px;
  max-height: 80px;
  resize: vertical;
  border: none;
  background: transparent;
  padding: 0.35rem 0.4rem;
  font: inherit;
  color: var(--text-main);
}

.chat-textarea:focus {
  outline: none;
}

.chat-icon-button {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: none;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--text-muted);
}

.chat-icon-button--send {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #f9fafb;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.35);
}

.chat-icon-button--send:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.45);
}

.chat-help-text {
  font-size: 0.78rem;
  color: var(--text-soft);
}

.chat-audio-preview {
  margin-top: 0.4rem;
  width: 100%;
}

/* Camera overlay for live photo */

.camera-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 80;
}

.camera-overlay-inner {
  width: min(480px, 100% - 2rem);
  border-radius: 1rem;
  background: #000000;
  padding: 0.75rem 0.75rem 0.9rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.camera-video {
  width: 100%;
  border-radius: 0.75rem;
  background: #000000;
}

.camera-overlay-actions {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.camera-overlay-actions .btn {
  flex: 1 1 auto;
}

/* Location history overlay (admin) */

.history-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 75;
}

.history-overlay-inner {
  width: min(960px, 100% - 2rem);
  max-height: calc(100vh - 2rem);
  border-radius: 1rem;
  background: #ffffff;
  padding: 0.9rem 1rem 1rem;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.7);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.history-header-title h2 {
  font-size: 1.02rem;
  color: var(--text-strong);
}

.history-header-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.history-map {
  width: 100%;
  height: 60vh;
  min-height: 260px;
  border-radius: 0.9rem;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.history-status {
  font-size: 0.78rem;
  color: var(--text-soft);
}

.history-time-tooltip {
  background: rgba(15, 23, 42, 0.9);
  color: #f9fafb;
  border-radius: 999px;
  padding: 0.1rem 0.35rem;
  font-size: 0.68rem;
  border: none;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.55);
}

/* Coworker header */

.coworker-header {
  margin-bottom: 0.8rem;
}

.coworker-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.coworker-header h2 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
  color: var(--text-strong);
}

.coworker-header p {
  font-size: 0.86rem;
  color: var(--text-soft);
}

.portal-logout-button {
  font-size: 0.8rem;
  padding-inline: 0.95rem;
  padding-block: 0.35rem;
}

/* Orders list (admin sidebar) */

.order-list {
  list-style: none;
  margin: 0.9rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}

.order-list-item {
  padding: 0.65rem 0.75rem;
  border-radius: 0.85rem;
  border: 1px solid var(--border-subtle);
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.order-main {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.order-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-strong);
}

.order-details {
  font-size: 0.82rem;
  color: var(--text-soft);
}

.order-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.76rem;
  color: var(--text-soft);
}

.order-status-badge {
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: #f97316;
  color: #fefce8;
  font-size: 0.72rem;
  font-weight: 600;
}

.order-location {
  color: #16a34a;
}

.order-time {
  opacity: 0.9;
}

/* Admin live location map */

.admin-live-map-card {
  margin-bottom: 1rem;
  padding: 0.9rem 1rem 1rem;
  border-radius: 1rem;
  border: 1px solid var(--border-subtle);
  background: #ffffff;
  box-shadow: var(--shadow-subtle);
}

.admin-live-map-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
}

.admin-live-map-header h2 {
  font-size: 1.02rem;
  color: var(--text-strong);
}

.admin-live-map-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: flex-end;
}

.admin-live-map-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem 0.45rem;
  font-size: 0.76rem;
  color: var(--text-soft);
}

.admin-live-map-fullscreen-button {
  font-size: 0.78rem;
  padding-inline: 0.9rem;
  padding-block: 0.3rem;
}

.admin-live-map-card--fullscreen {
  position: fixed;
  inset: 0;
  margin: 0;
  border-radius: 0;
  border: none;
  z-index: 65;
  box-shadow: none;
}

.admin-live-map-card--fullscreen .admin-live-map {
  height: calc(100vh - 90px);
}

.admin-live-map-card--fullscreen .admin-live-map-header {
  margin-bottom: 0.5rem;
}

.admin-live-map-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
  border: 1px solid transparent;
}

.admin-live-map-dot--live {
  background: #22c55e;
  border-color: #15803d;
}

.admin-live-map-dot--off {
  background: #9ca3af;
  border-color: #4b5563;
}

.admin-live-map-legend-label {
  margin-right: 0.35rem;
}

.admin-live-map {
  width: 100%;
  height: 260px;
  border-radius: 0.9rem;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.admin-live-map-list {
  margin-top: 0.45rem;
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.8rem;
  font-size: 0.76rem;
  color: var(--text-soft);
}

.admin-live-map-item {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: #f9fafb;
  border: 1px solid var(--border-subtle);
}

.admin-live-map-item--live {
  border-color: rgba(34, 197, 94, 0.7);
}

.admin-live-map-item--off {
  opacity: 0.8;
}

.admin-live-map-status {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.7rem;
}

.admin-live-map-name {
  font-weight: 500;
}

.admin-live-map-time {
  opacity: 0.8;
}

.admin-live-map-empty {
  font-size: 0.78rem;
  color: var(--text-soft);
}

/* Daily summary index (admin sidebar) */

.daily-summary-card {
  margin-top: 0.4rem;
  padding: 0.7rem 0.75rem 0.8rem;
  border-radius: 0.9rem;
  border: 1px solid var(--border-subtle);
  background: #f9fafb;
}

.daily-summary-filters {
  margin-bottom: 0.5rem;
  justify-content: flex-start;
}

.daily-summary-inner {
  margin-top: 0.25rem;
}

.daily-summary-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.4rem;
  margin-bottom: 0.45rem;
}

.daily-summary-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-strong);
}

.daily-summary-date {
  font-size: 0.76rem;
  color: var(--text-soft);
}

.daily-summary-table-wrapper {
  overflow-x: auto;
}

.daily-summary-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
  color: var(--text-main);
}

.daily-summary-table th,
.daily-summary-table td {
  padding: 0.25rem 0.4rem;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.daily-summary-table th {
  text-align: left;
  font-weight: 600;
  background: #e5e7eb;
}

.daily-summary-table tbody tr:last-child td {
  border-bottom: none;
}

.daily-summary-name {
  font-weight: 500;
}

.daily-summary-money {
  text-align: left;
}

.daily-summary-empty {
  font-size: 0.78rem;
  color: var(--text-soft);
}

/* Per-coworker daily work (admin sidebar) */

.coworker-daily-work-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.4rem;
  margin-bottom: 0.45rem;
}

.coworker-daily-work-title {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-strong);
}

.coworker-daily-work-date {
  font-size: 0.76rem;
  color: var(--text-soft);
}

.coworker-daily-work-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem 0.75rem;
  margin-bottom: 0.5rem;
  font-size: 0.78rem;
  color: var(--text-main);
}

.coworker-daily-work-metrics-label {
  color: var(--text-soft);
}

.coworker-daily-work-metrics-value {
  font-weight: 500;
}

.coworker-daily-work-list {
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.45rem;
  display: grid;
  gap: 0.45rem;
  max-height: 220px;
  overflow-y: auto;
}

.coworker-daily-work-item {
  padding: 0.35rem 0.4rem;
  border-radius: 0.7rem;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
}

.coworker-daily-work-item-title {
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
  color: var(--text-strong);
}

.coworker-daily-work-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  font-size: 0.75rem;
  color: var(--text-soft);
}

/* Custom marker styles for live location */

.live-marker.leaflet-div-icon {
  background: transparent;
  border: none;
}

.live-marker-inner {
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.96);
  color: #f9fafb;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.6);
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  font-size: 0.72rem;
  min-width: 80px;
}

.live-marker-name {
  font-weight: 600;
}

.live-marker-status {
  align-self: flex-start;
  padding: 0.05rem 0.5rem;
  border-radius: 999px;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.live-marker--on .live-marker-status {
  background: #22c55e;
  color: #022c22;
}

.live-marker--off .live-marker-status {
  background: #9ca3af;
  color: #111827;
}

/* Responsive for portal */

@media (max-width: 960px) {
  .portal-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .portal-column--sidebar {
    border-right: none;
    padding-right: 0;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
  }
}

@media (max-width: 640px) {
  .portal-card {
    padding-inline: 1.1rem;
  }

  .chat-message {
    max-width: 100%;
  }
}
