/* ========== Base Styling ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', sans-serif;
  margin: 0;
  padding: 0;
  background-color: #fffefe;
  color: #333;
  transition: background-color 0.3s, color 0.3s;
}

/* Header container */
.app-header {
  /* width: 100vw; */
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #1d3350;
  padding: 12px 24px;
  color: white;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  /* min-height: 72px; */
}

/* Logo + Title group */
.logo-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo {
  width: auto;
  height: 36px;
  margin-right: 10px;
  /* object-fit: contain; */
  /* background: #eee; */
  /* display: inline-block; */
}

/* Title text */
.logo-title h1 {
  font-size: 24px;
  margin: 0;
  font-weight: 600;
}

.header-buttons {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Buttons */
button,
.danger-button {
  background-color: #0984e3;
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s;
  font-weight: bold;
}

button:hover {
  background-color: #0069d9;
}

.danger-button {
  background-color: #f4433600;
}

.danger-button:hover {
  background-color: #d32f2f00;
}

.user-label {
  margin-right: 10px;
  font-weight: bold;
  color: #ffffff;
  white-space: nowrap;
}

.action-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.action-buttons button {
  white-space: nowrap;
  padding: 6px 12px;
  font-size: 13px;
}

/*td {
  vertical-align: middle;
} */

.main-content {
  padding: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.main-content h1 {
  margin-bottom: 15px;
}

.main-content {
  padding: 20px;
  margin-top: 20px;
  /* 👈 Adds space below header */
}

.actions,
.header-actions {
  margin-bottom: 8px;
  display: flex;
  gap: 10px;
}

.title-actions-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.title-actions-row .actions {
  display: flex;
  gap: 10px;
}


input,
select {
  padding: 8px;
  margin: 5px 0 15px;
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #ccc;
  border-radius: 4px;
}

form {
  margin-bottom: 30px;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  font-size: 14px;
}

th,
td {
  border: 1px solid #ccc;
  padding: 8px;
  text-align: left;
  word-break: break-word;
}

th {
  background: #f4f4f4;
}

/* ========== Dark Mode ========== */
body.dark-mode {
  background-color: #121212;
  color: #e0e0e0;
}

body.dark-mode .app-header {
  background-color: #121f30;
}

body.dark-mode table {
  background-color: #1e1e1e;
  color: #e0e0e0;
}

body.dark-mode th {
  background-color: #333;
}

body.dark-mode td {
  background-color: #222;
}

body.dark-mode input,
body.dark-mode select {
  background-color: #222;
  color: #e0e0e0;
  border-color: #555;
}

body.dark-mode button,
body.dark-mode .danger-button {
  background-color: #f4433600;
}

body.dark-mode button:hover,
body.dark-mode .danger-button:hover {
  background-color: #f4433600;
}

body.dark-mode tr {
  background: #1e1e1e;
}

#assetDetails table th {
  width: 200px;
  /* or try 150px or any value that looks good */
  white-space: nowrap;
}

/* Light mode zebra striping */
#assetsTable tbody tr:nth-child(odd) {
  background-color: #f9f9f9;
}

#assetsTable tbody tr:nth-child(even) {
  background-color: #ffffff;
}

/* Dark mode zebra striping */
body.dark-mode #assetsTable tbody tr:nth-child(odd) {
  background-color: #2c2c2c;
}

body.dark-mode #assetsTable tbody tr:nth-child(even) {
  background-color: #1e1e1e;
}

/* Optional: better contrast in dark mode */
body.dark-mode #assetsTable th,
body.dark-mode #assetsTable td {
  color: #eee;
}


/* ========== Responsive ========== */
@media (max-width: 600px) {
  .app-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .header-buttons {
    align-self: flex-end;
  }

  .logo-title {
    margin-bottom: 10px;
  }

  table,
  thead,
  tbody,
  th,
  td,
  tr {
    display: block;
  }

  thead {
    display: none;
  }

  tr {
    margin-bottom: 15px;
    border: 1px solid #ccc;
    padding: 10px;
    background: #fff;
  }

  td {
    border: none;
    padding: 5px 0;
    display: flex;
    justify-content: space-between;
  }

  td::before {
    content: attr(data-label);
    font-weight: bold;
  }

  body.dark-mode tr {
    background: #1e1e1e;
  }
}

