:root {
  --primary: #1f7a4d;
  --primary-dark: #145c38;
  --primary-light: #e7f6ee;
  --secondary: #16382b;
  --secondary-light: #1f4d3a;
  --accent: #2f9e44;
  --accent-dark: #1f7a4d;
  --accent-light: #d9f5e3;
  --text-main: #1c2b24;
  --text-muted: #5d6b64;
  --bg-main: #f4f7f4;
  --bg-card: #ffffff;
  --border-color: #d7e3db;
  --shadow-sm: 0 1px 3px rgba(22, 56, 43, 0.08);
  --shadow-md: 0 4px 6px -1px rgba(22, 56, 43, 0.08);
  --shadow-lg: 0 12px 24px -8px rgba(22, 56, 43, 0.16);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --transition: all 0.2s ease;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text-main);
  background-color: var(--bg-main);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-dark);
}

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

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* TOP BAR */
.topbar {
  background: var(--secondary);
  color: #94a3b8;
  font-size: 0.85rem;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.topbar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.topbar-badge {
  background: rgba(47, 158, 68, 0.2);
  color: #b7f0c8;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.8rem;
  border: 1px solid rgba(183, 240, 200, 0.35);
}

.topbar-links {
  display: flex;
  gap: 16px;
  align-items: center;
}

.topbar-links a {
  color: #cbd5e1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.topbar-links a:hover {
  color: #38bdf8;
}

/* NAVBAR */
.navbar {
  background: #ffffff;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

.brand-logo {
  display: flex;
  align-items: center;
  height: 58px;
}

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

.nav-links {
  display: flex;
  list-style: none;
  gap: 24px;
  align-items: center;
}

.nav-item {
  position: relative;
}

.nav-link {
  color: var(--secondary);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 8px 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary);
}

/* DROPDOWN */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: #ffffff;
  min-width: 260px;
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-md);
  padding: 8px 0;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: var(--transition);
  border: 1px solid var(--border-color);
  z-index: 1001;
}

.nav-item:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-link {
  display: block;
  padding: 10px 18px;
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 500;
}

.dropdown-link:hover {
  background: var(--primary-light);
  color: var(--primary-dark);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--secondary);
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff !important;
}

.btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35);
}

.btn-accent {
  background: var(--accent);
  color: #ffffff !important;
}

.btn-accent:hover {
  background: var(--accent-dark);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}

.btn-outline {
  background: transparent;
  border-color: var(--border-color);
  color: var(--secondary);
}

.btn-outline:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.btn-outline-white {
  background: transparent;
  border-color: rgba(255,255,255,0.4);
  color: #ffffff !important;
}

.btn-outline-white:hover {
  background: rgba(255,255,255,0.15);
  border-color: #ffffff;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1.05rem;
  border-radius: var(--radius-md);
}

/* HERO SECTION */
.hero {
  position: relative;
  background: linear-gradient(135deg, rgba(16, 48, 34, 0.92) 0%, rgba(31, 122, 77, 0.78) 100%), url('/assets/img/hero-relleno-seguridad.jpg') center/cover no-repeat;
  color: #ffffff;
  padding: 88px 0 110px;
  overflow: hidden;
}

.hero-content {
  max-width: 780px;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.4);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 20px;
  letter-spacing: 0.5px;
}

.hero-title {
  font-size: 3rem;
  line-height: 1.15;
  font-weight: 900;
  margin-bottom: 20px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero-title span {
  color: #b7f0c8;
}

.hero-desc {
  font-size: 1.2rem;
  line-height: 1.6;
  color: #e2e8f0;
  margin-bottom: 32px;
  max-width: 680px;
}

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

/* STATS BAR */
.stats-bar {
  background: #ffffff;
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-lg);
  margin-top: -50px;
  position: relative;
  z-index: 10;
  padding: 30px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  border: 1px solid var(--border-color);
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 16px;
}

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.stat-number {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--secondary);
  line-height: 1;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 4px;
}

/* SECTIONS */
.section {
  padding: 80px 0;
}

.section-bg {
  background: #ffffff;
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 50px;
}

.section-subtitle {
  color: var(--primary);
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
  display: block;
}

.section-title {
  font-size: 2.2rem;
  color: var(--secondary);
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 14px;
}

