:root {
  --bg-dark: #050b0e;
  --bg-card: #0e171b;
  --bg-input: #152228;
  --border-color: #1e313a;
  
  --emerald-primary: #10b981;
  --emerald-hover: #059669;
  --emerald-glow: rgba(16, 185, 129, 0.25);
  
  --teal-primary: #14b8a6;
  --gold-primary: #f59e0b;
  
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-dim: #6b7280;
  
  --danger-bg: #3f0909;
  --danger-border: #991b1b;
  --danger-text: #fca5a5;
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-dark);
  background-image: radial-gradient(circle at 80% 0%, rgba(16, 185, 129, 0.08), transparent 45%),
                    radial-gradient(circle at 10% 90%, rgba(20, 184, 166, 0.06), transparent 45%);
  background-attachment: fixed;
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header Navbar */
.app-header {
  background: rgba(14, 23, 27, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  max-width: 1350px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
}

.app-logo-img {
  height: 44px;
  width: auto;
  border-radius: var(--radius-sm);
  background: #ffffff;
  padding: 2px;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
  transition: var(--transition);
}

.app-logo-img:hover {
  transform: scale(1.03);
  box-shadow: 0 0 16px var(--emerald-glow);
}

.brand-text h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.5px;
}

.brand-text h1 span {
  color: var(--emerald-primary);
}

.brand-tag {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-nav.hidden {
  display: none !important;
}

.nav-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.nav-btn:hover {
  color: #fff;
  background: var(--bg-input);
}

.nav-btn.active {
  color: #fff;
  background: var(--bg-input);
  border-color: var(--emerald-primary);
  box-shadow: 0 0 12px var(--emerald-glow);
}

.status-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-muted);
  background: var(--bg-input);
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
}

.dot.online {
  width: 8px;
  height: 8px;
  background-color: var(--emerald-primary);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--emerald-primary);
}

/* Auth Header Controls */
.auth-header-container {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-auth-nav {
  background: var(--emerald-primary);
  color: #000;
  font-weight: 700;
  border: none;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 13px;
  cursor: pointer;
  box-shadow: 0 0 15px var(--emerald-glow);
  transition: var(--transition);
}

.btn-auth-nav:hover {
  background: var(--emerald-hover);
  transform: translateY(-1px);
  box-shadow: 0 0 22px rgba(16, 185, 129, 0.4);
}

.user-profile-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-input);
  border: 1px solid var(--emerald-primary);
  padding: 6px 14px;
  border-radius: var(--radius-md);
}

.user-profile-badge.hidden {
  display: none !important;
}

.u-avatar {
  font-size: 16px;
}

.u-info {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.u-name {
  font-size: 12px;
  font-weight: 600;
  color: #fff;
}

.u-role {
  font-size: 10px;
  color: var(--emerald-primary);
}

.btn-logout-icon {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  cursor: pointer;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 6px;
  font-weight: 600;
  transition: var(--transition);
}

.btn-logout-icon:hover {
  background: rgba(239, 68, 68, 0.3);
}

/* ==========================================================================
   PUBLIC LANDING PAGE REDESIGN
   ========================================================================== */
.public-landing {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.public-landing.hidden {
  display: none !important;
}

/* Hero Section */
.hero-section {
  position: relative;
  padding: 90px 24px 70px 24px;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
  overflow: hidden;
}

.hero-bg-glow {
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 500px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.14) 0%, rgba(20, 184, 166, 0.05) 50%, transparent 70%);
  pointer-events: none;
}

.hero-container {
  max-width: 960px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--emerald-primary);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 24px;
}

.hero-badge-pulse {
  width: 8px;
  height: 8px;
  background: var(--emerald-primary);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--emerald-primary);
}

.hero-title {
  font-family: 'Outfit', sans-serif;
  font-size: 48px;
  font-weight: 800;
  line-height: 1.15;
  color: #ffffff;
  margin-bottom: 20px;
  letter-spacing: -1px;
}

