/* =========================================
   Global normalize / cross-browser base
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  color-scheme: light; /* consistent native UI colors */
  --primary-purple: rgb(89, 25, 193);
  --primary-black: rgb(0, 0, 0);
  --text-light: rgb(110, 110, 110);
  --bg-light: rgb(242, 242, 242);
  --bg-white: rgb(255, 255, 255);
  --card-bg: rgba(230, 225, 248, 0.6);
  --border-color: rgb(220, 220, 220);
  --spacing-unit: 1.5rem;
  --transition: all 0.3s ease;

  /* Chat theme variables (neutral) */
  --chat-accent: #0a84ff;          /* subtle system blue for focus */
  --chat-border: #e5e7eb;          /* neutral border */
  --chat-header-bg: #f8fafc;       /* light header */
  --chat-bg: #ffffff;              /* body */
  --chat-user-bg: #e7f0ff;         /* light blue user bubble */
  --chat-agent-bg: #f2f4f7;        /* light gray agent bubble */
  --chat-text: #111827;            /* dark text */
  --chat-muted: #6b7280;           /* muted text */
}

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

html {
  -webkit-text-size-adjust: 100%; /* iOS zoom */
  text-size-adjust: 100%;
}

body {
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol", sans-serif;
  margin: 0;
  background-color: var(--bg-white);
  color: var(--primary-black);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}

img, picture, svg, video, canvas {
  max-width: 100%;
  height: auto;
  display: block;
}

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

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

:focus-visible {
  outline: 2px solid var(--primary-purple);
  outline-offset: 2px;
}

/* =========================================
   Typography (px fallback + clamp override)
   ========================================= */
h2 { font-size: 2.25rem; font-weight: 700; margin: 0 0 var(--spacing-unit); line-height: 1.2; }
h3 { font-size: 1.125rem; font-weight: 600; margin: 0 0 0.5rem; color: var(--primary-black); }
p  { font-size: 0.875rem; color: var(--text-light); line-height: 1.6; margin: 0; }

@supports (font-size: clamp(1rem, 2vw, 2rem)) {
  h2 { font-size: clamp(1.75rem, 4.5vw, 2.5rem); }
  h3 { font-size: clamp(1rem, 2.5vw, 1.125rem); }
  p  { font-size: clamp(0.75rem, 2vw, 0.875rem); }
}

.container { max-width: 1380px; margin: 0 auto; padding: 0 var(--spacing-unit); width: 100%; }

/* =========================================
   Header / Nav
   ========================================= */
header {
  padding: var(--spacing-unit) 0;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-white);
  position: -webkit-sticky; /* Safari */
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: var(--spacing-unit);
}

.logo { display: flex; align-items: center; font-weight: 600; }
.logo { font-size: 1.125rem; }
@supports (font-size: clamp(1rem, 2.5vw, 1.125rem)) {
  .logo { font-size: clamp(1rem, 2.5vw, 1.125rem); }
}

.logo-icon {
  width: 40px; height: 40px; margin-right: 0.75rem;
  background: radial-gradient(circle, rgba(220,220,220,1) 0%, rgba(180,180,180,1) 100%);
  border-radius: 8px; transition: var(--transition);
}
.logo:hover .logo-icon { transform: scale(1.05); }

.nav-center {
  background-color: var(--bg-light);
  padding: 0.5rem; border-radius: 50px; display: flex; gap: 1rem;
}
.nav-center a { padding: 0.5rem 1.25rem; font-weight: 500; font-size: 0.875rem; }
@supports (font-size: clamp(0.75rem, 2vw, 0.875rem)) {
  .nav-center a { font-size: clamp(0.75rem, 2vw, 0.875rem); }
}
.nav-center a:hover { background: rgba(89, 25, 193, 0.1); border-radius: 25px; }

.nav-right { display: flex; align-items: center; gap: 1.5rem; }
.nav-right a { font-weight: 500; font-size: 0.875rem; padding: 0.5rem 1rem; transition: var(--transition); }
@supports (font-size: clamp(0.75rem, 2vw, 0.875rem)) {
  .nav-right a { font-size: clamp(0.75rem, 2vw, 0.875rem); }
}
.nav-right a:last-child { background: var(--primary-purple); color: var(--bg-white); border-radius: 25px; }
.nav-right a:last-child:hover { background: rgb(100, 35, 210); transform: translateY(-1px); }
.nav-right a:first-child:hover { background: rgba(89, 25, 193, 0.1); border-radius: 25px; }