.section-lead {
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* CARDS GRID */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

/* SERVICE CARD */
.service-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: #bae6fd;
}

.service-img-wrap {
  height: 200px;
  overflow: hidden;
  position: relative;
}

.service-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.service-card:hover .service-img-wrap img {
  transform: scale(1.05);
}

.service-category {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(15, 41, 66, 0.85);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  backdrop-filter: blur(4px);
}

.service-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.service-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 10px;
  line-height: 1.35;
}

.service-desc {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 20px;
  flex-grow: 1;
}

.service-link {
  font-weight: 700;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary);
}

.service-link:hover {
  gap: 10px;
  color: var(--primary-dark);
}

/* SECTOR BADGES */
.sectors-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.sector-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px 16px;
  text-align: center;
  transition: var(--transition);
}

.sector-card:hover {
  border-color: var(--primary);
  background: var(--primary-light);
  transform: translateY(-3px);
}

.sector-icon {
  font-size: 2rem;
  margin-bottom: 8px;
}

.sector-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--secondary);
}

/* ABOUT HIGHLIGHT */
.about-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}

.about-img-group {
  position: relative;
}

.about-img-main {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
}

.about-badge-card {
  position: absolute;
  bottom: -25px;
  right: -20px;
  background: var(--secondary);
  color: #ffffff;
  padding: 20px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  border-left: 5px solid var(--accent);
  max-width: 260px;
}

.about-badge-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: #38bdf8;
  line-height: 1;
}

.about-badge-text {
  font-size: 0.85rem;
  margin-top: 6px;
  color: #e2e8f0;
}

.feature-list {
  list-style: none;
  margin: 24px 0;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.feature-check {
  background: var(--accent-light);
  color: var(--accent-dark);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-weight: 800;
  font-size: 0.85rem;
  margin-top: 2px;
}

/* CTA STRIP */
.cta-strip {
  background: linear-gradient(135deg, var(--secondary) 0%, #0369a1 100%);
  color: #ffffff;
  padding: 60px 0;
  border-radius: var(--radius-lg);
  text-align: center;
  margin: 40px 0;
}

.cta-strip h2 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.cta-strip p {
  color: #e0f2fe;
  font-size: 1.1rem;
  max-width: 650px;
  margin: 0 auto 28px;
}

/* FOOTER */
.footer {
  background: var(--secondary);
  color: #cbd5e1;
  padding: 70px 0 24px;
  border-top: 4px solid var(--primary);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1.2fr 1.5fr 1.3fr;
  gap: 40px;
  margin-bottom: 50px;
}

.footer-brand img {
  height: 52px;
  margin-bottom: 18px;
}

.footer-desc {
  font-size: 0.92rem;
  line-height: 1.6;
  color: #94a3b8;
  margin-bottom: 20px;
}

.footer-title {
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 18px;
  position: relative;
  padding-bottom: 8px;
}

.footer-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 32px;
  height: 2px;
  background: var(--accent);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: #94a3b8;
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: #38bdf8;
  padding-left: 4px;
}

.footer-contact li {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
  font-size: 0.9rem;
  color: #94a3b8;
}

.footer-contact i {
  color: var(--accent);
  margin-top: 3px;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: #64748b;
  flex-wrap: wrap;
  gap: 12px;
}

/* ========================================================
   WIDGET DE CHAT ONLINE "VALENTINA - ASESORA LIRS"
   ======================================================== */
.chat-widget {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 9999;
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-end;
  gap: 10px;
  width: min(360px, calc(100vw - 24px));
  font-family: inherit;
}

.chat-toggle-btn {
  background: var(--primary);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-full);
  padding: 10px 16px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 20px rgba(31, 122, 77, 0.28);
  cursor: pointer;
  font-weight: 700;
  font-size: 0.95rem;
  max-width: 100%;
}

.chat-toggle-btn:hover {
  background: var(--primary-dark);
}

.chat-avatar-mini {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #ffffff;
}

.chat-badge-pulse {
  position: relative;
  display: inline-block;
}

.chat-badge-pulse::after {
  content: '';
  position: absolute;
  top: -2px;
  right: -2px;
  width: 10px;
  height: 10px;
  background: #22c55e;
  border-radius: 50%;
  border: 2px solid #ffffff;
}