@media (min-width: 1600px) {
  .main-content {
    padding: 0 100px;
  }
}

/* Login page */
.container {
  max-width: 400px;
  margin: 50px auto;
  padding: 30px 20px;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

body.dark-mode .container {
  background-color: #1f1f1f;
  box-shadow: 0 2px 10px rgba(255, 255, 255, 0.05);
}

#loginForm h2 {
  margin-top: 0;
  margin-bottom: 20px;
  text-align: center;
}

#loginForm input {
  width: 100%;
  padding: 10px;
  margin-bottom: 15px;
  border-radius: 4px;
  border: 1px solid #ccc;
}

#loginForm button {
  width: 100%;
  padding: 10px;
  font-weight: bold;
  border-radius: 4px;
  background-color: #0984e3;
  color: white;
  border: none;
  cursor: pointer;
}

#loginForm button:hover {
  background-color: #0069d9;
}

/* ========== Zebra Striping (All Tables) ========== */
table tbody tr:nth-child(odd) {
  background-color: #f9f9f9;
}

table tbody tr:nth-child(even) {
  background-color: #ffffff;
}

body.dark-mode table tbody tr:nth-child(odd) {
  background-color: #2c2c2c;
}

body.dark-mode table tbody tr:nth-child(even) {
  background-color: #1e1e1e;
}

body.dark-mode table th,
body.dark-mode table td {
  color: #e0e0e0;
}

/* Ensure striping applies to view.html table too */
#assetDetails table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

#assetDetails table th,
#assetDetails table td {
  border: 1px solid #ccc;
  padding: 8px;
  text-align: left;
}

/* If not already defined */
body.dark-mode #assetDetails table td {
  background-color: #1e1e1e;
}

body.dark-mode #assetDetails table th {
  background-color: #333;
}

/* Ensure main content stretches full width */
.main-content {
  max-width: 100%;
  width: 100%;
  padding: 0 30px;
  box-sizing: border-box;
}

/* Force table container to stretch full screen */
/*.table-container {
  width: 100%;
  overflow-x: auto;
  margin-top: 20px;
} */

.table-container {
  max-height: 75vh;
  /* Adjust height as needed */
  overflow-y: auto;
}

.table-container thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background-color: #f0f0f0;
  /* light mode header background */
}

/* Optional: dark mode support */
body.dark-mode .table-container thead th {
  background-color: #222;
  color: #fff;
}

/* Ensure asset tables stretch and are readable */
#assetsTable,
#fullAssetsTable {
  width: 100%;
  table-layout: auto;
  min-width: 1200px;
  /* Adjust based on your column count */
  font-size: 13px;
  border-collapse: collapse;
}

/* Table cell formatting */
#assetsTable th,
#assetsTable td,
#fullAssetsTable th,
#fullAssetsTable td {

  padding: 10px;
  text-align: left;
  border: 1px solid #ccc;
  vertical-align: top;
  min-width: 90px;
}

#assetsTable th:last-child,
#assetsTable td:last-child {
  min-width: 210px;
}

#assetsTable td {
  vertical-align: middle;
}

/* Header background */
/*#assetsTable th,
#fullAssetsTable th {
  background-color: #f0f0f0;
}*/

button[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Table headers default style */
table thead th {
  background-color: #f0f0f0;
  color: #000;
}

/* Table headers in dark mode */
body.dark-mode table thead th {
  background-color: #333;
  color: #fff;
}

/* Zebra rows for readability */
table tbody tr:nth-child(even) {
  background-color: #f9f9f9;
}

body.dark-mode table tbody tr:nth-child(even) {
  background-color: #2a2a2a;
}

/* ✅ Final fix: dark mode header override */
body.dark-mode #assetsTable thead th,
body.dark-mode #fullAssetsTable thead th {
  background-color: #333 !important;
  color: #fff !important;
}

.action-buttons a {
  text-decoration: none;
  display: inline-block;
  padding: 6px 12px;
  background-color: #0984e3;
  color: white;
  border-radius: 6px;
  font-weight: bold;
  transition: background-color 0.2s;
}