.gradient-text {
  background: linear-gradient(90deg, #10b981 0%, #34d399 50%, #f59e0b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 780px;
  margin-bottom: 36px;
  line-height: 1.6;
}

.hero-cta-group {
  display: flex;
  gap: 16px;
  margin-bottom: 54px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn-hero-primary {
  background: var(--emerald-primary);
  color: #000;
  font-weight: 800;
  font-size: 15px;
  padding: 14px 30px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  box-shadow: 0 0 22px var(--emerald-glow);
  transition: var(--transition);
}

.btn-hero-primary:hover {
  background: var(--emerald-hover);
  transform: translateY(-2px);
  box-shadow: 0 0 32px rgba(16, 185, 129, 0.45);
}

.btn-hero-secondary {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 15px;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: var(--transition);
}

.btn-hero-secondary:hover {
  border-color: var(--emerald-primary);
  background: var(--bg-input);
}

.hero-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  width: 100%;
  max-width: 900px;
  border-top: 1px solid var(--border-color);
  padding-top: 36px;
}

.stat-card {
  background: rgba(14, 23, 27, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.stat-icon {
  font-size: 20px;
  margin-bottom: 2px;
}

.stat-num {
  font-family: 'Outfit', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--emerald-primary);
}

.stat-label {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
}

/* Landing Sections */
.landing-section {
  padding: 80px 24px;
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
}

.landing-section.dark-bg {
  background: rgba(14, 23, 27, 0.5);
  max-width: 100%;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

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

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

.section-header h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 32px;
  color: #fff;
  margin-bottom: 10px;
}

.section-header p {
  font-size: 15px;
  color: var(--text-muted);
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 24px;
}

.feature-card {
  background: rgba(14, 23, 27, 0.7);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 30px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: var(--transition);
}

.feature-card:hover {
  border-color: var(--emerald-primary);
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(16, 185, 129, 0.15);
}

.feature-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.feature-icon-wrapper.emerald {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--emerald-primary);
}

.feature-icon-wrapper.teal {
  background: rgba(20, 184, 166, 0.12);
  border: 1px solid rgba(20, 184, 166, 0.3);
  color: var(--teal-primary);
}

.feature-icon-wrapper.gold {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: var(--gold-primary);
}

.feature-icon-wrapper.red {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

.feature-card h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  color: #fff;
  margin-bottom: 10px;
}

.feature-card p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 18px;
}

.feature-tag {
  margin-top: auto;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--emerald-primary);
  background: rgba(16, 185, 129, 0.1);
  padding: 4px 10px;
  border-radius: 6px;
  width: fit-content;
}

.feature-tag.red {
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.15);
}

/* Workflow Section */
.workflow-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.workflow-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 30px;
  position: relative;
  overflow: hidden;
}

.workflow-num {
  font-family: 'Outfit', sans-serif;
  font-size: 32px;
  font-weight: 800;
  color: var(--emerald-primary);
  margin-bottom: 12px;
}

.workflow-card h3 {
  font-size: 17px;
  color: #fff;
  margin-bottom: 8px;
}

.workflow-card p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Audiences Section */
.audience-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-bottom: 60px;
}

.audience-card {
  background: rgba(14, 23, 27, 0.7);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px;
  text-align: center;
}

.audience-icon {
  font-size: 38px;
  margin-bottom: 12px;
}

.audience-card h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  color: #fff;
  margin-bottom: 8px;
}

.audience-card p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

.landing-cta-box {
  background: linear-gradient(135deg, #063a2c 0%, #081d24 100%);
  border: 1px solid var(--emerald-primary);
  border-radius: var(--radius-lg);
  padding: 46px 24px;
  text-align: center;
  max-width: 960px;
  margin: 0 auto;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.6);
}

.landing-cta-box h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 26px;
  color: #fff;
  margin-bottom: 10px;
}