.chat-window {
  position: relative;
  width: 100%;
  height: min(560px, calc(100vh - 96px));
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 40px rgba(22, 56, 43, 0.2);
  border: 1px solid var(--border-color);
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.chat-window.active {
  display: flex;
}

.chat-header {
  background: var(--secondary);
  color: #ffffff;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex: 0 0 auto;
}

.chat-agent-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-agent-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #ffffff;
}

.chat-agent-name {
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
}

.chat-agent-status {
  font-size: 0.8rem;
  color: #86efac;
  display: flex;
  align-items: center;
  gap: 4px;
}

.chat-close-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,0.8);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

.chat-close-btn:hover {
  color: #ffffff;
}

.chat-messages {
  flex: 1 1 auto;
  min-height: 0;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #f4f7f4;
}

.message-bubble {
  max-width: 82%;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  line-height: 1.45;
  word-break: break-word;
}

.message-bot, .message-agent {
  background: #ffffff;
  color: var(--text-main);
  align-self: flex-start;
  border-bottom-left-radius: 2px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
  border: 1px solid #e2e8f0;
}

.message-visitor {
  background: #10b981;
  color: #ffffff;
  align-self: flex-end;
  border-bottom-right-radius: 2px;
  box-shadow: 0 1px 2px rgba(16, 185, 129, 0.2);
}

.message-time {
  font-size: 0.7rem;
  color: rgba(0,0,0,0.4);
  margin-top: 4px;
  text-align: right;
}

.message-visitor .message-time {
  color: rgba(255,255,255,0.7);
}

.chat-quick-options {
  padding: 10px 12px 12px;
  background: #ffffff;
  border-top: 1px solid var(--border-color);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  flex: 0 0 auto;
  overflow: visible;
}

.quick-opt-btn {
  background: var(--primary-light);
  color: var(--primary-dark);
  border: 1px solid #cfe8d8;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.25;
  cursor: pointer;
  text-align: left;
  white-space: normal;
  min-height: 44px;
}

.quick-opt-btn:hover {
  background: #bae6fd;
}

.chat-input-area {
  padding: 12px;
  background: #ffffff;
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 8px;
  align-items: center;
  flex: 0 0 auto;
}

.chat-input {
  flex-grow: 1;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 10px 16px;
  font-size: 0.92rem;
  outline: none;
  font-family: inherit;
}

.chat-input:focus {
  border-color: var(--primary);
}

.chat-send-btn {
  background: var(--primary);
  color: #ffffff;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.chat-send-btn:hover {
  background: var(--primary-dark);
}

.chat-footer-cta {
  background: #f4f7f4;
  padding: 8px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  flex: 0 0 auto;
}

.chat-wa-link {
  color: #059669;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* FORMS */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 6px;
  color: var(--secondary);
}

.form-control {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition);
  font-family: inherit;
  background: #ffffff;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

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

/* FLASH ALERTS */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 12px;
}