.action-buttons a:hover {
  background-color: #0069d9;
}

body.dark-mode .action-buttons a {
  background-color: #f44336;
}

body.dark-mode .action-buttons a:hover {
  background-color: #d32f2f;
}

.actions a.action-button {
  text-decoration: none;
  display: inline-block;
  background-color: #0984e3;
  color: white;
  padding: 8px 14px;
  border-radius: 6px;
  font-weight: bold;
  transition: background-color 0.2s;
}

.actions a.action-button:hover {
  background-color: #0069d9;
}

body.dark-mode .actions a.action-button {
  background-color: #f44336;
}

body.dark-mode .actions a.action-button:hover {
  background-color: #d32f2f;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
  padding-top: 10px;
  border-top: 1px solid #ccc;
}

.header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
  /* Reduce spacing below header */
  /*margin-top: 20px; */
}

.actions-right {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

#searchInput {
  padding: 6px;
  width: 220px;
}

#exportBtn {
  padding: 6px 12px;
  font-size: 14px;
  background-color: #0288d1;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

#exportBtn:hover {
  background-color: #0277bd;
}

.action-button {
  padding: 6px 16px;
  font-size: 14px;
  background-color: #0288d1;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.action-button:hover {
  background-color: #0277bd;
}

#fullAssetsTable tbody tr:nth-child(even) td {
  background-color: #f9f9f9;
  /* light gray for even rows */
}

body.dark-mode #fullAssetsTable tbody tr:nth-child(even) td {
  background-color: #1a1a1a;
  /* darker gray for dark mode */
}

.back-button {
  background: #eee;
  color: #222;
  border: none;
  border-radius: 6px;
  padding: 8px 18px;
  font-size: 1em;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.2s;
}

.back-button:hover {
  background: #ccc;
}

body.dark-mode .back-button {
  background: #222;
  color: #fff;
}

body.dark-mode .back-button:hover {
  background: #444;
}

.user-menu {
  position: relative;
}

#userDropdown a:hover {
  background: #f0f0f0;
}

#userDropdown {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.user-dropdown {
  position: relative;
  display: inline-block;
  cursor: pointer;
}

.user-dropdown #user-name {
  cursor: pointer;
  user-select: none;
}

/*
.user-dropdown #user-name::after {
  content: " ▼";
  font-size: 0.8em;
} */

.user-icon {
  margin-right: 6px;
  font-size: 1.1em;
  vertical-align: middle;
}

.user-dropdown .dropdown-content {
  display: none;
  position: absolute;
  right: 0;
  background-color: #fff;
  min-width: 160px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  z-index: 1;
  border-radius: 4px;
  overflow: hidden;
}

.user-dropdown .dropdown-content a {
  color: #333;
  padding: 10px 16px;
  text-decoration: none;
  display: block;
  transition: background 0.2s;
}

.user-dropdown .dropdown-content a:hover {
  background-color: #f1f1f1;
}

.user-dropdown:hover .dropdown-content,
.user-dropdown:focus-within .dropdown-content,
.user-dropdown .dropdown-content.show {
  display: block;
  z-index: 1000;
}

/* Floating View History Button */
.view-history-fab {
  position: fixed;
  right: 32px;
  bottom: 32px;
  z-index: 100;
  background: #1976d2;
  color: #fff;
  border: none;
  border-radius: 24px;
  padding: 14px 28px;
  font-size: 1.1em;
  font-weight: bold;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
}

.view-history-fab:hover {
  background: #1565c0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
}

body.dark-mode .view-history-fab {
  background: #333;
  color: #fff;
}

body.dark-mode .view-history-fab:hover {
  background: #222;
}