/* =========================================
   Modal (generic)
   ========================================= */
.modal {
  display: none; position: fixed; z-index: 3000; inset: 0; /* above chat */
  background: rgba(0,0,0,0.5);
}
.modal .modal-content {
  background-color: var(--bg-white);
  margin: 15% auto; padding: 2rem; border-radius: 10px;
  width: 90%; max-width: 400px; position: relative;
  -webkit-backdrop-filter: saturate(1);
  backdrop-filter: saturate(1);
}
.modal .close {
  color: #aaa; font-size: 28px; font-weight: bold; cursor: pointer;
  position: absolute; top: 10px; right: 15px; line-height: 1;
}
.modal .close:hover { color: var(--primary-black); }
.modal h2 { margin-bottom: 1.5rem; text-align: center; }
.modal form { display: flex; flex-direction: column; gap: 1rem; }
.modal input {
  padding: 0.75rem; border: 1px solid var(--border-color); border-radius: 5px;
  font-family: inherit; -webkit-appearance: none; appearance: none;
}
.modal button {
  padding: 0.75rem; background: var(--primary-purple); color: #fff; border: none;
  border-radius: 5px; font-weight: 600; cursor: pointer; transition: var(--transition);
}
.modal button:hover { background: rgb(100, 35, 210); }

/* =========================================
   User menu
   ========================================= */
.user-menu { position: relative; display: none; }
.user-info {
  display: flex; align-items: center; gap: 0.5rem; cursor: pointer;
  padding: 0.5rem; border-radius: 25px; transition: var(--transition);
}
.user-info:hover { background: rgba(89,25,193,0.1); }
.user-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--primary-purple); color: #fff; display: grid; place-items: center; font-weight: 600;
}
.dropdown {
  position: absolute; top: 100%; right: 0; background: #fff;
  border: 1px solid var(--border-color); border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1); display: none; min-width: 150px; z-index: 2000;
}
.dropdown a { display: block; padding: 0.75rem 1rem; border-bottom: 1px solid var(--border-color); }
.dropdown a:last-child { border-bottom: none; }
.dropdown a:hover { background: var(--bg-light); }

/* =========================================
   Hero (unused on dashboard but kept)
   ========================================= */
.hero { padding: calc(var(--spacing-unit) * 3) 0; text-align: center; }
.hero h1 { font-size: 3rem; font-weight: 700; margin: 0; line-height: 1.1; }
.hero .subtitle { font-size: 1.5rem; font-weight: 400; margin: 0.75rem 0 0; color: var(--primary-purple); }

@supports (font-size: clamp(2.5rem, 6vw, 4rem)) {
  .hero h1 { font-size: clamp(2.5rem, 6vw, 4rem); }
}
@supports (font-size: clamp(1.25rem, 3.5vw, 2rem)) {
  .hero .subtitle { font-size: clamp(1.25rem, 3.5vw, 2rem); }
}

.hero-bottom-container {
  margin-top: calc(var(--spacing-unit) * 2);
  position: relative; height: 350px; border-radius: 30px; overflow: hidden;
}

.cta-button {
  display: inline-flex; align-items: center; gap: 0.75rem;
  background: var(--primary-purple); color: #fff; padding: 0.875rem 1.75rem; border-radius: 50px;
  font-weight: 500; font-size: 1rem; border: none; cursor: pointer;
  position: absolute; top: 2.5rem; left: 50%; transform: translateX(-50%); z-index: 3; transition: var(--transition);
}
@supports (font-size: clamp(0.875rem, 2vw, 1rem)) {
  .cta-button { font-size: clamp(0.875rem, 2vw, 1rem); }
}
.cta-button:hover { background: rgb(100, 35, 210); transform: translateX(-50%) translateY(-2px); }
.cta-button-icon { width: 1.5rem; height: 1.5rem; background: rgba(255,255,255,0.3); border-radius: 50%; display: grid; place-items: center; }