.alert-success {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.alert-error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.alert-info {
  background: #e0f2fe;
  color: #075985;
  border: 1px solid #bae6fd;
}

/* ADMIN PANEL STYLES */
.admin-layout {
  display: flex;
  min-height: 100vh;
}

.admin-sidebar {
  width: 270px;
  background: var(--secondary);
  color: #cbd5e1;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.admin-sidebar-header {
  padding: 24px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.admin-nav {
  padding: 20px 0;
  list-style: none;
  flex-grow: 1;
}

.admin-nav-item a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  color: #94a3b8;
  font-size: 0.95rem;
  font-weight: 500;
  transition: var(--transition);
}

.admin-nav-item a:hover, .admin-nav-item.active a {
  background: rgba(47, 158, 68, 0.16);
  color: #b7f0c8;
  border-left: 4px solid #7dcea0;
}

.admin-main {
  flex-grow: 1;
  background: #f1f5f9;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

.admin-topbar {
  background: #ffffff;
  padding: 16px 32px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-content {
  padding: 32px;
  flex-grow: 1;
}

/* DATA TABLES */
.table-responsive {
  overflow-x: auto;
  background: #ffffff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.92rem;
}

.data-table th {
  background: #f8fafc;
  padding: 14px 18px;
  font-weight: 700;
  color: var(--secondary);
  border-bottom: 1px solid var(--border-color);
}

.data-table td {
  padding: 14px 18px;
  border-bottom: 1px solid #f1f5f9;
  color: var(--text-main);
  vertical-align: middle;
}

.data-table tr:hover {
  background: #f8fafc;
}

/* BADGES */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
}

.badge-success { background: #dcfce7; color: #15803d; }
.badge-warning { background: #fef3c7; color: #b45309; }
.badge-info { background: #e0f2fe; color: #0369a1; }
.badge-danger { background: #fee2e2; color: #b91c1c; }
.badge-secondary { background: #f1f5f9; color: #475569; }

/* RESPONSIVE */
@media (max-width: 992px) {
  .hero-title { font-size: 2.3rem; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
  .about-split { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .admin-layout { flex-direction: column; }
  .admin-sidebar { width: 100%; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .mobile-toggle { display: block; }
  .grid-3, .grid-2, .grid-4, .stats-bar, .sectors-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .admin-chat-grid { grid-template-columns: 1fr; }
}

.page-hero {
  background: var(--secondary);
  color: #ffffff;
  padding: 48px 0 40px;
}

.page-hero h1 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-top: 12px;
}

.page-hero p {
  color: #d7e8de;
  font-size: 1.05rem;
  max-width: 720px;
  margin-top: 8px;
}

.card-block {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin-bottom: 18px;
}

.dropzone {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 22px;
  background: var(--bg-main);
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--text-muted);
}

.dropzone.active {
  border-color: var(--primary);
  background: var(--primary-light);
}

.dropzone input {
  margin-bottom: 6px;
}

.doc-stage-wrap {
  overflow: auto;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 12px;
}

.doc-stage {
  position: relative;
  display: inline-block;
  max-width: 100%;
}

.doc-stage img {
  max-width: 100%;
  height: auto;
  display: block;
}

.doc-mark,
.stamp-preview {
  position: absolute;
  left: 6%;
  top: 74%;
  width: 36%;
  min-height: 84px;
  border: 3px solid #145c38;
  background: rgba(255, 255, 255, 0.96);
  color: #145c38;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  cursor: move;
  touch-action: none;
  user-select: none;
  box-shadow: 0 8px 18px rgba(20, 40, 30, 0.18);
  z-index: 2;
}

.stamp-qr {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  background:
    linear-gradient(#111 0 0) 0 0 / 18px 18px no-repeat,
    linear-gradient(#111 0 0) 46px 0 / 18px 18px no-repeat,
    linear-gradient(#111 0 0) 0 46px / 18px 18px no-repeat,
    repeating-linear-gradient(90deg, #111 0 4px, transparent 4px 8px),
    repeating-linear-gradient(#111 0 4px, transparent 4px 8px);
  border: 2px solid #111;
}

.stamp-key {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  min-width: 0;
}

.stamp-key small {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.stamp-key strong {
  font-size: 1rem;
  color: #111;
}

.stamp-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.stamp-presets button {
  border: 1px solid var(--border-color);
  background: #ffffff;
  color: var(--secondary);
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 700;
  cursor: pointer;
}

.stamp-presets button:hover {
  border-color: var(--primary);
  color: var(--primary-dark);
}

.stamp-result {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: #ffffff;
}

.admin-chat-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(240px, 0.8fr);
  gap: 24px;
  align-items: start;
}

.chat-thread {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  height: min(580px, calc(100vh - 220px));
  min-height: 420px;
  overflow: hidden;
}

.chat-thread-messages {
  flex: 1 1 auto;
  min-height: 0;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: #f4f7f4;
}

.verify-body {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 28px 16px;
  background: #e7f6ee;
}

.verify-card {
  width: min(720px, 100%);
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 28px 22px;
  box-shadow: var(--shadow-md);
}

.verify-card h1 {
  font-size: 1.6rem;
  color: var(--secondary);
  margin-bottom: 12px;
}

.verify-ok {
  background: var(--accent-light);
  color: var(--primary-dark);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-weight: 700;
  margin-bottom: 14px;
}

.verify-image {
  width: 100%;
  height: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}