.table-actions-row {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

/* Action icon buttons for asset table */
.action-buttons a,
.action-buttons button {
  display: inline-block;
  padding: 6px 12px;
  background-color: #0984e3;
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.2s;
}

.action-buttons a:hover,
.action-buttons button:hover {
  background-color: #0069d9;
}

.action-buttons .delete-button {
  background-color: #c00;
}

.action-buttons .delete-button:hover {
  background-color: #a00;
}

/* AI Chat File Upload */
.file-label {
  font-size: 1.5em;
  cursor: pointer;
  margin-right: 8px;
  padding: 4px;
}

.file-label:hover {
  background-color: #eee;
  border-radius: 4px;
}

.input-group {
  display: flex;
  align-items: center;
}

/* AI Button in Header */
.ai-button {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: bold;
  margin-right: 12px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s, box-shadow 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ai-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  text-decoration: none;
  color: white;
}

/* AI Page Styling */
.ai-container {
  max-width: 900px;
  margin: 30px auto;
  padding: 24px;
  background-color: #f8f9fa;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.ai-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 2px solid #e9ecef;
  padding-bottom: 16px;
}

.ai-header h1 {
  font-size: 1.8rem;
  color: #2c3e50;
  margin: 0;
}

.back-button {
  text-decoration: none;
  color: #6c757d;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  transition: background-color 0.2s, color 0.2s;
  border: 1px solid #dee2e6;
}

.back-button:hover {
  background-color: #e9ecef;
  color: #495057;
  text-decoration: none;
}

.ai-intro {
  color: #6c757d;
  margin-bottom: 20px;
  line-height: 1.5;
}

.chat-box {
  border: 1px solid #dee2e6;
  padding: 20px;
  height: 500px;
  overflow-y: auto;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
  margin-bottom: 20px;
}

.user-msg .msg {
  background: #007bff;
  color: white;
  border-bottom-right-radius: 2px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.ai-msg .msg {
  background: #f1f3f5;
  color: #212529;
  border-bottom-left-radius: 2px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

#chatForm {
  background: #fff;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid #dee2e6;
}

#message {
  flex: 1;
  padding: 12px;
  border: 1px solid #ced4da;
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color 0.2s;
}

#message:focus {
  outline: none;
  border-color: #80bdff;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, .25);
}

#chatForm button {
  padding: 12px 24px;
  font-size: 1rem;
  background-color: #28a745;
  /* Green for send */
}

#chatForm button:hover {
  background-color: #218838;
}

.file-label {
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0 8px;
  transition: transform 0.2s;
}

.file-label:hover {
  transform: scale(1.1);
}

#fileNameDisplay {
  font-size: 0.85em;
  color: #f0f3f5;
  margin-top: 8px;
  margin-left: 42px;
  font-style: italic;
}

/* Dark mode adjustments for AI page */
body.dark-mode .ai-container {
  background-color: #2d3436;
  color: #dfe6e9;
}

body.dark-mode .ai-header {
  border-bottom-color: #636e72;
}

body.dark-mode .ai-header h1 {
  color: #dfe6e9;
}

body.dark-mode .back-button {
  color: #b2bec3;
  border-color: #636e72;
}

body.dark-mode .back-button:hover {
  background-color: #636e72;
  color: #fff;
}

body.dark-mode .chat-box {
  background-color: #2d3436;
  border-color: #636e72;
}

/* Chat Messages */
.user-msg {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.user-msg .msg {
  background: #1d3350;
  color: white;
  padding: 10px 15px;
  border-radius: 18px 18px 0 18px;
  max-width: 70%;
  word-wrap: break-word;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.ai-msg {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 12px;
}

.ai-msg .msg {
  background: #f1f3f5;
  color: #2d3436;
  padding: 10px 15px;
  border-radius: 18px 18px 18px 0;
  max-width: 70%;
  word-wrap: break-word;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.msg {
  padding: 12px 16px;
  line-height: 1.5;
}

/* AI Button in Index Page */
.ai-button-index {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  color: white !important;
  border: none !important;
}

.ai-button-index:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* =========================================
   AI Page Redesign (Qubi Theme)
   ========================================= */

/* Layout Container */
.ai-layout {
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  background-color: #f8f9fa;
}

/* Sidebar */
.ai-sidebar {
  width: 260px;
  background-color: #1d3350;
  /* App Header Blue */
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 20px;
  flex-shrink: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 30px;
}

.sidebar-logo {
  width: auto;
  height: 32px;
}

.sidebar-header h2 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0;
  color: #fff;
}

.new-chat-btn {
  background-color: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  margin-bottom: 24px;
  transition: background 0.2s;
}

.new-chat-btn:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}

.nav-item:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: #fff;
  text-decoration: none;
}

