:root { --rico-red:#e53935; --rico-orange:#fb8c00; --text:#111315; --muted:#667085; --panel:#ffffff; --bg:#f6f7f9; --accent: linear-gradient(135deg,var(--rico-red),var(--rico-orange)); }
*{ box-sizing:border-box; margin: 0; padding: 0; }
html,body{ height:100%; width: 100%; overflow-x: hidden; }
body{ margin:0; padding: 0; font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; background:#ffffff; color: var(--text); }
#app { width: 100%; height: 100%; margin: 0; padding: 0; }

.container { 
  width: 100%;
  max-width: 100%; 
  margin: 0; 
  padding: 0;
  min-height: 100vh;
  background: #f8f9fa;
  box-sizing: border-box;
}

.frame { 
  background: transparent;
  border: none; 
  border-radius: 0; 
  padding: 0; 
  box-shadow: none;
  width: 100%;
  max-width: 100%;
  margin: 0;
  box-sizing: border-box;
}

.brand {
  display: flex; 
  align-items: center; 
  gap: 16px; 
  margin-bottom: 0;
  padding: 16px 24px;
  background: white;
  border-bottom: 1px solid #e5e7eb;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 100;
}
.brand-logo { 
  width: 48px; 
  height: 48px; 
  border-radius: 8px; 
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-logo-large {
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.brand-logo-large img {
  height: 100%;
  width: auto;
  object-fit: contain;
}
.brand-name { font-weight: 700; letter-spacing: 0.5px; }

.user-badge { 
  display: flex; 
  align-items: center; 
  gap: 12px; 
  padding: 8px 14px; 
  border: 1px solid #e5e7eb; 
  border-radius: 12px; 
  background: #f9fafb;
  transition: all 0.2s;
  cursor: pointer;
}

.user-badge:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
}

.user-badge .avatar { 
  width: 36px; 
  height: 36px; 
  border-radius: 50%; 
  background: linear-gradient(135deg, #e53935, #fb8c00); 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  color: white; 
  font-weight: 700; 
  font-size: 14px;
  box-shadow: 0 2px 8px rgba(251, 140, 0, 0.2);
}

.user-badge .name { 
  font-weight: 600; 
  font-size: 14px; 
  color: #1f2937;
}

.user-badge .email { 
  font-size: 12px; 
  color: #6b7280; 
  margin-top: 2px; 
}

.card { background: var(--panel); border: 1px solid #e7e9ee; border-radius: 16px; padding: 20px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.row-3 { display: grid; grid-template-columns: 300px 1fr 300px; gap: 16px; }

input, button, textarea, select { background: #fff; color: var(--text); border: 1px solid #e7e9ee; border-radius: 12px; padding: 12px 14px; }
input:focus, textarea:focus, select:focus { outline: 2px solid rgba(229,57,53,.2); }

button.primary { 
  background: var(--accent); 
  border: none; 
  color: white; 
  cursor: pointer; 
  font-weight: 600;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(251, 140, 0, 0.2);
}

button.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(251, 140, 0, 0.3);
}

button.ghost { 
  background: transparent; 
  border: 1px solid #e5e7eb;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s;
}

button.ghost:hover {
  background: #f9fafb;
  border-color: #d1d5db;
}
button:disabled { opacity: 0.6; cursor: not-allowed; }

.tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.tab { padding: 10px 12px; border: 1px solid #2c2f38; border-radius: 10px; cursor: pointer; }
.tab.active { border-color: transparent; background: linear-gradient(135deg, #211516, #1b140d); box-shadow: inset 0 0 0 1px #2c2f38; }

.chat { display:grid; grid-template-rows: 1fr auto; height: 100%; gap: 12px; }
.messages{ overflow-y:auto; display:flex; flex-direction:column; gap:12px; padding-right:4px; }
.msg{ padding:12px 14px; border-radius:12px; white-space:pre-wrap; border:1px solid #eceff4; background:#fff; }
.msg.user{ background:#fff7f6; border-color:#ffe3df; }
.msg.assistant{ background:#fff; }

.side { display: flex; flex-direction: column; gap: 10px; }
.conv-item { padding: 10px 12px; border: 1px solid #242832; border-radius: 10px; cursor: pointer; }
.conv-item.active { background: #14161b; }

.rec-item { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; border: 1px solid #e7e9ee; border-radius: 12px; padding: 10px; background:#fff; }
.rec-item img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; background: #0c0d10; }
.muted { color: var(--muted); font-size: 12px; }
.price { font-weight: 700; }

.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td { text-align: left; padding: 12px 12px; border-bottom: 1px solid #eceff4; font-size: 14px; }
.admin-table thead th { position: sticky; top: 0; background: #fff; z-index: 1; }
.status-badge { 
  padding: 6px 14px; 
  border-radius: 999px; 
  font-size: 13px; 
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.status-ok { 
  background: #e9f9ee; 
  color: #18794e; 
  border: 1px solid #c9f0d8; 
}
.status-off { 
  background: #fff4f2; 
  color: #b54708; 
  border: 1px solid #ffe3db; 
}
.btn-row { display:flex; gap:8px; align-items:center; }
.card { 
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.2s;
}

.card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.card h3 { 
  margin-top: 0; 
  margin-bottom: 16px;
  font-size: 18px;
  font-weight: 700;
  color: #1f2937;
}
.two-col { display:grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.admin-layout { 
  display: grid; 
  grid-template-columns: 260px 1fr; 
  gap: 0;
  min-height: 100vh;
  background: #f8f9fa;
}

.sidenav { 
  background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
  border-right: 1px solid #e5e7eb;
  padding: 24px 16px;
  display: flex; 
  flex-direction: column; 
  gap: 24px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidenav .logo { 
  display: flex; 
  align-items: center; 
  justify-content: center;
  flex-direction: column;
  gap: 8px; 
  padding: 16px 12px;
  border-bottom: 2px solid #e5e7eb;
  padding-bottom: 24px;
  margin-bottom: 8px;
}

.sidenav .logo img {
  height: 32px;
  width: auto;
  object-fit: contain;
}

.sidenav .nav { 
  display: flex; 
  flex-direction: column; 
  gap: 8px;
  flex: 1;
}

.sidenav .nav .item { 
  display: flex; 
  gap: 12px; 
  align-items: center; 
  padding: 14px 16px; 
  border-radius: 12px; 
  cursor: pointer; 
  color: #6b7280;
  font-weight: 500;
  font-size: 15px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.sidenav .nav .item:hover {
  background: #f3f4f6;
  color: #1f2937;
  transform: translateX(4px);
}

.sidenav .nav .item.active { 
  background: linear-gradient(135deg, #e53935, #fb8c00);
  color: white;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(251, 140, 0, 0.3);
}

.sidenav .nav .item.active img {
  filter: brightness(0) invert(1) !important;
}

.sidenav .nav .item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 60%;
  background: white;
  border-radius: 0 4px 4px 0;
}

/* Navigation Action Buttons */
.nav-action-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  width: 100%;
  justify-content: flex-start;
}

.nav-action-secondary {
  background: #f3f4f6;
  color: #4b5563;
  border: 1px solid #e5e7eb;
}

.nav-action-secondary:hover {
  background: #e5e7eb;
  color: #1f2937;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.nav-action-danger {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.nav-action-danger:hover {
  background: #fee2e2;
  color: #b91c1c;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.15);
}

.nav-action-btn:active {
  transform: translateY(0);
}

/* Data Tables */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
}

.data-table thead {
  background: #f9fafb;
  border-bottom: 2px solid #e5e7eb;
}

.data-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #f3f4f6;
  font-size: 14px;
  color: #374151;
}

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

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
}

.badge-success {
  background: #d1fae5;
  color: #065f46;
}

.badge-info {
  background: #dbeafe;
  color: #1e40af;
}

.badge-warning {
  background: #fef3c7;
  color: #92400e;
}

.badge-danger {
  background: #fee2e2;
  color: #991b1b;
}

.content { 
  background: #f8f9fa;
  padding: 32px;
  overflow-y: auto;
  overflow-x: hidden;
  height: 100vh;
}

canvas {
  max-width: 100%;
  max-height: 100%;
}

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

.grid-2 { 
  display: grid; 
  grid-template-columns: 1fr 1fr; 
  gap: 20px;
}

.stat-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #e53935, #fb8c00);
  transform: scaleX(0);
  transition: transform 0.3s;
}

.stat-card:hover::before {
  transform: scaleX(1);
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(251, 140, 0, 0.15);
}

.stat-label {
  font-size: 13px;
  color: #6b7280;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.stat-value {
  font-size: 32px;
  font-weight: 800;
  color: #1f2937;
  line-height: 1;
}

.stat-icon {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 32px;
  opacity: 0.15;
}

.page-header {
  margin-bottom: 32px;
}

.page-title {
  font-size: 28px;
  font-weight: 800;
  color: #1f2937;
  margin: 0 0 8px 0;
}

.page-subtitle {
  font-size: 15px;
  color: #6b7280;
  margin: 0;
}

.action-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.btn-action {
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-action.primary {
  background: linear-gradient(135deg, #e53935, #fb8c00);
  color: white;
  box-shadow: 0 4px 12px rgba(251, 140, 0, 0.3);
}

.btn-action.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(251, 140, 0, 0.4);
}

.btn-action.secondary {
  background: white;
  color: #6b7280;
  border: 2px solid #e5e7eb;
}

.btn-action.secondary:hover {
  background: #f9fafb;
  border-color: #d1d5db;
  color: #374151;
}
.pill { padding: 4px 10px; border-radius: 999px; border: 1px solid #e7e9ee; font-size: 12px; background:#fff; }
.pill.active { background: #fff5f0; border-color: #ffd6c8; color: #a34015; }

/* USER LAYOUT like inspiration */
.layout { display:grid; grid-template-columns: 260px 1fr; gap:16px; }
.sidebar { background:#fff; border:1px solid #e7e9ee; border-radius:16px; padding:16px; display:flex; flex-direction:column; gap:16px; height: calc(100vh - 80px); position:sticky; top:16px; }
.search { display:flex; align-items:center; gap:8px; border:1px solid #e7e9ee; border-radius:12px; padding:10px 12px; background:#fff; }
.recent { display:flex; flex-direction:column; gap:8px; }
.recent-item { display:flex; align-items:center; gap:8px; padding:10px 12px; border:1px solid #e7e9ee; border-radius:12px; background:#fff; cursor:pointer; }
.rail { display:flex; flex-direction:column; gap:10px; }
.rail .item { display:flex; align-items:center; gap:8px; padding:10px 12px; border-radius:10px; color:#1f2937; }
.rail .item:hover { background:#f4f5f7; }
.main { background:#fff; border:1px solid #e7e9ee; border-radius:16px; padding:24px; height: calc(100vh - 80px); overflow:hidden; display:flex; flex-direction:column; }
.main-inner { max-width: 900px; margin: 0 auto; flex:1; display:flex; flex-direction:column; }
.hero-title { font-size: 42px; font-weight:800; letter-spacing:-0.5px; }
.hero-title span.grad { background: linear-gradient(90deg,#b062ff,#ff7bd7); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { font-size: 22px; color:#8a94a6; margin-top:6px; }
.quick { display:grid; grid-template-columns: repeat(3, 1fr); gap:14px; margin-top:20px; }
.quick .q { background: linear-gradient(180deg, #f7f0ff, #ffeefc); border:1px solid #f0dfff; padding:14px; border-radius:14px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.4); display:flex; gap:10px; align-items:flex-start; }
.q .badge { width:24px; height:24px; border-radius:8px; background: linear-gradient(180deg,#c28aff,#ffb0e8); display:flex; align-items:center; justify-content:center; font-size:12px; color:#fff; }
.q .text { display:flex; flex-direction:column; }
.q .title { font-size:13px; font-weight:700; }
.q .desc { font-size:11px; color:#8a94a6; margin-top:4px; }
.bottom-input { position:sticky; bottom:0; background:#fff; padding-top:16px; }
.input-bar-wrap { display:flex; justify-content:center; }
.input-bar { width: 640px; display:flex; gap:10px; border:1px solid #e7e9ee; border-radius:999px; padding:8px; background:#fff; box-shadow: 0 6px 18px rgba(16,24,40,.06); }
.input-bar input { border:none; flex:1; padding:10px 12px; border-radius:999px; }
.input-bar button { border-radius:999px; padding:10px 16px; }
.circle-btn { width:36px; height:36px; border-radius:999px; background:#111; color:#fff; display:flex; align-items:center; justify-content:center; border:none; }
.footer-note { text-align:center; color:#98a1b3; font-size:12px; margin-top:10px; }
.app-footer { text-align:center; margin-top: 10px; }

/* Auth layouts */
.auth-grid { display:grid; grid-template-columns: 1fr 1fr; gap:16px; }
.btn-wide { width: 100%; }
.auth-hero { background:#fff; border:1px solid #e7e9ee; border-radius:16px; padding:24px; height:100%; display:flex; gap:16px; align-items:center; }
.avatar {
  width:72px; height:72px; border-radius:16px;
  background: radial-gradient(120% 120% at 20% 20%, #ffd1bf 0%, #ffa76d 40%, #ff6b4a 100%);
  display:flex; align-items:center; justify-content:center;
  color:#fff; font-weight:800; font-size:28px;
}
.lead { font-size:16px; color:#667085; }

/* =============================================
   MOBILE & TABLET RESPONSIVE 
   ============================================= */

/* Mobile hamburger menu button */
.mobile-menu-btn {
  display: none;
  position: fixed;
  top: 76px;
  left: 16px;
  z-index: 1001;
  width: 44px;
  height: 44px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: all 0.3s;
}

.mobile-menu-btn:hover {
  background: #f9fafb;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.mobile-menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: #1f2937;
  position: relative;
  transition: all 0.3s;
}

.mobile-menu-btn span::before,
.mobile-menu-btn span::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 2px;
  background: #1f2937;
  transition: all 0.3s;
}

.mobile-menu-btn span::before {
  top: -8px;
}

.mobile-menu-btn span::after {
  top: 8px;
}

.mobile-menu-btn.open span {
  background: transparent;
}

.mobile-menu-btn.open span::before {
  top: 0;
  transform: rotate(45deg);
  background: var(--rico-orange);
}

.mobile-menu-btn.open span::after {
  top: 0;
  transform: rotate(-45deg);
  background: var(--rico-orange);
}

/* Mobile sidebar overlay */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s;
}

.sidebar-overlay.show {
  display: block;
  opacity: 1;
}

/* Tablet (max 960px) */
@media (max-width: 960px) {
  .auth-grid { grid-template-columns: 1fr; }
  .row, .row-3 { grid-template-columns: 1fr; }
  .chat { height: 65vh; }
  .layout { grid-template-columns: 1fr; }
  .quick { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  
  /* Mobile menu button visible */
  .mobile-menu-btn {
    display: flex;
  }
  
  /* Admin layout sidebar collapsible */
  .admin-layout { 
    grid-template-columns: 1fr; 
  }
  
  .sidenav {
    position: fixed;
    top: 0;
    left: -280px;
    width: 260px;
    height: 100vh;
    z-index: 1000;
    transition: left 0.3s ease;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
  }
  
  .sidenav.open {
    left: 0;
  }
  
  .content {
    padding: 20px 16px;
  }
  
  .welcome-suggestions {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile (max 768px) */
@media (max-width: 768px) {
  /* Brand header */
  .brand {
    padding: 12px 16px;
    gap: 12px;
  }
  
  .brand-logo {
    width: 40px;
    height: 40px;
  }
  
  .brand-name {
    font-size: 16px;
  }
  
  /* User badge */
  .user-badge {
    padding: 6px 10px;
    gap: 8px;
  }
  
  .user-badge .avatar {
    width: 32px;
    height: 32px;
    font-size: 12px;
  }
  
  .user-badge .name {
    font-size: 13px;
  }
  
  .user-badge .email {
    display: none;
  }
  
  /* Grid layouts */
  .grid-4 {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .grid-2 {
    grid-template-columns: 1fr;
  }
  
  /* Cards */
  .card {
    padding: 16px;
    border-radius: 12px;
  }
  
  .card h3 {
    font-size: 16px;
    margin-bottom: 12px;
  }
  
  /* Stat cards */
  .stat-card {
    padding: 16px;
  }
  
  .stat-value {
    font-size: 24px;
  }
  
  .stat-icon {
    font-size: 24px;
    top: 16px;
    right: 16px;
  }
  
  /* Page headers */
  .page-title {
    font-size: 22px;
  }
  
  .page-subtitle {
    font-size: 14px;
  }
  
  /* Buttons */
  .action-buttons {
    flex-direction: column;
  }
  
  .btn-action {
    width: 100%;
    justify-content: center;
  }
  
  /* Tables */
  .admin-table,
  .data-table {
    font-size: 13px;
  }
  
  .admin-table th,
  .admin-table td,
  .data-table th,
  .data-table td {
    padding: 8px 6px;
  }
  
  /* Hide some columns on mobile */
  .admin-table th:nth-child(3),
  .admin-table td:nth-child(3),
  .admin-table th:nth-child(4),
  .admin-table td:nth-child(4) {
    display: none;
  }
  
  /* Chat container */
  .chat-container {
    grid-template-columns: 1fr;
    height: 100vh;
    width: 100vw;
    margin: 0;
    padding: 0;
  }
  
  .chat-sidebar {
    position: fixed;
    top: 70px;
    left: 0;
    height: calc(100vh - 70px);
    width: 280px;
    z-index: 1000;
    transform: translateX(-100%);
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
  }
  
  .chat-sidebar.open {
    transform: translateX(0);
  }
  
  .chat-main {
    height: calc(100vh - 70px);
    overflow: hidden;
    width: 100%;
  }
  
  .chat-messages {
    padding: 12px !important;
    max-height: calc(100vh - 240px);
    overflow-y: auto;
    width: 100vw !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
    margin: 0 !important;
  }
  
  .chat-welcome {
    padding: 20px 16px;
    width: 100%;
  }
  
  .chat-input-container {
    position: sticky;
    bottom: 0;
    background: white;
  }
  
  .message-content {
    max-width: 90%;
    width: 100%;
  }
  
  .message-wrapper {
    gap: 10px;
    width: 100%;
    padding: 0;
    margin: 0;
  }
  
  .message-text {
    padding: 10px 12px;
    font-size: 14px;
    line-height: 1.5;
    width: 100%;
    box-sizing: border-box;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
  
  .message-avatar {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }
  
  .chat-input-container {
    padding: 12px 12px 20px;
    border-top: 1px solid #e5e7eb;
    width: 100%;
    box-sizing: border-box;
  }
  
  .chat-input-wrapper {
    padding: 10px 14px;
    border-radius: 20px;
    max-width: 100%;
    width: 100%;
    margin: 0;
    box-sizing: border-box;
  }
  
  .chat-input {
    font-size: 15px;
  }
  
  .chat-send-btn {
    width: 32px;
    height: 32px;
  }
  
  .welcome-title {
    font-size: 24px;
  }
  
  .welcome-subtitle {
    font-size: 14px;
  }
  
  .welcome-icon {
    width: 120px;
    height: 120px;
    font-size: 60px;
    margin-bottom: 20px;
  }
  
  .welcome-title {
    font-size: 24px;
    width: 100%;
    padding: 0 16px;
  }
  
  .welcome-subtitle {
    font-size: 14px;
    margin-bottom: 24px;
    width: 100%;
    padding: 0 16px;
  }
  
  .welcome-suggestions {
    flex-direction: column;
    gap: 12px;
    padding: 0 16px !important;
    max-width: 100vw !important;
    width: calc(100vw - 32px) !important;
    margin: 0 auto !important;
  }
  
  .suggestion-card {
    padding: 18px;
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  
  .suggestion-text {
    font-size: 15px;
  }
  
  /* Ensure full width on mobile */
  .chat-welcome {
    padding: 20px 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    margin: 0 !important;
  }
  
  /* Force all containers full width */
  .container,
  .frame,
  .chat-container,
  .chat-main {
    width: 100vw !important;
    max-width: 100vw !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  
  /* Chat container spacing */
  .chat-container {
    padding-top: 0;
  }
  
  .brand {
    position: sticky;
    top: 0;
    z-index: 100;
  }
  
  /* Sidebar layout */
  .sidebar {
    display: none;
  }
  
  .main {
    border-radius: 0;
    border: none;
    height: 100vh;
  }
  
  .main-inner {
    padding: 0 16px;
  }
  
  /* Hero */
  .hero-title {
    font-size: 28px;
  }
  
  .hero-sub {
    font-size: 16px;
  }
  
  /* Quick actions */
  .quick {
    grid-template-columns: 1fr;
  }
  
  /* Input bar */
  .input-bar {
    width: 100%;
  }
  
  /* Forms */
  input, button, textarea, select {
    font-size: 16px; /* Prevent zoom on iOS */
  }
  
  /* Rico speaking modal */
  .rico-speaking-modal {
    padding: 20px;
  }
  
  .rico-avatar-large {
    width: 150px;
    height: 150px;
  }
  
  .rico-speaking-text h2 {
    font-size: 28px;
  }
  
  .rico-speaking-text p {
    font-size: 16px;
  }
  
  .sound-bars {
    height: 60px;
    gap: 6px;
  }
  
  .sound-bars .bar {
    width: 8px;
  }
  
  .modal-stop-btn {
    padding: 14px 32px;
    font-size: 16px;
  }
  
  /* Speaker controls mobile */
  .speak-controls {
    flex-wrap: wrap;
  }
  
  .speak-btn,
  .stop-btn {
    padding: 5px 10px;
    font-size: 12px;
  }
  
  .speak-btn svg,
  .stop-btn svg {
    width: 14px;
    height: 14px;
  }
  
  /* Recommendation items */
  .rec-item {
    grid-template-columns: 48px 1fr;
    gap: 10px;
    padding: 12px;
  }
  
  .rec-item img {
    width: 48px;
    height: 48px;
  }
  
  .rec-item button {
    grid-column: 2;
    margin-top: 8px;
  }
}

/* Small mobile (max 480px) */
@media (max-width: 480px) {
  .brand {
    padding: 10px 12px;
  }
  
  .brand-logo {
    width: 36px;
    height: 36px;
  }
  
  .user-badge .name {
    display: none;
  }
  
  .card {
    padding: 12px;
  }
  
  .page-title {
    font-size: 20px;
  }
  
  .stat-value {
    font-size: 20px;
  }
  
  .hero-title {
    font-size: 24px;
  }
  
  .hero-sub {
    font-size: 14px;
  }
  
  .welcome-icon {
    width: 100px;
    height: 100px;
    font-size: 50px;
  }
  
  .welcome-title {
    font-size: 20px;
  }
  
  .rico-avatar-large {
    width: 120px;
    height: 120px;
  }
  
  .rico-speaking-text h2 {
    font-size: 24px;
  }
  
  .content {
    padding: 16px 12px;
  }
}



/* ChatGPT-style Chat UI */
.chat-container {
  display: grid;
  grid-template-columns: 260px 1fr;
  height: 100vh;
  gap: 0;
  overflow: hidden;
  width: 100%;
  margin: 0;
  padding: 0;
}

.chat-sidebar {
  background: #f7f7f8;
  border-right: 1px solid #e5e7eb;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.3s ease;
}

.btn-new-chat {
  width: 100%;
  padding: 12px 16px;
  background: white;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s;
}

.btn-new-chat:hover {
  background: #f9fafb;
  border-color: var(--rico-orange);
}

.chat-history {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  transition: all 0.2s;
  font-size: 14px;
  position: relative;
}

.history-content {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  cursor: pointer;
  min-width: 0;
}

.history-item:hover {
  background: white;
}

.history-item.active {
  background: white;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.history-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.history-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.delete-chat-btn {
  display: none;
  padding: 6px;
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  color: #6b7280;
  transition: all 0.2s;
  flex-shrink: 0;
}

.delete-chat-btn:hover {
  background: #fee2e2;
  color: #dc2626;
}

.history-item:hover .delete-chat-btn {
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-main {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: white;
  width: 100%;
  margin: 0;
  padding: 0;
}

.chat-welcome {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
}

.welcome-icon {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e53935, #fb8c00);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  animation: iconBounce 2s ease-in-out infinite;
  box-shadow: 0 15px 40px rgba(251, 140, 0, 0.4);
  position: relative;
  overflow: hidden;
  border: 4px solid white;
  font-size: 80px;
  flex-shrink: 0;
}

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

.welcome-icon::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  transform: rotate(45deg);
  animation: shine 3s ease-in-out infinite;
}

@keyframes iconBounce {
  0%, 100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-10px) scale(1.05);
  }
}

@keyframes shine {
  0% {
    transform: translateX(-100%) rotate(45deg);
  }
  100% {
    transform: translateX(100%) rotate(45deg);
  }
}

.welcome-title {
  font-size: 32px;
  font-weight: 700;
  margin: 0 0 12px 0;
  background: var(--accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: fadeIn 0.8s ease-out 0.2s both;
  width: 100%;
  text-align: center;
}

.welcome-subtitle {
  font-size: 16px;
  color: var(--muted);
  margin: 0 0 40px 0;
  max-width: 100%;
  width: 100%;
  line-height: 1.6;
  animation: fadeIn 0.8s ease-out 0.4s both;
  text-align: center;
  padding: 0 20px;
  box-sizing: border-box;
}

.welcome-suggestions {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 100%;
  width: 100%;
  animation: fadeIn 0.8s ease-out 0.6s both;
  padding: 0 20px;
  box-sizing: border-box;
  align-items: stretch;
}

.suggestion-card {
  padding: 20px;
  border: 2px solid #e5e7eb;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: white;
  text-align: left;
  position: relative;
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
}

.suggestion-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(229, 57, 53, 0.05), rgba(251, 140, 0, 0.05));
  opacity: 0;
  transition: opacity 0.3s;
}

.suggestion-card:hover {
  border-color: var(--rico-orange);
  box-shadow: 0 8px 24px rgba(251, 140, 0, 0.2);
  transform: translateY(-4px) scale(1.02);
}

.suggestion-card:hover::before {
  opacity: 1;
}

.suggestion-card:active {
  transform: translateY(-2px) scale(1.01);
}

.suggestion-icon {
  font-size: 32px;
  margin-bottom: 12px;
  display: inline-block;
  transition: transform 0.3s;
}

.suggestion-card:hover .suggestion-icon {
  transform: scale(1.2) rotate(5deg);
  animation: iconWiggle 0.5s ease-in-out;
}

@keyframes iconWiggle {
  0%, 100% { transform: scale(1.2) rotate(0deg); }
  25% { transform: scale(1.2) rotate(-5deg); }
  75% { transform: scale(1.2) rotate(5deg); }
}

.suggestion-text {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  position: relative;
  z-index: 1;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  scroll-behavior: smooth;
  max-height: calc(100vh - 200px);
  width: 100%;
  box-sizing: border-box;
}

.message-wrapper {
  display: flex;
  gap: 16px;
  animation: slideIn 0.4s ease-out;
  width: 100%;
  max-width: 100%;
}

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

.message-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e53935, #fb8c00);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(251, 140, 0, 0.3);
  transition: transform 0.3s;
}

.message-wrapper.assistant .message-avatar {
  animation: avatarPulse 2s ease-in-out infinite;
}

@keyframes avatarPulse {
  0%, 100% {
    box-shadow: 0 2px 8px rgba(251, 140, 0, 0.3);
  }
  50% {
    box-shadow: 0 4px 16px rgba(251, 140, 0, 0.5);
  }
}

.message-wrapper.user .message-avatar {
  background: linear-gradient(135deg, #667eea, #764ba2);
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.message-content {
  flex: 1;
  max-width: 85%;
  position: relative;
  width: 100%;
}

.message-text {
  padding: 14px 18px;
  border-radius: 16px;
  line-height: 1.7;
  font-size: 15px;
  white-space: pre-wrap;
  word-wrap: break-word;
  width: 100%;
  box-sizing: border-box;
}

.message-text strong {
  font-weight: 700;
  color: var(--rico-orange);
}

/* 🔊 Speaker Controls Container */
.speak-controls {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 🔊 Speaker Button */
.speak-btn {
  padding: 6px 12px;
  background: linear-gradient(135deg, var(--rico-red), var(--rico-orange));
  color: white;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(229, 57, 53, 0.2);
}

.speak-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(229, 57, 53, 0.3);
}

.speak-btn:active {
  transform: translateY(0);
}

.speak-btn svg {
  width: 16px;
  height: 16px;
}

/* ⏹️ Stop Button */
.stop-btn {
  padding: 6px 12px;
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  color: white;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.2);
  animation: pulse-stop 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.stop-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
}

.stop-btn:active {
  transform: translateY(0);
}

.stop-btn svg {
  width: 16px;
  height: 16px;
}

@keyframes pulse-stop {
  0%, 100% {
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.2);
  }
  50% {
    box-shadow: 0 2px 16px rgba(220, 38, 38, 0.4);
  }
}

/* ⏳ Loading Spinner */
.loading-spinner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(229, 57, 53, 0.1);
  border-radius: 20px;
  font-size: 13px;
  color: var(--rico-red);
  font-weight: 500;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(229, 57, 53, 0.2);
  border-top-color: var(--rico-red);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* 🎬 FULLSCREEN MODAL - RICO SPEAKING */
.rico-speaking-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: modalFadeIn 0.4s ease-out;
}

.rico-modal-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(229, 57, 53, 0.95), rgba(251, 140, 0, 0.95));
  backdrop-filter: blur(10px);
  animation: bgPulse 3s ease-in-out infinite;
}

.rico-modal-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

.rico-avatar-large {
  position: relative;
  width: 200px;
  height: 200px;
  animation: avatarFloat 3s ease-in-out infinite;
}

.rico-avatar-large img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  position: relative;
  z-index: 3;
  border: 5px solid white;
}

.avatar-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120%;
  height: 120%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.8), transparent 70%);
  border-radius: 50%;
  animation: glowPulse 2s ease-in-out infinite;
  z-index: 1;
}

.avatar-pulse-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  border: 3px solid rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  animation: ringExpand 2s ease-out infinite;
  z-index: 2;
}

.rico-speaking-text {
  text-align: center;
  color: white;
}

.rico-speaking-text h2 {
  font-size: 36px;
  font-weight: 700;
  margin: 0 0 8px 0;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  animation: textPulse 2s ease-in-out infinite;
}

.rico-speaking-text p {
  font-size: 18px;
  margin: 0;
  opacity: 0.9;
}

.sound-bars {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 80px;
}

.sound-bars .bar {
  width: 12px;
  background: white;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  animation: barDance 1s ease-in-out infinite;
}

.sound-bars .bar:nth-child(1) {
  animation-delay: 0s;
}

.sound-bars .bar:nth-child(2) {
  animation-delay: 0.1s;
}

.sound-bars .bar:nth-child(3) {
  animation-delay: 0.2s;
}

.sound-bars .bar:nth-child(4) {
  animation-delay: 0.3s;
}

.sound-bars .bar:nth-child(5) {
  animation-delay: 0.4s;
}

.modal-stop-btn {
  padding: 16px 40px;
  background: white;
  color: var(--rico-red);
  border: none;
  border-radius: 50px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  animation: btnPulse 2s ease-in-out infinite;
}

.modal-stop-btn:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.modal-stop-btn svg {
  width: 24px;
  height: 24px;
}

/* ANIMATIONS */
@keyframes modalFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes bgPulse {
  0%, 100% {
    opacity: 0.95;
  }
  50% {
    opacity: 1;
  }
}

@keyframes avatarFloat {
  0%, 100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-20px) scale(1.05);
  }
}

@keyframes glowPulse {
  0%, 100% {
    opacity: 0.5;
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    opacity: 0.8;
    transform: translate(-50%, -50%) scale(1.1);
  }
}

@keyframes ringExpand {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.6;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.5);
    opacity: 0;
  }
}

@keyframes textPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

@keyframes barDance {
  0%, 100% {
    height: 20px;
  }
  50% {
    height: 80px;
  }
}

@keyframes btnPulse {
  0%, 100% {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  }
  50% {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  }
}

/* 🎤 Rico Speaking Animation (removed - using modal now) */
.rico-speaking-animation {
  display: none;
}

.rico-speaking-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.3);
  animation: bounce-speaking 1s ease-in-out infinite;
  position: relative;
}

.rico-speaking-icon::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--rico-red), var(--rico-orange));
  opacity: 0.3;
  animation: pulse-overlay 1.5s ease-in-out infinite;
}

.rico-speaking-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: relative;
  z-index: 1;
}

.sound-waves {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 30px;
}

.sound-waves .wave {
  width: 4px;
  background: linear-gradient(135deg, var(--rico-red), var(--rico-orange));
  border-radius: 2px;
  animation: sound-wave 1.2s ease-in-out infinite;
}

.sound-waves .wave:nth-child(1) {
  animation-delay: 0s;
}

.sound-waves .wave:nth-child(2) {
  animation-delay: 0.2s;
}

.sound-waves .wave:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes bounce-speaking {
  0%, 100% {
    transform: scale(1) translateY(0);
  }
  50% {
    transform: scale(1.1) translateY(-3px);
  }
}

@keyframes pulse-overlay {
  0%, 100% {
    opacity: 0.2;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.1);
  }
}

@keyframes sound-wave {
  0%, 100% {
    height: 10px;
  }
  50% {
    height: 30px;
  }
}

@keyframes pulse-border {
  0%, 100% {
    border-color: rgba(229, 57, 53, 0.2);
    box-shadow: 0 2px 8px rgba(229, 57, 53, 0.1);
  }
  50% {
    border-color: rgba(229, 57, 53, 0.5);
    box-shadow: 0 4px 16px rgba(229, 57, 53, 0.3);
  }
}

/* 🎤 Speaking Animation */
.rico-speaking-avatar.speaking {
  animation: pulse-ring 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  position: relative;
}

.rico-speaking-avatar.speaking::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--rico-red), var(--rico-orange));
  opacity: 0.4;
  transform: translate(-50%, -50%);
  animation: pulse-wave 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse-ring {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(229, 57, 53, 0.7);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 0 8px rgba(229, 57, 53, 0);
  }
}

@keyframes pulse-wave {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.4;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.2);
    opacity: 0.2;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.4);
    opacity: 0;
  }
}

.message-text br + br {
  display: block;
  content: "";
  margin: 8px 0;
}

.message-wrapper.user .message-text {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}

.message-wrapper.assistant .message-text {
  background: white;
  border: 1px solid #e5e7eb;
}

.chat-input-container {
  padding: 20px;
  border-top: 1px solid #e5e7eb;
  background: white;
  width: 100%;
  box-sizing: border-box;
  position: relative;
}

.chat-input-wrapper {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 24px;
  background: white;
  transition: all 0.2s;
  max-width: calc(100% - 40px);
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}

.chat-input-wrapper:focus-within {
  border-color: var(--rico-orange);
  box-shadow: 0 0 0 3px rgba(251, 140, 0, 0.1);
}

.chat-input {
  flex: 1;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  font-size: 15px;
  padding: 4px 0;
  background: transparent;
}

.chat-input:focus {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}

.chat-send-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #e53935, #fb8c00);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(251, 140, 0, 0.2);
}

.chat-send-btn:hover {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 6px 20px rgba(251, 140, 0, 0.4);
}

.chat-send-btn:active {
  transform: scale(0.95);
  box-shadow: 0 2px 8px rgba(251, 140, 0, 0.3);
}

.chat-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.chat-disclaimer {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  margin-top: 12px;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInScale {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Responsive - Moved to consolidated section above */

/* Modern Login Page */
.login-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
  background: white;
}

.login-left {
  padding: 60px 80px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 40px;
  min-height: 100vh;
}

.login-logo {
  height: 40px;
}

.login-logo img {
  height: 100%;
  width: auto;
}

.login-form {
  max-width: 420px;
  width: 100%;
  flex: 1;
}

.login-title {
  font-size: 36px;
  font-weight: 700;
  margin: 0 0 8px 0;
  color: #111315;
}

.login-subtitle {
  font-size: 16px;
  color: var(--muted);
  margin: 0 0 32px 0;
}

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

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #111315;
}

.form-input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #e7e9ee;
  border-radius: 12px;
  font-size: 15px;
  transition: all 0.2s;
  background: white;
}

.form-input:focus {
  outline: none;
  border-color: var(--rico-orange);
  box-shadow: 0 0 0 3px rgba(251, 140, 0, 0.1);
}

.btn-login {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, #e53935, #fb8c00);
  border: none;
  border-radius: 12px;
  color: white;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  margin-top: 8px;
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(251, 140, 0, 0.3);
}

.btn-login:active {
  transform: translateY(0);
}

.login-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 14px;
  color: var(--muted);
}

.link-primary {
  color: var(--rico-orange);
  text-decoration: none;
  font-weight: 600;
}

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

.login-admin-link {
  margin-top: auto;
  padding-top: 30px;
  text-align: center;
  border-top: 1px solid #e5e7eb;
}

.link-muted {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.2s;
}

.link-muted:hover {
  color: var(--text);
  text-decoration: underline;
}

.login-right {
  background: linear-gradient(135deg, #e53935, #fb8c00);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
  position: relative;
  overflow: hidden;
}

.login-right::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 10px,
    rgba(255, 255, 255, 0.05) 10px,
    rgba(255, 255, 255, 0.05) 20px
  );
  animation: bgMove 20s linear infinite;
  pointer-events: none;
}

@keyframes bgMove {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(50px, 50px);
  }
}

.floating-shapes {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
}

.shape {
  position: absolute;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  animation: floatShape 15s ease-in-out infinite;
}

.shape:nth-child(1) {
  width: 80px;
  height: 80px;
  top: 10%;
  left: 10%;
  animation-delay: 0s;
  animation-duration: 12s;
}

.shape:nth-child(2) {
  width: 120px;
  height: 120px;
  top: 60%;
  left: 80%;
  animation-delay: 2s;
  animation-duration: 18s;
}

.shape:nth-child(3) {
  width: 60px;
  height: 60px;
  top: 80%;
  left: 20%;
  animation-delay: 4s;
  animation-duration: 15s;
}

.shape:nth-child(4) {
  width: 100px;
  height: 100px;
  top: 30%;
  left: 70%;
  animation-delay: 1s;
  animation-duration: 20s;
}

.shape:nth-child(5) {
  width: 70px;
  height: 70px;
  top: 50%;
  left: 5%;
  animation-delay: 3s;
  animation-duration: 14s;
}

@keyframes floatShape {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
    opacity: 0.3;
  }
  25% {
    transform: translate(30px, -30px) rotate(90deg);
    opacity: 0.5;
  }
  50% {
    transform: translate(-20px, 20px) rotate(180deg);
    opacity: 0.3;
  }
  75% {
    transform: translate(20px, 30px) rotate(270deg);
    opacity: 0.5;
  }
}

.login-right::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  animation: pulse 15s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.1); opacity: 0.8; }
}

.login-hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: white;
  max-width: 500px;
}

.hero-title {
  font-size: 40px;
  font-weight: 700;
  margin: 0 0 16px 0;
  text-shadow: 0 2px 10px rgba(0,0,0,0.1);
  animation: fadeInUp 1s ease-out 0.3s both;
}

.hero-subtitle {
  font-size: 18px;
  margin: 0 0 48px 0;
  opacity: 0.95;
  animation: fadeInUp 1s ease-out 0.5s both;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-features {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 48px;
}

.hero-features .feature-item:nth-child(1) {
  animation: fadeInUp 1s ease-out 0.7s both;
}

.hero-features .feature-item:nth-child(2) {
  animation: fadeInUp 1s ease-out 0.9s both;
}

.hero-features .feature-item:nth-child(3) {
  animation: fadeInUp 1s ease-out 1.1s both;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(255,255,255,0.15);
  padding: 16px 20px;
  border-radius: 12px;
  backdrop-filter: blur(10px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
}

.feature-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s;
}

.feature-item:hover {
  background: rgba(255,255,255,0.25);
  transform: translateX(10px) scale(1.05);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.feature-item:hover::before {
  left: 100%;
}

.feature-item:hover .feature-icon {
  transform: scale(1.3) rotate(10deg);
}

.feature-icon {
  font-size: 32px;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-text {
  font-size: 16px;
  font-weight: 500;
  text-align: left;
}

.hero-illustration {
  margin-bottom: 32px;
  display: flex;
  justify-content: center;
  animation: fadeInDown 1s ease-out 0s both;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-avatar-top {
  width: 200px;
  height: 200px;
  object-fit: contain;
  animation: avatarFloat 3s ease-in-out infinite, avatarGlow 3s ease-in-out infinite, avatarRotate 8s ease-in-out infinite;
  filter: drop-shadow(0 20px 40px rgba(0,0,0,0.4));
  transition: all 0.3s ease-out;
}

.hero-avatar-top:hover {
  transform: translateY(-10px) scale(1.1);
  filter: drop-shadow(0 30px 60px rgba(0,0,0,0.6));
}

@keyframes avatarFloat {
  0%, 100% { 
    transform: translateY(0) scale(1);
  }
  50% { 
    transform: translateY(-15px) scale(1.05);
  }
}

@keyframes avatarGlow {
  0%, 100% { 
    filter: drop-shadow(0 10px 30px rgba(251, 140, 0, 0.3));
  }
  50% { 
    filter: drop-shadow(0 15px 40px rgba(251, 140, 0, 0.6));
  }
}

@keyframes avatarRotate {
  0%, 100% { 
    transform: translateY(0) rotate(0deg);
  }
  25% { 
    transform: translateY(-5px) rotate(-3deg);
  }
  50% { 
    transform: translateY(-10px) rotate(0deg);
  }
  75% { 
    transform: translateY(-5px) rotate(3deg);
  }
}

/* Responsive - Login page */
@media (max-width: 1024px) {
  .login-container {
    grid-template-columns: 1fr;
  }
  
  .login-right {
    display: none;
  }
  
  .login-left {
    padding: 40px 24px;
    justify-content: flex-start;
  }
  
  .login-form {
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  .login-left {
    padding: 24px 16px;
    gap: 24px;
  }
  
  .login-logo {
    height: 32px;
  }
  
  .login-title {
    font-size: 28px;
  }
  
  .login-subtitle {
    font-size: 14px;
    margin-bottom: 24px;
  }
  
  .form-input {
    padding: 12px 14px;
    font-size: 16px; /* Prevent iOS zoom */
  }
  
  .btn-login {
    padding: 14px;
    font-size: 15px;
  }
}

@media (max-width: 480px) {
  .login-left {
    padding: 20px 12px;
  }
  
  .login-title {
    font-size: 24px;
  }
}