.landing-cta-box p {
  font-size: 14px;
  color: #a7f3d0;
  margin-bottom: 26px;
}

/* ==========================================================================
   PRIVATE DASHBOARD WORKSPACE STYLES
   ========================================================================== */
.private-dashboard {
  display: flex;
  flex-direction: column;
  flex: 1;
  width: 100%;
}

.private-dashboard.hidden {
  display: none !important;
}

/* Emergency Banner (RN-01) */
.emergency-banner {
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  padding: 16px 24px;
  margin: 16px 24px 0 24px;
  border-radius: var(--radius-md);
  animation: pulse-danger 2s infinite alternate;
}

.emergency-banner.hidden {
  display: none;
}

@keyframes pulse-danger {
  0% { box-shadow: 0 0 10px rgba(153, 27, 27, 0.4); }
  100% { box-shadow: 0 0 25px rgba(239, 68, 68, 0.7); }
}

.emergency-content {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.emergency-icon {
  font-size: 32px;
}

.emergency-info h3 {
  color: var(--danger-text);
  font-size: 16px;
  margin-bottom: 4px;
}

.emergency-info p {
  color: #feccae;
  font-size: 14px;
  margin-bottom: 12px;
}

.emergency-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-emergency {
  background: #dc2626;
  color: #fff;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 13px;
  transition: var(--transition);
}

.btn-emergency:hover {
  background: #b91c1c;
}

/* Main Layout */
.app-main {
  flex: 1;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.tab-content {
  display: flex;
  flex: 1;
  width: 100%;
}

.tab-content.hidden {
  display: none !important;
}

/* Chat Layout */
.chat-container {
  display: flex;
  gap: 20px;
  width: 100%;
  height: calc(100vh - 160px);
}

.chat-sidebar {
  width: 300px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar-section h4 {
  font-size: 12px;
  text-transform: uppercase;
  color: var(--text-dim);
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.chip-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.chip {
  font-size: 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 4px 10px;
  border-radius: 12px;
  cursor: pointer;
}

.chip.active {
  background: var(--emerald-primary);
  color: #000;
  font-weight: 600;
  border-color: var(--emerald-primary);
}

.history-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.history-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
  color: var(--text-muted);
  transition: var(--transition);
}

.history-item:hover, .history-item.active {
  background: var(--bg-input);
  color: #fff;
}

.sidebar-footer {
  margin-top: auto;
}

/* Chat Main Area */
.chat-main {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.messages-area {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.message-wrapper {
  display: flex;
  gap: 14px;
  max-width: 85%;
}

.message-wrapper.user {
  margin-left: auto;
  flex-direction: row-reverse;
}

.message-wrapper .avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  overflow: hidden;
}

.avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.message-bubble {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  padding: 16px;
  border-radius: var(--radius-md);
  font-size: 14px;
  color: var(--text-main);
}

.message-wrapper.user .message-bubble {
  background: #064e3b;
  border-color: #047857;
  color: #ecfdf5;
}

.quick-prompts {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.quick-btn {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid var(--emerald-primary);
  color: var(--emerald-primary);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  cursor: pointer;
  transition: var(--transition);
}

.quick-btn:hover {
  background: var(--emerald-primary);
  color: #000;
  font-weight: 600;
}

.media-preview-bar {
  background: var(--bg-input);
  border-top: 1px solid var(--border-color);
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--emerald-primary);
}

.media-preview-bar.hidden {
  display: none;
}

.chat-input-container {
  padding: 16px 24px;
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-form {
  display: flex;
  gap: 10px;
  align-items: center;
}

.btn-icon-input {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  transition: var(--transition);
}

.btn-icon-input:hover {
  border-color: var(--emerald-primary);
}

.hidden-file {
  display: none;
}

.chat-form input[type="text"] {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: #fff;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 14px;
  outline: none;
  transition: var(--transition);
}

.chat-form input[type="text"]:focus {
  border-color: var(--emerald-primary);
  box-shadow: 0 0 10px var(--emerald-glow);
}

.btn-send {
  background: var(--emerald-primary);
  color: #000;
  font-weight: 700;
  border: none;
  padding: 0 20px;
  height: 42px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.btn-send:hover {
  background: var(--emerald-hover);
  box-shadow: 0 0 15px var(--emerald-glow);
}

.input-hint {
  font-size: 11px;
  color: var(--text-dim);
  text-align: center;
}

/* Tool Cards & Forms */
.tool-card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  width: 100%;
}

.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.tool-card.single-center {
  max-width: 700px;
  margin: 0 auto;
}

.tool-header h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  margin-bottom: 6px;
  color: var(--emerald-primary);
}

.tool-header p {
  font-size: 13px;
  color: var(--text-muted);
}

.tool-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.form-group input, .form-group select {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: #fff;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  outline: none;
}

.form-group input:focus, .form-group select:focus {
  border-color: var(--emerald-primary);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.btn-primary {
  background: var(--emerald-primary);
  color: #000;
  font-weight: 700;
  border: none;
  padding: 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary:hover {
  background: var(--emerald-hover);
}

.btn-secondary {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.btn-secondary:hover {
  border-color: var(--emerald-primary);
}

.w-full {
  width: 100%;
}

.result-box {
  background: var(--bg-input);
  border: 1px solid var(--emerald-primary);
  border-radius: var(--radius-md);
  padding: 16px;
  font-size: 14px;
  margin-top: 10px;
}

.result-box.hidden {
  display: none;
}

/* Modal Overlay & Auth Card */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-overlay.hidden {
  display: none !important;
}

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 440px;
  padding: 30px;
  position: relative;
  box-shadow: 0 0 45px rgba(0, 0, 0, 0.9);
}

.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
}

.modal-header {
  text-align: center;
  margin-bottom: 20px;
}

.modal-logo {
  height: 56px;
  margin-bottom: 10px;
  border-radius: 8px;
  background: #fff;
  padding: 2px;
}

.modal-header h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 22px;
  color: var(--emerald-primary);
  margin-bottom: 4px;
}

.modal-header p {
  font-size: 12px;
  color: var(--text-muted);
}

.modal-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 20px;
}

.modal-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 10px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
}

.modal-tab-btn.active {
  color: var(--emerald-primary);
  border-bottom-color: var(--emerald-primary);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-form.hidden {
  display: none !important;
}

.auth-alert {
  margin-top: 14px;
  padding: 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  text-align: center;
}

.auth-alert.success {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid var(--emerald-primary);
  color: #a7f3d0;
}

.auth-alert.error {
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  color: var(--danger-text);
}

.app-footer {
  text-align: center;
  padding: 20px;
  font-size: 12px;
  color: var(--text-dim);
  border-top: 1px solid var(--border-color);
  background: var(--bg-card);
}

/* ==========================================================================
   COMPREHENSIVE RESPONSIVE DESIGN (MOBILE, TABLET & DESKTOP)
   ========================================================================== */

/* Tablets & Small Laptops (max-width: 1024px) */
@media (max-width: 1024px) {
  .hero-title {
    font-size: 38px;
  }
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .hero-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .tool-card-grid {
    grid-template-columns: 1fr;
  }
}

/* Mobile Devices & Small Tablets (max-width: 768px) */
@media (max-width: 768px) {
  /* Header Navbar Mobile */
  .header-container {
    padding: 8px 12px;
    flex-wrap: wrap;
    gap: 8px;
  }

  .brand-logo-img {
    height: 36px;
  }

  .brand-text h1 {
    font-size: 17px;
  }

  .brand-tag {
    font-size: 9px;
  }

  /* Private Nav Tabs Mobile Scroll */
  .header-nav {
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 4px;
    justify-content: flex-start;
    -webkit-overflow-scrolling: touch;
  }

  .header-nav::-webkit-scrollbar {
    display: none;
  }

  .nav-btn {
    padding: 6px 10px;
    font-size: 12px;
  }

  .auth-header-container {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .status-badge {
    padding: 4px 8px;
    font-size: 10px;
    flex-shrink: 0;
  }

  .btn-auth-nav {
    padding: 8px 12px;
    font-size: 12px;
  }

  .user-profile-badge {
    padding: 4px 8px;
  }

  .u-name {
    font-size: 11px;
  }

  .u-role {
    font-size: 9px;
  }

  /* Hero Section Mobile */
  .hero-section {
    padding: 40px 16px 40px 16px;
  }

  .hero-badge {
    font-size: 11px;
    padding: 4px 12px;
    margin-bottom: 16px;
  }

  .hero-title {
    font-size: 28px;
    line-height: 1.2;
    margin-bottom: 14px;
  }

  .hero-description {
    font-size: 14px;
    margin-bottom: 24px;
  }

  .hero-cta-group {
    flex-direction: column;
    width: 100%;
    gap: 12px;
    margin-bottom: 32px;
  }

  .btn-hero-primary, .btn-hero-secondary {
    width: 100%;
    padding: 12px 20px;
    font-size: 14px;
    text-align: center;
  }

  .hero-stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding-top: 20px;
  }

  .stat-card {
    padding: 12px 8px;
  }

  .stat-num {
    font-size: 18px;
  }

  .stat-label {
    font-size: 10px;
  }

  /* Landing Sections Mobile */
  .landing-section {
    padding: 40px 16px;
  }

  .section-header {
    margin-bottom: 30px;
  }

  .section-header h2 {
    font-size: 24px;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .feature-card {
    padding: 20px;
  }

  .workflow-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .workflow-card {
    padding: 20px;
  }

  .audience-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .audience-card {
    padding: 20px;
  }

  .landing-cta-box {
    padding: 28px 16px;
  }

  .landing-cta-box h2 {
    font-size: 20px;
  }

  /* Private Dashboard & Chat Mobile */
  .app-main {
    padding: 10px 8px;
  }

  .chat-container {
    flex-direction: column;
    height: auto;
    gap: 12px;
  }

  .chat-sidebar {
    width: 100%;
    max-height: 180px;
    padding: 12px;
    gap: 10px;
  }

  .sidebar-section h4 {
    margin-bottom: 4px;
  }

  .history-list {
    max-height: 70px;
  }

  .history-item {
    padding: 6px 8px;
    font-size: 12px;
  }

  .chat-main {
    height: calc(100vh - 260px);
    min-height: 420px;
  }

  .messages-area {
    padding: 14px;
    gap: 14px;
  }

  .message-wrapper {
    max-width: 95%;
  }

  .message-bubble {
    padding: 12px;
    font-size: 13px;
  }

  .chat-input-container {
    padding: 10px;
  }

  .btn-icon-input {
    width: 36px;
    height: 36px;
    font-size: 15px;
  }

  .chat-form input[type="text"] {
    padding: 10px 12px;
    font-size: 13px;
  }

  .btn-send {
    height: 36px;
    padding: 0 14px;
    font-size: 12px;
  }

  /* Forms & Modals Mobile */
  .form-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .modal-card {
    max-width: 95vw;
    padding: 20px 16px;
    margin: 10px;
  }

  .modal-header h2 {
    font-size: 18px;
  }

  /* Emergency Banner Mobile */
  .emergency-banner {
    margin: 10px 8px 0 8px;
    padding: 12px;
  }

  .emergency-content {
    flex-direction: column;
    gap: 8px;
  }
}

/* Small Smart Phones (max-width: 480px) */
@media (max-width: 480px) {
  .hero-stats-grid {
    grid-template-columns: 1fr;
  }

  .brand-text h1 {
    font-size: 15px;
  }

  .brand-tag {
    display: none;
  }
}