.nav-section h3 {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  margin: 20px 0 10px 12px;
  font-weight: 600;
}

.sub-item {
  font-size: 0.9rem;
  padding-left: 12px;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Main Content Area */
.ai-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  background-color: #fff;
}

/* Hero Section */
.ai-hero {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 40px 140px 40px;
  text-align: center;
}

.hero-content {
  max-width: 800px;
  width: 100%;
}

.hero-icon {
  font-size: 3rem;
  margin-bottom: 20px;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-10px);
  }

  100% {
    transform: translateY(0px);
  }
}

.hero-content h1 {
  font-size: 2.5rem;
  color: #1d3350;
  margin-bottom: 12px;
}

.hero-content p {
  font-size: 1.1rem;
  color: #6c757d;
  margin-bottom: 40px;
}

/* Suggestion Cards */
.suggestion-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
}

.card {
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  padding: 20px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  text-align: left;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
  border-color: #1d3350;
}

.card-icon {
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #1d3350;
  margin-bottom: 6px;
}

.card p {
  font-size: 0.85rem;
  color: #6c757d;
  margin: 0;
  line-height: 1.4;
}

/* Chat Container (replaces old chat-box styles for this layout) */
.chat-container {
  flex: 1;
  overflow-y: auto;
  padding: 20px 20px 150px 20px;
  /* Bottom padding for floating input */
  display: flex;
  flex-direction: column;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}

/* Floating Input Area */
.input-area-wrapper {
  position: absolute;
  bottom: 30px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  padding: 0 20px;
  pointer-events: none;
  /* Let clicks pass through wrapper */
}

.floating-input-form {
  position: relative;
  background: #fff;
  width: 100%;
  max-width: 800px;
  border-radius: 25px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: center;
  padding: 6px 8px 6px 16px;
  border: 2px solid #e9ecef;
  pointer-events: auto;
  transition: all 0.3s ease;
}

.floating-input-form:focus-within {
  box-shadow: 0 12px 40px rgba(29, 51, 80, 0.15);
  border-color: #1d3350;
  transform: translateY(-2px);
}

.attach-btn {
  font-size: 1.3rem;
  cursor: pointer;
  padding: 8px 10px;
  color: #6c757d;
  transition: all 0.2s;
  border-radius: 8px;
}

.attach-btn:hover {
  color: #1d3350;
  background-color: #f8f9fa;
}

#message {
  flex: 1;
  border: none;
  outline: none;
  padding: 12px 16px;
  font-size: 1rem;
  background: transparent;
  color: #2d3436;
}

#message::placeholder {
  color: #adb5bd;
}

.send-btn {
  background: linear-gradient(135deg, #1d3350 0%, #2d4a6d 100%);
  color: #fff;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.2rem;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(29, 51, 80, 0.3);
}

.send-btn:hover {
  background: linear-gradient(135deg, #2d4a6d 0%, #1d3350 100%);
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(29, 51, 80, 0.4);
}

.file-name-floating {
  position: absolute;
  top: -25px;
  left: 20px;
  background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
  color: #00e5ff;
  padding: 4px 30px 4px 10px;
  border-radius: 12px;
  font-size: 0.8rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  display: none;
}

.file-name-floating:not(:empty) {
  display: block;
}

.file-name-floating::after {
  content: '✕';
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  font-weight: bold;
  font-size: 0.9rem;
  padding: 2px 4px;
  border-radius: 3px;
  transition: background-color 0.2s;
  color: #ff4444;
}

.file-name-floating:hover::after {
  background-color: rgba(255, 255, 255, 0.2);
}

/* Responsive */
@media (max-width: 768px) {
  .ai-layout {
    flex-direction: column;
  }

  .ai-sidebar {
    width: 100%;
    height: auto;
    flex-direction: row;
    align-items: center;
    padding: 10px;
  }

  .sidebar-nav,
  .sidebar-footer,
  .new-chat-btn {
    display: none;
    /* Simplified mobile view */
  }

  .sidebar-header {
    margin-bottom: 0;
  }

  .ai-main {
    height: calc(100vh - 60px);
  }

  .input-area-wrapper {
    bottom: 10px;
  }
}