.background-blob-container { position: absolute; inset: 0; border-radius: 30px; overflow: hidden; background: #f0f0f0; }
.blob { position: absolute; border-radius: 50%; mix-blend-mode: screen; filter: blur(70px); opacity: 0.6; }
.blob1 { width: 400px; height: 400px; background: #ffafbd; top: -50px; left: -100px; animation: move 20s infinite alternate; }
.blob2 { width: 350px; height: 350px; background: #c9ffbf; bottom: -50px; right: -50px; animation: move 25s infinite alternate-reverse; }
.blob3 { width: 300px; height: 300px; background: #bde0fe; top: 150px; right: 150px; animation: move 15s infinite alternate; }

@keyframes move { from { transform: translate(0,0) scale(1); } to { transform: translate(100px,50px) scale(1.2); } }

/* =========================================
   Features / About / Innovations / Contact
   (kept from site)
   ========================================= */
.features-title-section { padding: calc(var(--spacing-unit) * 3) 0 calc(var(--spacing-unit) * 1.5); text-align: center; }
.features-sticky-container { height: 300vh; position: relative; z-index: 1; }
.features-sticky-content { position: -webkit-sticky; position: sticky; top: 0; height: 100vh; min-height: 100svh; display: flex; align-items: center; justify-content: center; overflow: hidden; z-index: 1; }
.mesh-gradient-bg { position: absolute; inset: 0; width: 100vw; height: 100vh; min-height: 100svh; background: radial-gradient(ellipse at 20% 80%, hsla(293,69%,90%,0.5) 0px, transparent 50%), radial-gradient(ellipse at 80% 20%, hsla(259,71%,85%,0.5) 0px, transparent 50%); z-index: -1; }
.features-animation-container { position: relative; width: 100vw; height: 100vh; min-height: 100svh; perspective: 1200px; overflow: hidden; z-index: 2; padding: 2rem; }
.content-after-sticky { position: relative; z-index: 10; background: var(--bg-white); margin-top: -10px; padding-top: 30px; }
.means-section { background: var(--bg-light); padding: calc(var(--spacing-unit) * 4) 0; position: relative; z-index: 11; }
.means-section h2 { text-align: center; margin-bottom: calc(var(--spacing-unit) * 3); }
.means-container { display: flex; justify-content: space-between; align-items: flex-start; max-width: 1200px; margin: 0 auto; padding: 0 var(--spacing-unit); gap: 4rem; }
.means-content { flex: 1; max-width: 600px; }
.means-item { display: flex; align-items: center; margin-bottom: 3rem; font-size: 1.25rem; font-weight: 500; opacity: 0; transform: translateX(-30px); transition: all 0.6s ease; }
@supports (font-size: clamp(1rem, 2.5vw, 1.5rem)) { .means-item { font-size: clamp(1rem, 2.5vw, 1.5rem); } }
.means-item.visible { opacity: 1; transform: translateX(0); }
.means-dot { width: 16px; height: 16px; background: var(--primary-purple); border-radius: 50%; margin-right: 1.5rem; flex-shrink: 0; transform: scale(0); transition: transform 0.4s ease 0.2s; }
.means-item.visible .means-dot { transform: scale(1); }
.means-sidebar { position: -webkit-sticky; position: sticky; top: 150px; flex: 0 0 200px; display: flex; flex-direction: column; gap: 2rem; }
.sidebar-dot { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--border-color); background: var(--bg-white); position: relative; transition: all 0.4s ease; cursor: pointer; display: grid; place-items: center; }
.sidebar-dot.active { background: var(--primary-purple); border-color: var(--primary-purple); transform: scale(1.2); }
.sidebar-dot::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--bg-white); opacity: 0; transition: opacity 0.3s ease; }
.sidebar-dot.active::after { opacity: 1; }
.sidebar-dot:not(:last-child)::before { content: ''; position: absolute; top: 100%; left: 50%; width: 2px; height: 2rem; background: var(--border-color); transform: translateX(-50%); }

.about-section { background: linear-gradient(135deg, #bca0fd 0%, #f29eff 50%, #fe964b 100%); padding: calc(var(--spacing-unit) * 6) 0; color: #fff; position: relative; overflow: hidden; z-index: 12; }
.about-section::before { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(182, 154, 246, 0.9) 0%, rgba(241, 153, 255, 0.8) 50%, rgba(249, 141, 63, 0.9) 100%); z-index: 1; }
.about-container { position: relative; z-index: 2; display: grid; grid-template-columns: 1fr 2fr; gap: calc(var(--spacing-unit) * 4); align-items: center; max-width: 1200px; margin: 0 auto; padding: 0 var(--spacing-unit); }
.about-logo { display: flex; flex-direction: column; align-items: center; text-align: center; }
.kirusa-logo { font-size: 4rem; font-weight: 700; color: #2D1B69; margin-bottom: .5rem; text-shadow: 2px 2px 4px rgba(0,0,0,.3); }
.logo-accent { width: 60px; height: 8px; background: #FF6B35; border-radius: 4px; margin-top: .5rem; }
.about-content { padding-left: 2rem; }
.about-content h2 { font-size: 3rem; font-weight: 700; margin-bottom: 2rem; color: #fff; text-align: left; line-height: 1.2; }
@supports (font-size: clamp(2rem, 4vw, 3.5rem)) { .about-content h2 { font-size: clamp(2rem, 4vw, 3.5rem); } }
.about-text { font-size: 1.125rem; line-height: 1.6; margin-bottom: 2.5rem; color: rgba(255,255,255,.9); }
@supports (font-size: clamp(1rem, 2.5vw, 1.25rem)) { .about-text { font-size: clamp(1rem, 2.5vw, 1.25rem); } }
.learn-more-btn { display: inline-flex; align-items: center; gap: .75rem; background: rgba(255,255,255,.2); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); color: #fff; padding: 1rem 2rem; border-radius: 50px; font-weight: 600; font-size: 1.1rem; border: 2px solid rgba(255,255,255,.3); cursor: pointer; transition: all .3s ease; }
.learn-more-btn:hover { background: rgba(255,255,255,.3); transform: translateY(-2px); box-shadow: 0 10px 25px rgba(0,0,0,.2); }
.learn-more-icon { width: 24px; height: 24px; border-radius: 50%; background: rgba(255,255,255,.3); display: grid; place-items: center; font-size: 14px; }

.innovations-section { padding: calc(var(--spacing-unit) * 3) 0; background: #141E30; color: #fff; position: relative; z-index: 13; overflow: hidden; }
.innovations-section .container { position: relative; z-index: 15; }
.innovations-section::before { content: ''; position: absolute; top: 50%; left: 50%; width: 120%; height: 120%; background: linear-gradient(160deg, #302b63, #24243e); border-radius: 50%; transform: translate(-50%,-50%) scale(1.2); animation: wave-innovations 20s infinite alternate; z-index: 14; clip-path: inset(0); }
@keyframes wave-innovations { from { transform: translate(-50%,-50%) translateX(-10%) rotate(0) scale(1.2); } to { transform: translate(-50%,-50%) translateX(10%) rotate(180deg) scale(1.3); } }
.innovations-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: calc(var(--spacing-unit) * 2); align-items: center; }
.innovation-cards-container { display: flex; flex-direction: column; gap: calc(var(--spacing-unit) * 1.25); }
.innovation-card { padding: 1.5rem; background: rgba(255,255,255,.95); border-radius: 16px; display: flex; gap: 1.25rem; align-items: center; color: var(--primary-black); box-shadow: 0 10px 25px rgba(0,0,0,.1); transition: var(--transition); }
.innovation-card:hover { transform: translateY(-5px); }
.innovation-card .logo-img { width: 140px; height: auto; object-fit: contain; flex-shrink: 0; }

.contact-section { padding: calc(var(--spacing-unit) * 3) 0; z-index: 20; position: relative; }
.contact-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: calc(var(--spacing-unit) * 2); align-items: start; }
.contact-info-links a { font-size: 1.1rem; margin-bottom: 1rem; font-weight: 500; display: block; }
@supports (font-size: clamp(0.875rem, 2.5vw, 1.25rem)) { .contact-info-links a { font-size: clamp(0.875rem, 2.5vw, 1.25rem); } }
form label { display: block; margin-bottom: .5rem; font-weight: 500; color: var(--text-light); font-size: .875rem; }
@supports (font-size: clamp(0.75rem, 2vw, 0.875rem)) { form label { font-size: clamp(0.75rem, 2vw, 0.875rem); } }
form input, form button { width: 100%; padding: .875rem; margin-bottom: 1.25rem; border-radius: 8px; border: 1px solid var(--border-color); font-size: .875rem; transition: var(--transition); -webkit-appearance: none; appearance: none; }
@supports (font-size: clamp(0.75rem, 2vw, 0.875rem)) { form input, form button { font-size: clamp(0.75rem, 2vw, 0.875rem); } }
form input:focus { outline: none; border-color: var(--primary-purple); box-shadow: 0 0 5px rgba(89,25,193,.3); }
form button { background: var(--primary-purple); color: #fff; border: none; cursor: pointer; font-weight: 600; }
form button:hover { background: rgb(100, 35, 210); transform: translateY(-2px); }

/* =========================================
   Footer
   ========================================= */
footer { background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f0f23 100%); padding: calc(var(--spacing-unit) * 3) 0; color: #fff; position: relative; z-index: 21; }
.footer-container { max-width: 1280px; margin: 0 auto; padding: 0 var(--spacing-unit); display: grid; grid-template-columns: 2fr 1.5fr 1.5fr 1fr; gap: calc(var(--spacing-unit) * 2); align-items: start; }
.footer-column h4 { font-size: 1rem; font-weight: 600; margin-bottom: 1rem; color: #fff; line-height: 1.4; }
.footer-column p, .footer-column a { font-size: .875rem; line-height: 1.6; color: rgba(255,255,255,.8); margin-bottom: .5rem; }
.footer-column a:hover { color: #fff; }
.address-line { font-weight: 600; color: #fff; margin-bottom: .75rem; line-height: 1.4; }
.locations-line { color: rgba(255,255,255,.7); font-size: .875rem; line-height: 1.4; }
.social-icons { display: flex; gap: .5rem; margin-top: .5rem; }
.social-icon { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; font-size: 1.2rem; color: #fff; transition: transform .2s ease, filter .2s ease; text-decoration: none; -webkit-user-select: none; user-select: none; }
.social-icon:hover { transform: scale(1.08); filter: brightness(1.1); }
.social-icon[href*="facebook.com"]  { background-color: #1877f2; }
.social-icon[href*="instagram.com"] { background: radial-gradient(35% 35% at 30% 30%, #feda77 0%, #f58529 25%, #dd2a7b 55%, #8134af 75%, #515bd4 100%); }
.social-icon[href*="x.com"], .social-icon[href*="twitter.com"] { background-color: #000; }
.social-icon[href*="linkedin.com"]  { background-color: #0077b5; }
.social-icon[href*="youtube.com"]   { background-color: #ff0000; }

/* =========================================
   Accessibility / motion
   ========================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* =========================================
   Scroll animations
   ========================================= */
.animate-on-scroll { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
.animate-on-scroll.is-visible { opacity: 1; transform: translateY(0); }

/* =========================================
   Responsive (site-wide)
   ========================================= */
@media (max-width: 1200px) {
  .animated-card { width: clamp(260px, 22vw, 320px); }
  .animated-card:nth-child(1) { left: calc(16.66% - 160px); }
  .animated-card:nth-child(2) { left: calc(50% - 160px); }
  .animated-card:nth-child(3) { left: calc(83.33% - 160px); }
  .animated-card:nth-child(4) { left: calc(16.66% - 160px); }
  .animated-card:nth-child(5) { left: calc(50% - 160px); }
  .animated-card:nth-child(6) { left: calc(83.33% - 160px); }
}

@media (max-width: 992px) {
  .features-animation-container { height: 80vh; min-height: 80svh; padding: 1.5rem; }
  .animated-card { width: clamp(240px, 28vw, 280px); min-height: 180px; }
  .footer-container { grid-template-columns: 1fr 1fr; gap: calc(var(--spacing-unit) * 1.5); }
}

@media (max-width: 768px) {
  .hero h1 { font-size: 3rem; }
  @supports (font-size: clamp(2rem, 5vw, 3rem)) { .hero h1 { font-size: clamp(2rem, 5vw, 3rem); } }
  .hero .subtitle { font-size: 1.5rem; }
  @supports (font-size: clamp(1rem, 3vw, 1.5rem)) { .hero .subtitle { font-size: clamp(1rem, 3vw, 1.5rem); } }

  .navbar { flex-direction: column; gap: 1rem; }
  .nav-center, .nav-right { width: 100%; justify-content: center; flex-wrap: wrap; }

  .contact-grid, .innovations-grid { grid-template-columns: 1fr; gap: calc(var(--spacing-unit) * 1.5); }
  .features-sticky-container { height: 200vh; }
  .features-animation-container { height: auto; min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2rem 1rem; gap: 1.5rem; }
  .animated-card { position: relative !important; width: 90%; max-width: 400px; min-height: 180px; left: auto !important; top: auto !important; transform: none !important; opacity: 1 !important; margin-bottom: 0; }
  .blob1, .blob2, .blob3 { width: 250px; height: 250px; }
  .hero-bottom-container { height: 300px; }
  .cta-button { top: 1.5rem; left: 50%; transform: translateX(-50%); padding: 0.75rem 1.5rem; }

  .means-container { flex-direction: column; gap: 2rem; }
  .means-sidebar { position: relative; top: auto; flex-direction: row; justify-content: center; order: -1; }
  .sidebar-dot:not(:last-child)::before { top: 50%; left: 100%; width: 2rem; height: 2px; transform: translateY(-50%); }

  .about-container { grid-template-columns: 1fr; gap: calc(var(--spacing-unit) * 2); text-align: center; }
  .about-content { padding-left: 0; }
  .about-content h2 { text-align: center; }
  .kirusa-logo { font-size: 3rem; }

  .footer-container { grid-template-columns: 1fr; gap: calc(var(--spacing-unit) * 1.5); text-align: center; }
  .social-icons { justify-content: center; }
}

@media (max-width: 480px) {
  .hero-bottom-container { height: 250px; }
  .blob1, .blob2, .blob3 { width: 200px; height: 200px; }
  .innovation-card { flex-direction: column; text-align: center; }
  .innovation-card .logo-img { width: 120px; }
  .animated-card { padding: 1.25rem; width: 95%; min-height: 160px; }
  .kirusa-logo { font-size: 2.5rem; }
  .features-animation-container { padding: 1.5rem 0.75rem; }
}

@media (max-width: 360px) {
  .animated-card { padding: 1rem; min-height: 150px; }
  .animated-card h3 { font-size: 0.95rem; }
  .animated-card p  { font-size: 0.8rem; line-height: 1.4; }
}

/* =========================================
   Misc you already had
   ========================================= */
.logo img { height: 100px; vertical-align: middle; }

/* Password form fix (was "display: 1 block") */
.password-form { display: none; margin-top: 1rem; }
.password-form.active { display: block; }

/* reCAPTCHA overlay */
#captcha-gate { position: fixed; inset: 0; z-index: 99999; display: block; }
#captcha-gate .rcgate-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.42); backdrop-filter: blur(2px); }
#captcha-gate .rcgate-box { position: relative; z-index: 2; width: min(520px, 94vw); margin: 10vh auto 0; background: #fff; border-radius: 16px; padding: 24px 20px; box-shadow: 0 20px 60px rgba(0,0,0,.25); text-align: center; }
#captcha-gate .rcgate-box h3 { margin: 0 0 8px; font-weight: 700; }
#captcha-gate .rcgate-box p { margin: 4px 0 14px; color: #475467; }
#captcha-gate .rcgate-disclosure { font-size: 12px; color: #667085; margin-top: 10px; }
#captcha-gate .rcgate-disclosure a { color: inherit; text-decoration: underline; }

/* =========================================
   DASHBOARD styles (central)
   ========================================= */
.dashboard-container { max-width:1200px; margin:0 auto; padding:2rem; background-color:var(--bg-white); }
.dashboard-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:2rem; padding-bottom:1rem; border-bottom:1px solid var(--border-color); }
.welcome-section { background:linear-gradient(135deg,var(--primary-purple) 0%,#6B46C1 100%); color:#fff; padding:2rem; border-radius:12px; margin-bottom:2rem; }
.dashboard-grid { display:grid; grid-template-columns:1fr 1fr; gap:2rem; margin-bottom:2rem; }
.dashboard-card { background:var(--bg-white); border:1px solid var(--border-color); border-radius:12px; padding:1.5rem; box-shadow:0 2px 4px rgba(0,0,0,.1); }
.card-header { display:flex; align-items:center; margin-bottom:1rem; }
.card-icon { width:24px; height:24px; margin-right:.5rem; color:var(--primary-purple); }

.form-group { margin-bottom:1rem; }
.form-group label { display:block; margin-bottom:.5rem; font-weight:500; color:var(--primary-black); }
.form-group input, .form-group textarea { width:100%; padding:.75rem; border:1px solid var(--border-color); border-radius:6px; font-family:'Inter',sans-serif; }
.form-group input:focus, .form-group textarea:focus { outline:none; border-color:var(--primary-purple); box-shadow:0 0 0 2px rgba(89,25,193,.1); }
.form-group textarea { resize:vertical; }

.btn-primary { background:var(--primary-purple); color:#fff; border:none; padding:.65rem 1.1rem; border-radius:8px; font-weight:600; cursor:pointer; transition:var(--transition); font-size:.92rem; }
.btn-primary:hover { background:rgb(100,35,210); transform:translateY(-1px); }
.btn-secondary { background:var(--bg-light); color:var(--primary-black); border:1px solid var(--border-color); padding:.55rem .95rem; border-radius:8px; font-weight:600; cursor:pointer; transition:var(--transition); font-size:.9rem; }
.btn-secondary:hover { background:#eee; }

.conversation-item { padding:1rem; border:1px solid var(--border-color); border-radius:8px; margin-bottom:.5rem; background:var(--bg-light); cursor:pointer; transition:background .2s; }
.conversation-item:hover { background:#f5f5f5; }
.empty-state { text-align:center; padding:2rem; color:var(--text-light); }

.stats-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:1rem; margin-bottom:2rem; }
.stat-card { background:var(--card-bg); padding:1.5rem; border-radius:12px; text-align:center; }
.stat-number { font-size:2rem; font-weight:700; color:var(--primary-purple); margin-bottom:.5rem; }
.stat-label { color:var(--text-light); font-size:.875rem; }

/* Toast message */
.message { position:fixed; top:20px; right:20px; padding:1rem 2rem; border-radius:10px; color:#fff; font-weight:600; z-index:4000; box-shadow:0 10px 25px rgba(0,0,0,.2); }
.message.success{ background:#4CAF50; }
.message.error{ background:#f44336; }
.message.info{ background:#2196F3; }

/* Modal overlay used by "New Conversation" */
.modal-overlay { position:fixed; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,.6); display:flex; justify-content:center; align-items:center; z-index:3500; }
.modal-overlay .modal-content { background:#fff; padding:2rem; border-radius:12px; width:90%; max-width:500px; box-shadow:0 5px 15px rgba(0,0,0,.3); }
.modal-overlay .modal-header { display:flex; justify-content:space-between; align-items:center; border-bottom:1px solid var(--border-color); padding-bottom:1rem; margin-bottom:1rem; }
.modal-overlay .modal-close { background:none; border:none; font-size:1.5rem; cursor:pointer; }
.modal-overlay .modal-footer { text-align:right; margin-top:1.5rem; }

/* =========================================
   CHAT popup (clean, professional)
   ========================================= */
/* Container */
.chat-container{
  position:fixed; bottom:20px; right:20px;
  width:420px; max-width:95vw; height:560px;
  background:var(--chat-bg);
  border:1px solid var(--chat-border);
  border-radius:16px;
  box-shadow:0 10px 30px rgba(0,0,0,.12);
  display:flex; flex-direction:column; z-index:1000;
  overflow:hidden;
}

/* Header */
.chat-header{
  height:56px;
  padding:0 .75rem;
  border-bottom:1px solid var(--chat-border);
  background:var(--chat-header-bg);
  color:var(--chat-text);
  display:flex; align-items:center; justify-content:space-between; gap:.5rem;
}
.chat-header h3{
  margin:0; font-size:1rem; font-weight:600;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.chat-header .header-actions{ display:flex; gap:.4rem; align-items:center; }
.chat-header .icon-btn{
  background:#fff; border:1px solid var(--chat-border); padding:.25rem; border-radius:8px; cursor:pointer;
  width:28px; height:28px; display:inline-grid; place-items:center;
}
.chat-header .icon-btn:hover{ background:#f9fafb; }
.chat-header .icon-btn i { font-size:14px; line-height:1; }

/* Compact danger (End) */
.btn-danger{
  background:#ef4444; color:#fff; border:none; border-radius:8px;
  font-weight:700; cursor:pointer; transition:var(--transition);
}
.btn-danger:hover{ background:#dc2626; }
.btn-compact{ padding:.35rem .6rem; font-size:.85rem; line-height:1; display:inline-flex; align-items:center; gap:.4rem; }

/* Messages area */
.chat-messages{
  flex:1; padding:.85rem 1rem; overflow-y:auto; background:#fff;
  display:flex; flex-direction:column; gap:.5rem;
}

/* Bubbles */
.chat-message{
  padding:.625rem .75rem; border-radius:12px; max-width:78%;
  word-wrap:break-word; position:relative; color:var(--chat-text);
  border:1px solid var(--chat-border); font-size:.95rem;
}
.chat-message p { margin: 0; }
.chat-message.user{
  margin-left:auto; text-align:left; background:var(--chat-user-bg);
  border-color:#d6e7ff;
}
.chat-message.team,
.chat-message.agent,
.chat-message.system,
.chat-message.server,
.chat-message.bot{
  margin-right:auto; background:var(--chat-agent-bg);
  border-color:#e5e7eb;
}
.chat-message small{
  display:block; margin-top:.25rem; font-size:.75rem; color:var(--chat-muted);
}

/* Inline previews */
.chat-preview { margin-top:.5rem; }
.chat-preview img,
.chat-preview video,
.chat-preview iframe,
.chat-preview audio { border-radius:8px; }

/* Input row */
.chat-input{
  display:flex; align-items:center; gap:.5rem;
  padding:.55rem .6rem; border-top:1px solid var(--chat-border);
  background:#fff;
}
.chat-input .icon-btn{
  flex:0 0 auto; display:inline-grid; place-items:center;
  width:34px; height:34px; border-radius:10px;
  border:1px solid var(--chat-border); background:#fff; cursor:pointer;
}
.chat-input .icon-btn:hover{ background:#f9fafb; }
.chat-input .input-wrap{
  position:relative; flex:1 1 auto; display:flex; align-items:center;
  border:1px solid var(--chat-border); border-radius:12px; background:#fff;
  padding:.25rem .5rem;
}
.chat-input .input-wrap:focus-within{
  border-color:var(--chat-accent);
  box-shadow:0 0 0 3px rgba(10,132,255,.12);
}
.chat-input textarea{
  width:100%; border:0; outline:0; resize:none;
  max-height:120px; min-height:36px; line-height:1.35; font-size:.95rem;
  padding:.2rem;
}
.chat-input .send-btn{
  flex:0 0 auto; width:40px; height:40px; border-radius:12px; border:0;
  display:inline-grid; place-items:center; cursor:pointer;
  background:#0f172a; color:#fff;
}
.chat-input .send-btn:hover{ filter:brightness(1.05); }
.chat-input .send-btn:active{ transform:translateY(1px); }

/* Attachments preview row */
.chat-attachments{ display:flex; gap:.4rem; padding:.35rem .75rem .6rem; flex-wrap:wrap; }
.chat-pill{
  display:flex; align-items:center; gap:.4rem; font-size:.8rem;
  background:#f3f4f6; border:1px solid var(--chat-border); color:var(--chat-text);
  padding:.25rem .55rem; border-radius:999px;
}
.chat-pill .remove{ cursor:pointer; }

/* Minimize state */
.chat-container.minimized { height:56px; }
.chat-container.minimized .chat-messages,
.chat-container.minimized .chat-input,
.chat-container.minimized .chat-attachments { display:none !important; }

/* Hidden file input for attachments */
#chat-attach-input { display:none; }

/* Responsive chat container */
@media (max-width:768px){
  .chat-container{ width:95%; height:75vh; right:10px; bottom:10px; }
}
